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   100 W

100 W
Posts: 106
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 » Apr 08 2021 7:35am

stancecoke wrote:
Apr 07 2021 1:25pm
Valopallo wrote:
Apr 07 2021 9:41am
I raised them up to 15A battery and 30A phase the motor won't spin at all.
What do you get for the control state in this case?
https://github.com/stancecoke/BMSBatter ... leshooting

regards
stancecoke

Control states are; Idle=1, Throttle=17, PAS=145, Brake=250,254. When the problems start, there flashes a few times =2.
Valopallo wrote: I'll try tomorrow with the 14S battery and see how it reacts.
Everything worked pretty well wheel in the air and also once again it took a few km of test run with slowly increasing commutation problems. Motor started vibrating and it couldn't seem to be able to match the timing right with load. I let the bike cool ten minutes and once again it worked pretty well but when I was riding downhill with full throttle and released the throttle I felt that the pwm(I guess) wasn't fast enough to come down and so the load that the motor had "stored" from the throttle seemed to give a spike and burn mosfet and fuse from battery.

It still feels and seems like controller is building current. It can also be seen at Bluosec with idle load of -0.1A to 0.1A and the lower red current arc over the speedometer arc shows this visually. Rising slowly without input. When using pas or throttle the arc shortens but when idle it widens. This does not happen all the time though. Is this "gaining" of current something that relates to GAIN I and GAIN P parameters? Also whenever the motor starts to roll on it's own (when the wheel is in the air), it can be stopped by raising the throttle min parameter or GAIN I, so they're related. Also Bluosec starts to show the battery voltage way higher than it should (69.7V) with 14s battery when the problems start. After booting the voltage is correct. This happens also with lower voltages.

I will print the blueterm log for you to see when I get to change the mosfet(s).

User avatar
stancecoke   100 kW

100 kW
Posts: 1403
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 » Apr 08 2021 10:17am

Valopallo wrote:
Apr 08 2021 7:35am
PAS=145,
That's strange,
145 = 0b10010001 This means:

1 you are in torquesimulation and pedaling slower than ramp end
16 throttle / torquesensor currently overrides torque simulatiom / cadence
128 phase current limiting


All of this should not occur, if you are pedaling faster than defined by Ramp End and the throttle is closed.
Valopallo wrote:
Apr 08 2021 7:35am
When the problems start, there flashes a few times =2.
2 you are in torquesimulation and pedaling faster than ramp end

This is the normal condition, if you are riding with a cadence faster than defined by Ramp End.

Please be so kind to read and try to understand the wiki, it's all written there!!!
Read it 3 times, if you don't understand it after the first time. If you still don't understand it after the third time, feel free to ask.

regards
stancecoke

User avatar
Valopallo   100 W

100 W
Posts: 106
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 » Apr 08 2021 10:45am

stancecoke wrote:
Apr 08 2021 10:17am

Please be so kind to read and try to understand the wiki, it's all written there!!!
Read it 3 times, if you don't understand it after the first time. If you still don't understand it after the third time, feel free to ask.

regards
stancecoke
<3 You bet I have been reading the wiki for three years now and sir I 'm trying my best to understand. :confused: When there are so many variables I suppose I learn best when I bump into problems and realize what things are and are not related to each other. I guess this is the situation for anyone coming from the woods into this field of engineering.

I changed two blown mosfets, dropped the voltage to 30V, battery current to 7A and phase current to 14A. I run a test bench with 10S charger and LM2596HV@30V. This is what blueterm prints with default parameters:

Code: Select all

printf("%u,%u, %u, %u, %u, %u\r\n", ui16_control_state, ui16_setpoint, ui16_motor_speed_erps, ui16_BatteryCurrent, ui16_sum_torque, ui16_momentary_throttle);
IDLE:

Code: Select all

1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
PAS:

Code: Select all

