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

Electric Motors and Controllers
User avatar
stancecoke   10 kW

10 kW
Posts: 941
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 » Nov 25 2018 12:54pm

Valopallo wrote:
Nov 25 2018 12:15pm

Ok. I flipped the disk, but the situation remains the same :(
then you have to mount the whole sensor to the other side of the bottom bracket.
There are tons of posts regarding this topic in this forum.

regards
stancecoke

Valopallo   100 mW

100 mW
Posts: 35
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 » Nov 25 2018 1:58pm

stancecoke wrote:
Nov 25 2018 12:54pm
Valopallo wrote:
Nov 25 2018 12:15pm

Ok. I flipped the disk, but the situation remains the same :(
then you have to mount the whole sensor to the other side of the bottom bracket.
There are tons of posts regarding this topic in this forum.

regards
stancecoke
There's no locking ring at the driveside so I flipped the sensor unit in its metal holder and everything works now. Some glue and silicone and I'm set. ;)

haiyi911   100 mW

100 mW
Posts: 41
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » Nov 26 2018 8:52am

Hi,when i twest the throttle at first time,the speed show after 5 seconds on the LCD3. then twest throttle again,the speed show immediately.

tomtom50   100 W

100 W
Posts: 182
Joined: Jun 18 2018 10:09am

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

Post by tomtom50 » Nov 26 2018 11:12pm

Blik86 wrote:
Aug 06 2018 12:57pm
Hi
I got KT48SVPRM-XFCF06 (board KTE-9S5-J5). It has 9 transistors K150E09NE. Processor STM8S105C6T6. Current sensor acs711 (QFN).
Is it compatible with this OpenSource firmware?
kt48svprm.jpg

What are the extra 3 transistors doing?
I bought this same controller from topbikekit. Have you used it yet? Any results?

User avatar
Xnyle   10 mW

10 mW
Posts: 32
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » Nov 27 2018 12:10pm

What are the extra 3 transistors doing?
Maybe passing more current? Or maybe they are just for optics.

Blik86   10 µW

10 µW
Posts: 6
Joined: Aug 06 2018 12:03pm

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

Post by Blik86 » Nov 27 2018 1:19pm

tomtom50 wrote:
Nov 26 2018 11:12pm
I bought this same controller from topbikekit. Have you used it yet? Any results?
Did not touch the waterproof fill. Therefore, I use it in stock.

Bike and I are about 100kg. Motor bafang BPM 10t 26 ". 48V.

It starts moving away if the gas is lightly pressed, otherwise the current exceeds and switches off the motor.

Without a display, the speed is no more than 25 km / h. The seller said that with the display speed is more.

The display will soon arrive (lsd6), if the speed does not rise, I will try the OpenSource firmware.

tomtom50   100 W

100 W
Posts: 182
Joined: Jun 18 2018 10:09am

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

Post by tomtom50 » Nov 27 2018 9:52pm

Blik86 wrote:
Nov 27 2018 1:19pm
tomtom50 wrote:
Nov 26 2018 11:12pm
I bought this same controller from topbikekit. Have you used it yet? Any results?
Did not touch the waterproof fill. Therefore, I use it in stock.

Bike and I are about 100kg. Motor bafang BPM 10t 26 ". 48V.

It starts moving away if the gas is lightly pressed, otherwise the current exceeds and switches off the motor.

Without a display, the speed is no more than 25 km / h. The seller said that with the display speed is more.

The display will soon arrive (lsd6), if the speed does not rise, I will try the OpenSource firmware.
Thanks. I'm interested in hearing how the open source firmware goes.

haiyi911   100 mW

100 mW
Posts: 41
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » Nov 28 2018 5:17am

Hi,stancecoke
I want to add a protection function. when the power is turned on, if the throttle value is between ADC_THROTTLE_MIN_VALUE and ADC_THROTTLE_MAX_VALUE, it is protected. Release the throttle then protection function is unprotected. Some code have been added and protection is worked,but there is a problem.
when i released the throttle fast,the motor run a few time then stop.https://youtu.be/KL8o5s7RZMI
when i released the throttle slowly,the motor didnot run.
Maybe the throttle value is valid when i release the throttle?
Last edited by haiyi911 on Nov 29 2018 9:34am, edited 1 time in total.

User avatar
stancecoke   10 kW

10 kW
Posts: 941
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 » Nov 28 2018 1:28pm

haiyi911 wrote:
Nov 28 2018 5:17am
I want to add a protection function
Thank you for your effort.
I don't know, if this solves your problem, but zero current means

Code: Select all

ui16_setpoint = ui16_current_cal_b;
regards
stancecoke

haiyi911   100 mW

100 mW
Posts: 41
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » Nov 28 2018 9:38pm

stancecoke wrote:
Nov 28 2018 1:28pm
haiyi911 wrote:
Nov 28 2018 5:17am
I want to add a protection function
Thank you for your effort.
I don't know, if this solves your problem, but zero current means

Code: Select all

ui16_setpoint = ui16_current_cal_b;
regards
stancecoke
Thanks! but :( the same result.
another question, when i twest the throttle at first time,the speed show after 5 seconds on the LCD3. then twest throttle again,the speed show immediately.is there delay-code?

User avatar
stancecoke   10 kW

10 kW
Posts: 941
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 » Nov 29 2018 2:53am

Uups, your code was right, ui16_setpoint is the duty-cycle, not the current target. The delay of the speed information is an issue of the display, not of our firmware.

Regards
stancecoke

j bjork   100 W

100 W
Posts: 106
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Nov 29 2018 5:14am

stanscoke already answered, but i can confirm that I have the same issue with the display not showing the speed at first. That is with standard controller and lcd3.

casainho   100 MW

100 MW
Posts: 2859
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 29 2018 11:34am

Status of the OpenSource firmware for Bafang 850C color LCD

The configuration menu is now fully implemented and is well structured that is easy and fast to add/remove items to the menu. This LCD would be a good tool for KT motor controllers, for the ones that do prefer an LCD. In future I want to implement graphs so the LCD can show a graph of real time value of variables like motor current, rider pedals human power, etc.

Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.


geofft   1 kW

1 kW
Posts: 324
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 » Nov 29 2018 3:15pm

casainho wrote:
Nov 29 2018 11:34am
Status of the OpenSource firmware for Bafang 850C color LCD

The configuration menu is now fully implemented and is well structured that is easy and fast to add/remove items to the menu. This LCD would be a good tool for KT motor controllers, for the ones that do prefer an LCD. In future I want to implement graphs so the LCD can show a graph of real time value of variables like motor current, rider pedals human power, etc.
Nice work Casainho, some useful options on those menus.

I'm a little confused though, as to where this fits in with the KT controllers - I guess this isn't currently compatible with your KT (S06S etc) fw branch, do you have plans to upgrade the KT controller fw to work with this?
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

casainho   100 MW

100 MW
Posts: 2859
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 29 2018 4:59pm

geofft wrote:
Nov 29 2018 3:15pm
I'm a little confused though, as to where this fits in with the KT controllers - I guess this isn't currently compatible with your KT (S06S etc) fw branch, do you have plans to upgrade the KT controller fw to work with this?
This would fit very well, because I developed the firmware and I did structure and program with the same logic I did for KT. Also the development tools are just the same! The good of this LCD is that is very flexible:
- 320x480 pixels, color
- has a clock that can keep date and time when system is powered off (1)
- very fast, running at 125Mhz, 32 bits ARM cortex M3
- has a LOT of program memory (0.5 mega byte and I am using 30% of it, while the firmware is at about 80% complete)

I wish I could make it for KT, but I can't do more because lack of time (I take already a LOT of my personal time for this projects!!). Time for other developers to join...

(1) I hate when riding and I have to slow down to look at my watch to see the hours, to see if I am late -- LCD3 do not have such clock and date.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2859
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 30 2018 2:17am

It's working for the very first time!!

I have an special ride on Saturday, and I decide to take the risk and use this fresh firmware that may have bugs and be a problem while I will be on the mountains...

Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

haiyi911   100 mW

100 mW
Posts: 41
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » Nov 30 2018 10:25am

stancecoke wrote:
Nov 29 2018 2:53am
Uups, your code was right, ui16_setpoint is the duty-cycle, not the current target. The delay of the speed information is an issue of the display, not of our firmware.

Regards
stancecoke
ok.thanks , stancecoke.
and what is the ACA meaning? " #define ACA 4760""

j bjork   100 W

100 W
Posts: 106
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Dec 01 2018 2:06pm

I have read the instructions, but I don´t understand where to solder the wires for the st link. I have an 18 fet controller. Is it on J1?

Image

j bjork   100 W

100 W
Posts: 106
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Dec 02 2018 1:10pm

It seems like there are a few users of the 18 fet controllers here, so there should be some people that knows I think. The second hole from the left is ground, but I don´t see any obvious 5v connection. At least it is not connected to the other 5v that exit the controller to pas, throttle etc.
If this is not theright spot, what markings should I look for?

Edit, I hooked it up and measured. There is 5v at the 4th hole from the left, so I guess it is the same as in the instructions. Just that it is wired the other way round.

User avatar
stancecoke   10 kW

10 kW
Posts: 941
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 » Dec 03 2018 7:35am

haiyi911 wrote:
Nov 30 2018 10:25am
and what is the ACA meaning? " #define ACA 4760""
In this value the initial settings of some parameters are stored.

Code: Select all

typedef enum {
	ASSIST_LVL_AFFECTS_THROTTLE = ((uint16_t) 1),
	OFFROAD_ENABLED = ((uint16_t) 2),
	BRAKE_DISABLES_OFFROAD = ((uint16_t) 4),

	DIGITAL_REGEN = ((uint16_t) 8),
	SPEED_INFLUENCES_REGEN = ((uint16_t) 16),
	SPEED_INFLUENCES_TORQUESENSOR = ((uint16_t) 32),
	PAS_INVERTED = ((uint16_t) 64),

	DUMMY_ALWAYS_ON = ((uint16_t) 128),

	BYPASS_LOW_SPEED_REGEN_PI_CONTROL = ((uint16_t) 256),

	DYNAMIC_ASSIST_LEVEL = ((uint16_t) 512),
	
	TQ_SENSOR_MODE = ((uint16_t) 2048),
	ANGLE_CORRECTION_ENABLED = ((uint16_t) 4096)
} ACA_FLAGS;
It is transferred to the variable that can be changed at runtime during the init-procedere:

Code: Select all

ui16_aca_flags = ACA;
regards
stancecoke

IgorsLog   1 µW

1 µW
Posts: 1
Joined: Dec 05 2018 8:46am

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

Post by IgorsLog » Dec 05 2018 8:59am

Would it be possible to make the brake shift and throttle work separately? When you press the shift:idle. When you press the throttle: regeneration.
Need for a e-kickscooter ebrake.

User avatar
stancecoke   10 kW

10 kW
Posts: 941
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 » Dec 05 2018 9:44am

IgorsLog wrote:
Dec 05 2018 8:59am
Would it be possible to make the brake shift and throttle work separately?
Yes, of course. You can do what ever you want :wink:

regards
stancecoke

glebor   1 µW

1 µW
Posts: 2
Joined: Feb 07 2018 4:41pm

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

Post by glebor » Dec 08 2018 7:09pm

Hello friends :)

I have a problem with the LCD display KT-3

Well, the question is because LCD KT-3 in the old version work with the KT48ZWSRL controller, where there are only basic settings and type P. setting "C " not included.

I ordered new displays on aliexpress KT-LCD3 and they don't want to work with my old controllers, but with new sinusoidal controllers they work. What and where to upload for displays to work with an older version of the driver?

I don't know what it's all about, because I have KT-LCD-3 displays provided by the manufacturer of the software version V3.0 and I also bought the KT-LCD3 version V3.0 on aliexpress and these no longer work with old ones. They do not display, do not show speed, do not show watts, do not change settings.

haiyi911   100 mW

100 mW
Posts: 41
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » Dec 14 2018 10:23am

Hi,stancecoke
whats the following lines meaning? calculate average? and how to calculate it?
in ACAsetPoint.c
“”ui32_erps_accumulated -= ui32_erps_accumulated >> 3;
ui32_erps_accumulated += ui16_motor_speed_erps;
ui32_erps_filtered = ui32_erps_accumulated >> 3;“”

Post Reply