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

Electric Motors and Controllers
casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 8:10 am

geofft wrote:
Jan 10, 2018 8:06 am
Just been out for a short test ride and have to say that the firmware is working really sweetly now, a credit to you guys. Still one or two details to tidy up but the major stuff all works well.
I don't have much time for this today but will ride some more and feedback later this week.
Later, when you write your feedback, please include what you value that you get with this firmware, comparing to original one.
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 8:28 am

honya96 wrote:
Jan 10, 2018 6:22 am
I have the start compiling. bat edited with timeout /t -1 /nobreak but It does not work with java tool. It needs to be added in the app? :shock:
Sorry, I think there's some confusion with our two java tools again. We have two Start_Compiling.bat-files. One in the firmware folder, that is used by the OSEC Parameter Configurator.jar and by eclipse, if you edit the sourcecode. This Start_Compiling.bat can be used to compile and flash just by doubleclicking it, also.

The firmware_configuration_tool.jar uses the Start_Compiling.bat file that's located in the configuration_tool/windows_scripts folder. Double clicking on this will not work properly.
So if you want to use the firmware_configuration_tool.jar, you have to edit the configuration_tool/windows_scripts/Start_Compiling.bat to avoid the immedeadly closing of the cmd-window :?

Regards
stancecoke

casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 11:59 am

I found another way to calculate FOC_READ_ID_CURRENT_ANGLE_ADJUST.
I measured with my Q85 and Q11 motors and the values are really different:
- Q85: 143
- Q11: 114

The value measured with my Q85 gave near results by the vale I measured using the other process: 137 VS 143.

Read here: https://opensourceebikefirmware.bitbuck ... DJUST.html

Image
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

geofft
100 W
100 W
Posts: 151
Joined: Nov 09, 2012 9:41 am
Location: Berkshire UK

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

Post by geofft » Jan 10, 2018 12:45 pm

casainho wrote:
Jan 10, 2018 11:59 am
I found another way to calculate FOC_READ_ID_CURRENT_ANGLE_ADJUST.
I measured with my Q85 and Q11 motors and the values are really different:
- Q85: 143
- Q11: 114

The value measured with my Q85 gave near results by the vale I measured using the other process: 137 VS 143.

Read here: https://opensourceebikefirmware.bitbuck ... DJUST.html

Image
This looks like a candidate for the "Advanced Options" menu in your confiurator..... :D

Seriously though, I may actually try this sometime, I still have my old oscilloscope in the back of the shed somewhere.
Last edited by geofft on Jan 10, 2018 1:41 pm, edited 2 times in total.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 20amp, LCD3, 48v 12s lipo.

casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 12:55 pm

The firmware configuration tool already supports defining that variable value.

I documented FOC tests here: https://opensourceebikefirmware.bitbuck ... rison.html

You just need to find the correct value for that variable.

I wonder if no one cares with original firmware.........
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 1:09 pm

casainho wrote:
Jan 10, 2018 12:55 pm
I wonder if no one cares with original firmware.........
We just don't know. If the motor starts in classical six steps, you can read the BEMF from the floating phase (as sensorless block commutation does) and compare it with the hall signal... The user won't recognize it.

We can check this with the original firmware and the oszi....

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 1:17 pm

stancecoke wrote:
Jan 10, 2018 1:09 pm
We just don't know. If the motor starts in classical six steps, you can read the BEMF from the floating phase (as sensorless block commutation does) and compare it with the hall signal... The user won't recognize it.
That would be great, but S06S harware can't read the phases voltage/BEMF. It only reads battery voltage.
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 2:06 pm

I think, it has to be able to read the BEMF, as the sensorless KT36-ZWS is exactly the same controller just without the phase current sensor....

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 2:11 pm

Do you have pictures of that controller?? I can't believe...
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:14 pm

I Think sensorless has external board which reads BEMF and feeds signal into hall pins.

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:15 pm

So the controller gets clasic hall signal

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:34 pm

Still not running. looks like communication with controller works, but the firmware compiling does not. new log should be same as first, there is still a lot of "nelze najít" which means "Cant find".
Attachments
log2.txt
(10.86 KiB) Downloaded 15 times

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 2:38 pm

honya96 wrote:
Jan 10, 2018 2:14 pm
I Think sensorless has external board which reads BEMF and feeds signal into hall pins.
may be, but I have seen no picture with an additional PCB (only for light switch) and in this offer it's written, that it's suitable for sensor- and sensorless mode...
http://dragonbike.de/bike/ebike-control ... s-15a.html

regards
stancecoke
Last edited by stancecoke on Jan 10, 2018 2:46 pm, edited 1 time in total.

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 2:41 pm

honya96 wrote:
Jan 10, 2018 2:34 pm
Still not running.
Looking at the log-file, the compiling and flashing was OK. Which settings did you use?
Please try in simple throttle mode and with correct battery setting (to avoid undervoltage shut off) first.

regards
stancecoke

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:44 pm

stancecoke wrote:
Jan 10, 2018 2:38 pm
honya96 wrote:
Jan 10, 2018 2:14 pm
I Think sensorless has external board which reads BEMF and feeds signal into hall pins.
may be, but I have seen no picture with an additional PCB (only for light switch) and in this offer it's written, that it's suitable for senor- and sensorless mode...
http://dragonbike.de/bike/ebike-control ... s-15a.html