1,0, 0, 321, 0, 0
1,0, 0, 321, 0, 0
1,0, 0, 321, 0, 0
1,0, 6, 321, 0, 0
1,0, 6, 321, 0, 0
1,0, 6, 321, 0, 0
1,0, 6, 321, 0, 0
1,0, 7, 320, 0, 0
1,0, 7, 320, 0, 0
1,0, 7, 320, 0, 0
1,0, 7, 320, 0, 0
1,0, 7, 320, 0, 0
1,0, 8, 320, 0, 0
1,0, 8, 320, 0, 0
1,0, 8, 320, 0, 0
1,0, 8, 320, 0, 0
1,0, 9, 320, 0, 0
1,0, 9, 320, 0, 0
1,0, 9, 320, 0, 0
1,8, 9, 320, 0, 0
129,7, 10, 319, 0, 0
129,11, 11, 318, 0, 0
129,18, 12, 319, 0, 0
129,26, 15, 320, 0, 0
129,37, 17, 321, 0, 0
1,52, 20, 321, 0, 0
1,67, 21, 321, 0, 0
1,83, 22, 322, 0, 0
1,98, 22, 322, 0, 0
1,112, 23, 323, 0, 0
1,125, 26, 326, 0, 0
1,136, 28, 328, 0, 0
1,147, 32, 329, 0, 0
1,157, 35, 330, 0, 0
1,166, 39, 331, 0, 0
1,176, 40, 330, 0, 0
1,185, 43, 332, 0, 0
1,194, 46, 333, 0, 0
1,202, 48, 332, 0, 0
1,212, 51, 332, 0, 0
1,221, 52, 332, 0, 0
1,230, 54, 332, 0, 0
1,238, 58, 334, 0, 0
1,246, 60, 333, 0, 0
1,253, 62, 334, 0, 0
1,255, 64, 333, 0, 0
1,255, 65, 332, 0, 0
1,255, 65, 329, 0, 0
1,255, 65, 328, 0, 0
1,255, 65, 326, 0, 0
1,255, 66, 328, 0, 0
1,255, 65, 326, 0, 0
1,255, 65, 326, 0, 0
1,255, 64, 325, 0, 0
1,255, 64, 326, 0, 0
1,255, 65, 326, 0, 0
1,255, 65, 325, 0, 0
1,255, 64, 326, 0, 0
1,255, 64, 326, 0, 0
1,255, 65, 326, 0, 0
1,255, 65, 326, 0, 0
1,255, 64, 326, 0, 0
1,255, 64, 327, 0, 0
1,255, 65, 326, 0, 0
1,255, 65, 326, 0, 0
1,255, 65, 325, 0, 0
1,255, 64, 327, 0, 0
1,255, 65, 326, 0, 0
1,255, 64, 326, 0, 0
1,255, 65, 325, 0, 0
1,253, 64, 326, 0, 0
1,250, 64, 326, 0, 0
1,247, 64, 325, 0, 0
1,245, 64, 324, 0, 0
1,241, 63, 326, 0, 0
1,238, 63, 325, 0, 0
1,236, 62, 324, 0, 0
1,234, 62, 324, 0, 0
1,231, 61, 325, 0, 0
1,228, 61, 324, 0, 0
1,226, 60, 323, 0, 0
1,225, 59, 323, 0, 0
1,222, 59, 324, 0, 0
1,221, 58, 323, 0, 0
1,219, 57, 323, 0, 0
1,217, 57, 323, 0, 0
1,215, 56, 324, 0, 0
1,212, 56, 324, 0, 0
1,210, 55, 324, 0, 0
1,208, 54, 323, 0, 0
1,206, 54, 323, 0, 0
1,205, 53, 323, 0, 0
1,203, 53, 323, 0, 0
1,200, 53, 324, 0, 0
1,199, 52, 323, 0, 0
1,197, 51, 323, 0, 0
1,195, 51, 324, 0, 0
1,193, 51, 323, 0, 0
1,190, 50, 324, 0, 0
1,189, 49, 323, 0, 0
1,187, 48, 323, 0, 0
1,185, 48, 323, 0, 0
1,183, 48, 324, 0, 0
1,181, 47, 323, 0, 0
1,179, 47, 323, 0, 0
1,177, 46, 323, 0, 0
1,175, 45, 323, 0, 0
1,173, 44, 323, 0, 0
1,172, 45, 323, 0, 0
1,170, 44, 323, 0, 0
1,168, 43, 323, 0, 0
1,166, 43, 323, 0, 0
1,165, 42, 323, 0, 0
1,163, 42, 323, 0, 0
1,161, 42, 323, 0, 0
1,159, 41, 323, 0, 0
1,157, 40, 323, 0, 0
1,156, 40, 323, 0, 0
1,154, 39, 323, 0, 0
1,152, 38, 323, 0, 0
1,150, 39, 323, 0, 0
1,148, 38, 323, 0, 0
1,147, 38, 323, 0, 0
1,145, 37, 323, 0, 0
1,143, 36, 323, 0, 0
1,141, 36, 323, 0, 0
1,139, 35, 323, 0, 0
1,138, 35, 323, 0, 0
1,136, 34, 323, 0, 0
1,134, 34, 323, 0, 0
1,133, 33, 322, 0, 0
1,130, 33, 323, 0, 0
1,129, 32, 322, 0, 0
1,127, 32, 323, 0, 0
1,125, 32, 323, 0, 0
1,124, 31, 323, 0, 0
1,122, 31, 323, 0, 0
1,120, 30, 323, 0, 0
1,118, 30, 323, 0, 0
1,116, 29, 323, 0, 0
1,115, 29, 322, 0, 0
1,113, 28, 323, 0, 0
1,111, 28, 323, 0, 0
1,109, 27, 323, 0, 0
1,108, 27, 322, 0, 0
1,106, 26, 323, 0, 0
1,104, 26, 323, 0, 0
1,103, 25, 323, 0, 0
1,101, 25, 322, 0, 0
1,100, 24, 322, 0, 0
1,98, 24, 323, 0, 0
1,96, 23, 322, 0, 0
1,94, 23, 323, 0, 0
1,93, 23, 322, 0, 0
1,91, 22, 323, 0, 0
1,90, 22, 323, 0, 0
1,89, 21, 322, 0, 0
1,87, 21, 322, 0, 0
1,85, 20, 323, 0, 0
1,84, 20, 322, 0, 0
1,83, 19, 323, 0, 0
1,81, 19, 322, 0, 0
1,79, 18, 323, 0, 0
1,78, 18, 322, 0, 0
1,77, 18, 322, 0, 0
1,76, 17, 322, 0, 0
1,74, 17, 323, 0, 0
1,73, 17, 322, 0, 0
1,71, 16, 323, 0, 0
1,70, 16, 322, 0, 0
1,69, 15, 322, 0, 0
1,67, 15, 322, 0, 0
1,66, 14, 322, 0, 0
1,65, 14, 323, 0, 0
1,63, 14, 322, 0, 0
1,62, 13, 322, 0, 0
1,61, 13, 322, 0, 0
1,59, 12, 322, 0, 0
1,58, 12, 322, 0, 0
1,56, 12, 323, 0, 0
1,55, 12, 322, 0, 0
1,54, 11, 322, 0, 0
1,52, 11, 322, 0, 0
1,51, 11, 322, 0, 0
1,49, 10, 323, 0, 0
1,48, 10, 322, 0, 0
1,47, 9, 322, 0, 0
1,45, 9, 323, 0, 0
1,44, 9, 322, 0, 0
1,43, 9, 322, 0, 0
1,42, 8, 322, 0, 0
1,41, 7, 322, 0, 0
1,40, 7, 322, 0, 0
1,38, 7, 322, 0, 0
1,37, 6, 322, 0, 0
1,36, 6, 322, 0, 0
1,35, 6, 322, 0, 0
1,34, 6, 322, 0, 0
1,32, 5, 323, 0, 0
1,30, 5, 323, 0, 0
1,29, 5, 322, 0, 0
1,27, 5, 323, 0, 0
1,26, 0, 323, 0, 0
1,24, 4, 322, 0, 0
1,23, 4, 322, 0, 0
1,22, 0, 322, 0, 0
1,20, 3, 322, 0, 0
1,19, 3, 323, 0, 0
1,18, 0, 322, 0, 0
1,16, 0, 322, 0, 0
1,15, 0, 322, 0, 0
1,14, 0, 322, 0, 0
1,13, 0, 322, 0, 0
1,12, 0, 322, 0, 0
1,10, 0, 322, 0, 0
1,9, 0, 322, 0, 0
1,8, 0, 322, 0, 0
1,7, 0, 322, 0, 0
1,6, 0, 322, 0, 0
Throttle:

