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

I am still very interested in trying the fw, especially the cruise control would be nice to have though. The app looks nice, I hope I can get an old phone working and try to use it on.
I have to get the parts to be able to program before I can get much furter though.

I know there was some talk about getting the controller to run on higher voltage earlier, but I don´t know if it was settled what can be done. In the fw it seems possible to set any number of serial sells I want, or is there any limitations there?

I guess I should be able to at least run 14s with the controller with stock hardware?
It would be nice to be able to modify it to run 20s, but maby it is easier to get a controller for 20s in that case..

Another thing, I saw that I can use x4 for variable regen, that sounds nice. But it also says the same x4 for temp sensor in the motor. But I think there is already a wire for temp sensor, there is an extra wire in the harness for the hall sensors.

I liked the possibility to have regen when pedaling backwards, but that maby was in casinos fw?
 
Integrated 9 mosfet KT sine controller.

I bought it from topbikekit.com

http://www.topbikekit.com/kt-36v48v-9mosfets-sine-wave-controller-for-big-hailong-case-65pcs-cells-p-712.html

They said it was for big Hailong case 65 cells, I took a risk, bought it, and it perfectly fits the 52 cell Hailong case UPP battery I have.

Board is marked KTE-9S5-J5
View attachment 2
STM8 needs a different angle to see
STM8.jpg

Since it is labeled 9S I think it probably is sine wave, but I personally cannot tell from the chips. I recall sine controllers have phase current sensors? Can anyone tell?

From what I am seeing KT does make 9 mosfet sine controllers, although they seem uncommon.

The packaging is great. Waterproof connectors, disappears inside the battery, board seems well sealed, cooling should be very good with the heatsink in the wind and frame attached.
 
tomtom50 said:
Since it is labeled 9S I think it probably is sine wave, but I personally cannot tell from the chips. I recall sine controllers have phase current sensors? Can anyone tell?

There is the phase B current sensor, right next to the green phase wire. You can't do classical FOC with this controller, but sinusodial SVM with a simplified advance angle adjustment is possible.

The circuit seems to be a little different to the known 6/12/18 FET controllers, as there is 14 pin IC on the board, that I have not seen before. Can you identify it? Is the label readable? I guess it's a op-amp?!

regards
stancecoke
 
With a flashlight and just the right angle I can read the IC tags. Let me know if you want me to take another look.
I'm not an EE or electronics tech so I don't know that well what to look for.KTE-9S5-J5 ANNOTATED.jpg
I'm interested in your thoughts. Do you know the function of the 78MOS or the 14-pin IC?
Is the X4 socket what would be used for an analog input for a torque cell?
 
tomtom50 said:
I'm interested in your thoughts. Do you know the function of the 78MOS or the 14-pin IC?

The 78M05 is the 5V regulator and the 324 is as guessed a four channel op-amp. But I don't know, why there are 4 op-amps needed :confused:

tomtom50 said:
Is the X4 socket what would be used for an analog input for a torque cell?
There are different possibilities. If X4 has 5V by default, then it's for a motor temperature sensor. If it has 0V then it might be usable for a torque sensor.

In our open firmware the torque sensor has to be connected to the throttle input by default, but it can be mapped to X4 quite easily.

regards
stancecoke
 
Wow, this thing really has a STM8 on it and also a flash connector.

Thats actually a very good alternative to the bulky Controllers that need an extra bag. Cooling should be decent as well as the airflow directly hits the underside.

If this can output ~20A over a longer period of time without blowing up those tiny fets... might buy one as well.
 
Xnyle said:
If this can output ~20A over a longer period of time without blowing up those tiny fets...
I have a similar controller with 9 * K150e09NE. At the start, turns off the motor when the battery current is 20A. In motion with a battery current of approximately 25A.
Phase currents up to 80A.
10mV =1A
 

Attachments

  • battary run wheel.jpg
    battary run wheel.jpg
    46.4 KB · Views: 3,168
  • phase run wheel.jpg
    phase run wheel.jpg
    46.1 KB · Views: 3,167
Is there any possibility to add field weakening in kt controllers, using OpenSource firmware ? Or are s/kt controller even capable of such thing, or is there missing some important hw parts etc?
 
stancecoke said:
Valopallo said:
Aye! <3 Finally, everything works, except I cannot reverse PAS direction neither I can't turn ON the offroad mode... Would it be cool to have offroad enabled from the BluOSEC app somehow? Is there?

I've just added some more information how to determine the right value for PAS threshold in the wiki page:

PAS threshold: Threshold for direction detection from the PAS signal. The value should be the arithmetic mean of the reciprocal of the duty cycle of the PAS-signal during forward and reverse rotation. The appropriate value can be determined by trial and error or by looking at the displayed values at turning the pedals forwards and backwards in "Diagnostics" mode, or look at the value of PAS fraction in the BluOSEC app. Set PAS threshold to a value somewhere in the middle between the value at pedaling forwards and the value at pedaling in reverse. The preset 1.7 was determined for a simple PAS with 8 magnets.
If you found the right value for PAS threshold, the function PAS inverted will work properly.
regards
stancecoke

If the PAS inverted function is set as OFF and I pedal backwards, I get some PAS fraction values in BluOSEC app between 7.7-9.5 but I haven't been able to get forward pedaling PAS fraction values yet. So, should I continue to try every possible PAS threshold value one by one, because that surely means I need to remember to switch the PAS inverted function as ON. :p
 