regards
stancecoke
I have seen that. But I dont know where and cant find it.

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:46 pm

stancecoke wrote:
Jan 10, 2018 2:41 pm
honya96 wrote:
Jan 10, 2018 2:34 pm
Still not running.
Looking at the log-file, the compiling and flashing was OK. Which settings did you use?
Please try in simple throttle mode and with correct battery setting (to avoid undervoltage shut off) first.

regards
stancecoke
I get no throttle, pas, or brake icon response. at 13s setting 50.2v battery voltage 4x12v for testing on table.

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:48 pm

just an interesting find when looking for the sensorless board. My 18fet controllers pcb is ready for this.
Attachments
dual-controller.png
dual-controller.png (135.07 KiB) Viewed 283 times

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 2:49 pm

honya96 wrote:
Jan 10, 2018 2:44 pm
I have seen that. But I dont know where and cant find it.
I've seen that only on very old Lishui controllers...
regards
stancecoke

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 2:52 pm

honya96 wrote:
Jan 10, 2018 2:46 pm
I get no throttle, pas, or brake icon response. at 13s setting 50.2v battery voltage 4x12v for testing on table.
Hmm, perhaps your different board layout has a different pinning for the perpherals on the µC?!

regards
stancecoke

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 2:53 pm

stancecoke wrote:
Jan 10, 2018 2:49 pm
honya96 wrote:
Jan 10, 2018 2:44 pm
I have seen that. But I dont know where and cant find it.
I've seen that only on very old Lishui controllers...
regards
stancecoke
maybe thats it.... but I think its the same case here beacuse there are 3 pins labeled NOHALL

casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 2:59 pm

honya96 wrote:
Jan 10, 2018 2:46 pm
I get no throttle, pas, or brake icon response. at 13s setting 50.2v battery voltage 4x12v for testing on table.
Please confirm the LCD version you are using.
Does it show any battery bar signal? Any speed value? Any brake or throttle symbol?
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

User avatar
stancecoke
10 kW
10 kW
Posts: 559
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Jan 10, 2018 3:03 pm

honya96 wrote:
Jan 10, 2018 2:53 pm
maybe thats it.... but I think its the same case here beacuse there are 3 pins labeled NOHALL
funny, casainho has a detailed picture of the S06P with the additional circuit board at bitbucket :-)
https://opensourceebikefirmware.bitbuck ... _S06P.html

regards
stancecoke

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 3:41 pm

stancecoke wrote:
Jan 10, 2018 3:03 pm
honya96 wrote:
Jan 10, 2018 2:53 pm
maybe thats it.... but I think its the same case here beacuse there are 3 pins labeled NOHALL
funny, casainho has a detailed picture of the S06P with the additional circuit board at bitbucket :-)
https://opensourceebikefirmware.bitbuck ... _S06P.html

regards
stancecoke
sooo.. thats where I saw it :lol:

honya96
100 W
100 W
Posts: 255
Joined: Mar 05, 2015 9:38 am
Location: Czech Republic

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

Post by honya96 » Jan 10, 2018 3:44 pm

casainho wrote:
Jan 10, 2018 2:59 pm
honya96 wrote:
Jan 10, 2018 2:46 pm
I get no throttle, pas, or brake icon response. at 13s setting 50.2v battery voltage 4x12v for testing on table.
Please confirm the LCD version you are using.
Does it show any battery bar signal? Any speed value? Any brake or throttle symbol?
s-lcd3 v3,0 72v ( works down to 50v with all my 36,48v controllers)
now I am back with another kt-lcd3 v3.0 0.6F 24-48v and another controller but it has the same board... maybe I will try the 12fet now. its the bmsbattery 40A same as yours.

edit: no brake icon, as i mentioned before. empty battery.

casainho
100 kW
100 kW
Posts: 1481
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Jan 10, 2018 4:38 pm

honya96 wrote:
Jan 10, 2018 3:44 pm
s-lcd3 v3,0 72v ( works down to 50v with all my 36,48v controllers)
now I am back with another kt-lcd3 v3.0 0.6F 24-48v and another controller but it has the same board... maybe I will try the 12fet now. its the bmsbattery 40A same as yours.

edit: no brake icon, as i mentioned before. empty battery.
Rotate de motor by hand and see if it is hard to push, when comparing to the controller poweered off.

See that no one ever tested the 72v controller version.

I would say it has different power resistors to measure the battery voltage and so the firmware triggers undervoltage -- try to increase number of cells and there should be a value where it does not trigger.

Even better, measure with a multimeter your battery voltage and also the voltage at STM8 pin, then I can update the firmware for 72v version. Try also to read the resistors value.
Developer of the Flexible OpenSource firmware for EBike motor controllers:
- Kunteng/BMSBattery VLR FOC motor controller: https://opensourceebikefirmware.bitbucket.io/
- TongSheng TSDZ2 mid drive motor controller: https://opensourceebikefirmware.bitbuck ... ment_tsdz2

Post Reply