Code: Select all

1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 17
17,0, 0, 322, 0, 39
17,0, 0, 322, 0, 51
145,0, 0, 322, 0, 56
17,8, 0, 322, 0, 65
145,6, 0, 322, 0, 78
145,7, 0, 322, 0, 90
145,8, 0, 322, 0, 104
145,9, 0, 322, 0, 125
145,11, 0, 322, 0, 140
145,14, 0, 322, 0, 161
145,18, 0, 322, 0, 176
145,25, 0, 322, 0, 184
145,34, 0, 322, 0, 190
145,47, 0, 323, 0, 193
145,64, 0, 325, 0, 195
145,88, 7, 327, 0, 195
17,113, 13, 331, 0, 195
17,136, 23, 334, 0, 197
17,157, 32, 337, 0, 197
17,177, 37, 339, 0, 197
17,197, 44, 340, 0, 197
17,217, 48, 340, 0, 197
17,237, 52, 341, 0, 197
17,255, 58, 344, 0, 197
17,255, 62, 342, 0, 197
17,255, 64, 338, 0, 195
17,255, 65, 331, 0, 195
17,255, 64, 330, 0, 195
17,255, 65, 330, 0, 195
17,255, 66, 329, 0, 195
17,255, 65, 326, 0, 195
17,255, 65, 325, 0, 195
17,255, 65, 325, 0, 195
17,255, 64, 326, 0, 195
17,255, 64, 325, 0, 195
17,255, 64, 326, 0, 193
17,255, 65, 326, 0, 193
17,255, 64, 326, 0, 193
17,255, 64, 325, 0, 193
17,255, 65, 326, 0, 193
17,255, 65, 326, 0, 192
17,255, 64, 326, 0, 192
17,255, 64, 325, 0, 192
17,255, 64, 327, 0, 192
17,255, 65, 326, 0, 190
17,255, 65, 327, 0, 190
17,255, 65, 326, 0, 190
17,255, 65, 326, 0, 190
17,255, 64, 326, 0, 192
17,255, 65, 326, 0, 190
17,255, 65, 326, 0, 190
17,255, 65, 327, 0, 190
17,255, 65, 326, 0, 190
17,255, 65, 326, 0, 192
17,255, 65, 326, 0, 192
17,255, 65, 326, 0, 192
17,255, 65, 326, 0, 192
17,255, 64, 327, 0, 170
17,255, 65, 326, 0, 25
17,255, 65, 327, 0, 0
17,255, 65, 326, 0, 0
17,255, 64, 326, 0, 0
17,255, 64, 326, 0, 0
17,252, 65, 327, 0, 0
17,249, 65, 326, 0, 0
1,246, 64, 324, 0, 0
1,243, 63, 325, 0, 0
1,240, 64, 325, 0, 0
1,238, 63, 324, 0, 0
1,236, 62, 324, 0, 0
1,234, 62, 323, 0, 0
1,231, 62, 324, 0, 0
1,229, 61, 324, 0, 0
1,226, 60, 324, 0, 0
1,224, 59, 323, 0, 0
1,222, 58, 323, 0, 0
1,219, 58, 325, 0, 0
1,217, 58, 324, 0, 0
1,215, 57, 323, 0, 0
1,213, 56, 323, 0, 0
1,211, 55, 324, 0, 0
1,209, 55, 323, 0, 0
1,207, 54, 323, 0, 0
1,205, 53, 323, 0, 0
1,203, 53, 324, 0, 0
1,201, 53, 324, 0, 0
1,199, 52, 324, 0, 0
1,196, 52, 324, 0, 0
1,195, 51, 323, 0, 0
1,193, 50, 323, 0, 0
1,191, 50, 323, 0, 0
1,189, 49, 323, 0, 0
1,187, 49, 323, 0, 0
1,186, 48, 323, 0, 0
1,184, 47, 323, 0, 0
1,181, 47, 324, 0, 0
1,180, 47, 323, 0, 0
1,177, 46, 324, 0, 0
1,176, 46, 323, 0, 0
1,174, 45, 323, 0, 0
1,172, 45, 323, 0, 0
1,170, 44, 323, 0, 0
1,168, 44, 324, 0, 0
1,166, 43, 323, 0, 0
1,165, 42, 323, 0, 0
1,163, 42, 323, 0, 0
1,161, 42, 323, 0, 0
1,159, 41, 323, 0, 0
1,157, 40, 323, 0, 0
1,156, 40, 323, 0, 0
1,154, 39, 323, 0, 0
1,152, 39, 324, 0, 0
1,150, 38, 323, 0, 0
1,148, 38, 323, 0, 0
1,146, 38, 323, 0, 0
1,144, 37, 323, 0, 0
1,143, 37, 323, 0, 0
1,141, 36, 323, 0, 0
1,139, 35, 323, 0, 0
1,137, 35, 323, 0, 0
1,135, 34, 323, 0, 0
1,134, 35, 323, 0, 0
1,132, 34, 323, 0, 0
1,130, 33, 323, 0, 0
1,128, 33, 323, 0, 0
1,127, 32, 323, 0, 0
1,125, 32, 323, 0, 0
1,123, 32, 323, 0, 0
1,121, 31, 323, 0, 0
1,120, 31, 322, 0, 0
1,118, 30, 323, 0, 0
1,116, 29, 323, 0, 0
1,115, 29, 322, 0, 0
1,113, 28, 322, 0, 0
1,111, 28, 323, 0, 0
1,110, 27, 323, 0, 0
1,108, 28, 323, 0, 0
1,106, 27, 323, 0, 0
1,105, 26, 322, 0, 0
1,103, 26, 323, 0, 0
1,102, 25, 323, 0, 0
1,101, 25, 322, 0, 0
1,99, 24, 322, 0, 0
1,97, 24, 323, 0, 0
1,96, 23, 323, 0, 0
1,94, 23, 323, 0, 0
1,93, 23, 322, 0, 0
1,91, 22, 322, 0, 0
1,90, 22, 322, 0, 0
1,88, 21, 322, 0, 0
1,87, 21, 322, 0, 0
1,85, 21, 323, 0, 0
1,83, 20, 322, 0, 0
1,82, 19, 322, 0, 0
1,80, 19, 323, 0, 0
1,79, 18, 322, 0, 0
1,78, 18, 322, 0, 0
1,76, 17, 322, 0, 0
1,74, 17, 323, 0, 0
1,73, 17, 322, 0, 0
1,72, 17, 323, 0, 0
1,71, 16, 322, 0, 0
1,69, 16, 322, 0, 0
1,68, 15, 322, 0, 0
1,67, 15, 322, 0, 0
1,65, 15, 323, 0, 0
1,64, 14, 322, 0, 0
1,62, 14, 323, 0, 0
1,61, 13, 322, 0, 0
1,59, 13, 323, 0, 0
1,58, 12, 322, 0, 0
1,56, 12, 323, 0, 0
1,55, 11, 323, 0, 0
1,54, 11, 323, 0, 0
1,52, 11, 323, 0, 0
1,51, 10, 322, 0, 0
1,50, 10, 322, 0, 0
1,48, 10, 323, 0, 0
1,47, 10, 322, 0, 0
1,45, 10, 322, 0, 0
1,44, 9, 322, 0, 0
1,42, 9, 322, 0, 0
1,41, 8, 322, 0, 0
1,40, 8, 322, 0, 0
1,39, 8, 322, 0, 0
1,38, 7, 321, 0, 0
1,37, 7, 322, 0, 0
1,35, 6, 323, 0, 0
1,33, 6, 323, 0, 0
1,31, 6, 323, 0, 0
1,30, 5, 323, 0, 0
1,29, 5, 322, 0, 0
1,27, 5, 322, 0, 0
1,25, 4, 323, 0, 0
1,23, 4, 322, 0, 0
1,22, 0, 322, 0, 0
1,21, 3, 322, 0, 0
1,19, 3, 322, 0, 0
1,18, 0, 322, 0, 0
1,17, 0, 322, 0, 0
1,16, 0, 322, 0, 0
1,15, 0, 322, 0, 0
1,13, 0, 322, 0, 0
1,12, 0, 322, 0, 0
1,11, 0, 322, 0, 0
1,10, 0, 322, 0, 0
1,9, 0, 322, 0, 0
1,7, 0, 322, 0, 0
1,6, 0, 322, 0, 0
1,5, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
Brake:

