Saturday, September 22, 2007

GPS Receiver (Part 2)




In the previous post I described how I prototyped my own GPS receiver. Since then I modified a small plastic enclosure to hold the LCD, GPS module and circuit board holding the PIC microcontroller and power circuit. I also added code (see link below) that checks for the state of a switch to determine if you wish to have the LCD's backlight on or off. I decided to add this feature after measuring the current draw of the receiver as a whole. With the backlight on, the receiver draws an average of 165mA; with the backlight off, the receiver draws an average of 125mA (that's about a 25% savings). Since the receiver runs off of a single 9 volt battery (alkaline - 600mAh typically), that power savings is equivalent to as much as 72 minutes of additional time the unit will now be able to run. With a lithium 9 volt (1200mAh - typically) it could add another 2 hours and 24 minutes.

The picture on the right shows the receiver as completed; I will be the first to say that it is not the most professional looking, but it works. The switch on the right is for power and the other switch is for the backlight. The center picture shows the 4 possible LCD states: searching with backlight off, searching with backlight on, receiving GPS data with backlight off, and receiving GPS data with backlight on. The last picture is the schematic for the receiver unit.

I did some research and here are some constants that show how useful this unit can be for many different functions.
  • 1 Degree = 60 Nautical Miles (69 Miles)
  • 1 Minute = 1 Nautical Mile (1.15 Miles)
  • 1 Second = 101.2 Feet
  • 0.1 Seconds = 10 Feet
With these relationships and some basic geometry, I can determine distances and directions to and from GPS way points.

This was a really satisfying project to do. With just a handful of parts and a couple of modules I have a fully functional and now portable GPS receiver.

Parts List:
  • LCD with backlight (2 lines, 16 characters per line)
  • Parallax GPS Module
  • PIC16F84A
  • 7805 (5 Volt Voltage Regulator)
  • 4700 Ohm Resistor
  • 4 MHz Crystal Oscillator
  • 100uF Electrolytic Capacitor
  • 0.1uF Ceramic Capacitor
  • 9 Volt Battery
  • SPST Switch (power)
  • SPDT Switch (backlight)

Labels: , ,

8 Comments:

Anonymous Andrew said...

Hi joe,i have build the circuit but the problem is parallax 2x16 lcd is not available in my location.I can only get a normal 2x16 lcd without the rx port that is available with parallax lcd.The lcd module i'm using is JHD-12232D,can i integrate with this lcd and make it to work?

October 26, 2007 2:17 AM  
Blogger Joe said...

Andrew,
I am not familiar with that particular LCD. I would assume there is a way to use it in the same way I used the Parallax LCD. You should look for your particular LCD's data-sheet and check for any operational information to help guide you in how it should be wired and if the commands are any different. Sorry I couldn't be of more assistance.

October 26, 2007 7:17 AM  
Blogger Joe T. said...

Hi Joe,

Thanks for posting this project. Have you thought about adding data logging to it via eeprom? I am new to PICBASIC and appreciate the straight forward code. Your code is real easy to read, compact, and gives me a good starting point.

January 14, 2008 11:33 PM  
Anonymous Anonymous said...

Hallo Joe,
but the code for PIC are OK for another GPS receiver or only for Parallax model?
Thank you.Davide from Italy.

April 2, 2008 1:03 AM  
Blogger Joe said...

Davide,

As you can see in the original code, commands for the GPS are based off of hex values which are taken from the GPS unit's data sheet. If you want to use a different GPS unit check the data sheet and modify the command values as necessary. Otherwise you could have some miscommunication between the PIC and the GPS.

April 2, 2008 7:24 AM  
Anonymous Curious Web Surfer said...

Nice writeup.

Just a note to help clarify for others perhaps, it seems the units in use might be misleading to some. The distance between latitude lines (you refer to them as degrees, they are also called meridians) is totally dependant upon one's location on the face of the Earth (and in 3D space to boot). Think of the distance between meridians at one of the North or South poles and that of at the equator.

Also, distance can be as the crow flies or over land. The later clearly depends upon terrain and the shape of the Earth, which of course is not a sphere. Position in three dimensions matters when detemrining distance to some other point in space.

Not trying to rain on anyone's parade, just trying to make it clear that using those units will only be accurate at very specific places on the Earth. Investigate map coordinate systems, projections and datums for more.

Have fun!

July 11, 2008 2:33 PM  
Blogger embedded said...

can the project be done with pic16f877a?

July 17, 2008 7:57 AM  
Blogger Joe said...

embedded,
This code should work fine with any PIC, assuming it is feature comparable. However, you will probably have to modify the I/O port initialization code to match the 16F877A.

July 17, 2008 8:43 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home