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

caesareor said:
Hello guys,

I'm new here. I compiled and flashed the firmware on a KT36/48SVPRD-HRD01 controller. I get no error at compiling (with proven setting: THR-PAS,KT36-48svpr,12s,26inch,Q128h + Diagnostics), the hex file is created just fine, I flashed it with the STVP. I get the message that the program memory was written and checked successfully.
However when I power it (36V battery) and try to run it with the throttle (I don't have PAS yet because the parts are not installed on the bike) nothing happens. I connected a HM-10 bluetooth module to the LCD pins. All that I am getting on the terminal app is this character� when I short the blue and red wires of the LCD.

The controller/motor combination was working fine with the factory firmware (I checked it even after I soldered programing pins)

Any ideas about what I should try to troubleshoot it?

Did you try adjusting the under voltage setting? It may think the battery is too low
 
tenten8401 said:
I get no error at compiling (with proven setting: THR-PAS,KT36-48svpr,12s,26inch,Q128h + Diagnostics) ...
I connected a HM-10 bluetooth module to the LCD pins. All that I am getting on the terminal app is this character�

OK, the controller should send the status message in any case. Are you sure, the HM-10 is working properly? Have you set the right BAUD rate? Have you tried to swap Rx and Tx?

Perhaps you should try a simple UART to USB converter for debugging with your laptop first...

regards
stancecoke
 
tenten8401 said:
caesareor said:
Hello guys,

I'm new here. I compiled and flashed the firmware on a KT36/48SVPRD-HRD01 controller. I get no error at compiling (with proven setting: THR-PAS,KT36-48svpr,12s,26inch,Q128h + Diagnostics),

Just a couple of things worth mentioning with those settings. The throttle min/max numbers were for a special setup and probably won't suit your throttle. Something like 50/180 would probably be better start numbers for a 'standard' hall throttle. Also, as already mentioned, those battery under/overvoltage settings won't suit your battery, something like 110/150 might be a better start point. Don't take too much notice of the voltage calibration setting, I don't think it has any function in the code nowadays.
 
tenten8401 said:
Did you try adjusting the under voltage setting? It may think the battery is too low

I tried to compile it with 100 as under voltage setting. Same result.

stancecoke said:
OK, the controller should send the status message in any case. Are you sure, the HM-10 is working properly? Have you set the right BAUD rate? Have you tried to swap Rx and Tx?

Perhaps you should try a simple UART to USB converter for debugging with your laptop first...

regards
stancecoke

I also thought about the baud rate and looked for a setting in the android app but couldn"t find it. I didn't try to swap RX and TX because I checked them and the wiring is exactly as in the wiki. I can give it a try. I also ordered a UART to USB. I'll keep you guys posted.
 
Been running the firmware for a few weeks now, seems to be working great so far except for 2 times now it just doesn't stop accelerating. Both times were on the same hill with a low-ish battery, brake handles took like 6 seconds to stop the motor and by then I was off the bike..

Going to see if I can get a log and a sure way to reproduce it because it's been great for like 60 miles of riding except for those 2 incidents
 
Hello

I am having trouble with a t09s controller from topbikekit running the OSEC firmware.

I am trying to wire in a pas sensor but No matter what I do, I don't see Any pas activity in the app.

The controller was not marked from the factory and the diagram on topbikekit Does not match the wires on my controller, so now I ask:

What pins on the board should a PAS SENSOR be wires between?

Thank you
 
Aeron said:
If you are interested, I'll let you know how the 6fet I have behaves @52V (stock amps, I'm like you and don't want to up the amps for now).

Hi. I'm trying to do the same thing. I'm running 2wd with 2xS06S 6fet controllers and planning to run these with 52V battery. I have not modified the controllers because they are still at the delivery but I wanted to know have you managed to make the 6fet KT controller to work with 52V and what modifications should I make(if any) and what components to check when my controllers finally arrive?
 
hi,thanks in advance to those who helped

with this opensource firmware;

can it do them?

1-Highly reactive throttle handle(quick response)

2-Powerful starts with maximum torque for throttle mod (in other words; if you give full throttle,the front wheel can rise from the ground.)

3-Torque simulation mod for throttle(I know it's for pas mod)

I know it will be a difficult throttle handling with these 3 settings :D

I used golden motor magic pie 5.these 3 settings were available

i got used to it, i miss it,because the controller has failed.

I like the front wheel getting off the ground and the sudden reaction. :D

I don't want to buy a new magic pie controller.both expensive and limiting setting


I know I can go to higher speeds and higher powers with this 48v 1000watt magic pie 5 motor.

So I am looking for an external controller.

i bought this controller, 48volt 40A sinewawe,I am waiting for the delivery.
https://tr.aliexpress.com/item/4001093131407.html?spm=a2g0s.9042311.0.0.48d04c4dkEmxFq

kt48svprl-lcd-c@d
 
How much current capabilities does these S06S controller wires have to have for the controller to work properly;

Throttle: +5V, GND, signal
Brake: +5V, GND, signal
HALL: +5V, GND, white, green, yellow, blue -signals
PAS: +5V, GND, signal
Display/bluetooth: +5V, GND, RX, DX, blue

I'm planning to use 55mm length strip of flat IDE cable (28AWG) to jump these wires inside my controller housing. It seems 28AWG holds 1.4A current(chassis wiring) but how much these wires need to carry?
 
Valopallo said:
How much current capabilities does these S06S controller wires have to have for the controller to work properly;

Throttle: +5V, GND, signal
Brake: +5V, GND, signal
HALL: +5V, GND, white, green, yellow, blue -signals
PAS: +5V, GND, signal
Display/bluetooth: +5V, GND, RX, DX, blue

I'm planning to use 55mm length strip of flat IDE cable (28AWG) to jump these wires inside my controller housing. It seems 28AWG holds 1.4A current(chassis wiring) but how much these wires need to carry?

The throttle/brake/hall/pas connections are all voltage sensitive signal lines, current in these will be just a few mA, shouldn't give you any trouble.

You need to be a little more careful with the display connections however. Not sure which display you are using, I can only speak for the LCD3 display where the +ve, GND and blue carry the supply for the display and controller drive circuits (not the mosfet supply). This could be quite significant, you may need to 'double up' in the ribbon cable on these lines to be safe.

The only other issue may be induced noise between the signal lines where they are running side by side in the ribbon cable but over a short 55mm length I wouldn't think that would be a problem. Maybe route the ground lines between the signal lines to reduce this possibility?
 
stancecoke said:
It is well known, that the Kunteng Controllers have bad resonances with the cheap china directdrives. That's a hardware issue, you can't fix it with software settings.
[....]
regards
stancecoke

That's interesting. I have KT + 212 motor and experienced similar grinding noises ... until I flashed the open source firmware. Had to manually tweak correction angle, but now it runs smoother and quieter now than with stock firmware. Still have to figure out the torque sensor thing though.
What "resonances" issue are your referring to ?
 
qwerkus said:
What "resonances" issue are your referring to ?
Just search keywords like 'vibrations' or 'resonances' in this thread or in the german Pedelecforum. You will get many hits.

regards
stancecoke
 
stancecoke said:
qwerkus said:
What "resonances" issue are your referring to ?
Just search keywords like 'vibrations' or 'resonances' in this thread or in the german Pedelecforum. You will get many hits.

regards
stancecoke

Thanks, did that and found a few reports indeed though it seems to be quite random. Some DD work just fine while other seem to be hopelessly plagued by resonances. And in some case like mine, the open source firmware seem to help. I wonder if the key is a higher switching frequency. For an instance, I had similar problems with a vesc + DD hub, and upping the frequency from 20k to 35k solved the issue.
 
Hello Guys,

first of all. Thanks for this incredible smart thread. I found it while deep into research. I have a very similar controller to the BMS 12? something, but its from another chinese supplier. Layout seems to be identical, but the X4 Pad is already wired to some green wire going into a thing.

I will just order a controller from the BMS store if there is no solution, but maybe you know this issue already. If not, can you tell me what controller you are using or if this one (https://bmsbattery.com/home/1026-s12sn-1000watts-40amps-torque-simulation-sine-wave-controller-.html) has a free X4 Pad for linear regen braking.

Or can you give me a hint where to change the code if i can use another pad or maybe the torque sensor, because i ditched my pedals at some point in my progress :) The Controller seems to be exactly the same as the BMS ones.

I read through all of this thread and didn't find a solution so i hope you guys are still willing to help.

Big thank you in advance and best regards,
fp - please be kind, and don't judge me by my lötskills
 

Attachments

  • STLink.JPG
    STLink.JPG
    204.3 KB · Views: 691
  • Controller4.jpg
    Controller4.jpg
    225.8 KB · Views: 691
  • Controller5.jpg
    Controller5.jpg
    115.6 KB · Views: 691
fp23 said:
but the X4 Pad is already wired to some green wire going into a thing.
Do you have any idea, what this thing is doing? :)

There is no alternative on the PCB for an analog input. Only if you solder a wire directly to the last free processor pin, see this post:

https://endless-sphere.com/forums/viewtopic.php?f=30&t=87870&p=1355574&hilit=solder+pin#p1355574

regards
stancecoke
 
Do you have any idea, what this thing is doing? :)

