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

Hello

Does anyone know if the firmware Will also work for this style of controller?

http://www.topbikekit.com/10s13s14s-9mosfets-sine-wave-controller-for-polly-dc6c-case-65pcs-cells-p-772.html

It is a kt but IT doesn't look like the others :roll:
 
Added 14 to the code, it works great now!! Thanks a lot!
Not sure how accurate the wattage is compared to kunteng software, but it seems to run rather efficiently compared to the stock firmware, so that's fantastic.

Where the controller disappoints is the voltage regulator for the mosfets (Lm317t) and its 3w resistor, I can't phantom how they could've designed this. The resistor seriously burned my finger after burning through multiple layers of a plastic bag 8)
Apparently that whole mess is replaceable by a switching regulator (like a V7815W). Has anyone here done this?

Some questions about the software:
- The top speed (both GPS and lcd3) is limited to ±42km/h no matter what settings I use. Both the top speed on lcd3 and the controller itself are set to 75km/h
- At standstill, the motor makes a low pitch rumble sound, and the power consumption, as displayed by the lcd3 seems very high (jumps between 100 and 230w). I read that this can be fixed by enabling "PWM off at coast", but apparently that's kinda risky. The current draw goes away when pressing the brake.
 
Hello, I found this project really fascinating...

I'm good at software programming, but at the beginning with ebikes.
I have a Fat 20" ebike with a stupid controller, where the PAS speeds are not working.
All the PAS speeds are fixed at Speed limit. The bike is powerful but not very usable. It has only 1 speed.
I do not recommend at all these JYTJD controllers.

As the bike supplier do not answer anymore, I have to change controller, and maybe display.
But I like to keep all the rest, 1T4 cabling included. The current controller is this:

61l8fYKANOL._AC_SX569_.jpg

My motor is Bafang G060.750.DC and display is DPC18

Please may you suggest me the right KT controller to buy ?
Do you just have a .ini file for by motor ?
Please note I have 1T4 cabling for everything, but head and rear light are apart.
See here the complete kit:

-700c-pollice-250w-biciclette-brushless-gear-motor-mozzo-posterioreC.jpg

Hope I can keep the DPC18, and somebody can help me to fix this bike, at the end I'm a fraud victim !
Thank you very much
 
AndZab said:
Hope I can keep the DPC18, and somebody can help me to fix this bike?

I would try fixing the issues with your current controller instead of buying into a new system. There are loads of threads about you bafang system, and from experience, I can tell you it's pretty neat!

If you really want to throw another 80$ into your low power setup, you could buy any kunteng controller. Just check aliexpress for anything with the same amp rating (22A) or more! You can always limit the output. That display won't work, kunteng lcd3/5/6 will.
 
Corrida victim said:
AndZab said:
Hope I can keep the DPC18, and somebody can help me to fix this bike?

I would try fixing the issues with your current controller instead of buying into a new system. There are loads of threads about you bafang system, and from experience, I can tell you it's pretty neat!

If you really want to throw another 80$ into your low power setup, you could buy any kunteng controller. Just check aliexpress for anything with the same amp rating (22A) or more! You can always limit the output. That display won't work, kunteng lcd3/5/6 will.

Hello, current controller is from a little know brand, so I have no way to fix it.
If I buy a KT and new LCD8S display, maybe I'll fix the situation with a few money.
But this time I want it fully programmable, this is why I ask compatibility with this open software.

I seen this, for my 1T4 cabling, but I don't know if it's SVP type:

HTB10jaHaOLxK1Rjy0Ffq6zYdVXa5.jpg

Any help ? Thanks
 
AndZab said:
But this time I want it fully programmable, this is why I ask compatibility with this open software.

This firmware runs on all kunteng controllers. I think they all feature the same microprocessor (STM8S105C6T6?)
I don't think lcd8 is supported, but if you're not new to programming you could probably add support ;)
 
I have a kt controller(https://a.aliexpress.com/_dUn7d5Y) and am wondering if I should use this firmware or the tsdz one because this one is no longer maintained and they use the same micro processors as stated in the wikis.
 
Corrida victim said:
AndZab said:
But this time I want it fully programmable, this is why I ask compatibility with this open software.

This firmware runs on all kunteng controllers. I think they all feature the same microprocessor (STM8S105C6T6?)
I don't think lcd8 is supported, but if you're not new to programming you could probably add support ;)

LCD8 has same parameters like LCD3. Maybe is compatible. I will buy both, because I like graphics.
LCD3 really looks old fashion nowadays.

But it would be fun to add Bafang protocol support, for DPC18, that is a wonderful display.
If you can point me to the Bafang serial protocol specs, I can think about it.
With controllers I'm really at the beginnings, but no problem to arrange a new serial protocol.
Thanks a lot, regards
 
bj97301 said:
I have a kt controller(https://a.aliexpress.com/_dUn7d5Y) and am wondering if I should use this firmware or the tsdz one because this one is no longer maintained and they use the same micro processors as stated in the wikis.

Hello, you have a beautiful controller.
Just in case, do you know the meaning of the product code ?

KT72SVPR.jpg

I understand it's 72 volt sinewave (SVPR), but then what is the meaning of final CKD-JLS03 ?
That is puzzling to me... :confused:
 
Thank you. I actually have the 60v version. Not sure about the model numbers. Attached are pics of mine. What firmware do you use?

Also, I should mention that this controller arrived in a non working condition. I am hoping to get it working with the os firmware. The pcb looks good so I am hoping it’s a firmware issue.
 

Attachments

  • DA9534B2-BDAC-405E-87B3-3CC0BF367AF4.jpeg
    DA9534B2-BDAC-405E-87B3-3CC0BF367AF4.jpeg
    129.3 KB · Views: 1,341
  • 46ABFA47-DAEE-49CF-8B55-A914BB00CBB2.jpeg
    46ABFA47-DAEE-49CF-8B55-A914BB00CBB2.jpeg
    125.1 KB · Views: 1,342
  • FC6B4CDF-872B-4C2E-B2AE-CD27A4350F83.jpeg
    FC6B4CDF-872B-4C2E-B2AE-CD27A4350F83.jpeg
    165.6 KB · Views: 1,342
  • A862C7BB-F282-4611-8EC4-55831ACA55FD.jpeg
    A862C7BB-F282-4611-8EC4-55831ACA55FD.jpeg
    126.1 KB · Views: 1,342
  • AB2D82A9-488E-49A0-9F2C-24F68F113C84.jpeg
    AB2D82A9-488E-49A0-9F2C-24F68F113C84.jpeg
    164.1 KB · Views: 1,342
  • D0A89620-E790-4994-B58D-B270EE0C3B4C.jpeg
    D0A89620-E790-4994-B58D-B270EE0C3B4C.jpeg
    150.2 KB · Views: 1,341
  • BC9AB105-569C-45C8-8C8E-2C4FE707295D.jpeg
    BC9AB105-569C-45C8-8C8E-2C4FE707295D.jpeg
    113 KB · Views: 1,342
I see you have sinewave 60 volt, not 72 volt.
But the code is similar, ends with 1 and not 3
I can't figure out what is the meaning of the last part.

KT60SVPRCKD-JLS01.jpg

I'm sorry, but I can't help you, at this time, I'm just ordering my first 2 controllers, one 1T4 cabling, and one 1T5
When I'm done with the order, I'll begin to take a look at the open software.
It seems it's a beautiful project...
Regards
 
AndZab said:
If you can point me to the Bafang serial protocol specs, I can think about it.

For my Lishui-Project, I took the code from the "Forumscontroller", see the display_bafang.cpp and the display_bafang.h

The Bafangs work with 1200 BAUD, you have to change this in the UART init function.

bj97301 said:
wondering if I should use this firmware or the tsdz one because this one is no longer maintained
This project is alive, only casainhos fork is inactive. See my signature!

regards
stancecoke
 
stancecoke said:
AndZab said:
If you can point me to the Bafang serial protocol specs, I can think about it.

For my Lishui-Project, I took the code from the "Forumscontroller", see the display_bafang.cpp and the display_bafang.h

The Bafangs work with 1200 BAUD, you have to change this in the UART init function.

bj97301 said:
wondering if I should use this firmware or the tsdz one because this one is no longer maintained
This project is alive, only casainhos fork is inactive. See my signature!

regards
stancecoke

Very good. Thank you. I’ll see if I can update some docs to better indicate this on your repo.
 
opened a pr to make it more obvious that the stancecoke fork is the maintained repo.
 
I'll just try again

Does anyone know if the open source firware will work on this style of KT controller?

https://www.ebay.co.uk/itm/Big-Hailong-battery-case-controller-36V-48V-22A-9mosfers-KT-sine-wave-controller-/173619589407

It's the one for putting inside the battery case
 
Pretty sure my controller is broke but does the controller need to be plugged in to the battery and turned on to flash it?
 
I am having a lot of trouble with this firmware. I have the S12SNN 72V controller and a leaf hub motor. The motor ran fine with the controller stock. But now with the new firmware, nothing happens when I hit the throttle. Does anyone have any ideas? Thanks.
 

Attachments

  • controller pic cropped.png
    controller pic cropped.png
    35.4 KB · Views: 2,582
Hi,
J have a problem with blueosec.
After connecting hc 05 to the controller , the application does not display anything. I tried swap rx with tx and it did nothing. Do you know what it might be?
 
Hi all and thanks to everyone involved in this project.

I flashed my old bmsbattery s12s with the fw and I'm using it with a bbs02 at 36v. I'm also using an hc-05 with the bluosec app. After a bit of initial fiddling, everything seems to be working quite well.

Now that I'm fine tuning, I'd like to be more confident in the settings I'm using and 'calA' raises some doubts for me.
wiki said:
Battery Current cal a: Factor a in the calibration function.
ADC value = calA * battery current + calB.
calB is measured automatically at starup.
Required for internal calculation of the current from the 10bit ADC value.
For a 6FET and 12FET controller the value has to be something around 100, for the 18FET about 50.
According to the wiki I should have calA at 'something around 100'... A little ambiguous.

So I tried to use the calibration function to work it out.
ADC value = calA * battery current + calB.
∴ calA * battery current = ADC value - calB
∴ calA = (ADC value - calB) / battery current

I'm assuming that the max ADC correlates to the max battery current and the battery current is in amps.
calB is measured on my setup as 315. So for a conservative 15A we get:
calA = (1023 - 315) / 15 = 47

47 is quite a long way from 100. Does this sound right?

Now I use calA to calculate the 'Battery Current max' value.
Battery Current max = ampere * calA / 10
Battery Current max = 15 * 47 / 10 = 71

I'll try these settings and see what happens but how much confidence should I have in them?
 
Marctwo said:
Hi all and thanks to everyone involved in this project.

I flashed my old bmsbattery s12s with the fw and I'm using it with a bbs02 at 36v. I'm also using an hc-05 with the bluosec app. After a bit of initial fiddling, everything seems to be working quite well.

Interested to see you had success using the firmware with the BBS02, this is something I've thought about trying myself. I've got a BBS02 equipped bike sitting around not getting much use just now.

I'm presuming you're using an external Kunteng S12S controller hooked up to the BBS02 hall and motor phase connections? Was it just a case of getting the phases correct to match the Kunteng? I suspect it can't be quite that simple though... :wink:
 
stancecoke said:
Marctwo said:
ADC value = calA * battery current + calB.
Edit: the wiki was right !
Hmm... ok, thanks.

I must have the wrong idea about this formula as the figures I worked out were pants and gave me very low power. So is there anyway I can actually work out the correct value for calA? Or should I just settle for what seems to work ok?

geofft said:
I'm presuming you're using an external Kunteng S12S controller hooked up to the BBS02 hall and motor phase connections?
Yes.
geofft said:
Was it just a case of getting the phases correct to match the Kunteng?
Yeah, it's just another motor. I'm currently using a motor angle of 246 but that may change over the coming days as I fine tune it.

Hall sensors:
Where the bafang controller had:
Red, Black, Grey, White, Blue
The s12s has:
Red, Black, Yellow, Blue, Green
 
geofft said:
Was it just a case of getting the phases correct to match the Kunteng?
Yeah, it's just another motor. I'm currently using a motor angle of 246 but that may change over the coming days as I fine tune it.

Hall sensors:
Where the bafang controller had:
Red, Black, Grey, White, Blue
The s12s has:
Red, Black, Yellow, Blue, Green

Thanks, that's all useful info, will probably give this a try sometime.

Also means that if some way can be found to add a torque sensor to the BBS02 it will be easy to configure the f/w to suit...
 
Back
Top