Ebike week 1: Electricals
A good quality powered vehicle capable of transporting me around is one of my maker bucket list items, and the only one I haven't really ticked off. I've previously built a friction drive ebike and the Shonkmaster 9000 electric scooter, but both of those were both terrible and totally illegal.
A compact, minimal weight, road legal electric assist for my road bike. It needs to be:
- mountable with non-permanent modifications
- preferably quickly de-mountable for unassisted road riding
- 250W max, no assist above 25kph, only provide assistance power when the rider is pedalling
A slim primary reduction stage with a 2.4:1 belt reduction stage from the motor kit, turning a jackshaft with a salvaged sprag/freewheel bearing on it, turning a second chain reduction stage driving the back wheel.
The obsessive amounts of CAD:
What I've done so far:
Firstly: bought a VESC, figured out how the VESC tool works, set it up in lower power mode for testing my motor with, and figured out how to make the Arduino control it in PPM (servo-style) mode.
For the control scheme, a member on the endless-sphere ebike forum described a minimal electric assist with a single button, and I liked the idea: my road bike has drop handlebars with nowhere to mount a twist grip throttle, and if it's only an assist the finesse of an analog throttle isn't vital. To be road legal for the UK it must only provide assistance when the rider is also pedalling, so I have this minimal setup for testing: two buttons and a potentiometer.
The left button represents the throttle button: the motor will only turn if it's pressed.
The right button is a standin for a reed switch pedal rotation sensor: the motor will only turn if it's detected a pedal rotation in the preceding 1.2s, and a rotation between 0.5 and 1.2s before that which should allow reasonable pedalling cadence and discard glitches. This satisfies the criteria of only powering the motor if the rider is both pedaling and giving control input.
The potentiometer can be used for a power setting; on the bike I'd probably have that controlling the motor current between 0 and 11 amps, but for testing it's easier to see the effect if it's controlling motor speed. Having a small knob on the bars would be awkward to use as an actual throttle but should be OK for "this is flat, I don't need 100% power" or "there's a hill coming".
There's also a single RBG LED for mode feedback. The greeny-blue colour distinctions don't show up well on camera but the states are encoded with
- blue for "off"
- cyan with yellow flashes for "pedalling, no throttle"
- red for "throttle pressed but no pedal rotation"
- green for "pedalling and throttle pressed, powering motor"
In this video I'm using the light bar scavenged off R3L14NT because I don't have any more Neopixels soldered up at the moment :)
The next steps:
That's actually most of the electrical side done. I'd need a quick disconnect, fuse and a voltmeter for real riding but this is the functional side done. Next I'll need to turn my attention to the mechanical side. Much as I'd love to, I probably can't 3d print the entire thing so it will need at least some metalwork. That will require stock, and precision cutting/drilling, maybe welding, possibly even work on the mill so isn't likely to happen until Hackspace reopens. Until then it's 3d printed prototypes all the way.