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

Electric Motors and Controllers
User avatar
Valopallo   10 W

10 W
Posts: 86
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 » Jan 25 2021 2:47pm

stancecoke wrote:
Jan 25 2021 8:45am
Valopallo wrote:
Jan 25 2021 4:56am
Any hope left?
If the voltage returns to 4.3V after disconnection the motor halls, the controllers should be OK at least.

You can check if the hall cables are weared somewhere and cause contact to the bike frame e.g. But it's quite easy to replace the hallsensors and the cables. Of course you have to open the motor for repair.

regards
stancecoke
No hope. The HALL sensors were bad and also the motor harness had one signal wire cut. More money to china! "Build your own, it's going to be cheaper", they said. :confused:

atkforever   100 mW

100 mW
Posts: 36
Joined: Sep 25 2019 2:17pm

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

Post by atkforever » Jan 27 2021 7:21am

Hello, I plan to buy a KT 60V 60A but the label on the controller says "KT60ZWSRK....". From my understanding ZW stands for square wave.

If I upload a new FW with the tool, will it run sine wave simplified FOC?

An other question : is it possible to run at 64v (16s battery) without any mods a KT labeled as 48V dc; this one for instance : Image

cheers

atkforever   100 mW

100 mW
Posts: 36
Joined: Sep 25 2019 2:17pm

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

Post by atkforever » Jan 29 2021 4:57am

After carefully read the Wiki, ZW cannot be turned to Sinewave by Software. Is there a way to mod the controller in order to activate interpolation?

Second question : Is there a way to dump the original FW of the controller, the "factory" firmware. I have a STLINK.

Thanks

User avatar
stancecoke   100 kW

100 kW
Posts: 1383
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 » Jan 29 2021 5:11am

atkforever wrote:
Jan 29 2021 4:57am
ZW cannot be turned to Sinewave by Software. Is there a way to mod the controller in order to activate interpolation?
you can use sinusoidal commutation, if you have Motorhallsensors. You can't use the "simplified" FOC. To use it, you have to solder the ACS phase current sensor to the PCB and remove the solder bridge.
atkforever wrote:
Jan 29 2021 4:57am
Is there a way to dump the original FW of the controller, the "factory" firmware. I have a STLINK.
no.

regards
stancecoke

atkforever   100 mW

100 mW
Posts: 36
Joined: Sep 25 2019 2:17pm

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

Post by atkforever » Jan 29 2021 5:36am

stancecoke wrote:
Jan 29 2021 5:11am
atkforever wrote:
Jan 29 2021 4:57am
ZW cannot be turned to Sinewave by Software. Is there a way to mod the controller in order to activate interpolation?
you can use sinusoidal commutation, if you have Motorhallsensors. You can't use the "simplified" FOC. To use it, you have to solder the ACS phase current sensor to the PCB and remove the solder bridge.
atkforever wrote:
Jan 29 2021 4:57am
Is there a way to dump the original FW of the controller, the "factory" firmware. I have a STLINK.
no.

regards
stancecoke
What are the pros and the cons of using FOC rather than sinusoidal commutation ?

User avatar
stancecoke   100 kW

100 kW
Posts: 1383
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 » Jan 30 2021 5:21am

atkforever wrote:
Jan 29 2021 5:36am
pros and the cons of using FOC rather than sinusoidal commutation ?
The efficiency at high load an high speed is better with FOC. Less heat and more torque

regards
stancecoke

marka-ee   10 W

10 W
Posts: 68
Joined: Mar 24 2020 5:17pm

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

Post by marka-ee » Jan 31 2021 10:15am

I understand the theoretical reasons the FOC control is better, but has anyone actually run a bike with a DD hub motor with this open source firmware and also run same bike with standard KT controller to see real world results ? Like Watt hrs/ km and top speed results ?
I use KT controller that was 9 fet but now 6 fet ( pulled cheap fets that were doubled up and replaced with K150E09NE so all the same ).
Can this tool chain run under linux ? Or maybe Windows 7 in VM ?
Thanks

sdobbie   10 W

10 W
Posts: 69
Joined: Dec 14 2013 12:56pm
Location: Fife Scotland

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

Post by sdobbie » Jan 31 2021 5:36pm

How can I get my SVP controller to work in sinewave mode? I can see all sorts of wavetables in the wavetables folder and the motor sounds as if it is being driven by a standard squarewave controller.
Solder that shunt!

