KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Nope, it's definitely consuming. I have found my watt meter which can register negative flow and it does regenerate a bit when I spin it up as we saw in another graph and then it starts consuming power and creating a noticeable drag. As I said before, changing the cal value to negative makes the wheel turn slowly and if I add speed to that by turning the pedals, it starts consuming power. The least drag was achieved by setting the cal value to zero but I am looking for no noticeable drag. Every other controller I have ever used does not place a drag on the motor when coasting so I don't see why this one should be any different. I also wasn't asking you to be my plotting service, I was only providing the log files YOU asked for.
PWM auto off is a great feature but I need to bring the bike to a stop to get the pwm to turn off if I use the throttle during coasting .
Again, how do I enable the field weakening?
PWM auto off is a great feature but I need to bring the bike to a stop to get the pwm to turn off if I use the throttle during coasting .
Again, how do I enable the field weakening?
Solder that shunt!
- stancecoke 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
very strange, the current reading from the internal shunt say's clearly, that there is slight regen. No idea where a positive current should come from, that not passes the shunt

I'm using a BionX IGH3 direct drive with a Kunteng 6 FET and this firmware on my bike for my daily commuting, I have no drag at all. So I can't help any further at this point.
Regarding field weakenig: This feature is not implemented in the firmware. It could be implemented easyly by increasing the advance angle with speed and load more than we are doing actually for max torque and min loss. Feel free to do it, make a pull request at github, then I can merge your solution to the master.
I can't see any sense in field weakening. Increasing the battery voltage is the better way to get higher speeds.
Regarding switching PWM on while the wheel is turning: You have to know the kv constant of your motor excactly, then you can preload the PI-control to have the correct dutycyle directly at the start of the PWM. I've implemented something similar to optimize the regen at low speed. But I won't make it a feature in this firmware, as it carries a massive risk to burn your controller.
regards
stancecoke
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
It is definitely puzzling. Do you think that maybe I should try mechanical calibration on the battery current shunt by fililing away small amounts of material or adding a tiny bit of solder?
Does your 6 fet controller have the phase current sensor? I have a 6 fet which doesn't and could test tonight and see if the issue affects that one too.
Does your 6 fet controller have the phase current sensor? I have a 6 fet which doesn't and could test tonight and see if the issue affects that one too.
Solder that shunt!
- stancecoke 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
No, I guess this would only influence the battery current cal a factor.
yes, but I think it's not a matter of the controller, but of your specific motor. A geared motor with regen was never used before in this project, I think.
Perhaps, it would be interesting, what happens with the advance angle during dragging. You could print out ui8_position_correction_value and make a new log.
regards
stancecoke
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Will do. I will make a graph of it too to save you time. I think my hall angles 1 to 6 being slightly off might have something to do with it also. I made a separate topic about that because I was using osec app to look at the hall angles and you don't use the osec app.
Solder that shunt!
-
- 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
Hi guys, what max phase motor current can I configure? I have a 18fet KT (stock hardware, didn't mod the fets or caps), running at 16S. My battery is limited to 50A so I though that 120A would be an OK value. is there any risk to burn the fets ? What is the absolute max phase amp in stock configuration?
-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Hi,
If your motor is a 1000W, a 16S battery provides 60V
power = voltage times current => current = power / voltage = 1000/60 = 16.7A
I would start testing 15 amps max for the battery current.
If the wires don't heat up at all, I would increase the value little by little.
Only the battery current is limited by the program.
I don't know what kind of motor you have, but 20 amps in a motor winding is already a lot.atkforever wrote: ↑Feb 23 2021 5:29pmMy battery is limited to 50A so I though that 120A would be an OK value.
If your motor is a 1000W, a 16S battery provides 60V
power = voltage times current => current = power / voltage = 1000/60 = 16.7A
I would start testing 15 amps max for the battery current.
If the wires don't heat up at all, I would increase the value little by little.
Only the battery current is limited by the program.
-
- 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
My motor is a MXUS 3K rated at 3000W nominal (90N.M torque and 800RPM at 60V)




Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
I did another motor drag test and noted ui8_position_correction_value and it stayed at 127 constantly. I also connected an old analog ammeter up to the controller just in case my digital wattmeter was getting confused. The ammeter showed 1 amp power consumption while the motor was dragging.
Surely it must be possible to disable pwm when one lets off the throttle as the rotor position can be sensed with the hall sensors so when power is needed again, the pwm can switch on with correct timing. Every other controller does this. I sadly don't have any programming skills so I can't implement that feature.
Surely it must be possible to disable pwm when one lets off the throttle as the rotor position can be sensed with the hall sensors so when power is needed again, the pwm can switch on with correct timing. Every other controller does this. I sadly don't have any programming skills so I can't implement that feature.
Solder that shunt!
-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
There are something wrong with your table :atkforever wrote: ↑Feb 24 2021 9:19amMy motor is a MXUS 3K rated at 3000W nominal (90N.M torque and 800RPM at 60V)
speed = radius times angular velocity (speed in m/s radius in meter and angular velocity in rad/s)
With your values : 26 inch wheel : speed = 27.4 m/s = 98 km/h !!!
Mechanical power = torque times angular velocity (power in W, torque in N.m and angular velocity in rad/s)
With your values :
Mechanical power = 90 x 800 x 2 x pi /60 = 7500W !!!!
3000W is the electrical power of the motor (if it's correct)
The battery provides 3000/60 = 50 amps for the rated power. it sounds a lot.
In my opinion, I would start with 20 amps. You risk nothing and if everything works well, I would increase gradually.
- stancecoke 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
This is not correct. The motor current is limited also. You can detect the motor current limitation by the 7th bit of the motor state.
Not the rotor position is the problem but the BEMF. You have to start the PWM with the right duty cycle, that's matching the BEMF, otherwise, you'll get magic smoke.
regards
stancecoke
-
- 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
You are correct but the RPM is given for no load. 98KPH is obviously unreachable due to the wind resistance (aprox 6000w at this speed), furthermore 3000W is the rated power, it means it can run at 3000W for a long period without getting hot, you can push the motor to 7000W if you use ferrofluid (statorade) or other cooling device.sylvain_wm wrote: ↑Feb 24 2021 9:55amThere are something wrong with your table :atkforever wrote: ↑Feb 24 2021 9:19amMy motor is a MXUS 3K rated at 3000W nominal (90N.M torque and 800RPM at 60V)
speed = radius times angular velocity (speed in m/s radius in meter and angular velocity in rad/s)
With your values : 26 inch wheel : speed = 27.4 m/s = 98 km/h !!!
Mechanical power = torque times angular velocity (power in W, torque in N.m and angular velocity in rad/s)
With your values :
Mechanical power = 90 x 800 x 2 x pi /60 = 7500W !!!!
3000W is the electrical power of the motor (if it's correct)
The battery provides 3000/60 = 50 amps for the rated power. it sounds a lot.
In my opinion, I would start with 20 amps. You risk nothing and if everything works well, I would increase gradually.
My motor winding is 3T which means 11.9Kv, here is the simulation out from ebikes.ca, as you can see the top speed (ie crossing point between load and power) is 68kph. Winding is kind of overkill for my bike, I should have orderer a 4T motor instead (I have a 24inch wheel).

-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
I got it.
You can limit you battery current to 50 amps, it's no matter for the 18fet KT.
Each mosfet supports 150 amps and there are 3 mosfets in parallel.
But it could be damaging to your motor.
Regards
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
I think we are getting close. My motor specific angle for the smoothest and most efficient operation is 215. When I changed it to 200, the motor will not start but there is no resistance at all when turning the pedals. Any ideas?
Solder that shunt!
- stancecoke 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
Hm, are you sure, that the PWM is on? Is the controller drawing current, if you open the throttle?
regards
stancecoke
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Yeah everything was on. I have to turn the wheel a little to get the motor motor to start but once started it runs fine with no resistance when coasting. I think it may just be the hall angles being a bit off as I did fit the sensors myself. I am not sure how to get the exact angles for the sensors though as in osec app hall angle 5 and 2 are missing
Solder that shunt!
- stancecoke 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

you can print out uint8_t_60deg_pwm_cycles[0] ... uint8_t_60deg_pwm_cycles[5] This are durations between the hall state changes.
Run the motor at a contant speed and look at the values. All values should be nearly the same at constant speed. If certain values are significant different, you can calculate the offset for the angle setting by the ratio of the values. I wonder, why @Xnyle uses an 8-bit variable here, this should only work at high speeds, at lower speeds, there must be overflows

by the way, you should not use pure sine, this leads to lower max speeds. I think mid clamp is the SVPWM waveform. I don't know, why @Xnyle implemented this options, they are confusing for newbies (and even for me

regards
stancecoke
-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Hi,
is there a way to use the firmware without a throttle and without a torque sensor?
My torque sensor is the problem of my system. The PAS works well but the torque sensor signal is dead.
I don't want to use a thumb throttle.
I'd like to know if it's possible to use my bike without a thumb throttle : I mean, as soon as I pedal, the motor starts and I can adjust the power assist with my LCD display... like a bafang.
Thanks
is there a way to use the firmware without a throttle and without a torque sensor?
My torque sensor is the problem of my system. The PAS works well but the torque sensor signal is dead.
I don't want to use a thumb throttle.
I'd like to know if it's possible to use my bike without a thumb throttle : I mean, as soon as I pedal, the motor starts and I can adjust the power assist with my LCD display... like a bafang.
Thanks
Last edited by sylvain_wm on Feb 26 2021 10:57am, edited 1 time in total.
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Awesome, thanks. With the angle setting that gives no resistance the bike runs really well and regen is brilliant, just will not work from standstill. Is pure sine the most efficient option? I would also like to find out how to enable field weakening too so I can really kick the arse out it and go fast if need be. I can't use a higher voltage battery as that would require me to buy a new bms and charger.
Solder that shunt!
-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Hi,
how to activate this driving mode? PAS sensor with torque simulation and reverse step detection
In this mode, I just need a PAS. No Torque sensor, no Thumb Throttle. Am I wrong?
What are the most important parameters in this mode?
Regards
how to activate this driving mode? PAS sensor with torque simulation and reverse step detection
In this mode, I just need a PAS. No Torque sensor, no Thumb Throttle. Am I wrong?
What are the most important parameters in this mode?
Regards
- stancecoke 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
Again: read the wiki carefully!!! If you disable the torquesensor mode, the controller runs in "torque simulation mode" automatically. but it expects a duty cycle of the PAS signal different from 0.5 by default.
I don't know, why the ERider T9 / T13 torquesensor always dies on a Kunteng controller. One guy in the german forum wasted three sensors this way. Now he uses a Lishui Controller and everything works well

no, the SVPWM has the same efficieny, but you get higher phase voltages with it, so you get higher speeds.

regards
stancecoke
-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
Thank you stancecoke for your patience... and for sharing your experience.
Regards.
I can't change the duty cycle of the PAS signal. Do I have to create an additional circuit?stancecoke wrote: ↑Feb 27 2021 3:43ambut it expects a duty cycle of the PAS signal different from 0.5 by default.
That's weird. I'm going to put a non-inverter follower circuit between the controller and the torquesensor.
Regards.
- stancecoke 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
Have you read the wiki??? Or do you think, asking stancecoke is much easier than reading all the stuff?

You have just to set the right value for PAS threshold.
Good idea! But I don't know, if the failure is caused by the torque signal line, or by interferences of the power supplies, or whatever...sylvain_wm wrote: ↑Feb 27 2021 4:38amI'm going to put a non-inverter follower circuit between the controller and the torquesensor.

regards
stancecoke
-
- Posts: 44
- Joined: Feb 02 2020 6:09am
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
I have read it for a long time and I don't want to bother you stancecoke.stancecoke wrote: ↑Feb 27 2021 5:13amHave you read the wiki??? Or do you think, asking stancecoke is much easier than reading all the stuff?
Thanks a lot.
-
- Posts: 41
- Joined: Apr 27 2014 6:38pm
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
https://www.aliexpress.com/item/1000042 ... qP2NT&mp=1
Will these KT controllers from Ali work with the opensource firmware ?
Thanks
Will these KT controllers from Ali work with the opensource firmware ?
Thanks