Thanks. I will try to play around with that some more, but so far not much luck. In the 170:s the wheel is stuck. I beleve I ended up in the 230:s, then I had very low correction angle.
But the bike behaves rather strange. If I pull the throttle it can take off ok, but then start to cogg badly. Sometimes there is no reaction to throttle, on maby the third try it reacts. But then it does not react to the release of trottle ither, I have to keep it still with the brakes for a few seconds.

Figured I ask here because I guess the developers of this firmware knows this best.
Does the standard KT controllers come with a higher Phase Amps than Battery Amps? e.g. 45A from the Battery but 70A goes to the motor?

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
| |
Smilies
Figured I ask here because I guess the developers of this firmware knows this best.
Does the standard KT controllers come with a higher Phase Amps than Battery Amps? e.g. 45A from the Battery but 70A goes to the motor?

I think you mean a limiter for both type of currents. Yes, Kunteng hardware permits that limit and my code does that, even because I think we should limit motor/phase current to protect the controller. I think Stancecoke code does not implement this limit.

Thanks to both of you, really appreciated.
Do you know what the normal ratio is on a stock controller? Or is it different on each one?
I really want to know how much phase current my stock 60V 45A KT controller has.

Thanks to both of you, really appreciated.
Do you know what the normal ratio is on a stock controller? Or is it different on each one?
I really want to know how much phase current my stock 60V 45A KT controller has.

You should ask to Kunteng and then configure that value on the firmware. Also please share with us the answer from Kunteng.

Thanks to both of you, really appreciated.
Do you know what the normal ratio is on a stock controller? Or is it different on each one?
I really want to know how much phase current my stock 60V 45A KT controller has.

You should ask to Kunteng and then configure that value on the firmware. Also please share with us the answer from Kunteng.

I've wrote them an eMail, I'll let you guys know when I've got an answer.

I have just tested the firmware yesterday and it works great!
The app is also very usefull to get it up and running.
I have the 18fet controller with an ebay 48v 1kw hub.
I used the following settings:
motor angle 215
current calibration 50
battery current 120
battery voltage cal 140
Might not be optimal but it starts and runs really well.

For others, trying to get it working I would strongly recommend to get the bt adapter and app and make sure the hall sensor sequence is correct by rotating the wheel slowly.

Is there an explanation how to change the hall angles in order to get equal pwm cycle counts on all of them? With my motor they are slightly different (sometimes +-10) but I don't notice any issue in the motor operation.
Also am I right in thinking these angles only make any sense when its doing 60 degree interpolation and after it goes to 360deg interpolation they wont make a difference?

I've looked at the svm table and I am wondering what tool is used to generate it?
Also would it be more efficient to disable pwm on the low phase? Because now all fets are switching all the time, while if the low portion is all 0s then the phase would be low and there will be no switching on that phase?

But some settings are very different, I have battery current 500 (as I understood in the instructions should mean 50A) and battery voltage cal 70.
Did you have to swap any phase or hall wires with the new firmware?

For me the bluosec app freezes all the time, so I don´t really get any live numbers. I can mostly try to have the bike running stedy for a while, and then look at the values after some time.

I wanted to have low current limit in the beginning so I set it to something very low then gradually increased it..
I didn't have to swap any wires, all colours match as with the original firmware.
I think the app is really helpful so maybe you should try another bluetooth module or phone..

Yes, I have a HC-06 bluetooth module, that was what I could find locally. I bought a HC-05, but there vas no bluetooth module on it.. Maby I can take the bluetooth module from the HC-06 and put on the HC-05 if that is better?

I tried 215 motor angle, but it cogged badly and blew the fuse. So I think I have to go higer, it behaved better at about 230 where I was before.

I've looked at the svm table and I am wondering what tool is used to generate it?
Also would it be more efficient to disable pwm on the low phase?

There are several approaches how to calculate the SVPWM pattern.
You can't switch off any channel as we are using center aligned PWM. Zero in the lookup table does not mean zero DutyCycle on the phase wire. Look at the figure 31 of ST's User Manual 1052.

