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

sylvain_wm said:
But, as I said, when I hold the "DOWN" button, the meter assist function logo flashes, but the function doesn't work.

Yes, but this is not a matter of the LCD8H, it doesn't work with any display, as the walk assist function is not implemented yet.

regads
stancecoke
 
Ok,
thanks stancecoke.
So the LCD8H works well with the firmware...
I'm glad to read this, because I was trying to pore over every single ligne of the program to figure out where I had to change the code....

Have a good day.

Sylvain_wm
 
Oh cool, might give it a try then.. Might like to keep the walk assist but otherwise sounds like I'll give it a try :)
Thanks for confirming it all works
 
sylvain_wm said:
because I was trying to pore over every single ligne of the program to figure out where I had to change the code....
I've implemented the walk assist in the new branch "Walk_Assist":
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/tree/Walk_Assist

It's just quick and dirty and not tested yet. When the walk assist bit is set, the current target is simply set to 1 amp (for the 6FET calibration).

Code:
if (ui8_walk_assist) uint32_current_target = 10 + ui16_current_cal_b;

If someone can confirm that it works properly, I can push it to the master branch.

regads
stancecoke
 
stancecoke said:
sylvain_wm said:
because I was trying to pore over every single ligne of the program to figure out where I had to change the code....
I've implemented the walk assist in the new branch "Walk_Assist":
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/tree/Walk_Assist

It's just quick and dirty and not tested yet. When the walk assist bit is set, the current target is simply set to 1 amp (for the 6FET calibration).

Code:
if (ui8_walk_assist) uint32_current_target = 10 + ui16_current_cal_b;

If someone can confirm that it works properly, I can push it to the master branch.

regads
stancecoke

Seems like a pretty good idea, but wouldn't it be better to set a constant speed target rather than amp draw so it'd assist more uphills and less downhill?
 
tenten8401 said:
but wouldn't it be better to set a constant speed target
feel free to implement it in your suggested way and share your work here! :wink:
The whole firmware doesn't know a speed control yet, just a ramp down at the speed limit. So you have to tune a PI-control for the speed, similar to the PI-control we are using for the battery-current at the moment.

regards
stancecoke
 
stancecoke said:
tenten8401 said:
but wouldn't it be better to set a constant speed target
feel free to implement it in your suggested way and share your work here! :wink:
The whole firmware doesn't know a speed control yet, just a ramp down at the speed limit. So you have to tune a PI-control for the speed, similar to the PI-control we are using for the battery-current at the moment.

regards
stancecoke

̶s̶u̶r̶e̶l̶y̶ ̶t̶h̶e̶ ̶P̶I̶ ̶c̶o̶n̶t̶r̶o̶l̶l̶e̶r̶ ̶w̶o̶u̶l̶d̶ ̶b̶e̶ ̶u̶s̶a̶b̶l̶e̶ ̶f̶o̶r̶ ̶a̶ ̶3̶m̶p̶h̶-̶i̶s̶h̶ ̶s̶p̶e̶e̶d̶ ̶l̶i̶m̶i̶t̶ ̶w̶o̶u̶l̶d̶ ̶i̶t̶ ̶n̶o̶t̶?̶ ̶I̶'̶m̶ ̶c̶o̶n̶f̶u̶s̶e̶d̶ ̶o̶n̶ ̶h̶o̶w̶ ̶t̶h̶e̶ ̶o̶f̶f̶i̶c̶i̶a̶l̶ ̶K̶T̶ ̶s̶o̶f̶t̶w̶a̶r̶e̶ ̶w̶o̶u̶l̶d̶ ̶d̶o̶ ̶i̶t̶ ̶i̶f̶ ̶t̶h̶e̶y̶'̶r̶e̶ ̶n̶o̶t̶ ̶u̶s̶i̶n̶g̶ ̶a̶ ̶P̶I̶ ̶c̶o̶n̶t̶r̶o̶l̶l̶e̶r̶ ̶t̶o̶ ̶t̶r̶a̶c̶k̶ ̶t̶h̶e̶ ̶t̶a̶r̶g̶e̶t̶ ̶s̶p̶e̶e̶d̶
Edit: I see what you're saying now, there's no PI controller for speed yet
 
