GPS for accurate synchronization and position measurement must use precise clock, so GPS satellites are equipped with atomic clocks. Clock accuracy is amazing ± 1 second in 1 million years. Using GPS module is available not only acquire position, speed, bet also time and date, so in this post I’ll explain how to do it.
Sirf II module has RS-232 interface for communication and it can be connected to PC Com port. Atmega in Arduino board has UART interface. RS-232 basically is the same UART, only zeros and ones voltage levels are different. To match levels MAX232 driver is used. Today’s GPS modules have UART port, so there isn’t any need for MAX232.
Arduino in this project doesn’t have clock function it just pass time and date from GPS module to display. It works that way because GPS module has internal RTC(Real time clock) it’s not accurate, but it is synchronized to GPS system.
As you can see from video GPS module RTC is sychronised before GPS fix happens, but GPS fix is only one indicator that shows that clock is synchronised. Continue reading →
I have idea to build precise clock, and GPS module is here because GPS satellites has atomic clock on board. I have chosen particularly this module, because it was the cheapest, that I could find on internet, only 15 USD with free shipping. While new GPS module costs 60 USD, thought You could find completed GPS navigator for 70 USD.
Module has simple 5 wires connection. It’s powered from 5V, but can also work form 3.3V power supply. Data from/to device flows via well known RS-232 interface’s RX and TX data lines. Module can be directly connected to PC using RS-232 (com port), but is also needs 5V power source, USB works well. RS232 have the same data structure as UART, but voltage levels are different, so it can’t be connected directly to microcontroller, logic level converter MAX232 must be used.
Module use standard NMEA-0183 standard interface for data transmission. One reason it’s good, because module outputs data continuously without any request, so really it can be used only one RS232 data line.
Cold start (18 minutes until GPS fix)
To test bought GPS module I had connected it to my desktop PC RS232 port. It’s very easy to test. because seller send my with documentation and test software – GPS Diagnostics V1.05. It decrypts data in NMEA format and shows it in user friendly way.
18 minutes elapsed until I got location from module, at so called Cold start. Cold start means, that GPS module doesn’t have primary data about time, and location, so it is impossible to calculate which of 24 satellites are in module “view”. In this scenario module searches for signal of all 24 satellites, consequently it takes some time. Seller recommended to test device with clear view of sky, but I placed module near open window, so it is why 18 minutes 🙂
After 7 minutes I got data from 2 satellites, no location info still, but UTC date and time from satellite.
After 18 minutes location is found.
Here is module’s best result – 6 satellites, but still near open window.
Warm start (5-6 seconds)
Module saves date, time and location information in memory. Next time it is turned on it uses that information for faster GPS fix. With built in RTC (Real time clock) used time is current, not the same as was when module last time worked.
There is GPS module pinout instructions from seller: