Making a torque throttle instead of a speed throttle for a cheap controller

Woosh

Trade Member
May 19, 2012
20,933
17,117
Southend on Sea
wooshbikes.co.uk
what is the advantage of maintaining constant current versus constant speed? When you ride on throttle,you just push more to go faster, intuitively. The bike reacts immediately with the change in the throttle's output then settles to higher speed. If you turn the throttle to current proportional, you'd need to fiddle with the throttle all the time because the road's gradient and environment changes to maintain your speed, like following the vehicle in front.
 

vfr400

Esteemed Pedelecer
Jun 12, 2011
9,822
3,994
Basildon
You don't notice the difference so much on low power bikes, but on high power ones, current throttles are more or less essential. Also, current throttles work better on crank drive bikes because of the high torque they make in ghe low gears.
 

danielrlee

Esteemed Pedelecer
May 27, 2012
1,396
725
Westbury, Wiltshire
torquetech.co.uk
It becomes more pertinent running at increased power levels, where granular control is almost impossible at low speed over varying terrain with rapid changes to motor loading. It's difficult to describe, but I think it might be down to the fact that even better speed throttle controllers struggle to dampen constant changes to power delivery due to lacking the proper PID feedback.

EDIT: TUFKAD beat me to it!
 

AviatorTrainman

Pedelecer
Feb 9, 2018
35
6
24
Arizona, USA
Shoot, just realized I forgot to update this thread after rebuilding my battery. I'm running on 44v now, which is alright, I just need a new BMS and charger so I don't have to check the voltage every few minutes while charging. In any case, using the code given above, and tweaking a few of the throttle voltage values to more precisely match my throttle, I am happy with the project as it stands. I have been using this to go everywhere for some time now, and I can happily say I have found no glitches, and it works just fine. The shutoff is instant, and power up is as fast as the built-in soft start will allow. I would recommend this project to anybody looking to have some of the functionality of a CA, with a far lower cost. My all-in cost for this project was $5 for the Arduino (an Amazon clone of the real thing), $17 for the contactless current sensor, and some wires, resistors, and a capacitor I had just laying about, so a total of $22-25, depending on your part sources. I might yet make some more refinements, and if I do, I'll make sure to post them here, but I believe this can stand on its own as a fully complete project. It would, in theory, be possible to implement a bunch of other functions, I just don't have any use for them right now. The Arduino has 4 more analog inputs available, and 13 more digital input/outputs, with the capability to run a basic LCD, so it should be quite possible to make something with more functionality than this project.
 

Alibro

Just Joined
Aug 20, 2019
1
0
Shoot, just realized I forgot to update this thread after rebuilding my battery. I'm running on 44v now, which is alright, I just need a new BMS and charger so I don't have to check the voltage every few minutes while charging. In any case, using the code given above, and tweaking a few of the throttle voltage values to more precisely match my throttle, I am happy with the project as it stands. I have been using this to go everywhere for some time now, and I can happily say I have found no glitches, and it works just fine. The shutoff is instant, and power up is as fast as the built-in soft start will allow. I would recommend this project to anybody looking to have some of the functionality of a CA, with a far lower cost. My all-in cost for this project was $5 for the Arduino (an Amazon clone of the real thing), $17 for the contactless current sensor, and some wires, resistors, and a capacitor I had just laying about, so a total of $22-25, depending on your part sources. I might yet make some more refinements, and if I do, I'll make sure to post them here, but I believe this can stand on its own as a fully complete project. It would, in theory, be possible to implement a bunch of other functions, I just don't have any use for them right now. The Arduino has 4 more analog inputs available, and 13 more digital input/outputs, with the capability to run a basic LCD, so it should be quite possible to make something with more functionality than this project.
Hi and thank you for this great project. I have a 1500W ebike kit and it is pretty brutal in the power delivery so I am going to give this a go. The kit I bought was very cheap so I'm not surprised and have enjoyed doing small upgrades to it. I have ordered the parts you listed so will have to wait for a couple of weeks for them to arrive.
One other thing I'm very keen to do is to upgrade the cadence control as it's so poor as to be useless. I was looking for a way to do this with an Arduino and thought it might be something you could add to your project.
 

AncientMariner

Just Joined
Sep 19, 2020
3
0
can anyone tell me what current the contacles current sensor should measure?
I've been working on and off on this device, tried to contact the Author without success. I need proper torque control for my projects and plan to get stuck in again this week, so if your still interested, would be happy to compare observations. Oh yes, regarding the current sunsor, it implies it is sensing motor current but I,ve been thinking of trying sensing battery current which may be more stable.
 

vfr400

Esteemed Pedelecer
Jun 12, 2011
9,822
3,994
Basildon
Most controllers have a shunt in them to measure current. You could easily use that rather than add another device to measure the current. There's normally a shunt in the battery's BMS that you could use too.
 

AncientMariner

Just Joined
Sep 19, 2020
3
0
I'm seeking assistance from someone who has experience in programming an Arduino. The attached program for a torque throttle, when switched on, ramps the output voltage to the controller to 3.81V and just stayes there. Sorry to say I've run out of ideas.
 

Attachments

AncientMariner

Just Joined
Sep 19, 2020
3
0
Reference my request for assistance programming an Arduino, prblem solved, reason too embarrassing to admit in Public!
 

Saabman

Just Joined
Sep 28, 2021
1
0
Reference my request for assistance programming an Arduino, problem solved, reason too embarrassing to admit in Public!
Just stumbled onto this thread while researching converting my speed control to Torque control as well- you problem was it related to your code or wiring?

