Push Button Throttle

Rider90

100 µW
Joined
Jul 13, 2015
Messages
7
Hi guys,

I am new to this forum. I have a 36V ebike that i would like to add a push button throttle to it. Basically a simple button that throttles the motor when pressed. How would I go about doing it?

Appreciate any advice and help!
 
Hi, and welcome to the forum!

What bike or controller du you have?

By push button, do you mean a simple on/off switch that switch from no power to full power, or do you want like a thumb swith where you can adjust the power? Both are usually simple to connect if your controller support a throttle, but a simple on/off switch can be dangerous, at least with a higer power ebike.
 
Hi there! Thanks for your prompt reply, I’m using a 36V ebike with some China made controller, it does have a throttle plug. I would like the button to be a simple on/off where pressing it will give full power, does not have to be variable.
 
in most cases

feed throttle switched 4.5vdc

higher than that might not work

may interpret full 5vdc as error

disables controller
 
You may need to add a resistor or two (1k) to bring the voltage to 4.2V.
https://electricbike.com/forum/forum/kits/golden-motor-magic-pie/70584-guide-to-hall-sensor-throttle-operation-testing-and-modification

(check the section on pot throttles at the bottom)
 
https://endless-sphere.com/forums/viewtopic.php?f=2&t=103995&p=1520028&hilit=button#p1520028


put a potentiometer in or near the controller, so taht you can set the level of power you're after with the button, and adjust it experimentally until it does wha tyou want.

the middle wire from the pot goes to one side of the "activation button".

the other side of the "activation button" goes to the sp pad in the controller.

one end wire from the pot goes to any 5v pad in the controller.

the other end wire from the pot goes to any ground gnd pad in the controller.

flip the bike upside down and turn it on.

turn the pot's knob to the middle of ti's range.

press and hold the activation button, and turn the pots knob until the wheel goes as fast as it can, just before it stops spinning.

now it is set for full power output whenever you press that button.


if yo udon't want full power ewhenver you press the button, turn the pots knob until it is at the power you want it to be.
 
Trying to understand why you would want a full throttle button rather than a smooth controllable throttle which can also be used as a full throttle button. Thumb throttles are probably less expensive than the parts you would need to jury rig a button on the bars and a throttle would be a lot safer.
 
amberwolf said:
https://endless-sphere.com/forums/viewtopic.php?f=2&t=103995&p=1520028&hilit=button#p1520028


put a potentiometer in or near the controller, so taht you can set the level of power you're after with the button, and adjust it experimentally until it does wha tyou want.

the middle wire from the pot goes to one side of the "activation button".

the other side of the "activation button" goes to the sp pad in the controller.

one end wire from the pot goes to any 5v pad in the controller.

the other end wire from the pot goes to any ground gnd pad in the controller.

flip the bike upside down and turn it on.

turn the pot's knob to the middle of ti's range.

press and hold the activation button, and turn the pots knob until the wheel goes as fast as it can, just before it stops spinning.

now it is set for full power output whenever you press that button.


if yo udon't want full power ewhenver you press the button, turn the pots knob until it is at the power you want it to be.
Thanks, this sounds the easiest to implement. If I’m using a normal 12v horn button as my “throttle button”, what kind of potentiometer should I be using? Is a 10k pot sufficient?
 
Hwy89 said:
Trying to understand why you would want a full throttle button rather than a smooth controllable throttle which can also be used as a full throttle button. Thumb throttles are probably less expensive than the parts you would need to jury rig a button on the bars and a throttle would be a lot safer.
I live in a country where ebikes are not allowed to have throttles, having a small throttle button makes it less inconspicuous.
 
amberwolf said:
https://endless-sphere.com/forums/viewtopic.php?f=2&t=103995&p=1520028&hilit=button#p1520028


put a potentiometer in or near the controller, so taht you can set the level of power you're after with the button, and adjust it experimentally until it does wha tyou want.

the middle wire from the pot goes to one side of the "activation button".

the other side of the "activation button" goes to the sp pad in the controller.

one end wire from the pot goes to any 5v pad in the controller.

the other end wire from the pot goes to any ground gnd pad in the controller.

flip the bike upside down and turn it on.

turn the pot's knob to the middle of ti's range.

press and hold the activation button, and turn the pots knob until the wheel goes as fast as it can, just before it stops spinning.

now it is set for full power output whenever you press that button.


if yo udon't want full power ewhenver you press the button, turn the pots knob until it is at the power you want it to be.
I tried it with a 10k potentiometer and having some issues. When I hold down the button and turn the pot knob slowly, the motor does accelerate. However when I let go of the button and press it again, it doesn’t work anymore. I have to hold the button again and readjust the knob in order for it to work.

Left pin of pot to gnd
Right pin of pot to +5v
Center pin of pot to button A wire
Button B wire to controller signal wire
 
Rider90 said:
I tried it with a 10k potentiometer and having some issues. When I hold down the button and turn the pot knob slowly, the motor does accelerate. However when I let go of the button and press it again, it doesn’t work anymore. I have to hold the button again and readjust the knob in order for it to work.

Left pin of pot to gnd
Right pin of pot to +5v
Center pin of pot to button A wire
Button B wire to controller signal wire

Did you add the two 1k resistors in series with the 5v and ground, as shown in the diagram at the bottom of the page I linked?

https://electricbike.com/forum/forum/kits/golden-motor-magic-pie/70584-guide-to-hall-sensor-throttle-operation-testing-and-modification
 
Rider90 said:
Thanks, this sounds the easiest to implement. If I’m using a normal 12v horn button as my “throttle button”, what kind of potentiometer should I be using? Is a 10k pot sufficient?
doesn't really matter, 10k works fine.

just has to be low enough resistnace that electrical noise like rf doesn't generate voltages across it to interfere with throttle operation and high enough to minimize current draw in controller. commonly 5k-20kohm is well within this range.
 
Rider90 said:
I tried it with a 10k potentiometer and having some issues. When I hold down the button and turn the pot knob slowly, the motor does accelerate. However when I let go of the button and press it again, it doesn’t work anymore. I have to hold the button again and readjust the knob in order for it to work.

Left pin of pot to gnd
Right pin of pot to +5v
Center pin of pot to button A wire
Button B wire to controller signal wire
that's odd.

that shoudl work, as long as the pot is not set higher or lower than whatever threshold the controller has for "failed throttle".

if the contrllers throttle line is getting noise on it when not connected to the pot, then it should work to instead wire the button between right pin of pot and 5v, and directly connect controller signal wire to center pin of pot.

that will keep throttle line at zero volts except when throttle button is pushed.


i'm trying to think of another simple circuit to keep a minimum voltage on the throttle line when button isn't pressed, that doesnt' require anythign active like transistors, but atm i'm having trouble doing so.
 
E-HP said:
Did you add the two 1k resistors in series with the 5v and ground, as shown in the diagram at the bottom of the page I linked?

https://electricbike.com/forum/forum/kits/golden-motor-magic-pie/70584-guide-to-hall-sensor-throttle-operation-testing-and-modification

that only matters if using a pot *as* a throttle, so that it doesn't have a dead range at either end as it is twisted in use.

not relevant in this application where the pot is only used to set a single voltage that will then be applied ot throttle input.
 
amberwolf said:
E-HP said:
Did you add the two 1k resistors in series with the 5v and ground, as shown in the diagram at the bottom of the page I linked?

https://electricbike.com/forum/forum/kits/golden-motor-magic-pie/70584-guide-to-hall-sensor-throttle-operation-testing-and-modification

that only matters if using a pot *as* a throttle, so that it doesn't have a dead range at either end as it is twisted in use.

not relevant in this application where the pot is only used to set a single voltage that will then be applied ot throttle input.
I was thinking the one on the 5V line would keep from overshooting the high threshold (it sounded like the OP adjusted the pot until it was above 4.3V).
 
Rider90 said:
When I hold down the button and turn the pot knob slowly, the motor does accelerate. However when I let go of the button and press it again, it doesn’t work anymore. I have to hold the button again and readjust the knob in order for it to work.

Rather than adjusting by monitoring the motor, use your voltmeter to adjust the pot until the signal wire sits at 4.3V when the button is depressed.
 
amberwolf said:
Rider90 said:
I tried it with a 10k potentiometer and having some issues. When I hold down the button and turn the pot knob slowly, the motor does accelerate. However when I let go of the button and press it again, it doesn’t work anymore. I have to hold the button again and readjust the knob in order for it to work.

Left pin of pot to gnd
Right pin of pot to +5v
Center pin of pot to button A wire
Button B wire to controller signal wire
that's odd.

that shoudl work, as long as the pot is not set higher or lower than whatever threshold the controller has for "failed throttle".

if the contrllers throttle line is getting noise on it when not connected to the pot, then it should work to instead wire the button between right pin of pot and 5v, and directly connect controller signal wire to center pin of pot.

