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

Did everything in the new controller, problem I can't connect with the bluosec it crashes few seconds after trying to connect, don't know how to fix that
I too had this issue, and I suppose this is something that has affected many users since the newer versions of sdcc. Try to downgrade to an older version of sdcc.

Hi,
in case someone is struggling to get BluOSEC app to work (it crashes on start), here's what you can try.
The culprit is SDCC 4.2.0, which for some reason doesn't want to operate properly with current master branch. The results are the following:
  • It renders previously flashable setups corrupt (controller will drain only 20mA)
  • Flashing freshly cloned master will result in BluOSEC app crashing
  • Produces otherwise no errors anywhere (log, onscreen)
The solution for this should be fairly simple. Uninstall SDCC 4.2.0, reboot your machine, and then install SDCC 4.1.0 (2nd reboot just in case)
4.1.0 package can be found here: Small Device C Compiler - Browse /sdcc-win64/4.1.0 at SourceForge.net
I have also archived it in case the repo goes offline at some point.

I'm hoping to add full explanation to the wiki at some point, but recently got quite busy at work.
 
Last edited:
Hello everyone,
this is my first post here.
I want to try open source firmware on my bike made from Himo c20 and kt36 controller. I need advice, will this firmware work on my bike? Motor phases are specially was mixed up from the factory, but I resoldered the wires and it works. but runs only with special setting **C2** Phase shift mode = 1.
I dont know what it is, and whether there is / whether such a setting is needed for Opensource firmware
if it doesnt work, I won’t be able to restore the Chinese firmware back, and I will be left without a bike))
Thank you in advance
 
Yeah i've used it. It works great. Best fork is Andrea-104 or torque from x4. They're more stable.
What programmer did you use? The ST-Link v2 dongle? Or the official ST-Link (v2,v3)?

Do you think that it's safer to instead use a 6 FET for this firmware?

I suppose that the 9 FET and 6 FET should have the same phase current because there's still only 1 FET on one of the sides that limits the max phase current to whatever it can withstand, would that be correct?
 
I have used a cheap st-link v2 copy dongle.

I don't think it matters which controller you use the firmware on. I have no first hand experience with the 6-fet, but since it is rated for lower current by KT I would think that the 9-fet can take a bit more.

The phase current is limited by the plug if you use the waterproof overmoulded version, at least on the amk q-128.
 
From what I've seen on the normal 6 fets, there are versions that range from 14 up to 22+-1 amperes. I suppose that it's mostly on the mosfets. The less powerful 6 fets use less powerful mosfets. That also explains why the 6 fet hailong controllers only has a max of 15 amperes.

All pictures of the 6 fet hailong pcb shows that the 5 v regulator actually is cooled properly, it also has a bit more space inside. I suppose it'll be easier use a 6 fet instead of 9 fet, especially because of the rare problems with them on this firmware.

Judging by the industry, 9 fet controllers doesn't seem to be that popular. KT them selves only have one version of the 9 fet and more powerful controllers like the baserunner also use only 6 mosfets. So by this I suppose it's better to stick to a 6 fet, at least for the hailong versions.🤷‍♂️
 
Hi Guys, I need advise.
I flashed from Master Branch my s06s (i have T9 Torqsensor). Generaly it's working okay but when I stopped, the Engine is not cutoff and will smoothly accelerate. Maybe thats because i havent already connected the Brake Switches ? In the German Forum they say I have to modify the Source but where, what Variable ?
Can anybody Help ?
 
In the German Forum they say I have to modify the Source but where, what Variable ?
Can anybody Help ?
If you do a search for "zero point" on this thread you should find references to what Stancecoke has mentioned on the German forum.

Post #3455 on this thread makes reference to this, but there are probably many more.
 
Thanks geofft ..I will Test this and Change in ADC.c the Value ui16_current_cal_b -= 2
I already found another Description 'change ui16_current_cal_b -= 1 to ui16_current_cal_b += 1' which Solution is the Favorite ?
Sorry If this is a stupid Question but programming is not mine 😉
 
Thanks geofft ..I will Test this and Change in ADC.c the Value ui16_current_cal_b -= 2
I already found another Description 'change ui16_current_cal_b -= 1 to ui16_current_cal_b += 1' which Solution is the Favorite ?
Sorry If this is a stupid Question but programming is not mine
A small negative adjustment of -= 2 or -= 3 has always worked for me in the past, but you'll need to experiment to find what works for you.

I should also add that if you use a torquesensor with the Master branch you will almost certainly get issues with processor overloads and resets. The tqsr code was altered in the 'Torque from X4' branch to fix this problem.
 
