This project is a GPS speedometer with a setpoint. It connects to a GPS module like
those used in the tracker. The left-hand LED display shows current speed, updated once
per second. The right-hand display shows the setpoint. The speeds are in MPH, but this
can be changed by altering a constant in the program.|
When the current speed exceeds the setpoint, a relay closes. When the current speed drops below the setpoint, the relay opens. There is a three-sample delay to prevent repeated switching when the speed is near the setpoint.
The two buttons adjust the setpoint up and down. Pressing the button steps one unit. Holding the button counts rapidly. The setpoint is saved to EEPROM a few seconds after the setting is changed.
The device was developed for a customer who has a speedboat with low and high gears. People had downshifted at excessive speed and damaged the transmission, so this device will prevent downshifting above a safe speed. It likely has other uses, such as sounding an alarm if a vehicle is speeding. It could be easily modified into a large-display speedometer for various purposes.
The unit uses an ATMEGA8 (not an ATMEGA88, although it could be adapted) and four common-cathode multiplexed LED digits. Four NPN transistors (PN2222) are required. The unit shown above also has a relay, relay driver transistor, a 12 volt power converter, and an input fuse.
The chip pin-outs are explained in the source code file.