Daz   1 µW

1 µW
Posts: 2
Joined: Oct 27 2020 12:54am

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

Post by Daz » Feb 03 2021 6:35am

hi all

this is my first post on this site so sorry in advance for any mistakes

i bought a kt controller from lightingbike on aliexpress i believe its the 18 mosfet Bluetooth but i think i went for dual mode thinking it meant that it could do regen brakes i think its called

i think i may have ended up with mod sine instead of sinewave as a result and dual mode may mean something about with and without hall sensors

can anyone tell me if this is correct

i bought it to upgrade my voilamart 1500w controller as i hoped for the braking and to be able to run at high volts but reduce amps

everything works, bluetooth connects but no data displays on KT bluetooth app, i was told i dont need a display i have some jumper leads that came on controller

i would like to try this software soon but not even sure if i have a problem first with motor, controller and/or combination

hall sensors plug matched and all worked straight away

would like to be able to see volts and amps on KT app they sent me, can anyone help

side note i plan to when i understand what to do beter upgrade to this open source software but would like to try this first and dont have any funds to invest in this just yet am still saving for a BMS

also while i see members on here saying sinewave is best is it possible to use the modified sine version with this software and not get some features or reduced performance

sorry if these questions have been asked or im asking wrong or in wrong place, i honestly have looked and use google and am probably over 500 hours into my first ebike build having amazing fun and am hoping to maybe post my build

thanks in advance to all

Daz   1 µW

1 µW
Posts: 2
Joined: Oct 27 2020 12:54am

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

Post by Daz » Feb 03 2021 6:46am

atkforever wrote:
Jan 27 2021 7:21am
Hello, I plan to buy a KT 60V 60A but the label on the controller says "KT60ZWSRK....". From my understanding ZW stands for square wave.

If I upload a new FW with the tool, will it run sine wave simplified FOC?

An other question : is it possible to run at 64v (16s battery) without any mods a KT labeled as 48V dc; this one for instance : Image

cheers
i run my KT 48v controller on 16s but charge to 62.8v

there are 63v capacitors in mine, my understanding is 63v

16s is usually charged to 67.2V

my understanding is that you need to stay under the 63V for most 48V controllers in general

running @16s i am not able to use the full capacity as i only charge to 62.8V but i get the higher power/speed maintained longer than running at 15s or 14s

hope that helps

Tepa76   1 µW

1 µW
Posts: 2
Joined: Dec 11 2019 10:19am

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

Post by Tepa76 » Feb 03 2021 11:40am

I found something intresting while playing with the firmware and settings. I mapping the motor spec angle for finding best maching.
I made this for a 2 year a go, but it leaving the feel that it was not perfect. So i did it now again with new instructions "wheel in air with full throttle without load".

Previously 25 deg would work for best.
Now i start from there "25°"by increasing angle by 5° steps and found that current and erps stay invariable until 45°. From here current starts to grow, but also i got more speed.. I continued until 65° when current measured externally was about 5,5A and erps is 400!! witch is about double from starting point :shock: .
I repeat this test with adding roughly 150W load to motor for confirm that i can increase the speed while loaded this way. okay by sacrificing the efficiency..

By degreasing the corr angle below 15° leads to current grow and reduce speed. No good!

Now question: Is this same as what happens in proper field weakening? I believe not, just courious if i add "bonus" angle to offset in certain needs :) eg activate (off-road and assist 5) simultaneusly would get me fast back home or propapbly really slow (pushing bike back without walk assist after smoke escapes) :lol:
Thoughts!?


Ps 25-30deg fit nicely in middle of sweet spot, so i will continue for using it.
Diagnostic screenshots below,
Image

Cheers,

marka-ee   10 W

10 W
Posts: 68
Joined: Mar 24 2020 5:17pm

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

Post by marka-ee » Feb 03 2021 5:28pm

I'm reading a lot of this thread but am wondering about the maturity of this FW. So many questions of phase angle settings, rough running, various other settings that in my opinion, quite frankly looks like alpha level status at this point. I Asked a few days ago: What are the real world measured advantages achieved by this FW as far as wh/KM results ( efficiency ) and top speed results with a before-after using same bike, battery, etc. You know, as in basic scientific method. FOC sounds wonderful, but , ummmm, does it work on the road ??? I admire the work of the two ( competing ? ) developers, but in 171 pages is there some road testing that I missed ? Thanks

