Intro: DIY SPEEDOMETER AND ODOMETER
Hey guys, this a instructable of how to make a bike speedometer.Yeah,you read it right the one that we use in car but only for 10$ .Well the first this for you to know is that this is the collaborated project of Mr_DIY_Electrician and paurushthemaker .So back to topic our project is all about a speedometer which has 3 modes as follow:-
Speedometer(for speed) and odometer(for distance)
Task1.-Cover 20 miles
Task2-Achieve 30mph speed
And yes one more thing is that this is a arduino speedometer so there is no limitation for imagination. Let's Get Started.........
Step 1: HOW IT WORKS
The working of a project is simple. It is also very important to understand it for making the project. Basically the apparatus consists of the reed switch or the magnetic switch mounted on the frame of the cycle and a magnet mounted on the one of the spokes. As the wheel rotates the magnet triggers the switch every rotation. The signal go to the arduino which counts the no of rotation and finds the distance covered(you have to pre enter the diameter of your cycle). The arduino also measures the time and calculates the speed. The output from the arduino then goes to the lcd where it is shown in miles per hour (you can convert it if you want).
Step 2: MATERIALS REQUIRED
The full project would cost you about 5$-10$ depending on the place you live in. The cycle speedometer also would require moderate soldering skills and an afternoon. so without any further ado the materials for the build are --:
1. The arduino board - i got Rs.330 which is around 5$ but to programme the pro mini you will also need to have an arduino uno or an usb to ttl adapter (how to program an arduino pro mini with an uno) or if you don't have it then use an arduino micro or an arduino uno.
2.Arduino 16x2 lcd (Rs150 or 2.3 $)
3.7805 voltage regulator (increases the control over the contrast no major difference -optional)
4. 2x switches for backlight and on off (optional)
5.220 ohm resistor
6. trimer pot 10k ohm
7.female headers and male headers if you want the reed switch to be detachable
8. reed switch
10. a momentary switch to change the modes
11. 0.1uf capacitor to reduce the debounce of the button
12.10k ohm resistor
The tools you would require are
1. soldering iron
4. cutting tool like the dremel to cut out holes in the enclosure to mount he lcd and stuff
5. hot glue or any adhesive to mount the various components.
Step 3: THE CODE
Before moving on to the electronics it would be good to flash the code so that you don't need to struggle between wires afterwards
flash the given code on the arduino but DON'T FORGET TO SET IN THE DIAMETER OF YOUR CYCLE.
the code can be downloaded below
Step 4: THE ELECTRONICS
The wiring diagram can be found above also I have mentioned it down
1 - GND
3 VIPER PIN OF THE POT (ends to vcc and gnd and center to pin 3 of lcd)
a 220 ohm resistor is to be connected between pin 2 of the arduino and ground(pull down)
the momentary switch is connected to pin two and vcc
a 0.1 uf capacitor between the two terminals of the switch to reduce the debounce
the reed switch to vcc and A0
a resistor between A0 and gnd (pull down)
After connecting all this the wiring would be complete and now you can connect power and check if every thing is working
Step 5: THE ENCLOSURE
The enclosure can be a plastic box or a wooden , just that it should be sturdy and should have enough space.
After mounting the switches ,lcd,button and headers do check the working of the device also.
as far as possible try and make it waterproof because the cycle goes into the worst of the conditions.t
Step 6: TESTING AND TROUBLESHOOTING
Connect a 9v battery and test all three modes completely. Bring a magnet close to the reed switch and the speed and distance should increase.
If it is not so in your case then post your doubts and queries in the comments and i will answer them back as soon as possible...