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: 76
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 28 2020 7:23am

simpletech wrote:
Jan 27 2020 4:39pm

I'm afraid I don't have any other places for you to check.
Thank you for helping me. I guess buying these controllers from Aliexpress is like russian roulette. You hit or you miss. :? Two recent aliexpress controllers were DOA but the first one I got from bmsbattery two years ago still works like a charm. Wish they could get more affordable shipping costs to customers though.
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 7:43am

Valopallo wrote:
Jan 28 2020 7:23am
is like russian roulette
:-) have you checked the voltage of the brake-signal wire? It has to have 5V (pullup from processor) otherwise the processor stops during booting.

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 8:18am

stancecoke wrote:
Jan 28 2020 7:43am
Valopallo wrote:
Jan 28 2020 7:23am
is like russian roulette
:-) have you checked the voltage of the brake-signal wire? It has to have 5V (pullup from processor) otherwise the processor stops during booting.

regards
stancecoke

Brake= vin 4.5V, signal 4.95V
Hall= vin 4.5V, signal 4.95V
PAS= vin 4.5V, signal 4.95V
Throttle= vin 4.5V, signal 4.95V
Speedometer = vin 4.5V, signal 4.95V

Hall sensors = check
Phases = check
Mosfets = check
LM317 = check
78L05 = check
82R = check
Attachments
Osec.jpg
Osec.jpg (431.7 KiB) Viewed 1671 times
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 8:32am

Valopallo wrote:
Jan 28 2020 8:18am
Brake= vin 4.5V, signal 4.95V
OK, you don't use the latest version of the java configurator from github?!

Image

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 8:38am

stancecoke wrote:
Jan 28 2020 8:32am
OK, you don't use the latest version of the java configurator from github?!
No. But now I think I should update. :D

EDIT: Which I did just now, flashed again but it didn't change anything :(
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 9:34am

have you checked the log in the cmd window while compiling and flashing? Is there any error?

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 9:52am

stancecoke wrote:
Jan 28 2020 9:34am
have you checked the log in the cmd window while compiling and flashing? Is there any error?

regards
stancecoke
Yes, there is;
brake.c:23: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
Attachments
Compiling_log.txt
(6.06 KiB) Downloaded 29 times
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 10:08am

Valopallo wrote:
Jan 28 2020 9:52am
Yes, there is
OK, but this should be no problem, the log looks fine.

Have you tested the Diagnostics mode? Does the controller send any information in this mode? Use e.g. Blueterm for logging.

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 11:20am

stancecoke wrote:
Jan 28 2020 10:08am
Valopallo wrote:
Jan 28 2020 9:52am
Yes, there is
OK, but this should be no problem, the log looks fine.

Have you tested the Diagnostics mode? Does the controller send any information in this mode? Use e.g. Blueterm for logging.

regards
stancecoke
It connects and sends numbers:
1, 0, 0, 323, 0, 0
1, 0, 0, 324, 0, 0
1, 0, 0, 325, 0, 0
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 12:14pm

Valopallo wrote:
Jan 28 2020 11:20am
It connects and sends numbers:
1, 0, 0, 323, 0, 0

OK, that looks like normal operation.

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);
Are the values changing when you push the throttle?

You can put in (uint16_t) uint32_current_target instead of ui16_sum_torque (line 193 of the main.c), to see if the controller gets the command to produce power.

Are you sure, that you plugged the throttle to the right connector? The throttle singal line should have 0V if unconnected, and the adc shows 0 for the throttle channel (last number)...

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 12:33pm

stancecoke wrote:
Jan 28 2020 12:14pm
Valopallo wrote:
Jan 28 2020 11:20am
It connects and sends numbers:
1, 0, 0, 323, 0, 0

OK, that looks like normal operation.

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);

You can put in (uint16_t) uint32_current_target instead of ui16_sum_torque (line 193 of the main.c), to see if the controller gets the command to produce power.

Like this? (line 193)

Code: Select all

printf("%u,%u, %u, %u, %u, %u\r\n", ui16_control_state, ui16_setpoint, ui16_motor_speed_erps, ui16_BatteryCurrent, (uint16_t) uint32_current_target, ui16_momentary_throttle);
Are you sure, that you plugged the throttle to the right connector? The throttle singal line should have 0V if unconnected, and the adc shows 0 for the throttle channel (last number)...
Oh, the throttle wasn't connected. Only the bluetooth module and battery were. I plug everything to the controller and try again with this main.c line edit.
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 12:52pm

This is the effect of the throttle. The motor moved a little the first time I pressed throttle.
Attachments
Screenshot_20200128-195005.png
Screenshot_20200128-195005.png (191.09 KiB) Viewed 1624 times
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 2:06pm

Valopallo wrote:
Jan 28 2020 12:52pm
This is the effect of the throttle.
Very good! So nothing's wrong with the controller :-)
We have to check the hallsensor-signals next.

Put in GPIO_ReadInputData(HALL_SENSORS__PORT) & (HALL_SENSORS_MASK) instead of ui16_setpoint now. Then turn the motor shaft slowly by hand. The signal sequence has to be 4-6-2-3-1-5. If you have to turn the motor backwards due to a freewheel, the order is vice versa of course. If the sequence is OK, you have to find the right motor specific angle.
The meaning of the first value (ui16_control_state) can be decrypted as described here.

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 2:27pm