Also the link to the Current sensor the OP posted right back at the begining is no longer valid. Any one that has a had a go at this have any further in formation ?
 

Bobbo1260

Pedelecer
Oct 18, 2023
53
12
I have a yosepower 250w 36v kit which servers my needs but would like to be able to limit the thumb throttles speed from the standard 15mph to say 6mph so as to be somewhere near the legal 4mph limit. i don’t have the electrical expertise you guys have so it would need to be something simple.
I did consider constructing a simple manual throttle stop but suspect this would give different speeds on the flat and on inclines.
The other option is whether the throttle can be configured to only work when pedalling so that when needed I can get a quick boost when pulling away.
any simple suggestions welcome.
 

saneagle

Esteemed Pedelecer
Oct 10, 2010
7,967
3,662
Telford
I have a yosepower 250w 36v kit which servers my needs but would like to be able to limit the thumb throttles speed from the standard 15mph to say 6mph so as to be somewhere near the legal 4mph limit. i don’t have the electrical expertise you guys have so it would need to be something simple.
I did consider constructing a simple manual throttle stop but suspect this would give different speeds on the flat and on inclines.
The other option is whether the throttle can be configured to only work when pedalling so that when needed I can get a quick boost when pulling away.
any simple suggestions welcome.
The older Yose kits have KT controllers, which can do all that in the settings. If you have one of the later crappy LiShui ones, the easiest solution would be change to KT.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
21,288
8,710
61
West Sx RH
If one disconnects the throttle doee the Lishui display not have the walk assist mode by depressing the minus button ?
 

Woosh

Trade Member
May 19, 2012
20,933
17,117
Southend on Sea
wooshbikes.co.uk
If one disconnects the throttle doee the Lishui display not have the walk assist mode by depressing the minus button ?
It does.
 

Bobbo1260

Pedelecer
Oct 18, 2023
53
12
The kit I have has a lishui controller which is integrated with the battery docking unit and a KD21C display.
It does have a walk assist mode by pressing the - button but it’s only enough power to power the bike and not with my fat @rse on it.
which display would one need with a KT controller and would that allow the throttle speed to be adjusted.
I also want to be able to customise the numbers of pedal assist as I prefer 7 levels which I then customise at increments of 14%, 14, 28, 42 etc
 

saneagle

Esteemed Pedelecer
Oct 10, 2010
7,967
3,662
Telford
The kit I have has a lishui controller which is integrated with the battery docking unit and a KD21C display.
It does have a walk assist mode by pressing the - button but it’s only enough power to power the bike and not with my fat @rse on it.
which display would one need with a KT controller and would that allow the throttle speed to be adjusted.
I also want to be able to customise the numbers of pedal assist as I prefer 7 levels which I then customise at increments of 14%, 14, 28, 42 etc
KT controller can be set as follows:
1. Set the global speed limit of 25 km/hr or whatever you want.
2. Set P4=1 KT description is nin-zero startup, which means (normally) the throttle only works when you pedal but is subject to C$ setting
3. Set C4=3 The throttle will work independently until 6km/hr, then if you pedal, the throttle is interpreted as level 5 pedal assist. To work like that P4 must be set to one.

All that can be interpreted as the throttle will work without pedalling until 6km/hr, and if you operate it when pedalling it works as a maximum power boost button so that you can air pedal. As soon as you let go of it, your power reverts to whatever level you have set in the LCD for pedal assist. It's a much more logical control system that what the Lishui has.

KT controllers work differently to yours. Each pedal assist level is a different power, and all allow you to reach the global maximum speed you set. For your Lishui one, each level allows maximum power, but has a different speed limit.

When you have a bike with large wheels, the 6km/hr is still a bit weak due to the low rpm, where hub-motors can't work efficiently, and also because of the probable ramping down as you approach 6km/hr, but when you have a bike with small wheels, it gives more meaningful torque, partly because the small wheels give more torque, but also because the higher RPM lets the motor work more efficiently.
 

eas2lv

Pedelecer
Sep 1, 2024
50
13
Canada
> KT controllers work differently to yours. Each pedal assist level is a different power, and all allow you to reach the global maximum speed you set. For your Lishui one, each level allows maximum power, but has a different speed limit.

That depends on the firmware. Lishui controllers I've used have current control [*]-- at any PAS level one can reach the max speed if the load is low enough. While riding, it may feel like max speed is dependent on the PAS level only because the speed maxes out due to the load. Especially so on low power controllers. Test on a stand to know whether its current/power limited or speed limited.

[*] Loosely called torque control which is a misnomer as what it controls is the battery current not the phase current. Power control would be a better word.
 
  • Agree
Reactions: Woosh

saneagle

Esteemed Pedelecer
Oct 10, 2010
7,967
3,662
Telford
> KT controllers work differently to yours. Each pedal assist level is a different power, and all allow you to reach the global maximum speed you set. For your Lishui one, each level allows maximum power, but has a different speed limit.

That depends on the firmware. Lishui controllers I've used have current control [*]-- at any PAS level one can reach the max speed if the load is low enough. While riding, it may feel like max speed is dependent on the PAS level only because the speed maxes out due to the load. Especially so on low power controllers. Test on a stand to know whether its current/power limited or speed limited.

[*] Loosely called torque control which is a misnomer as what it controls is the battery current not the phase current. Power control would be a better word.
He has a Yose kit with speed control controller. That's what he wants to change. It doesn't matter what's on other bikes.
 

Advertisers