Bookmark and Share Printer-friendly version Email to a Friend

Versatile digital speedometer uses few components

( 01 Aug 2005 )
by Abhishek Jain, Netaji Subhas Institute of Technology, Dwarka, New Delhi, India

A speedometer measures a wheel’s rotational speed. Unlike conventional mechanical and moving-magnet designs that use analog movingpointer displays, the electronic speedometer in this Design Idea features a digital readout and a power-saving device that uses few components. Figure 1 shows thedigital speedometer’s circuit deign. An Atmel AVR AT90S2313 microcontroller, IC1, drives IC3, a 16-character, two-row LCD. All components except IC4, an Allegro A3121 Hall-effect sensor reside on a pc board within the reach and view of the vehicle’s operator. The Halleffect sensor attaches to the vehicle near its periphery and a fixed distance from the wheel’s axle.

When the wheel rotates, a permanent magnet attached to the wheel passes the sensor, activating it and generating one short pulse for each revolution of the wheel. After you apply the pulse’s rising edge to the IC1’s INT0 input, the rising edge generates a highpriority interrupt. The AVR calculates the elapsed time between two interrupts, computes the speed and distance traveled, and displays the results on the LCD. One of IC1’s internal timers, Timer0, increments after every N clock pulses. Distance traveled equals 2R, where R is the wheel’s radius. To calculate speed, IC1 divides the distance the elapsed time travels. In this application, the display shows speed in kilometers per hour.



In addition, IC1 keeps the track of distance traveled by incrementing a register every time a sensor interrupt occurs. It compares this register value with a number that’s equivalent to a 100m distance traveled, and, when the register value exceeds the 100m constant, IC1 increments the distance register. The display shows the distance traveled in kilometers, and a location in IC1’s EEPROM retains the distance even when a users switches off power to the speedometer. Maximum values of the design include speeds of 0 to 255km/hour and distances as far as 9999.9km.



The design requires a 5V-dc power supply to work properly. To accommodate higher power-supply voltages, a bridge rectifier and a 7805 voltage regulator, IC2, accept power supplies ranging from 6 to 24V dc or ac for indoor applications. At 12V-dc input, the speedometer draws approximately 43mA, or approximately 500mW, under normal conditions. Switching on the LCD’s backlight for night operation increases current drain by approximately 11mA for a power consumption of approximately 730mW.

You can download the source code for IC1’s program from the online version of this Design Idea at www.edn.com and assemble the software with Atmel’s AVR Studio 4 software. You can alter constants within the software to accommodate wheels of various radii for other applications. Future enhancements to the software would allow measurement and display of a rotating object’s speed in revolutions per minute or show elapsed distances when you use the device as a trip meter.

 
Printer-friendly version Email to a Friend
 
Article Rating 
Average Rate:
 
Poor Quite Good Good Very Good Excellent
 
 
ADVERTISEMENT
 
Related Content 

bb

 
 
ON-DEMAND WEBCASTS


 
 
Highest Rated  
Feedback Loop  

ADS BY GOOGLE 
 
 
 
ADVERTISEMENT
Press Release 
 
TECHNOLOGY NEWS
 
 
 
PRODUCT NEWS
 
FEATURED SPONSORS
 
 
 
DESIGN CENTERS
 
ADVERTISEMENT
     
Reference Designs 
   
     
 
 
 
 

 

RSS
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

POLL
What type of environmental regulation do you think will be most beneficial for the tech industry?
Proper recycling and disposal
Push for power efficiency and energy conservation
Chemical/lead regulation
View results


 
     
 
Power Technology E-newsletter 
Power.org Releases Power Architecture 32-bit Application Binary Interface Supplement
EDNA, May 11
POL Regulators Designed for Energy-efficient Computing
EDNA, March 11
Fairchild Revolutionizes Power Savings
EDNA, January 11
Lattice Transforms Board Power and Digital Management
EDNA, November 10
 
Analog E-newsletter 
12V Dual-channel Synchronous Buck Converter Features Integrated FETs
EDNA, February 10
Power MOSFETs features reduced top-side thermal impedanc
EDNA, January 10
 
     
 
KNOWLEDGE CENTER
 
Texas Instruments: DaVinci™ Technology
 
Texas Instruments: Safe Bet Series
 
 
INDUSTRY LINKS
 
Photonics Association (Singapore)
Singapore Industrial Automation Association (SIAA)
Taiwan Semiconductor Industry Association (TSIA)
 
 
OUR SPONSORS
 






Keithley Instruments
With more than 60 years of measurement expertise, Keithley Instruments has become a world leader in advanced electrical test instruments and systems from DC to RF (radio frequency). Our products solve emerging measurement needs in production testing, process monitoring, product development, and research...
 
 
 
     
 

EDN India | EDN Taiwan | EDN Korea | EDN Japan | EDN China | EDN | EDN Europe

 
ABOUT EDN Asia | CONTACT US
   
© 2012 EDN Asia All rights reserved.