BICYCLE SPEEDOMETER-
USING ARDUINO
Hello friends,
Do you want your bicycle to be different and unique than others?
Want your bicycle to be noticed?? Want to implement speed calculating tool on your boring cycle and make it coolllll !!!
YEA you landed up exactly on the right place.
I'm going to show you a very simple way to make your very own BICYCLE SPEEDOMETER .
Components Required----
1. Arduino Uno board-1no.
2. 16*2 LCD display moniitor-1no.
3. Magnet(Prefer a strong one).
4. Connecting Wires.
5. Reed Switch.
6. Resistor 10K(2nos).
5. Bread Board.
6. Potentiometer for backlight.
Step 1: Circuit Diagram
The schematic involves a power supply of 5 V DC.
The reed switch simply acts as a counter.
Backlight switch is a simple on-off switch.
Step 2: Interface Arduino with LCD display...
The potentiometer is used to adjust the contrast of the readings displayed on the lcd monitor.
**NOTE--: EITHER YOU CAN DIRECTLY SOLDER THE ARDUINO TO THE LCD OR MAKE USE OF A BREAD BOARD.........
SHOW THE POWER OF YOUR PRESENTATION SKILLS HERE...!!!
ALTERNATE--->
If you find the above connection messy, you can prefer using an LCD 1602 module......
and fix it to the LCD as shown.....
By taking the pain to add an additional module you reduce the number of wires and soldering required as in the above case.......
***NOTE--
HERE
MODULE---- ARDUINO
PIN VCC---->5V ON THE BOARD
PIN GND---->GND ON THE BOARD
DATA------->A4 PIN ON BOARD
CLK-------->A5 PIN ON BOARD
STEP 3: Mount the reed switch on the rear wheel....
Tape the magnet on the spokes of the wheel and the reed switch on the cycle support rod(blue in the above picture).
STEP 4: Burn the below code....
Install Arduino on your PC and burn the code given below......
USING ARDUINO
Hello friends,
Do you want your bicycle to be different and unique than others?
Want your bicycle to be noticed?? Want to implement speed calculating tool on your boring cycle and make it coolllll !!!
YEA you landed up exactly on the right place.
I'm going to show you a very simple way to make your very own BICYCLE SPEEDOMETER .
Components Required----
1. Arduino Uno board-1no.
2. 16*2 LCD display moniitor-1no.
3. Magnet(Prefer a strong one).
4. Connecting Wires.
5. Reed Switch.
6. Resistor 10K(2nos).
5. Bread Board.
6. Potentiometer for backlight.
Step 1: Circuit Diagram
The schematic involves a power supply of 5 V DC.
The reed switch simply acts as a counter.
Backlight switch is a simple on-off switch.
Step 2: Interface Arduino with LCD display...
The potentiometer is used to adjust the contrast of the readings displayed on the lcd monitor.
**NOTE--: EITHER YOU CAN DIRECTLY SOLDER THE ARDUINO TO THE LCD OR MAKE USE OF A BREAD BOARD.........
SHOW THE POWER OF YOUR PRESENTATION SKILLS HERE...!!!
ALTERNATE--->
If you find the above connection messy, you can prefer using an LCD 1602 module......
and fix it to the LCD as shown.....
By taking the pain to add an additional module you reduce the number of wires and soldering required as in the above case.......
***NOTE--
HERE
MODULE---- ARDUINO
PIN VCC---->5V ON THE BOARD
PIN GND---->GND ON THE BOARD
DATA------->A4 PIN ON BOARD
CLK-------->A5 PIN ON BOARD
STEP 3: Mount the reed switch on the rear wheel....
Tape the magnet on the spokes of the wheel and the reed switch on the cycle support rod(blue in the above picture).
STEP 4: Burn the below code....
Install Arduino on your PC and burn the code given below......
#define reed A0
float radius = 13.5;(Enter the radius of your wheel here)
int reedVal;
long timer = 0;
float mph = 0.00;
float circumference;
boolean backlight;
int maxReedCounter = 100;
int reedCounter;
void setup(){
reedCounter = maxReedCounter;
circumference = 2*3.14*radius;
pinMode(1,OUTPUT);
pinMode(2,OUTPUT);
pinMode(reed, INPUT);
checkBacklight();
Serial.write(12);
cli();
TCCR1A = 0;
TCCR1B = 0;
TCNT1 = 0;
OCR1A = 1999;// = (1/1000) / ((1/(16*10^6))*8) - 1
TCCR1B |= (1 << WGM12);
TCCR1B |= (1 << CS11);
TIMSK1 |= (1 << OCIE1A);
sei();
Serial.begin(9600);
}
void checkBacklight(){
backlight = digitalRead(2);
if (backlight){
Serial.write(17);}
else{
Serial.write(18);
}
}
ISR(TIMER1_COMPA_vect) {
reedVal = digitalRead(reed);
if (reedVal){
if (reedCounter == 0){
mph = (56.8*float(circumference))/float(timer);
timer = 0;
reedCounter = maxReedCounter;
}else{
if
(reedCounter > 0){
reedCounter
-= 1;
}
}
}else{
if (reedCounter > 0){
reedCounter
-= 1;
}
}
if (timer > 2000){
mph = 0;
}
else{
timer += 1;}}
void displayMPH();
Serial.write(12)
lcd.print("Speed =");
Serial.write(13);
Serial.print(mph);
lcd.print(" MPH ");
lcd.print("0.00 MPH ");
}
void loop(){
displayMPH();
delay(1000);
checkBacklight();
}
THAT'S IT
BURN THE PROGRAM AND ENJOY....
I'LL LEAVE THE ASSEMBLY PART TO YOU....MAKE IT AS CREATIVE AS YOU CAN.....
STAY TUNNED FOR FURTHER COOL ARTICLES........
Good evening, I had the opportunity to read your contribution about the Bicycle Speedometer. Unfortunately, the attached Sketch created many errors while compiling. I would appreciate to get a running sketch including the LCD libraries too. Thanks a lot. I liked the reed relay switch and will implement the solution for another application (you will get a feedback). Thank you for your help. Walter
ReplyDelete