Code: Select all

1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
254,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
Throttle start, PAS, full throttle, Hard Brake(system boots):

Code: Select all

1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 0
1,0, 0, 322, 0, 17
17,0, 0, 322, 0, 26
17,0, 0, 322, 0, 29
17,0, 0, 322, 0, 37
17,5, 0, 322, 0, 46
145,0, 0, 322, 0, 50
145,6, 0, 322, 0, 54
145,7, 0, 322, 0, 64
145,7, 0, 322, 0, 71
145,8, 0, 322, 0, 75
145,9, 0, 322, 0, 78
145,12, 0, 322, 0, 86
145,16, 0, 322, 0, 92
145,20, 0, 322, 0, 96
145,28, 0, 322, 0, 96
145,37, 0, 323, 0, 98
17,51, 0, 323, 0, 101
17,64, 0, 325, 0, 104
17,76, 6, 327, 0, 104
17,88, 11, 327, 0, 106
17,100, 18, 328, 0, 111
17,113, 22, 329, 0, 115
17,125, 25, 329, 0, 117
17,137, 30, 330, 0, 117
17,149, 34, 331, 0, 120
17,162, 36, 330, 0, 125
17,175, 38, 331, 0, 131
17,188, 42, 332, 0, 142
17,202, 45, 334, 0, 143
17,215, 48, 335, 0, 145
17,228, 53, 337, 0, 151
17,241, 56, 337, 0, 159
17,255, 59, 339, 0, 164
17,255, 62, 337, 0, 164
17,255, 63, 335, 0, 167
17,255, 65, 331, 0, 178
17,255, 65, 328, 0, 186
17,255, 65, 327, 0, 190
17,255, 64, 328, 0, 192
17,255, 65, 326, 0, 192
17,255, 65, 325, 0, 193
17,255, 65, 326, 0, 195
17,255, 64, 326, 0, 195
17,255, 65, 326, 0, 195
17,255, 65, 325, 0, 197
17,255, 65, 325, 0, 197
17,255, 64, 327, 0, 197
17,255, 64, 326, 0, 197
17,255, 64, 325, 0, 197
17,255, 65, 325, 0, 197
17,255, 65, 327, 0, 197
17,255, 64, 327, 0, 197
17,255, 65, 326, 0, 197
17,255, 65, 326, 0, 197
17,255, 65, 326, 0, 197
17,255, 64, 327, 0, 197
17,255, 65, 325, 0, 86
17,255, 64, 326, 0, 0
17,255, 65, 327, 0, 0
17,255, 64, 326, 0, 0
17,255, 65, 325, 0, 0
17,253, 64, 325, 0, 0
17,249, 64, 327, 0, 0
1,246, 64, 326, 0, 0
1,244, 64, 324, 0, 0
1,241, 63, 324, 0, 0
1,238, 63, 325, 0, 0
1,236, 62, 324, 0, 0
1,234, 62, 324, 0, 0
1,232, 62, 323, 0, 0
1,229, 61, 324, 0, 0
1,226, 60, 324, 0, 0
1,224, 59, 323, 0, 0
250,216, 58, 322, 0, 0
250,209, 58, 323, 0, 0
250,204, 56, 322, 0, 0
250,198, 54, 322, 0, 0
250,192, 49, 322, 0, 0
250,182, 42, 329, 0, 0
250,167, 38, 338, 0, 0
250,150, 34, 343, 0, 0
250,132, 26, 344, 0, 0
250,116, 22, 342, 0, 0
Brakes and throttle give 4,25V.
If GAIN I=0.3 and GAIN P=0.5 works with 30V test bench flawlessly but not with 58V battery, how should I change these accordingly?
Could the wrong GAIN I/P value burn a mosfet?
Could overheating cause this?

User avatar
stancecoke   100 kW

100 kW
Posts: 1403
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 » Apr 08 2021 1:32pm

Valopallo wrote:
Apr 08 2021 10:45am
blueterm prints with default parameters:
please print (uint16_t) uint32_current_target instead of ui16_sum_torque

All the logs look quite normal. I only wonder, why you always stay in state 1 at PAS operation, are turning the pedals that slowly, or have you set a quite small value for Ramp End?!

Do you use a direct drive, or a geared motor with freewheel?

regards
stancecoke

User avatar
Valopallo   100 W

100 W
Posts: 106
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 » Apr 08 2021 3:57pm

stancecoke wrote: please print (uint16_t) uint32_current_target instead of ui16_sum_torque

Code: Select all

1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 3, 321, 320, 0
1,0, 3, 322, 320, 0
1,0, 4, 321, 320, 0
1,0, 4, 321, 320, 0
1,0, 0, 321, 320, 0
1,0, 4, 321, 320, 0
1,0, 4, 321, 320, 0
1,0, 5, 321, 320, 0
1,0, 5, 321, 320, 0
1,0, 5, 321, 320, 0
1,0, 5, 321, 320, 0
1,0, 5, 321, 323, 0
129,0, 6, 321, 323, 0
129,7, 6, 321, 323, 0
129,8, 7, 321, 324, 0
129,12, 8, 320, 326, 0
129,20, 9, 317, 329, 0
129,29, 10, 319, 334, 0
129,41, 12, 321, 341, 0
1,56, 14, 322, 346, 0
1,71, 15, 322, 347, 0
1,86, 15, 323, 347, 0
1,99, 18, 325, 347, 0
1,111, 20, 327, 347, 0
1,122, 25, 328, 347, 0
1,132, 28, 330, 347, 0
1,142, 32, 330, 347, 0
1,153, 34, 329, 347, 0
1,161, 37, 329, 340, 0
1,169, 38, 328, 342, 0
1,178, 40, 329, 344, 0
1,184, 42, 330, 340, 0
1,193, 44, 330, 344, 0
1,202, 47, 330, 345, 0
1,208, 49, 332, 344, 0
1,217, 51, 331, 346, 0
1,221, 53, 332, 337, 0
1,227, 55, 333, 342, 0
1,235, 57, 332, 344, 0
1,239, 59, 332, 337, 0
1,246, 60, 331, 342, 0
1,253, 62, 332, 344, 0
1,255, 64, 332, 346, 0
1,255, 65, 331, 346, 0
1,255, 65, 328, 346, 0
1,255, 66, 328, 346, 0
1,255, 65, 327, 347, 0
1,255, 65, 326, 345, 0
1,255, 65, 325, 346, 0
1,255, 65, 326, 337, 0
1,255, 65, 326, 342, 0
1,255, 65, 326, 344, 0
1,255, 65, 325, 337, 0
1,255, 65, 328, 342, 0
1,255, 65, 326, 344, 0
1,255, 64, 326, 337, 0
1,255, 64, 326, 327, 0
1,255, 65, 326, 337, 0
1,255, 65, 326, 342, 0
1,255, 64, 326, 344, 0
1,255, 64, 325, 346, 0
1,255, 64, 327, 343, 0
1,255, 65, 326, 345, 0
1,255, 64, 326, 346, 0
1,255, 64, 325, 344, 0
1,255, 64, 328, 346, 0
1,255, 65, 326, 341, 0
1,255, 64, 326, 344, 0
1,255, 64, 326, 345, 0
1,255, 64, 326, 340, 0
1,255, 64, 326, 344, 0
1,255, 64, 325, 345, 0
1,255, 65, 325, 346, 0
1,255, 65, 327, 346, 0
1,255, 64, 327, 346, 0
1,255, 64, 325, 346, 0
1,255, 65, 325, 344, 0
1,255, 65, 327, 345, 0
1,255, 64, 327, 346, 0
1,255, 65, 326, 331, 0
1,254, 65, 326, 325, 0
1,251, 64, 326, 322, 0
1,248, 64, 325, 320, 0
1,246, 64, 324, 320, 0
1,243, 63, 324, 320, 0
1,240, 63, 325, 320, 0
1,238, 63, 324, 320, 0
1,235, 62, 324, 320, 0
1,233, 62, 324, 320, 0
1,230, 60, 324, 320, 0
1,228, 61, 324, 320, 0
1,226, 60, 323, 320, 0
1,224, 59, 323, 320, 0
1,222, 59, 324, 320, 0
1,220, 58, 323, 320, 0
1,218, 57, 323, 320, 0
1,216, 57, 323, 320, 0
1,215, 56, 323, 320, 0
1,212, 56, 324, 320, 0
1,209, 55, 324, 320, 0
1,207, 54, 324, 320, 0
1,206, 53, 323, 320, 0
1,204, 53, 323, 320, 0
1,201, 53, 324, 320, 0
1,199, 52, 324, 320, 0
1,197, 52, 324, 320, 0
1,196, 51, 323, 320, 0
1,193, 51, 324, 320, 0
1,191, 50, 323, 320, 0
1,189, 50, 324, 320, 0
1,187, 49, 323, 320, 0
1,186, 48, 323, 320, 0
1,183, 48, 324, 320, 0
1,181, 47, 324, 320, 0
250,174, 46, 323, 313, 0
250,168, 46, 322, 313, 0
250,164, 44, 322, 314, 0
250,159, 42, 322, 314, 0
250,154, 42, 322, 314, 0
250,149, 40, 322, 314, 0
250,144, 37, 323, 314, 0
250,139, 36, 323, 315, 0
250,135, 35, 322, 315, 0
250,130, 32, 323, 315, 0
250,122, 28, 328, 315, 0
250,114, 25, 329, 316, 0
250,107, 24, 327, 316, 0
250,101, 23, 326, 316, 0
250,95, 21, 326, 317, 0
250,89, 18, 327, 317, 0
250,83, 17, 327, 317, 0
250,77, 15, 326, 317, 0
1,74, 14, 325, 320, 0
1,72, 15, 324, 320, 0
1,69, 15, 324, 320, 0
1,67, 15, 323, 320, 0
1,66, 15, 323, 320, 0
1,64, 14, 322, 320, 0
1,63, 14, 323, 320, 0
1,61, 14, 322, 320, 0
254,59, 13, 323, 320, 0
254,58, 13, 323, 320, 0
254,56, 12, 323, 320, 0
254,54, 11, 323, 320, 0
254,51, 8, 325, 320, 0
254,47, 8, 326, 320, 0
254,43, 0, 326, 320, 0
254,40, 4, 326, 320, 0
254,37, 4, 325, 320, 0
254,34, 0, 324, 320, 0
254,32, 0, 323, 320, 0
1,30, 0, 323, 320, 0
1,29, 0, 322, 320, 0
1,28, 0, 322, 320, 0
1,27, 0, 322, 320, 0
1,26, 1, 322, 320, 0
1,24, 1, 322, 320, 0
1,23, 1, 322, 320, 0
1,22, 0, 322, 320, 0
1,21, 0, 322, 320, 0
1,20, 0, 322, 320, 0
1,18, 0, 322, 320, 0
1,17, 0, 322, 320, 0
1,16, 1, 322, 320, 0
1,15, 1, 322, 320, 0
1,14, 0, 322, 320, 0
1,12, 0, 322, 320, 21
17,12, 0, 322, 322, 42
17,15, 0, 322, 326, 53
17,19, 0, 322, 329, 57
17,24, 0, 322, 331, 67
17,32, 0, 322, 334, 75
17,40, 0, 323, 336, 76
17,49, 0, 323, 337, 76
17,58, 0, 323, 338, 76
17,66, 7, 325, 339, 76
17,75, 11, 325, 340, 78
17,84, 13, 325, 340, 82
17,93, 17, 326, 341, 89
17,104, 19, 326, 343, 93
17,113, 22, 327, 343, 96
17,123, 25, 328, 344, 96
17,133, 28, 329, 345, 98
17,143, 32, 330, 346, 100
17,153, 35, 329, 346, 104
17,163, 37, 330, 347, 109
17,175, 40, 330, 349, 117
17,186, 43, 331, 350, 123
17,198, 45, 332, 352, 139
17,212, 49, 332, 355, 165
17,227, 53, 335, 360, 190
17,245, 56, 336, 365, 195
17,255, 61, 338, 367, 197
17,255, 64, 336, 369, 198
17,255, 64, 332, 371, 200
17,255, 65, 328, 372, 198
17,255, 66, 328, 372, 200
17,255, 65, 327, 373, 200
17,255, 65, 326, 374, 200
17,255, 65, 325, 374, 200
17,255, 65, 326, 374, 200
17,255, 64, 326, 374, 200
17,255, 64, 325, 374, 200
17,255, 65, 326, 374, 200
17,255, 65, 326, 374, 200
17,255, 65, 326, 374, 200
17,255, 64, 325, 374, 200
17,255, 64, 327, 374, 200
17,255, 65, 327, 374, 200
17,255, 64, 325, 374, 197
17,255, 65, 327, 368, 112
17,255, 65, 326, 361, 86
17,255, 65, 327, 354, 65
17,255, 65, 326, 348, 53
17,255, 65, 326, 343, 37
17,255, 65, 326, 334, 0
17,255, 64, 326, 328, 0
17,254, 65, 325, 324, 0
17,251, 65, 326, 322, 0
1,248, 64, 325, 320, 0
1,246, 64, 324, 320, 0
1,243, 63, 324, 320, 0
1,240, 64, 326, 320, 0
1,237, 63, 325, 320, 0
1,235, 62, 324, 320, 0
1,232, 62, 324, 320, 0
1,230, 61, 324, 320, 0
1,228, 60, 324, 320, 0
1,226, 60, 323, 320, 0
1,224, 59, 323, 320, 0
1,222, 58, 323, 320, 0
1,220, 58, 323, 320, 0
1,219, 57, 323, 320, 0
1,217, 57, 323, 320, 0
1,215, 56, 323, 320, 0
1,212, 55, 324, 320, 0
1,210, 55, 324, 320, 0
1,207, 55, 324, 320, 0
1,205, 54, 323, 320, 0
1,204, 53, 323, 320, 0
1,201, 53, 324, 320, 0
1,199, 52, 323, 320, 0
1,197, 52, 323, 320, 0
1,195, 51, 323, 320, 0
1,193, 50, 323, 320, 0
1,192, 50, 323, 320, 0
1,190, 49, 323, 320, 0
1,188, 49, 323, 320, 0
1,186, 48, 323, 320, 0
1,184, 48, 323, 320, 0
1,182, 47, 324, 320, 0
1,180, 47, 323, 320, 0
1,178, 46, 324, 320, 0
1,176, 46, 323, 320, 0
1,174, 45, 323, 320, 0
1,173, 45, 323, 320, 0
1,170, 44, 323, 320, 0
1,168, 44, 324, 320, 0
1,166, 43, 323, 320, 0
1,164, 42, 323, 320, 0
1,162, 42, 323, 320, 0
250,155, 41, 323, 314, 0
250,150, 40, 322, 314, 0
250,146, 39, 322, 314, 0
250,141, 38, 322, 314, 0
250,137, 37, 322, 315, 0
250,133, 36, 322, 315, 0
250,128, 35, 322, 315, 0
250,124, 34, 322, 315, 0
250,120, 33, 322, 315, 0
250,116, 32, 322, 315, 0
250,112, 30, 322, 315, 0
250,108, 29, 322, 316, 0
250,105, 27, 322, 316, 0
250,101, 26, 322, 316, 0
250,96, 23, 324, 316, 0
250,91, 19, 325, 317, 0
250,85, 18, 326, 317, 0
250,79, 17, 328, 317, 0
250,71, 14, 329, 317, 0
254,65, 12, 330, 320, 0
254,57, 12, 333, 320, 0
254,51, 4, 331, 320, 0
254,44, 4, 330, 320, 0
254,39, 0, 328, 320, 0
254,37, 0, 325, 320, 0
254,34, 0, 324, 320, 0
254,31, 0, 325, 320, 0
254,29, 0, 323, 320, 0
1,28, 0, 322, 320, 0
1,27, 0, 322, 320, 0
1,26, 0, 322, 320, 0
1,25, 0, 322, 320, 0
1,24, 0, 322, 320, 0
1,22, 0, 322, 320, 0
1,21, 0, 322, 320, 0
1,20, 0, 322, 320, 0
1,19, 0, 322, 320, 0
1,18, 0, 322, 320, 0
1,16, 0, 322, 320, 0
1,15, 0, 322, 320, 0
1,14, 0, 322, 320, 0
1,13, 0, 322, 320, 0
1,12, 0, 322, 320, 0
1,10, 0, 322, 320, 0
1,9, 0, 322, 320, 0
1,8, 0, 322, 320, 0
1,7, 0, 322, 320, 0
1,6, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322, 320, 0
1,0, 0, 322
are turning the pedals that slowly, or have you set a quite small value for Ramp End?!
I turned pedals slowly with a big gear without any particular reason. Ramp end = 1472
Do you use a direct drive, or a geared motor with freewheel?
Direct drive.
Attachments
blueTerm_20210408_231215.log
(9.44 KiB) Downloaded 6 times

