I’m brand new to GPS, but I have an idea i’d like to make. I’d like to track how far I have gone on my motorcycle (no odometer or speedo) so that I know how much gas I have left. I figured I could use a gps unit and output to to an lcd screen with the mileage and speed, and have a reset button to zero it out at the end of a trip or fill up. I’m not sure what parts I’d need to make all that happen. Obviously a gps, lcd, a board of some type to do the calcs. Any suggestions are welcome. Thanks.
Are you doing this because you want the learning experience or because you want the end result? I ask because just about every handheld GPS unit I’ve seen has those features, and an off-the-shelf unit will be almost certainly be smaller and cheaper than what you will end up with if you do it yourself… but it will be far less fun to make.
Probably any decent 8-bit microcontroller could do the job. You’ll talk to the GPS over a serial connection, so look for a microcontroller with a hardware UART. If you’re planning to use a character LCD, that will require 6 pins or so. Add two for the UART, two for power, a few for buttons, and you still can fit on a pretty small chip (although extra pins are nice to have when debugging).When choosing components, pay attention to what voltages they run at. If you can select a GPS that operates at 3.3V, a microcontroller that operates at 3.3V, and an LCD that operates at 3.3V, you can run everything from one supply without doing any level translation. If you get a 1.8V GPS, a 3.3V microcontroller, and a 5V LCD, you’re making a lot of extra work for yourself. PICs, AVRs, and MSP430s would all be fine choices. Some of the boards that come with bootloaders like the arduino or UBW would save you from having to buy a programmer.
Absolutely for the learning experience, plus I think it would be fun to create my own. And, I don’t need all the mapping features that the COTS products have. I just want mileage and speed. Mileage most importantly.
Thanks for the run down, I’ll start researching those parts to purchase and see what I can come up with. I’m guessing the hardest part will be programming the controller to do the calculations?
Thanks again.
this is very helpful: http://williams.best.vwh.net/avform.htm
i have used a picaxe (yuk) + uMFPU v3 floating point maths chip (which can output straight to an lcd…) for my recent project.
It all depends on what tradeoffs you make. If you use a microcontroller that doesn’t have a lot of SRAM, the hardest part might be parsing the speed, latitude, and longitude out of the NMEA data stream. That can be a real pain when you don’t have enough memory to buffer an entire line from the GPS. If you have lots of RAM, this won’t be an issue.
The calculations will certainly be the part that makes the microcontroller work the hardest, but it will probably only take you a few lines of code. If you’re only updating once a second, I don’t think you’d need to bother optimizing your calculations much.
If you’re new to microcontrollers, it’ll be all the little stuff that becomes the hard part.