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

Electric Motors and Controllers
casainho   1.21 GW

1.21 GW
Posts: 3919
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Sep 15 2018 8:05am

Xnyle wrote:
Sep 15 2018 7:56am
It would be easy to create another non technical dashboard screen.

But then its main purpose is to know and change what's going on inside that black or silver box.

For me it will replace the original display, there are cheap smartphones for under 50€/$ out there so i will just mount one of them and have more flexibility and insight than any commercially available display could ever provide.

For almost the same price that is.

Just have to find one that looks really crappy, so it doesn't get stolen :wink:
Can you please give the link to github where the code is?
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
Xnyle   10 W

10 W
Posts: 74
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » Sep 15 2018 11:21am

I will not put it on Github as long as it's considered beta.

If you tell me your Gitlab handle I'll invite you though (and everyone else who asks).

casainho   1.21 GW

1.21 GW
Posts: 3919
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Sep 15 2018 11:39am

As ebike market grows, more users and developers are joining!! Now a developer did the firmware for XH18LCD (currently only for working with TSDZ2 original, but should be simple to add support for other firmwares. This LCD also uses the same STM8 microcontroller as KT motor controllers, TSDZ2 motor controller and KT LCDs).

I wish firmware for KT could be developed further to support this LCDs.
hurzhurz wrote:
Sep 15 2018 10:58am
I have now started a collection for information that are needed to develop custom firmware for the XH18LCD:
https://github.com/hurzhurz/xh18lcd

And I have also created a example firmware that supports most features of the original firmware.
https://github.com/hurzhurz/xh18lcd/tre ... evelopment
Image
Though, it is made with an Arduino port for STM8. Probably not very efficient and not the best code style.
Probably better to make a one version from scratch than to enhance this one.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

cencen   1 µW

1 µW
Posts: 3
Joined: Jul 27 2018 11:25am

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

Post by cencen » Sep 15 2018 1:15pm

Hi everyone,
I’m a new user/participant of this open-source ebike project. Thanks to all the instructions of Casainho and Stancecoke after working out for about a few hours I could luckly manage to compile and adjust de parameters to my needs in the java parameter configurator. My ebike configuration is as follows:
- 28” with AKM 100SX (q100 equivalent) front wheel motor
- KT24/36SVP Controller
- PAS sensor with 5 magnets
- 10 Cell 8A Lipo Battery (2X 5cell HK battery in series)
- KT-LCD3 Display
- Using ‘only PAS’ with the Torque-Simulation mode
- Max. speed with full battery is around 30Km/h

I could get a smooth run only with ‘high’ PAS timeout '15000' and Ramp end '5000' values. Any other suggestions over these values are appreciated.
Osec_values.jpg
Osec_values.jpg (83.4 KiB) Viewed 2412 times
I also made my own Bluetooth module as described and tested it with success. I guess BT software communication with the controller needs to be improved. For the moment I prefer LCD3 for the convenience of use.

I have a small issue with the battery indicator on LCD3. It seems that my cutoff voltage setting is not correct, it shuts down the controller at about 35V. How can I improve the accuracy of reading on LCD3.

My programming skills are limited but I’ll be happy to test and report any new improvement.

Best Regards,
Cencen

cencen   1 µW

1 µW
Posts: 3
Joined: Jul 27 2018 11:25am

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

Post by cencen » Sep 15 2018 1:28pm

stancecoke wrote:
Sep 15 2018 4:10am

Xnyle was very hardworking during the last weeks, we are very proud to present the beta release of the Android app now! We are looking for betatesters, if interested please contact Xnyle via PM or just here in the thread!

In the video you can see the Java tool for basic settings and flashing the firmware. The greyed parameters can be set with the app afterwards also. Next you can see the app and the push assistance function with the throttle up to 6 km/h and finally the motor working in torque simulation mody by turning the "pedals" :wink:
Offroad mode can be activated by the brake lever as known or by a "magic" touch to the smarthphone screen 8)

regards
stancecoke


BluOSEC.png

Hi stancecoke,
I would very much like to test the beta version of new android app. Thanks and regards.
Cencen

geofft   1 kW