No, it seems to go to the connector for the display, but that wouldn't make sense does it?

There is no alternative on the PCB for an analog input. Only if you solder a wire directly to the last free processor pin, see this post:viewtopic.php?f=30&t=87870&p=1355574&hi ... n#p1355574

Thanks for that hint. My Hand is nowhere near steady enough to soldier directly to the cpu pin :)

I am happy to buy another controller to try your setup. Ist this the one you are working on? https://bmsbattery.com/home/1026-s12sn-1000watts-40amps-torque-simulation-sine-wave-controller-.html

Big thanks for keeping this alive. regards, fp
 
Looking to upgrade my controller to a KT. Is there a recommended place to buy from? I see bmsbattery linked. Are there other places as well?
 
hyper93 said:
Looking to upgrade my controller to a KT. Is there a recommended place to buy from? I see bmsbattery linked. Are there other places as well?

For 6-fet versions (and other accessories) I've also used PSWpower:-

http://www.pswpower.com/ven.php?cargo-s220052

...they've been a reliable supplier for me so far. They've also got a shop on Aliexpress, shipping from there may be a little cheaper if you can wait longer for it.
 
Hi, may be somebody more knowledgeable can help me out with my issue:
I have S06 18FET controller, direct drive motor 1.5Kw, throttle, PAS sensor, hall sensors in the wheel. No torque or FOC sensors. Opensource firmware works great, except for one thing – sometimes, when I’m trying to stop, motor will not stop for some amount of time even if bike is stopped with the brakes. so I have to keep brakes pressed in order to stall the motor. If I release the brakes, motor will turn for may be 30-45deg, and stops. I can’t figure out why it behaves like this. Will really appreciate your ideas.

