How to Build a Robust DIY Electric Bike for a Budget
Introduction: How to Build a Robust DIY Electric Bike for a Budget
If you are like me, you hate coming all sweaty at school or at work in the morning because riding your bike was difficult. So I decided I needed an electric bike. I looked at the prices and... way too expensive for a student. So I looked at the kits with an electric wheel, but they were also expensive and... Where's the fun of building that? So the only solution: build my own. With all the material and if you adapt your own bike, you can build it for under 250€, which is quite reasonable for an electric bike, and less expensive than electric wheels. Unlike other projects, it's driven by a chain which allows it to have much higher efficiency.
I've so far traveled 250 km with it, with no major problems, so it's quite resistant.
Warning : this bike is adapted to the French law. If you plan on using the code and the hardware on another country, be sure to check that your design is OK with the law.
Supplies
-Arduino Mega
-Screen
-10k Potentiometer
-Hall effect sensors (x3)
-Magnets : what you want as long as they are 8mm wide and powerful enough.
-Wiring : I used old RJ45 cable, it worked pretty fine. For the power, I used 1.5mm2 copper wire.
-Jumper cables : a lot (at least 100), anyway you'll need them to test your sensors, your code...
-Motor driver
-Voltage regulator : What you want, you need one DC DC converter which can convert 24V into 6.5V with 1A.
-3D printer and ABS filament : around 300g. (As it will be used on the outside, PLA isn't the best idea)
-Steel tube : 1m of 20x20mm tube, thickness 1.5mm.
-Aluminium : 1m of 2mmx20mm profile.
-Screws ans bolts...
-Motor : 250W MY1016 with a 1/8 inch sprocket and 10 teeth.
-Wheel sprocket and chain : 1/8 inch chain and sprocket with 68 teeth.
-Poly carbonate plate.
-Batteries : 18V and at least 15Ah if you want a 25km autonomy.
-A water proof box to put the electronics in, 25cmx20cmx10cm should be enough
-Various connectors and small electronics...
Step 1: Assembly of the Sensors
There are 2 sensors on this bike : a pedaling sensor, which senses when pedals are turning, and a speed sensor. 98
In both case, they are hall effect sensors. The pedaling sensor has 2 sensors, so it knows the direction of the pedaling.
First, print the 5 parts : magnetic wheel (2 parts), pedaling sensor box, wheel magnet support, speed sensor box.
Then, we will focus on the pedaling sensor. Put the two hall effect sensors in the box, wire them, and seal the box. For me, gluing a piece of plastic bottle on the top and hot glue to waterproof the wire worked fine. Keep careful to have wires long enough to go to your electric box. Glue the magnets into the wheel, but be careful, magnets will trigger the sensors only if they are placed in the right direction, so test them before gluing them. Then, install the box and the wheel as on the picture.
This is the same process for the speed sensor, except this time you'll install the box on the rear wheel, as on the picture. This box is also smaller, since only one hall sensor is required, and the plastic part which goes on the wheel only has 4 magnets (but 2 is enough).
Step 2: The Screen
For the screen, you will need to print the two files below.
On the screen, you will see your speed, your battery level, and the current which is drawn by the motor. The potentiometer next to the screen is used to control how much electric assistance you need.
You 'll need 9 wires to wire the screen and the potentiometer.
Then, wire the screen as explained in this site. You'll need to wire the potentiometer as well, simply use the +5V and the ground from the screen, and the ninth wire to transmit the signal.
For the lid, glue a transparent piece of plastic, screw the potentiometer, and close the box with 4 screws. Water proof the wires coming out of the box with hot glue.
Step 3: The Batteries
Here you have the choice for the battery. In order it to be compatible with the electronics, it has to be between 18V and 24V nominal, lithium-ion. 259