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

Yes sir! It works now!
I've to buy the controller now :) How long does it take the controller to arrive from bmsbattery.com?
 
dkmorb said:
Yes sir! It works now!
I've to buy the controller now :) How long does it take the controller to arrive from bmsbattery.com?
Good you could build the firmware -- and I just tested and added battery voltage max protection while regen.

For me that I am in Portugal, after the ship, takes about 2 weeks for the package arrive in UK and after another 1 week from UK to Portugal. You may ask why they send first to UK, that way It will not stop in Portugal customs for more 2 or 3 weeks and I don't pay taxes.

I can ask them to ship very fast like by DHL, it may just take 1 week but I will have to pay a lot on customs as also extra fees for DHL work on customs, etc....

What I do is asking for the cheaper even if slower shipment, buy extra hardware, like some units of controllers, LCDs, etc so I can play with them and repair if something burn during the development :)
 
stancecoke, I added to the master the battery max voltage protection while regen and it works as expected. Now we can use again a lab power supply for development but it will simple not brake. (I don't remember if you added already this feature to your fork).
 
casainho said:
I added to the master the battery max voltage protection while regen and it works as expected.
That's great and should protect the hardware of battery and controller!

casainho said:
(I don't remember if you added already this feature to your fork).
I'm not planning to implement all that stuff in my fork, as my aim is still to close my fork. I can't afford to spend much time in our project at the moment.

dkmorb said:
I've to buy the controller now :)

You can get the controller at aliexpress, too. Shipping might be cheaper there.
https://de.aliexpress.com/store/group/Sine-Wave-controller/1314442_506798312.html

regards
stancecoke
 
dkmorb said:
Hi all, I'm new here.
I'm trying to compile your code (...)
Can you please share with us some information, so we can understand better your needs:
1. can you please tell us why are you interested to use the firmware?
2. what bicycle type do you have, what is the kind of usage?
3. which motor, battery pack voltage?
4. do you use throttle, PAS, torque sensor, regen brakes?
 
Hi guys,
I want to order on digikey some mosfets; i find a80nf70.
I would to try a personal build using ir2110 too.
 
1. can you please tell us why are you interested to use the firmware?
I'm interested in electric motor and so now I want to experiment, but i'm a professional programmer (db layer C#, almost)
2. what bicycle type do you have, what is the kind of usage?
I haven't a bike, but I would go to work by bike
3. which motor, battery pack voltage?
I would like to buy and drive a big motor (1500W / 2000W)
4. do you use throttle, PAS, torque sensor, regen brakes?
Well...i don't know :)
 
dkmorb said:
1. can you please tell us why are you interested to use the firmware?
I'm interested in electric motor and so now I want to experiment, but i'm a professional programmer (db layer C#, almost)
I thought that making a generic motor controller using S series controller that can be controlled by UART and Arduino, could be interesting for playing with brushless motors using Arduino.

For what kind of application wold you use the motor for?
 
dkmorb said:
So we are tuned on the same subject! o mundo é pequeno...
Sim :)

If you can give more details of what you are looking for, we can think of it and maybe try to develop for a generic motor controller as also keep developing for EBike application. It is much simple to develop if we know the real needs of the application.
 
My Q11 is now working very well - I had corrected a bug on the motor code.
Then I moved to S12S controller and my EBike 48V - with this, the Q11 motor runs at 42 km/h. Then I configured regen current to 25A and recorded the following video -- regen very strong and fast!! -- not mechanical braking were used:

[youtube]m-Ha64Rqd70[/youtube]

I did some ride tests and is really great and strong the ebrake (although I used for riding, 15A for regen). I was using the torque sensor and configured regen current = 0 so I can coast my legs/pedals when I want a rest but as soon I use brakes, regen current is configure to 15A and I get the strong ebrake/regen. When I release brakes, I get regen current again = 0 and I can pedal and stop pedaling and rest my legs when I want.

Next, I want to use my torque sensor + PAS that I added:



and I will use both signals to detect when I stop rotating the pedals and move them backwards, and count how many PAS signal changes/steps I moved and apply a regen current that will scale with the number of backwards PAS steps. The torque sensor have 12 magnets equally spaced that give 24 PAS signal changes/steps per crank revolution and this should be a nice resolution to be able to ebrake nicely and smooth :)
 
For what kind of application wold you use the motor for?
Well, at the moment, I would build a "simple" little bike like this one:
https://i.ytimg.com/vi/2XLFEvYwaB8/maxresdefault.jpg

So, what kind of mosfet can I order from digikey to build a little and simple controller?
I found this N-Channel Power Mosfet stp80nf70...is it suitable?
 
I can't help about build or mod a controller. I suggest you to buy S12S controller of 48V 40A, about 2kwh. They also have a 72V version.

The Q11 is a 1kw motor. The cables don't seem to handle much more, they seem to have the same size as their 250 and 500w motors. But the motor seems robust.

I drive up to 45km/h and that is the max speed to where I can pedal, as I like to pedal. In my city we have some large amd long bike lanes.
 
For got to say that I found I were using one LCD5 from were I was not receiving any data and I went o look and found it has a different CRC ^ ? than the other LCD5 and I was able to get it working, right now the current code is:
Code:
    // see if CRC is ok
    if (((ui8_crc ^ 10) == ui8_rx_buffer [7]) 	|| // some versions of CRC LCD5 (??)
	((ui8_crc ^ 9) == ui8_rx_buffer [7]) 	|| // CRC LCD5
	((ui8_crc ^ 2) == ui8_rx_buffer [7])) 	   // CRC LCD3
    {
 
I just implemented and did some rides with the regen ebrake like coast brakes

How does it wok?
- ebike rider can pedal forward as usual or stop pedaling for rest
- when ebike rider want to ebrake for reducing speed (without using mechanical brakes), needs to rotate backwards the pedals
- one full rotation of the pedals equals to 24 points and I implemented in a way that 5 point of backwards rotation gives the full ebrake power, while 1 point gives 1/5 of the full ebrake power and so on

The implementation needs in fact 6 points, and the first one is a neutral point that is needed to detect pedal rotating backward. This point also works well as a hysteresis.

I did some rides and on the video, I did ebrake so strong that I almost did fall...

[youtube]KoQfGS1X8gw[/youtube]
 
I think that its not a good way of applying regen for most users. Try variable regen with something like this http://s.aliexpress.com/FnQJ7f6F if the controller cant see analog voltage input, then this module will convert output voltage of brake lever (hall thumb throttle as brake) to pwm.

What about the torque controll throttle? Is it implemented?
 
honya96 said:
I think that its not a good way of applying regen for most users. Try variable regen with something like this http://s.aliexpress.com/FnQJ7f6F if the controller cant see analog voltage input, then this module will convert output voltage of brake lever (hall thumb throttle as brake) to pwm.

What about the torque controll throttle? Is it implemented?
Yes, maybe not for everyone. For ones like me, that live on flat lands and have some background on fixed bikes, this is nice. Or maybe the ones that are used to coast brakes.

The controller have at least 2 analog inputs: throttle and torque sensor.

Yes, torque control throttle and "torque + speed" control.
 
Puh, luckily you didn't tumble off the bike!

As I see in the code, you have used the pad X4 also!
But I can't find a direction detection for PAS2 in the code. Has the additional PAS an internal direction detection?

honya96 said:
(hall thumb throttle as brake)
This solution is already implemented in the torque-simulation fork.

Regards
stancecoke
 
I've been following this project for a dew days now and I must say that I'm impressed. You guys are doing a great job!

The idea of doing regen when pedaling backwards is great. Add a bit of a delay until the regen sets in you you have a great solution that doesn't need additional hardware.


I have a question of my own. I am planning on running a S12SN (possibly even the 72V variant) with this firmware. Since it was only tested on the S6 and S12S, I am wondering if it can work. I can tweak and play around some (Linux dev environment is available), but I am no match for your programming skills. So do you think it might be possible and worth a try?
 
casainho said:
- when ebike rider want to ebrake for reducing speed (without using mechanical brakes), needs to rotate backwards the pedals

That's a very interesting idea! Has this ever been used before?
 
stancecoke said:
As I see in the code, you have used the pad X4 also!
But I can't find a direction detection for PAS2 in the code. Has the additional PAS an internal direction detection?
Yes, thanks for sharing that info about X4 -- and I used it as a digital input pin. I also put your info on the notes.

I use both signals to get the direction and count how many steps, see the image:
 
1N4001 said:
I've been following this project for a dew days now and I must say that I'm impressed. You guys are doing a great job!

The idea of doing regen when pedaling backwards is great. Add a bit of a delay until the regen sets in you you have a great solution that doesn't need additional hardware.

I have a question of my own. I am planning on running a S12SN (possibly even the 72V variant) with this firmware. Since it was only tested on the S6 and S12S, I am wondering if it can work. I can tweak and play around some (Linux dev environment is available), but I am no match for your programming skills. So do you think it might be possible and worth a try?
Thanks for the feedback.

On the current implementation, there is a distance (1/24 steps) after the direction inversion (and this can be increased) that is a null. The result is very good, at least for me :)

So, I own a S12S (S12P moded to S12S) and I it works very well with current firmware. The 72V version I don't know which changes are between the 48V and 72V versions, but I would say only the voltage resistor that reads the battery voltage (not counting with changes on capacitors, etc to handle the higher voltage). That difference I think you will be able to find using a multimeter.

I think someone will want to use the most powerful version of this controllers, and would be great to get knowledge on how to use them. I think Kunteng sells even an higher current version than BMSBattery sells. But go with BMSBattery if you can, because no BMSBattery versions may have some significant changes in hardware, mainly on the available cables/inputs to the microcontroller.
 
daffy99 said:
casainho said:
- when ebike rider want to ebrake for reducing speed (without using mechanical brakes), needs to rotate backwards the pedals

That's a very interesting idea! Has this ever been used before?
I am not aware that anyone had implement this idea before. But this is very similar to coast brakes. Also near the fixed gear bikes.
 
I also have been watching this thread with great interest and would like to add my congratulations to you guys on your efforts so far. Will definitely be trying your firmware sometime in the future, I'm no coder but can usually follow instructions to get these things loaded up and working.

Just a small question for casainho regarding the S12P to S12S mod you describe in the link. When this mod is done is the controller still run sensorless or do you add the three hall wires and run it sensored? I ask this as I have a S09P sensorless controller (ordered in error) that I would like to mod to S09S sinewave/sensored operation - is that possible? - unfortunately I have found that my Q128H does not run well in sensorless mode.

Geoff.
 
Back
Top