The throttle controls the current (= torque), that's the "normal" behaviour of every throttle in any motorcycle or car.
Xnyle has build in the option assist lvl affects throttle, with this you can reduce the max amps of full throttle for low speeds. (I

Yes, but not "normal" for e-bike (good only for PAS mode, not for throttle)
As I already mentioned, almost all other controllers control PWM, not current. Some "good" opensource firmware has 2 throttle mode:

BTW - about "regen". For gear motors, this is nonsense (the same as using the throttle "like a motorcycle" for an e-bike ) - this only shortens the life of the battery and the motor itself.

But ... If you disable regen by setting
REGEN_CURRENT_MAX_VALUE 0L
And release throttle/press brake lever - motor (I checked, securing only the motor on the table, not in the wheel) will slow down for a long time, but it will not stop completely even in 10 seconds.
The same situation when you press the brake lever. This is fraught with breakdowns gears during emergency braking. And yes, other controllers (include KT original firmware) instantly (1sec.) stop the rotation of the motor when the brake is pressed or the throttle is released - without using regen. And it is right.

Hi all, new here and looking for some direction. So I'm building a ~3-4kW peak BHT style mid drive direct drive ebike and am hoping to use a KT controller with this firmware, however I am not sure what kind of phase amps I could squeeze out of it.

My goals would require about 120A phase Amps. I see the Nucular controllers from Vasili can do 120A with 12 fets, so I am assuming a KT 18 fet might be able to stretch it to 120A?

@kkm: feel free to implement all your suggested improvements in our code and present us your result here in the thread.
Perhaps on your way you will learn how a PI-control works and why it makes no sense to test the system with no load / wheel in the air.

I tried 215 motor angle, but it cogged badly and blew the fuse. So I think I have to go higer, it behaved better at about 230 where I was before.

@j bjork, I've just remembered that I had similar issues to this (cogging, blown fuse, etc) when I had the 'Gain I' factor of the PI controller set too high. I found reducing this to 0.1 (from the default 0.2) cured this issue for me. Not sure if it has anything to do with your problem but easy to test, so maybe worth a try..?

Hi all, new here and looking for some direction. So I'm building a ~3-4kW peak BHT style mid drive direct drive ebike and am hoping to use a KT controller with this firmware, however I am not sure what kind of phase amps I could squeeze out of it.

My goals would require about 120A phase Amps. I see the Nucular controllers from Vasili can do 120A with 12 fets, so I am assuming a KT 18 fet might be able to stretch it to 120A?

Cheers

I have set my 18fet for 120 phase amps. But I don´t know if I get it, or if it works. Btw. nuculars 12 fet does 200 phase amps, and 120 battery amps. I have only set 50 battery amps, my battery can´t handle much more.

It does´nt look too hard to beef up the controller board with some copper wire, and there are extra holes for wires to the motor and power wires. So it would be easy to run double wires, or beefier wires and split them in to 2 holes. There are room for one more, and bigger capacitors on the bord too. If you want to go for more amps I mean

Others seem to not have much luck with changing to better mosfets from what I have read though.

Thanks to both of you, really appreciated.
Do you know what the normal ratio is on a stock controller? Or is it different on each one?
I really want to know how much phase current my stock 60V 45A KT controller has.

You should ask to Kunteng and then configure that value on the firmware. Also please share with us the answer from Kunteng.

I've just got an answer from them, either they didn't understand me or they don't know it lol.

Hi,
Glad to receive your email, we are dealer of KT company,
45A is the max current of the controller, but for the motor we know little, we never measure the current of the motor, if you want to know the motor, may be the motor supplier will give you a better answer, thanks

Today I added a disgusting, stupid code (my C # knowledge is close to zero) in main.c to protect against an emergency - when the gas knob is accidentally pressed when the controller is turned on, or the hall sensor in the gas knob burned (4.3-5V on the control pin in this case)

It would be a great idea to add the indication ui16_error "Err 01" (0x22) to KT-LCD3, but my knowledge is not enough.

during the tests, the motor suddenly stopped responding to the throttle (only showed an increase in power on the KT-LCD3 display), then the smell of burning insulation on the phase wires began to be felt ...The reason is the accidental disconnection of the hall sensor connector from the motor. In the “old good” casainho code, this problem was solved:

But with my "knowledge" it is difficult to implement this necessary code in a new firmware.

Today also uncomment line in main.c
// pwm_set_duty_cycle ((uint8_t) ui16_sum_throttle);
(and commented out the previous one) and made a test trip ... This is amazing. Perfectly. I can ride stable on a dirty, skid unpaved road at a speed of 4-8 km/h, and the bike does not slow down, or the rear wheel does not start to slip and rotate quickly. I was happy.
But there is a problem - in this mode there is no reaction to pressing the brake (if the throttle is not released), as in "current mode". And it is very disappointing ....

I've looked at the svm table and I am wondering what tool is used to generate it?
Also would it be more efficient to disable pwm on the low phase?

There are several approaches how to calculate the SVPWM pattern.
You can't switch off any channel as we are using center aligned PWM. Zero in the lookup table does not mean zero DutyCycle on the phase wire. Look at the figure 31 of ST's User Manual 1052.

Glad to hear, that you are happy with our firmware

regards
stancecoke

Ok, I read the document and although I didn't understand all of it it seems that all phases are centered around 50% duty cycle when the commanded duty is 0. Is there any good reason behind this?
I actually tried changing this so that 0 duty is actually 0 duty on the phase and the controller seems to work fine. That way 1/3 of the mosfets are not switching which should increase efficiency... I have tested this on a 6 fet (because I didn't want to mess up my 18fet) and tried it up to 20A and works ok. So I have ben getting good results from the firmware on both 6 fet and 18fet. The pwm off when idle feature also works fine although its mentioned as experimental.

Another thing I tried is decreasing the dead time (from 16 to which happily didn't cause burnt mosfets but caused something strange that I have no explanation for: the duty cycle (setpoint) never drops below 20 even with no torque request and throttle at 0. Requested current and actual current values are both 0 (or -0.1) so I don't see where that duty is coming from. The wheel is actually rotating slowly.. until I stop it with the brakes and duty goes to 0. Then after the next throttle application it is stuck at 20. I am only using throttle and no pas or torque sensor. Any ideas why that could be happening or how to debug?