Sep 12, 2010

GPS Time

GPS? What is the relation between GPS and Time? There are two ways to get always "correct" time into your project.
1) Use atomic clock which generate an extremely accurate clock 2) Receive the atomic clock time transmitted through radio, GPS or internet.
Complex signal receiving technique and calculation are performed in the a GPS receiver module but no problem because the GPS receiver module sends out the information in easy-to-understand protocol via serial port. Well, there are many protocols either binary or ASCII but this time I use PGM-111 GPS receiver module which generate SIRF-II ASCII.
GPS module send out many information. Not only the time but also the position, altitude, validity, the number of received satellite. As you can see on the picture beside, my project shows time, date, and signal validity. Time zone is defined in the program manually. See below example data generated by PGM-111. What the program does is to find the $GPRMC then parse the text by comma, get the time and date, convert it to the right timezone.  




      
       Time                                          Date    
$GPRMC,125957,A,2142.4116,N,10841.2210,E,000.0,000.0,161209,,,A*7A
$GPGSV,3,3,10,27,52,052,41,29,10,191,00,,,,,,,,*7B
$GPRMC,125957,A,2142.4116,N,10841.2210,E,000.0,000.0,161209,,,A*7A
$GPGGA,125958,2142.4116,N,10841.2210,E,1,04,02.2,-00110.6,M,106.7,M,,*65
$GPGSA,A,2,09,14,18,27,,,,,,,,,02.4,02.2,00.9*0C
$GPGSV,3,1,10,05,04,106,00,09,64,067,54,12,14,135,00,14,24,260,40*75
$GPGSV,3,2,10,15,18,044,31,18,48,346,51,21,74,265,00,22,23,315,00*71
$GPGSV,3,3,10,27,52,052,41,29,10,191,00,,,,,,,,*7B


Here the schematic, nothing special about it. It consists of LPC21XX microcontroller, LM1117 voltage regulator, 84x48 pixel graphic LCD, and a PGM-111 GPS receiver with built-in antenna. Googling for SIRF-II protocol if you want to know the protocol detail. In fact if you connect the PGM-111 to your notebook with GPS software in it, your notebook will work like a normal GPS.

No comments:

Post a Comment