Regards,
 
kaliandg said:
motor will not stop for some amount of time
Are you using the master branch with the BluOSEC app? It's known that it freezes sometimes. A bugfix is implemented in the branch Torque from X4. It can be applied to the master also: Avoid float operations and divisions....

https://github.com/stancecoke/BMSBattery_S_controllers_firmware/commit/d430d8d3ec2c7ddaae9378f407ca0010caecbee0

regards
stancecoke
 
Thank you Stancecoke for your answer,

Yes i used the main branch. I've just soldered in ACS758LCB-100B FOC sensor, will re-adjust settings and try to use the branch,

Regards,
 
stancecoke said:
kaliandg said:
motor will not stop for some amount of time
Are you using the master branch with the BluOSEC app? It's known that it freezes sometimes. A bugfix is implemented in the branch Torque from X4. It can be applied to the master also: Avoid float operations and divisions....

https://github.com/stancecoke/BMSBattery_S_controllers_firmware/commit/d430d8d3ec2c7ddaae9378f407ca0010caecbee0

regards
stancecoke

@stancecoke: Would it be possible that you backport that fix to the master-branch?

Also: Is this known freezing problem only happening when one actively uses the BluOSEC app (i.e. while there is a Bluetooth connection)?
I want to use the App only for setup and then run the controller completely without any display. So, when freezing happens only while using the App, this would be only a minor problem for my use case
And I am asking, since I can not test for myself, as I am still waiting for my controller to arrive....
 
endlessolli said:
Also: Is this known freezing problem only happening when one actively uses the BluOSEC app (i.e. while there is a Bluetooth connection)?

I don't know, as I'm not using the BluOSEC app. Perhaps users of BluOSEC can report their experience...

regards
stancecoke
 
Back
Top