stancecoke wrote:
Jan 28 2020 2:06pm
If the sequence is OK, you have to find the right motor specific angle.
Sequence is ok. So I just have to try different motor specific angle parameters and see what works?
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 28 2020 2:40pm

Valopallo wrote:
Jan 28 2020 2:27pm
So I just have to try different motor specific angle parameters and see what works?
Yes, try to add/substract 64 to/from your recent value (64 is 90 degree as 256 is 360 degree)
Or just increase/decrease in steps of 15 and check what happens...

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 28 2020 3:41pm

stancecoke wrote:
Jan 28 2020 2:40pm
Valopallo wrote:
Jan 28 2020 2:27pm
So I just have to try different motor specific angle parameters and see what works?
Yes, try to add/substract 64 to/from your recent value (64 is 90 degree as 256 is 360 degree)
Or just increase/decrease in steps of 15 and check what happens...
:bolt: And so it happens that everything works! :bolt: Even the BluOSEC reads current and voltage. The speed is not correct and also I cannot access most of the parameters from BluOSEC(greyed out). But this is just because I don't have a wheel trued to the motor yet, I think. Does BluOSEC prevent changing parameters when there is something wrong with the flashed controller parameters? Also, I tested the motor without proper tightening to the fork, so I guess the fault might happen when the axle twists backward and the angle gets diffrerent.
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 2020 2:37am

Valopallo wrote:
Jan 28 2020 3:41pm
Does BluOSEC prevent changing parameters when there is something wrong with the flashed controller parameters?
Make sure, that you use the latest BlueOSEC-version with the latest controller firmware version!
https://github.com/Xnyle/bluosec-apk

regards
stancecoke

Lesny   100 µW

100 µW
Posts: 9
Joined: Jan 30 2020 8:09am

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

Post by Lesny » Jan 30 2020 8:19am

Hi
J have some problem with blueosec app.
My bluetooth hc 05 it works, J try swap rx and tx but app dont receive any data. J use kt60svp and this controller reacts on settings in software.
Are you know how solve this problem?

sylvain_wm   1 µW

1 µW
Posts: 2
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

Post by sylvain_wm » Feb 02 2020 6:16am

Hi there,

thank you for this interesting topic.

I'm trying to build an electric fatbike with a torque sensor.
I wonder where I can get a KT controller SVP that can drive a 1000W motor.
To tell the truth, I haven't read the 152 pages of this topic.
Can anyone help me?

Have a great day.

Sylvain


sylvain_wm   1 µW

1 µW
Posts: 2
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

Post by sylvain_wm » Feb 03 2020 1:02pm

Thank you so much!!!
I've spent so much time looking for this.

I'll order one and tell you if it works.

Have a good one.

Sylvain

User avatar
Valopallo   10 W

10 W
Posts: 76
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 » Feb 03 2020 3:35pm

stancecoke wrote:
Jan 29 2020 2:37am
Valopallo wrote:
Jan 28 2020 3:41pm
Does BluOSEC prevent changing parameters when there is something wrong with the flashed controller parameters?
Make sure, that you use the latest BlueOSEC-version with the latest controller firmware version!
https://github.com/Xnyle/bluosec-apk

regards
stancecoke
Yes, I am. My hub motor shows wrong speed. I cannot drive without offroad because the motor starts pulsating power as if when limiting speed. It shows Something like 248km/h with offroad. Also shuts the offroad mode back to normal when the load gets too much. Even though set to 10A blueosevc only shows 8.2A max when resisting the wheel with hand. Very low torgue before motor starts "jittering". Maybe my speed hall sensor is wrong type or some settings are wrong. I set gear ratio 10 because I counted 20 magnets at the hub. Is this correct? Also how does high speed motors operate? Could this be high speed motor (unknown chinese front hub motor with a 36v250w label)? My limits are 80km/h and no pas connected.
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 2020 2:59am

Valopallo wrote:
Feb 03 2020 3:35pm
I set gear ratio 10 because I counted 20 magnets at the hub. Is this correct?
For a direct drive it is OK, if it's a geared motor, you have to multiply the 10 with the mecanical gear ratio.

regards
stancecoke

User avatar
Valopallo   10 W

10 W
Posts: 76
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 » Feb 04 2020 5:16am

stancecoke wrote:
Feb 04 2020 2:59am
Valopallo wrote:
Feb 03 2020 3:35pm
I set gear ratio 10 because I counted 20 magnets at the hub. Is this correct?
For a direct drive it is OK, if it's a geared motor, you have to multiply the 10 with the mecanical gear ratio.

regards
stancecoke
Ok, so as it seems I have 21 teeth on the drive gear and 36 teeth on each driven gears. Their ratio is 36/21=1.7. And so multiplying that with the count of the aforementioned pole pairs is 10 x 1.7= 17. Is that the right way to calculate it?
BluOSEC@36V|AWD|2xS06S|15A rear DD|10A front geared|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1199
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 2020 5:54am

Valopallo wrote:
Feb 04 2020 5:16am
Ok, so as it seems I have 21 teeth on the drive gear and 36 teeth on each driven gears.
no, I guess, you have a planetary gear. So the number of teeth of the planet gears is irrelevant, important is the ratio from the sun gear to the ring gear.
Image

regards
stancecoke
Last edited by stancecoke on Feb 04 2020 7:11am, edited 1 time in total.

Post Reply