Bicycle speedometer

From ShawnReevesWiki
Revision as of 21:27, 6 December 2013 by Shawn (talk | contribs) (Created page with "When a student in my circuits class asked if they could build a speedometer, I began to seek a simple circuit that would include a switch, a frequency meter, some way to conve...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

When a student in my circuits class asked if they could build a speedometer, I began to seek a simple circuit that would include a switch, a frequency meter, some way to convert that to a speed, and a display.

Specifications

Use a magnetic reed switch attached to the frame/fork of a bicycle. Run on a battery. Include a two-digit display. Include a power switch to save the battery. Weigh as little as possible. Use a breadboard so it can be modified.

Circuit

Circuit diagram for a bicycle speedometer

The circuit uses a common-anode layout since the 2051's output ports can sink up to 20mA of current. Since the digits are shown in an alternating fashion, we can use a 10-pin display or tie together parallel pins of an 18-pin display.

Components

Atmel 89C2051
This is a very cheap (~$1) micro-controller that can run on 2.7 to 6 volts. The C variant requires a flash programmer with a 12V power supply. There is an S variant that can be serially programmed in-circuit.
Lumex LDD-M512RI-RA
This is a dual-digit, seven-segment display, where the LED's cathodes for each digit are tied together to reduce the number of pins to 10. This means that unless both digits are the same, we need to alternate rapidly between showing one and the other by allowing current into one anode or the other.
Fairchild BS270
This is an N-channel MOSFET suited to switching at logic levels (3-5V). The current that goes through depends on the voltage between the gate and source. When the voltage at the gate is equal to or lower than the source, no current is allowed from drain to source. Since more current is allowed when the voltage at the gate is much higher than at the source, this N-channel MOSFET is better suited to a common cathode display. I'd like to find a better MOSFET for this common-anode display, and I welcome suggestions on the discussion page.