1 kW
Posts: 351
Joined: Nov 09 2012 9:41am
Location: Berkshire UK

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

Post by geofft » Sep 15 2018 1:49pm

Xnyle was very hardworking during the last weeks, we are very proud to present the beta release of the Android app now! We are looking for betatesters, if interested please contact Xnyle via PM or just here in the thread!
More good work from Xnyle.... 8)

Unfortunately I'm having to catch up on some diy/home improvements, etc, at the moment :( so haven't got too much time available. Hopefully that will soon change and I can help with some testing on this.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

User avatar
stancecoke   100 kW

100 kW
Posts: 1117
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 » Sep 15 2018 2:16pm

cencen wrote:
Sep 15 2018 1:28pm
I would very much like to test the beta version of new android app.
welcome to the project! Xnyle has added the apk-file to the github repo today. Just copy it to your smartphone and install it.

regards
stancecoke

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 16 2018 1:30am

stancecoke wrote:
Sep 15 2018 2:16pm
cencen wrote:
Sep 15 2018 1:28pm
I would very much like to test the beta version of new android app.
welcome to the project! Xnyle has added the apk-file to the github repo today. Just copy it to your smartphone and install it.

regards
stancecoke
You forget to add the name of the file " BluOsec-release.apk"

This is great news for me, there will be an opportunity to observe the behavior of the controller.
One more note for the configurator, if you do not plan to start from the throttle later, then probably this option should be removed from the menu to exclude the torment of people with an attempt to ride a bicycle from their place without help of the pedals :)
Since my hopes to make a good electric car with this firmware firmware probably never come true :(
Attachments
plata-adapter_dlya_hc-05-06.jpg
41XkMMUcatL.jpg
41XkMMUcatL.jpg (30.43 KiB) Viewed 2375 times

User avatar
stancecoke   100 kW

100 kW
Posts: 1117
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 » Sep 16 2018 5:25am

be aware, your photo shows only the breakout board, not the BT-Module itself.
The tutorial, how to connect the module can be found in chapter 6 There is the link to an ebay-offer for the HC-05 also.

regards
stancecoke

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 16 2018 6:52am

stancecoke wrote:
Sep 16 2018 5:25am
be aware, your photo shows only the breakout board, not the BT-Module itself.
The tutorial, how to connect the module can be found in chapter 6 There is the link to an ebay-offer for the HC-05 also.

regards
stancecoke
I already bought it today :)
Attachments
IMG_20180916_144803.png
IMG_20180916_144803.png (418.94 KiB) Viewed 2358 times

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 16 2018 1:40pm

Hello guys, I see some very interesting stuff going on here, would like to try but I am using different controllers right now :roll:

I am trying to convince (or bribe) my brother to write a code for arduino nano, to send speed, battery bars, watts and motor temp ( for now) to LCD3, so it can work with any controller.

I guess its well documented here somewhere how to do it, maybe we can also reuse some code..

can you please point me to something what can help us?

Thanks a lot.

casainho   1.21 GW

1.21 GW
Posts: 3919
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Sep 16 2018 3:30pm

honya96 wrote:
Sep 16 2018 1:40pm
I am trying to convince (or bribe) my brother to write a code for arduino nano, to send speed, battery bars, watts and motor temp ( for now) to LCD3, so it can work with any controller.
WAIT!! Instead, ask your brother to program directly the LCD3!! We developed OpenSource firmware for LCD3, see here this user doing a review and see it using the LCD3 and you will see new menus on LCD3 that you never saw before :-)

For you understand, we developed TSDZ2 mid drive motor controller firmware + LCD3 firmware, and we make both firmware communicating the LCD3 supports configuration of the many advanced features of our firmware for TSDZ2, like you configure on LCD3 your battery voltage, number of cells, etc that on KT firmware you can only do on config.h file or the config Java app:

- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 16 2018 4:55pm