sdobbie   10 W

10 W
Posts: 69
Joined: Dec 14 2013 12:56pm
Location: Fife Scotland

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

Post by sdobbie » Feb 04 2021 2:54am

marka-ee wrote:
Feb 03 2021 5:28pm
I'm reading a lot of this thread but am wondering about the maturity of this FW. So many questions of phase angle settings, rough running, various other settings that in my opinion, quite frankly looks like alpha level status at this point. I Asked a few days ago: What are the real world measured advantages achieved by this FW as far as wh/KM results ( efficiency ) and top speed results with a before-after using same bike, battery, etc. You know, as in basic scientific method. FOC sounds wonderful, but , ummmm, does it work on the road ??? I admire the work of the two ( competing ? ) developers, but in 171 pages is there some road testing that I missed ? Thanks
The software definitely comes across as pre alpha. I really appreciate the effort that has went into it but it makes my motor draw over 100 watts no load and sound like a tractor engine, whereas a cheap squarewave controller off ebay makes it run smoothly and quietly drawing under 20 watts at full speed. I have spent hours trying angle settings. The only settings I haven't played with are the hall angle settings 1 to 6 but they make absolutely no sense. My motor has 3 sensors, not 6.
Solder that shunt!

User avatar
stancecoke   100 kW

100 kW
Posts: 1383
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 » Feb 04 2021 3:09am

marka-ee wrote:
Feb 03 2021 5:28pm
Is this same as what happens in proper field weakening?
Yes, of course. Field weakening is nothing else than a "too big" advance angle.
marka-ee wrote:
Feb 03 2021 5:28pm
What are the real world measured advantages achieved by this FW
My main motivation for the project was the possibility to use a torquesensor directly with the controller with no need for an ugly and expensive thing like the Cycle Analyst (sorry Justin :-))
It works without any problems for many users with very good effiency. No difference to the stock firmware.
If you want simple PAS or throttle operation, there's no need to use the open source firmware.

The Kunteng hardware is very limited, a poor 8bit processor with no possibility to do "real" FOC. Therefore I concentrate on the Lishui hardware for about two years now. The Lishui firmware is ported to the very cheap an widely available controller of the Xiaomi M365 scooter, also.

regards
stancecoke

sdobbie   10 W

10 W
Posts: 69
Joined: Dec 14 2013 12:56pm
Location: Fife Scotland

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

Post by sdobbie » Feb 04 2021 5:14am

Can someone please help me understand the hall angle 1 to 6 settings? My motor only has 3 sensors.
Solder that shunt!

User avatar
stancecoke   100 kW

100 kW
Posts: 1383
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 » Feb 04 2021 6:19am

sdobbie wrote:
Feb 04 2021 5:14am
understand the hall angle 1 to 6 settings?
the three sensors have 6 on/off combinations during one electrical revolution.
Each switch is assigned to a certain rotor position. Due to manufacturing tolerances the positions can vary slightly. Setting them manually is not necessary normally, it's only for fine fine tuning...
@mspider65 has just given a lecture to this topic :-)
https://endless-sphere.com/forums/viewt ... 0&t=110121

regards
stancecoke

Image

sdobbie   10 W

10 W
Posts: 69
Joined: Dec 14 2013 12:56pm
Location: Fife Scotland

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

Post by sdobbie » Feb 04 2021 7:16am

Thanks, had a good read of it but I still don't understand. In the image there is two instances of each hall angle along the bottom, which one do I use? 5 transitions at 0 and 360 for example. I am pretty sure the hall sensors in my motor are 30 degrees apart and not 60
Hall.png
Hall.png (39.51 KiB) Viewed 344 times
Solder that shunt!

Vbruun   100 W

100 W
Posts: 139
Joined: Sep 26 2019 8:42am

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

Post by Vbruun » Feb 05 2021 2:29am

I quite like this firmware because it is well adapted to running with a torque sensor. I am thinking of using it on a mid drive (bosch) that has no halls but the moment a sine/cosine rotary encoder installed. Would I be correct in thinking that I could swap out the rotary encoder for the RMB28IE / RMF44IE encoder?

Link to data sheet: https://www.rls.si/eng/fileuploader/dow ... _sheet.pdf