stancecoke said:
If someone can confirm that it works properly, I can push it to the master branch.

After a little bugfix, a german user confirmed that the walk assist works now. I've pushed the Walk_Assist branch to the master!

regards
stancecoke
 
stancecoke said:
stancecoke said:
If someone can confirm that it works properly, I can push it to the master branch.

After a little bugfix, a german user confirmed that the walk assist works now. I've pushed the Walk_Assist branch to the master!

regards
stancecoke

Awesome, greatly appreciate the work being done on this :)
 
Thank you stancecoke,
I'll try your code as soon as my controller is fixed.
I burnt a couple of transistors during my last trip.
I'm waiting for MOFETS from aliexpress.
I'm loorking forward to trying your program.

Regards.

Sylvain_wm
 
stancecoke said:
I've implemented the assistance from standstill in torquesensor-mode, after a user in the german forum asked for a similar function in PAS+THROTTLE mode, too. Now the throttle works as push assistant up to 6 km/h in all ride modes. For correct 6km/h the gear ratio has to have the correct value.

Hi stancecoke!
I was wondering if this is still a thing, I have been using this software on my daily commuter for a couple months and 3000km. It's all flawless!! Except for the fact that start from standstill is impossible (especially uphill) with my 60-11 gear ratio (when I'm not able to down-shift😅).
The feature mentioned above would greatly improve my daily commute :)

Best regards,
Inse
 
Walk assist turns out to be a nice solution to my 'departure from standstill' issues!

I set the walk assist current target to 60 instead of 10 in ACAsetpoint.c. If someone is interested, my code change will set the target power for walk assist to ±500w and limit the speed to 20km/h (to make it legal in Europe for speed pedelecs).
Change this line:
Code:
if (ui8_walk_assist) uint32_current_target = 10 + ui16_current_cal_b;

To this:
Code:
if ((ui8_walk_assist) && (ui16_virtual_erps_speed < 57)) { uint32_current_target = 60 + ui16_current_cal_b;}
This line can also be used to limit the speed to another value. For example, set "ui16_virtual_erps_speed < 18" to limit walk assist to 6km/h.
Credits to stancecoke for adding walk assist!

If anyone could guide me towards activating torque sensor "throttle" from standstill (without PAS detected) I would be super happy 😁
 
@stancecoke,

I've recently switched from Xnyle's 'x4throttle' branch to your 'Torque_from_X4' branch and glad to say all is now working very sweetly.

Sorry to put another request on you, but just wondered if you have any plans to add walk assist to the 'Torque_from_X4' branch? :roll:
 
Corrida victim said:
my code change will set the target power for walk assist to ±500w and limit the speed to 20km/h (to make it legal in Europe for speed pedelecs)

:thumb:

geofft said:
but just wondered if you have any plans to add walk assist to the 'Torque_from_X4' branch?
You could have made the few changes yourself, but here you go :wink: (not tested):
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/commit/a370abc9e0f2c1ab7552eafefeacfe8db04c547d

regards
stancecoke
 
stancecoke said:
geofft said:
but just wondered if you have any plans to add walk assist to the 'Torque_from_X4' branch?
You could have made the few changes yourself, but here you go :wink: (not tested):
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/commit/a370abc9e0f2c1ab7552eafefeacfe8db04c547d

regards
stancecoke

Aaww... thanks, you're a star.

Tested and all seems to be ok. The walk assist is a bit racy for my weary old legs, I'll need to turn the current down a little. That much I can manage myself... :)
 
Well regarding the strange behavior of my controller described by my last post, I managed to get rid of it by flashing the firmware again (still not sure what caused this but I will keep looking if this happens again).

One thing that I tried back then was to add a brake to stop the motor from spinning at max eros, but this seemed to only cause the same issue, even accelerating the motor from standstill to the max erps with max power.
This still happens after re-flashing the controller and i'm starting to wonder if this is because my setup ( Q100CST, BMSbattery S06S controller at 36V) is having some sort of problem with the regen (or more specifically the controller)?

Otherwise this open source firmware is really great and has been very reliable in the past 5 months of using it, so great thanks to stancecoke, casahino and all the other contributers of this awesome firmware.
 
