I am using the LS20031 GPS receiver in this prototype to tag logged data with both geographic location and date/time stamp. The LS20031 is a bread and butter GPS receiver. It's very simple to operate. This receiver is made by LOCOSYS Technology. I have attached the LS20031 datasheet to this section for those interested in more detailed specifications.
- Model: LS20031
- Chip: MediaTek MT3329
- Voltage: 3.3V
- Frequency: L1 1575.42MHz, C/A code
- Channels: Support 66 channels (22 Tracking, 66 Acquisition)
- Update rate: 1Hz default, up to 10Hz
- Hot start: (Open Sky) < 2 seconds (typical)
- Acquisition Time: Cold Start (Open Sky) 35 second (typical)
- Autonomous 3m (2D RMS)
- Position Accuracy: SBAS 2.5m (depends on accuracy of correction data)
- Datum: WGS-84 (default)
- Max. Operating Altitude: < 18 Km
- Max. Operating Velocity: < 515 m/s
When the GPS receiver is powered up, it will start transmitting information via it serial (TX) pin in the form of standardized comma-delimited text lines. These standardized text messages are called NMEA sentences containing latitude, longitude, date/time, among other useful data.
NMEA stands for National Marine Electronics Association. This is the industry body that comes up with standardized message formats for GPS receivers to simplify using this technology.
NMEA sentences start with GP + a three-letter identifier that tells us what sort of data is contained in this NMEA sentence being transmitted by the GPS receiver.
The LS20031 sends out the following NMEA sentences.
- GGA Global positioning system fixed data
- GLL Geographic position - latitude/longitude
- GSA GNSS DOP and active satellites
- GSV GNSS satellites in view
- RMC Recommended minimum specific GNSS data
- VTG Course over ground and ground speed
- Message ID: $GPRMC RMC protocol header
- UTC Time: 053740.000 hhmmss.sss
- Status A: A=data valid or V=data not valid
- Latitude: 2503.6319 ddmm.mmmm
- N/S: Indicator N N=north or S=south
- Longitude: 12136.0099 dddmm.mmmm
- E/W Indicator: E E=east or W=west
- Speed over ground: 2.69 knots True
- Course over ground: 79.65 degrees
- Date: 100106 ddmmyy
- Magnetic variation: degrees
- Variation sense: E=east or W=west (Not shown)
- Mode A: A=autonomous, D=DGPS, E=DR
- Checksum: *53
End of message termination
POWERING AND WIRING THE LS20031
I mentioned earlier that I had published a guide to help configure the LS20031 GPS receiver. The LS20031 is a 3.3V module which means it's powered by a 3.3V source. This also means we cannot connect the Arduino output pins, such as the TX pin (5V), to the LS20031 RX pin (3.3V) without converting from 5V to 3.3V.
In this prototype, I use the SN74AHC125 as level-shifter from 5V to 3.3V. We should be able to take the LS20031 GPS serial output pin, the TX pin (3.3V), and wire it directly to the Arduino's serial RX receive PIN1 (5V). The Arduino's 5V pins can handle a 3.3V signal and will treat it as a logical high.
CONFIGURING THE LS20031
For this prototype I used MiniGPS 1.4 to configure the LS20031 GPS receiver as follow:
- Baud rate: 4800
- Fix Update Rate: 5/sec
- NMEA outputs: RMC output set to 1 while all other NMEA outputs set to zero (0). At 5Hz, this means 5 RMC messages per second.