User avatar
stancecoke   100 kW

100 kW
Posts: 1403
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 » Apr 09 2021 12:42am

The log looks completly OK, except again, you are pedaling slowly, so you never reach Ramp End
Valopallo wrote:
Apr 07 2021 3:37pm
I'll try tomorrow with the 14S battery and see how it reacts.
If you get the problems at higher voltages, it could be a problem with the big resistor and the LM317. We know that there are strange things happening, if they get too hot. (Due to high voltage on the battery or high current on the 12V / 5V rail)

You can try to attach an additional heatsink to both parts.

regards
stancecoke

User avatar
Valopallo   100 W

100 W
Posts: 106
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 » Apr 09 2021 1:22am

stancecoke wrote:
Apr 09 2021 12:42am

You can try to attach an additional heatsink to both parts.
Is there a temperature sensor on board and if so, how could I measure the controller temperature and test my cooling conditions?

User avatar
stancecoke   100 kW

100 kW
Posts: 1403
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 » Apr 09 2021 2:32am

Valopallo wrote:
Apr 09 2021 1:22am
Is there a temperature sensor on board
No, and I think it wouldn't help, you have to measure directly on the critical components.
I hope you really read the wiki and don't power your BT-module from the 5V rail of the controller :shock:

regards
stancecoke

User avatar
Valopallo   100 W

100 W
Posts: 106
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 » Apr 09 2021 3:31am

stancecoke wrote:
Apr 09 2021 2:32am
Valopallo wrote:
Apr 09 2021 1:22am
Is there a temperature sensor on board
No, and I think it wouldn't help, you have to measure directly on the critical components.
I hope you really read the wiki and don't power your BT-module from the 5V rail of the controller :shock:
No It's powered from the controller main as written there. Is there a current limit that can be drawn from the controller mains to power bt module, lights, usb charger? If my LM2596HV-adj is dialed to handle 3A would that mean that it draws 3A all the time from the controller even without using lights usb etc? This is a module that has a potentiometer also for the current and a lamp to indicate the load. I ask because these problems came to the both of my controllers when I had to replace LM2596 to this LM2596HV along with the higher battery voltage upgrade. I dropped it to 1.5A for now to see if it has any effect whatsoever. It was at 3.5A :shock:

Post Reply