Okay then i need to soldering X4 ? and use this for Input, Not throttle anymore. Correct ?
Yes, if I remember correctly, you solder the tqsr signal wire to X4 (white wire usually), if you're using a throttle it stays connected to the throttle input as normal.
 
Thanks a Lot. This Project is great but the documentation is a crap.
So people must ASK the same Questions again and again ....
 
That is exactly the right answer so don't worry if you keep being asked again and again ..... ;)
I can not understand how people (like you) have the guts to complain about software they get for free from people who don‘t want anything in return and build it for the community free of charge…
-> Please don‘t complain, but contribute!
It is really easy to add to / change the wiki, once you learned / understood something which could be of interest for others as well.
 
I can not understand how people (like you) have the guts to complain about software they get for free from people who don‘t want anything in return and build it for the community free of charge…
-> Please don‘t complain, but contribute!
It is really easy to add to / change the wiki, once you learned / understood something which could be of interest for others as well.
Do you really think a Noob that ASK Here the first time can contribute and modified the Wiki ? German Forum is dead, why ...to many "stupid" Questions.

No criticism allowed?
 
Do you really think a Noob that ASK Here the first time can contribute and modified the Wiki ? German Forum is dead, why ...to many "stupid" Questions.

No criticism allowed?

1) Everyone is a noob at some point. And if you (even as a noob) figured something out (i.e. by asking in the forum), which you could not find in the Wiki, its probably worth adding to the wiki.

2) constructive critisim is always welcome, I would think. But calling something „crap“ is not constructive
 
Last edited:
1) Everyone is a noob at some point. And if you (even as a noob) figured something out (i.e. by asking in the forum), which you could not find in the Wiki, its probably worth adding to the wiki.

2) constructive critisim is always welcome, I would think. But calling something „crap“ is not constructive
It seems you are one of the people who edit the wiki ? A good Starting point is to have Referenz Configurations and a short Description what changed in the Sources to get the Firmware running (spec. with Torquesensor). Then we Noob`s have a good Starting Point :)
 
It seems you are one of the people who edit the wiki ? A good Starting point is to have Referenz Configurations and a short Description what changed in the Sources to get the Firmware running (spec. with Torquesensor). Then we Noob`s have a good Starting Point :)
Im hopefully not the bad Guy but if anyone say...Contribute..anyone has to ask themselves: How have i contribute in the Past (I mean not the Creators and real Supporters of the Project) this Project ?
As I stated before the Project ist Great ...many Thanks
 
Do you really think a Noob that ASK Here the first time can contribute and modified the Wiki
Yes of course, as noobs have problems, that I would never think of. Just add one line of text to the FAQs in the Wiki regarding the not stopping wheel with the hint to modify the offset with a link to the relevant line of code. That takes you the same 5 minutes as it takes me.
I don't use Kuntengs any longer, as they are "crappy", to speak in your words ;)

regards
stancecoke
 
Last edited:
Hi Stancecoke, sorry for my Statement that was not against you but you are the first One who answered ;)
I will test if the Problem is solved with the Change and try to add it to the Wiki. :)
 
Hello I am new to this hobby and would love to flash this opensource firmware on my kt48 lcd3 ebike kit.
When reading the guide on the bitbucket I read this sentence:
Support of Kunteng LCD3, only the speed and wheel size are used. All other settings are currently without function.

What does this mean? Does the firmware still have full capability, but the only settings I can change through the lcd3 are the max speed and wheel size?
I like this project and would like to contribute in the long term.
 
This means, I prefer to set the parameters on a clear graphical interface. I don't like to have to fiddle through a thousand sub-menus with three buttons. ;)

regards
stancecoke
Sorry if I am repeating questions, but what functionality do I loose? Can I still change all settings in the firmware by flashing, and can I no longer change most settings using the lcd3?
 
I can not understand how people (like you) have the guts to complain about software they get for free from people who don‘t want anything in return and build it for the community free of charge…
-> Please don‘t complain, but contribute!
It is really easy to add to / change the wiki, once you learned / understood something which could be of interest for others as well.

Um...speaking of which, dumb question but somewhere in these 5000 thread replies, is there a list for P1-5 and C1-14 where there is a layman's explanation for all parameters and more importantly, what the typical input for those parameters are.

On a different note, I once read an online complaint that said the product didn't do enough for him for the money. The product was free. Some people are born to complain. All kinds of theories as to why, going all the way back to they were not breastfed properly. No joke.
 
Back
Top