casainho wrote:
Sep 16 2018 3:30pm
honya96 wrote:
Sep 16 2018 1:40pm
I am trying to convince (or bribe) my brother to write a code for arduino nano, to send speed, battery bars, watts and motor temp ( for now) to LCD3, so it can work with any controller.
WAIT!! Instead, ask your brother to program directly the LCD3!! We developed OpenSource firmware for LCD3, see here this user doing a review and see it using the LCD3 and you will see new menus on LCD3 that you never saw before :-)
I wanted the arduino as kind of Cycle Analyst, so I connect things to it. Seems easier to me. Firstly speed only and then adding more.

With custom fw and as you say "program lcd3 directly" I will have to connect hall signal temp sensor etc directly to lcd3. :?: directly on micro processor pins?

Possible way to do it is (maybe) also use output from controller, (sabvoton, kelly) which sends a lot of data and "teach" lcd3 to show them. But this way theres no chance to implement PAS level (modulating throttle signal by arduino or STM32 board or directory by lcd3's STM8.)

casainho   1.21 GW

1.21 GW
Posts: 3919
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Sep 16 2018 4:58pm

honya96 wrote:
Sep 16 2018 4:55pm
I wanted the arduino as kind of Cycle Analyst, so I connect things to it. Seems easier to me.
Ok I understand and yes, that seems the best idea!! Good luck!!
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

tomtom50   100 W

100 W
Posts: 186
Joined: Jun 18 2018 10:09am

ebike using Q100H and open source firmware

Post by tomtom50 » Sep 16 2018 6:29pm

I am thinking about building a stealth ebike with a 201rpm Q100H rear hub and KT open source firmware on an S06S.

The idea is not to use much assist on the flat, or go fast. The idea is to have a light ebike that feels like a regular bike but gives real assist on hills. The Q100H is 2.1kg and low rpm. I have a heavier DIY ebike that I like, so I'm not new to ebikes, but I am new to open source.

Looking for advice and opinions:
  • The biggest advantage for me would be higher efficiency at lower speed due to FOC. How significant is this really?
  • Is there an easiest-to-use display? LCD-3?
  • My other ebike has a 52V battery. Should I even consider using it or is it best to stick to 36V? The BMS battery S06S is 36V, I would have to find a 48V KT controller equivalent to S06S, the Q100H is nominally 36V, etc.
I'd like to simulate the setup, to use the simulator at ebikes.ca I need:
  • a0: Hysteresis torque of the motor in Nm. You can derive it from the no-load current at low speeds
  • a1: Eddy current torque of the motor, (N-m/(Rad/sec)). You can derive it from the slope of the no-load current vs. rpm
  • Battery amperage for the S06S (the nominal 15A?)
  • Phase amperage for the S06S?
If anyone can help with those values or a no-load chart I can check if I am being realistic about hill climbing ability. (My target is 7mph on 8% grade with 100W human input).

User avatar
stancecoke   100 kW

100 kW
Posts: 1117
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 » Sep 17 2018 2:08am

honya96 wrote:
Sep 16 2018 1:40pm
I guess its well documented here somewhere how to do it, maybe we can also reuse some code..

can you please point me to something what can help us?

Thanks a lot.
I think the Forumscontroller is exactly what you are looking for!
https://github.com/jenkie/Arduino-Pedelec-Controller
Sadly the documentation is mainly in german

regards
stancecoke

cpn   1 µW

1 µW
Posts: 3
Joined: Mar 06 2018 5:15pm

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

Post by cpn » Sep 17 2018 7:51am

I had phase to phase short on 18fet open source firmware controller. It looks like as a result transistor is burned. Can somebody point me on right part I am not sure if is Y1 or Y2
Attachments
Y1orY2.jpg

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 17 2018 8:44am

cpn wrote:
Sep 17 2018 7:51am
I had phase to phase short on 18fet open source firmware controller. It looks like as a result transistor is burned. Can somebody point me on right part I am not sure if is Y1 or Y2
Will check that when I get home. :wink:

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 17 2018 12:23pm

honya96 wrote:
Sep 17 2018 8:44am
cpn wrote:
Sep 17 2018 7:51am
I had phase to phase short on 18fet open source firmware controller. It looks like as a result transistor is burned. Can somebody point me on right part I am not sure if is Y1 or Y2
Will check that when I get home. :wink:
It is Y2

User avatar
Valopallo   10 W

10 W
Posts: 72
Joined: May 29 2018 1:37pm

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

Post by Valopallo » Sep 18 2018 8:45am

honya96 wrote:
Jul 07 2018 7:32am
Valopallo wrote:
Jul 07 2018 7:19am
Please explain, what would be the problem with the battery? I understand that 10ah isn't much range if drawing 40Amps from it but is there something else like heat problems involved when going this high current draw?
Also, what do you mean by; "But I am still not running it reliably on Direct motor" ?
Well, I know nothing about programing So I cant get it to run reliably, its still better Stock.
But Stancecoke Is running Direct motor with it..

You Have some Brand battery in plastic case with bms inside? Send photos maybe...

Overheating of the cells should not be that bad, but if it has 15A bms with 30A overcurrent protection, it Will shut off.
Ok. Finally got the time to open the battery case. Do these pictures give any information about my BMS or it's overcurrent protection?

https://imgur.com/a/30EvYLc

EDIT: Found it. http://www.spardbattery.com/PW-10SM-30092-2-20
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

1N4001   100 W

100 W
Posts: 104
Joined: Nov 28 2017 7:55am

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

Post by 1N4001 » Sep 19 2018 1:43pm

I'm in the process of modifying my S06S for higher voltages. Can anyone tell me the purpose of C1/C5/C14? (https://github.com/KingQueenWong/bmsbat ... roller.PDF upper right corner) I wonder if their voltage rating needs to be raised if the max input voltage is, say, doubled.

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 19 2018 2:23pm

Valopallo wrote:
Sep 18 2018 8:45am

Ok. Finally got the time to open the battery case. Do these pictures give any information about my BMS or it's overcurrent protection?

https://imgur.com/a/30EvYLc

EDIT: Found it. http://www.spardbattery.com/PW-10SM-30092-2-20
If you need more power, you can connect discharge without bms, just a fuse. And still have safe charging through bms. :wink:

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 19 2018 2:32pm

1N4001 wrote:
Sep 19 2018 1:43pm
I'm in the process of modifying my S06S for higher voltages. Can anyone tell me the purpose of C1/C5/C14? (https://github.com/KingQueenWong/bmsbat ... roller.PDF upper right corner) I wonder if their voltage rating needs to be raised if the max input voltage is, say, doubled.
I guess they dont, Vbst should be from some regulator so it remains the same.. But i dont recommend trying this. Buy 72v 12fet and cut case to ~50mm

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Sep 19 2018 2:41pm

stancecoke wrote:
Sep 17 2018 2:08am
honya96 wrote:
Sep 16 2018 1:40pm
I guess its well documented here somewhere how to do it, maybe we can also reuse some code..

can you please point me to something what can help us?

Thanks a lot.
I think the Forumscontroller is exactly what you are looking for!
https://github.com/jenkie/Arduino-Pedelec-Controller
Sadly the documentation is mainly in german

regards
stancecoke
We had a conversation about this allready.. I guess I did not find it easy and good enough, but thanks anyway :wink:

1N4001   100 W

100 W
Posts: 104
Joined: Nov 28 2017 7:55am

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

Post by 1N4001 » Sep 19 2018 3:18pm

honya96 wrote:
Sep 19 2018 2:32pm
1N4001 wrote:
Sep 19 2018 1:43pm
I'm in the process of modifying my S06S for higher voltages. Can anyone tell me the purpose of C1/C5/C14? (https://github.com/KingQueenWong/bmsbat ... roller.PDF upper right corner) I wonder if their voltage rating needs to be raised if the max input voltage is, say, doubled.
I guess they dont, Vbst should be from some regulator so it remains the same..
Yes, the FETs are controlled with around 15V from the LM317, however one leg of C1/C5/C14 (the negative one in fact) sits directly on the motor phase, so it must be involved in the load circuitry somehow.
But i dont recommend trying this. Buy 72v 12fet and cut case to ~50mm
Surely you jest? The 12FET PCB extends the entire length of the case: https://opensourceebikefirmware.bitbuck ... s/15-1.png
Last edited by 1N4001 on Sep 19 2018 3:22pm, edited 1 time in total.

Post Reply