that will keep throttle line at zero volts except when throttle button is pushed.


i'm trying to think of another simple circuit to keep a minimum voltage on the throttle line when button isn't pressed, that doesnt' require anythign active like transistors, but atm i'm having trouble doing so.
Do i add need to add another resistor in parallel such that when the button is not pressed, there is a min voltage of 0.8v feeding to the signal line?

Based on your set up when button isn’t pressed, voltage is 0 which I suspect could be causing the issue.
 
E-HP said:
I was thinking the one on the 5V line would keep from overshooting the high threshold (it sounded like the OP adjusted the pot until it was above 4.3V).
if the pot gets adjusted above the controllers throttle max the controller will just stop responding in the cases i've had.

but even if it doesnt the pot just gets adjusted down until it is running like expected, then button released and retried. if it doesn't work then adjust pot down again and repeat, until it does work.

since the pot itself, when not adjusted to either extreme, already "has resistors" between the segment in use and hte 5v and ground lines, it doesn't require external ones. ;)


i'm pretty sure in this case his controller is detecitng the disconnect of the throttle signal and throwing an error, which the slow vs fast change in throttle voltage is then resetting.
 
Rider90 said:
Do i add need to add another resistor in parallel such that when the button is not pressed, there is a min voltage of 0.8v feeding to the signal line?

thats a circuit that would require active electronics to deal with. a transistor circuit at the least; i tried to think of a way to just use resistors but it doesn't come out working.

the only other thing i can think of is try putting a small capacitor, like 1uf, between controller signal wire and ground, so the cap stays connected to the controller when the switch is disconnected. it's internal pulldown will drain this but not as quickly as the plain wire. if this works, the disadvantage is it takes more time for throttle to drop to zero, so it won't instantly stop providing power, and it takes more time for throtle to rise form zero to max, so it wont' instantly start providing power.

Based on your set up when button isn’t pressed, voltage is 0 which I suspect could be causing the issue.
it's possible, some controllers error out if theres not enough or too much signal.


a simple-ish 2n2222 transistor circuit will do it, where there's a voltage divider on the base from 5v to ground to bias it partly on (to around 0.8v) when switch is not connected, and a pullup resistor on the collector to 5v, so that the button connects the base to the center of the pot (still wired 5v to ground on the outer pins) so that the pot voltage when connected to the base thru the switch will make the transistor collector (wired to the controller thorttle input signal) rise to the max input voltage of the controller.

sorry i don't have a schematic for that; it's just written up out of my head. if you want to try building it i'll sketch one up in paint.
 
This might work, but haven't checked math. Mimicking the voltage ranges of a typical hall throttle, like in Tommycat's post. 5K pot and a 20K fixed resistor, and a N/O switch.

circuit.jpg

Should output 0.88V and 4.4V when the button is pressed, I think.
 
Waking this thread up to say I've just built one of these following @E-HP 's diagram. I used a 5K pot, a 30K pot, two right angled connectors (2 pin and 3 pin) and a piece of solder on breadboard. Result in picture:
PXL_20210402_171705176.jpg

Calibration as follows:
- Provide a 5V DC supply across + and ground wires
- Short the 30K pot out with a jumper
- Measured from the signal wire to the ground connector, adjust the 5K pot until output on signal wire is 4.4V (or just a bit less for safety)
- Remove the "short" jumper, and adjust the 30K pot until output on signal wire is 880mV
- Done.

I hot glued little fibreglass strips to the sides and bottom to give it a bit of structural integrity, made up DuPont connectors for controller cable and momentary switch, plugged it all together and entombed the widget in insulation tape.

I attached the now fully formed "throttle switch" cable to the bike and used my "rolling road" (https://www.endless-sphere.com/forums/viewtopic.php?f=3&t=109112) to test it. Worked as expected.

I have drop handle bars, so for final attachment I positioned the momentary switch under the bars right by the right hand brake/shifter. It sits near my index finger when "on the hoods", so perfect for what I need, which is getting going on hill starts whilst struggling to get my left foot clipped into the pedal. :) I'm a street legal UK rider, so absolute maximum power to the hub motor is 500 ish watts - doesn't set the world alight. Also, this position keeps the switch out of view from a casual Plod inspection - should that ever happen.

The switch introduces a small risk that didn't exist before, which is that it could short out and thus cause unexpected wide open throttle. My mitigation for this are the cut out switches I have on both brakes.

Anyway - thought folk might be interested
 
Back
Top