Lishui Controller Modification - Firmware Flash Project

Sparksandbangs

Pedelecer
Jan 16, 2025
222
79
Quick update. I'm working on improving the characteristics around the legal cut off point to stop any surging. Only changing a bit at a time so slow going. Trying really hard not to do my usual and change about ten things at once so I have no idea what has caused it to stop working.

As the firmware was designed around a torque sensor I think the torque simulation probably has room for a bit of improvement. The assist kicks in far too early so next job is to work out how to put in some sort of start delay. Probably will be some sort of PAS pulse counter.
 

saneagle

Esteemed Pedelecer
Oct 10, 2010
9,065
4,050
Telford
Quick update. I'm working on improving the characteristics around the legal cut off point to stop any surging. Only changing a bit at a time so slow going. Trying really hard not to do my usual and change about ten things at once so I have no idea what has caused it to stop working.

As the firmware was designed around a torque sensor I think the torque simulation probably has room for a bit of improvement. The assist kicks in far too early so next job is to work out how to put in some sort of start delay. Probably will be some sort of PAS pulse counter.
I was thinking that a devious person might do a Volkswagon on it, and make it so that it behaves one way (15mph) when tested and another way in normal use, like they did with their emissions testing? Something like the speed being limited for the first 10 seconds of demanding power on any level, then the limit disappears. That way, they wouldn't get the annoying cutting in and out.
 

Sparksandbangs

Pedelecer
Jan 16, 2025
222
79
Adjusted the characteristics around cut off point and now seems to behaving.

Added C14 setting from the display.
Setting selects one of three user defined assist profiles rather than just upping or lowering it 20%. Means I can quickly select tortoise mode without re-flashing if I go out cycling with the wife.
Reactivated the 36V settings. After I've run the 48V battery down I'll swap over to test.

Think I'm pretty much there but of course I realise this will be a never ending tweakathon. Mainly because as soon as i think I've finished I think of something else to do.

I do have a EN06 and S830 display. I might try getting it working with those or not depending how I feel.
 

Sparksandbangs

Pedelecer
Jan 16, 2025
222
79
So as a recap my setup is:
AKM128
Lishui 12FET 25A New Generation Controller
PAS sensor V12L
KT LCD3
Throttle

Firmware link:

User settings:
 
  • Like
Reactions: Woosh

Tony1951

Pedelecer
Jul 29, 2025
54
24
So as a recap my setup is:
AKM128
Lishui 12FET 25A New Generation Controller
PAS sensor V12L
KT LCD3
Throttle

Firmware link:

User settings:
You deserve much Kudos for doing all this and documenting it so well.

The code referenced on github looks almost understandable - even to me.... Though not sure exactly how it would be flashed onto the controller. I've dabbled a tiny bit with Arduinos, and arduino based radios and always had my buttocks clenched when re-flashing them through usb connections. I once mucked about with changing parameters with a direct board connection on a GPS with some sort of weird dongle thing converting from serial, but this isn't a process I understand well at all.
 
Last edited:

Sparksandbangs

Pedelecer
Jan 16, 2025
222
79
You deserve much Kudos for doing all this and documenting it so well.

The code referenced on github looks almost understandable - even to me.... Though not sure exactly how it would be flashed onto the controller. I've dabbled a tiny bit with Arduinos, and arduino based radios and always had my buttocks clenched when re-flashing them through usb connections. I once mucked about with changing parameters with a direct board connection on a GPS with some sort of weird dongle thing converting from serial, but this isn't a process I understand well at all.
I've commented everything that I've amended or i thought might be unclear. I did an object orientated programing course many moons ago and was threatened with being failed if i didn't start adding comments.

The flashing process is in the Wiki

I'm using the ST Link V2.
 
  • Like
Reactions: Tony1951

Sparksandbangs

Pedelecer
Jan 16, 2025
222
79
LCD3 Settings with Lishui controller running S&B-EBiCs.

Assist Levels – 1 to 5. Work as normal
Walk Assist – Works as normal. Press and hold down button

General Settings
Speed Limit – Display overrides controller settings.
Wheel Size – Disabled. No effect. Wheel size should be set in mm in config.h
Metric and Imperial Units – Functions as Normal.

P Parameter Setting
P1 Motor Characteristic – Modifies display speed when taking speed readings from hall sensors. Does not override controller setting in config.h.
P2 Wheel Speed Pulse Signal – Overrides controller value in config.h
P3 - Disabled. No effect.
P4 - Disabled. No effect.
P5 - Disabled. No effect.

C Parameter Setting
C1 - Disabled. No effect.
C2 - Disabled. No effect.
C3 Power Assist Ratio Gear Initialization - Functions as Normal.
C4 - Disabled. No effect.
C5 - Disabled. No effect.
C6 Backlight Brightness Adjustment - Functions as Normal.
C7 - Disabled. No effect.
C8 - Disabled. No effect.
C9 - Startup Password Setting - Functions as Normal.
C10 - Restore Factory Default - Functions as Normal.
C11 - Meter Attribute Selection - Functions as Normal.
C12 - Disabled. No effect.
C13 - Disabled. No effect.
C14 - Power-assist tuning parameters – 1 selects Assist Profile (L), 2 selects Assist Profile, 3 selects Assist Profile (H). All stored in config.h
C15 - Disabled. No effect.
 

Advertisers