raedet   100 µW

100 µW
Posts: 8
Joined: Dec 29 2020 5:00am

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

Post by raedet » Feb 09 2021 8:52am

Quick question
is this OSFW compatible with the S-KU63 controller if not what are the required modifications (maybe changing CPU?) or do i really need the KT36 or S06S controller? i'm a rookie on these subjects its for a school project :oops:

geofft   1 kW

1 kW
Posts: 375
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 » Feb 10 2021 5:25am

raedet wrote:
Feb 09 2021 8:52am
Quick question
is this OSFW compatible with the S-KU63 controller if not what are the required modifications (maybe changing CPU?) or do i really need the KT36 or S06S controller? i'm a rookie on these subjects its for a school project :oops:
The usual problem with using non sinewave controllers with this fw is the lack of a current sensor. This means that the FOC can't operate which seriously impairs the efficiency.

Some controllers have the facility to retrofit a current sensor (ACS711 or similar), I've no idea if the KU63 is one of these. You'll find several references to this elsewhere in this thread, but I've no experience of doing this.

Probably easiest just to buy a compatible sinewave controller... :wink:
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 6-fet, LCD3, 48v 12s lipo.

sdobbie   10 W

10 W
Posts: 69
Joined: Dec 14 2013 12:56pm
Location: Fife Scotland

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

Post by sdobbie » Feb 12 2021 5:19pm

I have been doing more experiments with the pwm off at coast feature but it doesn't work properly.

If I accelerate from standstill by leg power alone, there is no resistance from the motor and it works as expected however, as soon as I use the throttle for a bit of extra power, there is resistance felt from the motor even if I completely release the throttle. The only way to get rid of the resistance is to bring the bike to a stop for a few seconds then start pedalling again.
Solder that shunt!

marka-ee   10 W

10 W
Posts: 68
Joined: Mar 24 2020 5:17pm

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

Post by marka-ee » Feb 13 2021 5:15am

geofft wrote:
Feb 10 2021 5:25am

The usual problem with using non sinewave controllers with this fw is the lack of a current sensor. This means that the FOC can't operate which seriously impairs the efficiency.
'Seriously impairs' ? Any road tests by someone to support this claim?

geofft   1 kW

1 kW
Posts: 375
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 » Feb 13 2021 6:27am

marka-ee wrote:
Feb 13 2021 5:15am
'Seriously impairs' ? Any road tests by someone to support this claim?
I remember during earlier testing of the fw at one point I tested the difference between FOC on/off with the bike on a heavily loaded training roller. The difference was very noticeable, with foc 'on' the motor sounded and felt much more lively and the achievable top speed increased from 14mph to around 18mph.

It would be fair to say that higher speed doesn't necessarily equate to higher efficiency, so maybe 'noticeably impairs motor performance' would have been better chosen words, but for sure it made a difference.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 6-fet, LCD3, 48v 12s lipo.

User avatar
stancecoke   100 kW

100 kW
Posts: 1383
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 » Feb 13 2021 8:34am

sdobbie wrote:
Feb 12 2021 5:19pm
The only way to get rid of the resistance
Hm. Are you sure, there is a measuralbe resistance? e.g. if you stop pedaling at 20kph with PWM on you reach 0 kph after a significant shorter distance than with PWM off?!
Are you sure, that the X4 throttle settings are OK? Is the resistance the same with the old version, when regen can only activated by the brake lever? If yes, there is something wrong with the current offset.
You can try to fine tune the offset in line 79 of the adc.c Try values from -10 to +10.

https://github.com/stancecoke/BMSBatter ... /adc.c#L79

regards
stancecoke

sdobbie   10 W

10 W
Posts: 69
Joined: Dec 14 2013 12:56pm
Location: Fife Scotland

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

Post by sdobbie » Feb 14 2021 7:30am

Hi, I was playing about with current cal a in the app to make the current display in the app match what my multimeter was showing. I take it that the current offset is not the same as changing the cal a setting in the app? Is cal b a decimal where I change it in steps of 0.1?

I was doing the experiments with the bike upside down and turning the pedals with my hand and there is a definite resistance there. With a bicycle, that resistance including the higher idle consumption will impact efficiency and probably negate any gains from regenerative braking and foc.
Solder that shunt!

Post Reply