eLsc said:
Otherwise this open source firmware is really great and has been very reliable in the past 5 months of using it, so great thanks to stancecoke, casahino and all the other contributers of this awesome firmware.

Out of curiosity how do you like it compared to the stock? Is it worse in any way? Still trying to decide if I want to take the one way trip on my kit when it shows uo
 
@tenten4801

This firmware runs way more efficient/quieter than the stock rom, also the ability to change most of the parameters at runtime through the BluOESC app such as the top speed, the individual speeds of just Throttle, throttle with pas and only the pas is amazing. The only thing I'm missing out at the moment ist regen l, but having read that it works quite well, this should work on your Controller, as I haven't read about anyone having the same problem as I have

Regards
 
stancecoke said:
Corrida victim said:
my code change will set the target power for walk assist to ±500w and limit the speed to 20km/h (to make it legal in Europe for speed pedelecs)

:thumb:

geofft said:
but just wondered if you have any plans to add walk assist to the 'Torque_from_X4' branch?
You could have made the few changes yourself, but here you go :wink: (not tested):
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/commit/a370abc9e0f2c1ab7552eafefeacfe8db04c547d

regards
stancecoke
Hi, i have problem with regen, its brake very slow and nothing go back to battery and any reaction on regen current max
 
stancecoke said:
sylvain_wm said:
because I was trying to pore over every single ligne of the program to figure out where I had to change the code....
I've implemented the walk assist in the new branch "Walk_Assist":
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/tree/Walk_Assist

It's just quick and dirty and not tested yet. When the walk assist bit is set, the current target is simply set to 1 amp (for the 6FET calibration).

Code:
if (ui8_walk_assist) uint32_current_target = 10 + ui16_current_cal_b;

If someone can confirm that it works properly, I can push it to the master branch.

regads
stancecoke
I am building junior MTB with torque sensor without throttle.
1. How to activate walk assist? Is it working by holding "down" button on display? Or will it support startup by engaging the motor at zero cadence? I very courious about it :)
2. The dynamic assist mode: what is the assit variation here? Can we compare IT to dynamic modes od Trail in Shimano or eMTB on Bosch?
Looking forward for your answer
 
Slipy said:
i have problem with regen, its brake very slow and nothing go back to battery and any reaction on regen current max
Please log the data in debug mode and look at the duty cycle during regen. I guess, the motor-constant has to be adjusted to your motor.

szkuba said:
Is it working by holding "down" button on display?
With a Kunteng-Display, yes.

szkuba said:
The dynamic assist mode: what is the assit variation here?
Sorry, this feature was added by @Xnyle. I have no idea, what it does, I don't use it.

regards
stancecoke
 
stancecoke said:
szkuba said:
The dynamic assist mode: what is the assit variation here?
Sorry, this feature was added by @Xnyle. I have no idea, what it does, I don't use it.

regards
stancecoke

Not sure if you've seen this, but there is some reference to it in the wiki, copied below:-

Ride Options:
Dynamic Assist Level: Using the throttle for a longer period of time will automatically increase the assist factor a bit. After the throttle is released, the assist factor will slowly ramp down again.
 
geofft said:
stancecoke said:
szkuba said:
The dynamic assist mode: what is the assit variation here?
Sorry, this feature was added by @Xnyle. I have no idea, what it does, I don't use it.

regards
stancecoke

Not sure if you've seen this, but there is some reference to it in the wiki, copied below:-

Ride Options:
Dynamic Assist Level: Using the throttle for a longer period of time will automatically increase the assist factor a bit. After the throttle is released, the assist factor will slowly ramp down again.

I saw that , Thanks. I was wondering what is the variation. So for instance going uphill it will increase the assit but how much? It says "a bit" so would it be 10%-20%?. Nevertheless i asked Xnyle directly but no response do far since few months ;)

I have the DC/DC for powering Sempu T4. Does anyone knows what is the EN pin for?
 

Attachments

  • IMG_20200925_074902.jpg
    IMG_20200925_074902.jpg
    91.2 KB · Views: 1,195
szkuba said:
Does anyone knows what is the EN pin for?

This is the enable pin. It has to be on TTL high to enable the 12V output.
You can just short it to the VIN+ pad to enable the output permanently.

regards
stancecoke
 
Back
Top