Speedometer & Odometer
Speedometer/ Odometer Using AT89S52 & AT24C04 with complete ‘C’ code
This is very useful project. This article tell you how to design your own digital speedometer for your motor bike.
Project is bulit using AT89S52 microcontrroller which is basically an 8052 derivative by ATMEL, The concept behind the project is that we can count the number of revolution of wheel by just putting a megnetic sensor like reed switch or hall sensor. First i generate a delay one second using sim[ple for loop technique with a crystal value of 11.0592 MHz. I turn on the timer1 of AT89S52 for one second as counter and turned it off by pulling TR1=0. in this way i got the number of pulses coming in a second , which directly refelects tyhe speed in Km/sec or Mt/sec. This let you know the speed of your vehicle.
speedometer cum odometer by deveshsamaiya
Errata- Plz connect EA pin no. 31 to Vcc,and use Pull ups of 10K on I2C lines… it is not shown in Schematic
To make a digital Odometer i used a Non Volatile Memory EEPROM AT24C04 which has a storage of 4KB. EEPROM is used to store the total distance covered by the vehicle since the speedometer is installed. The content of EEPROM is updated after every 100meter distance.
Total two timers of 8052 is used in the design.You can download the complete source code below. If yoiu have any queries or your speedometer/Odometer isn’t working contact me at devesh@electroons.com
DownLoad complete source code and schematic files here




