Sunday, January 31, 2010

GPS Speedometer project

Here is a project I worked on a couple of months ago that I thought I'd like to post before I "reclaim" the parts into something else.

Inside the trendy "lunchbox" is a small GPS sensor and a PICAXE that work together to display the current speed in Kilometres-per-hour (KPH) on the display - forming a universal speedometer. In an attempt to make this project as simple as possible, the PICAXE uses PWM to output 0-200mV to a 0-200mV DC Voltmeter. This removes the need for a (more expensive) dedicated LCD as the circuit can be connected to any multimeter with a 200mV range setting.

The program reads in the KPH from the GPS unit (one of these) using the serial pin, multiplies that number by 4 and sets its PWM output to the result.

The PICAXE code is available here on GitHub.

The PWM output ranges from zero the supply voltage to the chip - in this case 5V. This is then limited to 0-3V by a Zener diode and further reduced to 0-200mV using a potentiometer wired as a voltage divider.

The result is an accurate speedometer that can be used in a car, boat, bicycle, motorcycle without any sort of special configuration and that costs virtually nothing. Performance-wise, it updates once every second and the speed is steady and accurate to within +/- KPH at highway speeds.