Lishui Controller Modification - Firmware Flash Project

Sparksandbangs

Pedelecer
Jan 16, 2025
143
41
I’ve had the urge to tinker with firmware for ages and have decided to take the plunge.

As I want to use the bike while I'm experimenting this necessitates purchasing another controller for testing purposes. Options are another KT sinewave controller and flash with OSEC firmware or a Lishui controller which arguably has better hardware than the KT and flashing with eBics. The settings will then be modified to mimic the standard KT controller but hopefully in a better package.

After reading through the procedures for both controllers the KT appears easier to set up than the Lishui. The Lishui also has the added problem (for me) that the forum discussing it is a German language forum. Google translate can only get you so far and it makes it difficult to search for specific terms in a monster length thread if you don't speak the language.

In the pioneering spirit I have of course gone for the more difficult option on the hope it will give me a better outcome.

There is a Wiki in English

First thing order a controller. This is one of them recommended in the Wiki for the project.

First issue. On opening it up it has been potted with some grey goo. Not quite the consistency of silicone sealant and not quite decorators calk but somewhere in between. After removing both end caps and the 3 screws holding the MOSFET rail a bit of light pressure on it reveals it to be stuck in the case. A bit of exploratory digging reveals the aluminium rail running through the controller with all the MOSFETs attached to it. With the case held in the vice and a small length of wood thinner than the case placed on the rail followed by couple of short, sharp taps with a lump hammer the circuit board pops out. Aluminium bar is pictured below on a photo borrowed from another forum. I have added a red circle to show the point to whack.

63730

Now needs a bit of digging to clean it up to reveal the board.

Next problem. There is no throttle connection. I hadn't noticed when I ordered it. A quick look at the chip drawing shows that a wire should be soldered from 'SP' on the board. A lead from the ground and another from the +5v rail adds the throttle function.
 

Sparksandbangs

Pedelecer
Jan 16, 2025
143
41
And the next problem I can identify the programming port but terminals are not identified. An internet search suggests the configuration below:
63731

Testing with a multimeter confirms the +3.8v and ground. Soldered leads as below:

63732

Next problem. PAS is x 5 wire connection.

This is because the controller is designed to be used with a bottom bracket torque sensor. I just want to use a normal magnetic PAS. The voltage output is 15v, I doubt that will work well with my sensor so use the 5v and ground from the throttle. There are two pas wires. One is an inverse PAS signal. My guess is this is the one to use with a left hand sensor, the other two signal wires are for the PAS normal sensor and the torque sensor that I won’t be using.

With the first steps completed it is now time to connect to the bike and test what happens with stock firmware.

First test using stock firmware. Wheel off the ground using walk assist from the display - working.

Throttle - nothing. Maybe it isn't activated in the stock firmware. A quick check with a multimeter shows that voltages are as expected.

PAS - nothing. I could have this wired up incorrectly. I could try swapping it to the other PAS input wire.


Think I may just flash a basic version of eBics from the java tool and try the test again.
 

Sparksandbangs

Pedelecer
Jan 16, 2025
143
41
Followed the instructions from the Wiki. Connected ST-Link V2. Opened the Java tool. Set up the battery levels, switched off torque sensing. Set the speed limit and set to debug. Clicked on the enable autodetect in debug mode.

63733

Unlocked controller then flashed. Error 30 is now showing on the controller

Unplugged ST-Link V2. Switched off, wheel off the floor, switched back on again and autodetect cycle runs to completion. Bit of knocking and banging noises coming from the hub.

Plugged ST-Link V2 back in and reflashed. Now out of debug mode and back to using the EN06 display.

Powered up and throttle and PAS now work. The throttle must have been disabled in stock firmware.

First success.
 

Advertisers