KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

Electric Motors and Controllers
mmilch   1 µW

1 µW
Posts: 4
Joined: May 18 2020 2:49pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by mmilch » Jul 10 2020 6:08pm

Hi. I'm the guy which tried to flash KZQW22A-MIFA/PR with mentioned soft.

So...MIFA is protecting their ST chips with a ROP byte, beside there is no simple rule that mentioned hacked soft will work with every kind of KZQW22A model. They differ in communication protocol (with panel) and used kind of sensors depend of e-bike manufacturer and e-bike model. Soft posted by AlexDaniel of corse is OK by only for GZR e-bikes because for those was originally designed. In my opinion (based on eperience) - it has no sense trying to flash KZQW22A controllers made by MIFA with mentioned soft.

In their case it is far way better to choose other universal, sensorless and unlocked controller with similar small size.

Here is example of controller which can be used in a place of original MIFA KZQW22A (small, even stronger-350W, cheap, unlocked, with S866 LCD panel, has lot of settings, can work both as sensor and sensorless, can use speed throttle, lamp etc):
https://a.aliexpress.com/_B1ySQA
https://www.youtube.com/watch?v=vAj4BvREvUs

Surely this model can fit into MIFA original casing (like batter case) without any case modification.
Last edited by mmilch on Jul 10 2020 6:37pm, edited 1 time in total.

mmilch   1 µW

1 µW
Posts: 4
Joined: May 18 2020 2:49pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by mmilch » Jul 10 2020 6:31pm

But.....if someone want to try anyway (on it's own risk!), I give a scheme of pins which shall be connected to the same pins of STLINK V2 programmer and a way how to clear a ROP byte (please note that clearing ROP byte initiates global memory erase and irretrievable loss of original soft !):

echo "00" | xxd -r -p >ROP_CLEAR.bin
stm8flash -c stlinkv2 -p stm8s105?4 -s opt -w ROP_CLEAR.bin


There are also some "cheats" to bypass ST chip ROP protection and acquire original soft, but it require
the knowledge, oscilloscope and it's not always succesful:
https://itooktheredpill.irgendwo.org/20 ... rotection/
Attachments
KZQW22A flash pins.jpg
KZQW22A flash pins.jpg (232 KiB) Viewed 614 times

Slipy   1 mW

1 mW
Posts: 12
Joined: Mar 19 2020 6:22pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Slipy » Jul 19 2020 6:31am

stancecoke wrote:
Jul 10 2020 7:56am
AlexDaniel wrote:
Jul 09 2020 4:39pm
In fact, that user tried to flash one of the firmware dumps I provided, but it ended up not being able to communicate with the display, essentially bricking the controller.
A german dealer offers the re-programming of this kind of controllers, so it could be possible to bring the controller back to life...
https://www.groetech.de/index.php?main_ ... cts_id=937

Image

regards
stancecoke

Hi, how i need to configure firmware when i change acs712 30a on acs758 50a
Thanks

User avatar
stancecoke   100 kW

100 kW
Posts: 1224
Joined: Aug 02 2017 2:56pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by stancecoke » Jul 21 2020 4:26am

Slipy wrote:
Jul 19 2020 6:31am
how i need to configure firmware when i change acs712 30a on acs758 50a
You have to change nothing. With the phase current sensor we only detect the zero-crossing for the advance angle correction. So the absolute value of the signal is irrelevant. The signal has to be 2,5V at 0 amps.

regards
stancecoke

qwerkus   1 kW

1 kW
Posts: 497
Joined: Jul 22 2017 4:00am

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by qwerkus » Jul 25 2020 2:07pm

After 2 unsuccessful attempts, I finally managed to get a 9c RH212 motor running on a 12FET KTs controller with the open source firmware. Unfortunately, it's still super buggy, and I could use some help configuring it correctly. Setup is pas+throttle and kt lcd3 display.
What works:
- compiling / flashing the OS firmware
- motor / controller powers on
- hall / phase in the correct order
- pas starts the motor
- throttle starts the motor
- some sort of regen, although its behaviour is super strange
What does not work:
- max power seems to be limited to 500W although I pur 35A as upper limit (on 52V). This motor can take 2000W, and I need all of it to haul the trailer.
- PAS levels 1-4 are useless, only 5 seems to work, and still no very strong.
- throttle configuration: can't find the correct values for my standart thumb throttle. either it's always on, or it gets so sensitive I can't really push through it
- light function on the kt lcd3 display. (hold arrow up for 1-3s). Worked fine on stock firmware - now it seems to be broken
- temperature display on the lcd3. I soldered a temp sensor to x4 but can't figure out where/how to enable it.

Attached, my current config. Any help / suggestions would be greatly appreciated.
config.jpg
config.jpg (507.82 KiB) Viewed 334 times
EDIT: batt current max is 400, not 40. Seems to be a jre/screenshot glitch

KonKey125   1 µW

1 µW
Posts: 1
Joined: Jul 21 2020 4:00pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by KonKey125 » Jul 26 2020 10:34pm

Hi everyone,

I'm looking to flash the custom firmware on my KT controller which came with my electric scooter (Glion Dolly). However, I have a non-standard controller which is impossible to find anywhere else. From the several pages I've read on the forum, I'm guessing that I'll be able to flash the firmware into the controller using the solder contacts marked "SOF".

There are a few things I want to know:

First, does it have a phase current sensor?

Second, this controller is sensorless controller. Would it be possible to wire in hall sensors, either by hooking it up to the sensor emulator board or by removing the board and soldering the wires where it was? Also, would I have to add any small resistors/capacitors to the hall sensor to get it to work?

Third, could I wire a display connector up to the controller?

Thanks!

Image
Image
Image
Image

mmilch   1 µW

1 µW
Posts: 4
Joined: May 18 2020 2:49pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by mmilch » Jul 27 2020 3:41am

RE: "However, I have a non-standard controller which is impossible to find anywhere else"

It has standard 48pin STM8S105C6 controller. If it's not ROP protected you can try to dump it's memory content by STLINK V2 programmer. The pinout scheme you can find in attachment
Attachments
pinout.jpg
pinout.jpg (88.38 KiB) Viewed 294 times
stm8s105c6.pdf
(1.93 MiB) Downloaded 15 times
Last edited by mmilch on Jul 29 2020 6:55pm, edited 2 times in total.

mmilch   1 µW

1 µW
Posts: 4
Joined: May 18 2020 2:49pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by mmilch » Jul 27 2020 4:10am

RE: Third, could I wire a display connector up to the controller?

Pins 46 and 47 are TX and RX used for communication with the display, so yes - if the controller has programmed display operation.

You can try to study activity on those pins by USB/RS232 cable or oscilloscope. If display operation is set then you shall get some activity.

Post Reply