Inspired by a Kickstarter project we also decided to start experimenting with an analog speedometer. The ambition is fairly low, use standard off-the-shelf parts as much as possible and keep the functionality basic.
- trip distance with a reset
- total distance
The parts list so far:
- 3 servos (ES08A)
- Arduino Attiny85 for the control
- one push button
- one led
- one wheel sensor stolen from a cheap bike-computer
The meter sports three gauges, one for the current speed, and two for the distance. The distance is split in two so that the leftmost provides the fine grained and the rightmost the coarse grained measure. In trip mode, these values are 0-10km and 10-100km and in total-distance mode they are 0-1000km and 1000-10000km.
The speedo dimensions are dictated by the servo sizes. The case is a set of plastic and aluminium rings joined by long 3mm screws. We managed to cram 3 servos + the arduino inside a ring with 45mm inside and around 58mm outside diameter. The servos were chosen mostly by price and size.
The Attiny arduino has just enough inputs and outpurs for the three servos, push button, and the wheel sensor. The input pin for the push button is programmed as a digital input. If more buttons were needed the input could be configured as analog and more buttons could be hooked up with resistors providing slightly different voltage levels.
The servos seem to provide less than 180 degree movement and the dial is not entirely accurate. One more addition to the long todo list:)
The Arduino was ordered from ebay and needs an update for the firmware to allow programing all of the input pins. A friendly guy provides instructions online on how to accomplish this.
The finished speedo needs a 5V USB battery pack for operation but remembers its state if the power source is disconnected as it uses the onboard EEPROM to regularly store the miles and wheel revolutions.
As mentioned, the meter has two modes that are controlled by the push button. In trip mode, which is indicated by the green led, the leftmost small gauge needle displays the distance from 0 to 10km and the rightmost needle displays the distance from 0 to 100km. Once either of the needles reaches the maximum it rotates back to zero. Pushing the button brings on the total-distance mode, in which the respective values are 0-1000km for the leftmost pointer and 0-10000km for the rightmost one. A long press (more than 2sec) resets the trip distance back to zero.