Xnyle said:
Wow, this thing really has a STM8 on it and also a flash connector.

Thats actually a very good alternative to the bulky Controllers that need an extra bag. Cooling should be decent as well as the airflow directly hits the underside.

If this can output ~20A over a longer period of time without blowing up those tiny fets... might buy one as well.
It has a flat mounting surface that is bolted down. That gives the option of using aluminum "U" channel as a heat sink (the U straddles the frame tube. With all that in the wind it should cool very well, and perhaps could be pushed hard.
 
Nixunen said:
Is there any possibility to add field weakening in kt controllers, using OpenSource firmware ? Or are s/kt controller even capable of such thing, or is there missing some important hw parts etc?
That's very easy, you just have to choose a higher advance angle... :shock:

regards
stancecoke
 
stancecoke said:
PAS threshold: Threshold for direction detection from the PAS signal. The value should be the arithmetic mean of the reciprocal of the duty cycle of the PAS-signal during forward and reverse rotation. The appropriate value can be determined by trial and error or by looking at the displayed values at turning the pedals forwards and backwards in "Diagnostics" mode, or look at the value of PAS fraction in the BluOSEC app. Set PAS threshold to a value somewhere in the middle between the value at pedaling forwards and the value at pedaling in reverse. The preset 1.7 was determined for a simple PAS with 8 magnets.
If you found the right value for PAS threshold, the function PAS inverted will work properly.
regards
stancecoke

I literally tried every possible PAS threshold setting at the BluOSEC app with PAS inverted function set as ON. The wheel does not spin with any of them.

When the PAS inverted function is set as OFF, in most PAS threshold settings the wheel spins when I rotate the PAS backwards and I also get a reading at PAS fraction.

There's no PAS fraction readings when I rotate the crank forwards as I want it to be.

I don't know if this is relevant but the BluOSEC app shuts down the settings with some PAS threshold values and I needed to flash OSEC firmware to be able to change PAS threshold once again.


Then, I changed the firmware to diagnostics mode and edited the main.c. I just pasted the line in the tutorial to the main.c file and saved the file. I tried flashing, but the ST-link V2 lights didn't blink and also some errors of missing files ends the flashing process. So I guess no success.

I tried the BlueTerm app but there are no readings at all even though it's connected correctly to HC-05.

What can I do? Could you help me to edit the main.c correctly to get to flash the firmware with diagnostics and to get readings for further examination. Or can some other incorrect settings in OSEC affect the PAS fraction values not showing up?

System info:
36V. 10S. 10.4Ah Battery. 20A limit
S06S controller
Direct drive rear hub motor. 46 poles.
BluOSEC app
HC-05 with DC-DC reg.
Brake
Throttle
PAS
 
I've got an old S06S Controller which I want to test this firmware on.
I ordered an ST-Link V2 clone from e-bay, but the labelling on the pins is different to what I see in the instructions online.
The pins I have are:
GND | TCK
RXD | RST
TXD | 3V3
5V0 | N.C.
3V3 | N.C.

GND, RST, and 5V0 are all fairly obvious to match, but which one should I use for SWIM?
Or have I got the wrong thing?

This is the listing I bought from:
https://www.ebay.co.uk/itm/STC-microcontroller-automatically-download-line-USB-to-TTL-without-manual-col-Kx/132761388689

The first picture of 6 different coloured sticks shows what I thought I was getting, the rest of the pictures show what I actually got.
 
Valopallo said:
What can I do?

It is obvious that you are using a PAS with an internal direction detection. PAS pulses are only generated, when the pedals are turning in the right direction.
Just turn your PAS disc on the bottom bracket shaft, so that the arrow on it points to the opposite spin direction. Then it will work. :wink:

gutyex said:
I ordered an ST-Link V2 clone from e-bay, but the labelling on the pins is different to what I see in the instructions online
This is not a STLink, even if the first picture of the offer shows a bundle of STLinks.
Your item in an USB to TLL converter.

FAKE_ST-LINK.JPG


regards
stancecoke
 
stancecoke said:
Valopallo said:
What can I do?

It is obvious that you are using a PAS with an internal direction detection. PAS pulses are only generated, when the pedals are turning in the right direction.
Just turn your PAS disc on the bottom bracket shaft, so that the arrow on it points to the opposite spin direction. Then it will work. :wink:

Ok. I flipped the disk, but the situation remains the same :(
The little red led at the PAS signal sensor is blinking only when rotating backwards and also BluOSEC's pasActive and pasFraction gives readings only when rotating backwards. When PAS Inverted function is switched ON, only backward rotation gives reading on PAS fraction but then there's no pasActive reading anymore. And still, there's no activity on either of those when rotating forwards.

This is the PAS I'm using;

s-l300.png

I guess I have to make an inverted clone of the metal part that holds the sensor unit, so that I can flip it, but I think this problem might occur with somebody else's setup so it would be important to figure this out in BluOSEC if possible.
 
Valopallo said:
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
 
stancecoke said:
Valopallo said:
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. ;)
 
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.
 
Blik86 said:
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?
 
tomtom50 said:
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.
 
Blik86 said:
tomtom50 said:
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.
 
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?
 
Back
Top