LS20031 GPS

From Dallas Makerspace
Jump to: navigation, search
LS20031 GPS
Ls20031 gps.jpg
Small, lightweight, easy to use and accurate.
Device Information
ManufacturerLOCOSYS
ChipsetMediaTek MT3329
InterfaceTTL Serial
Baud Rate4800 to 115200
Update Rate1 to 10Hz
Voltage3.3v
Channels66
DGPSCapable of SBAS (WAAS, EGNOS, MSAS)
LED IndicatorYes, blinks once per second when locked
Dimensions30 x 30 x 7.2 mm


The LS20031 is an amazing little GPS unit. It's small, lightweight, easy to use and accurate. It even has a built-in micro battery to preserve system data for rapid satellite re-acquisition.

Suppliers

Datasheet and Schematic

Don't let the datasheet fool you, the GPS defaulted to a baud rate of 57600 8N1 and not the 9600 8N1 that the datasheet claims.

Pinout

Ls20031 pinout.png

  1. Vcc
  2. RX
  3. TX
  4. GND
  5. GND or not connected

Sparkfun has an excellent tutorial on preparing the LS20031 for use on a breadboard.

Commands

This board accepts standard MTK/NMEA commands and outputs in the same format. When sending commands to the GPS you must ensure that the checksum is correct, otherwise the command will be ignored. I recommend using the handy MTK NMEA checksum calculator. Commands must also be terminated by a CRLF ("\r\n").

Baud Rate

Baud rate is set with the $PMTK251 command. For example, to set the baud rate to 9600:

$PMTK251,9600*17\r\n

Update Rate

SparkFun recommends sticking to 5Hz, as it is more reliable than 10Hz on this device. 1Hz Output:

$PMTK220,1000*1F\r\n

2Hz Output:

$PMTK220,500*2B\r\n

4Hz Output:

$PMTK220,250*29\r\n

5Hz Output:

$PMTK220,200*2C\r\n

10Hz Output:

$PMTK220,100*2F\r\n

GPS Augmentation Settings

Enable SBAS:

$PMTK313,1*2E\r\n

Disable SBAS:

$PMTK313,0*2F\r\n

Query SBAS:

$PMTK413*34\r\n
  • 0 = Disabled
  • 1 = Enabled

Enable WAAS:

$PMTK301,2*2E\r\n

Disable WAAS:

$PMTK301,0*2C\r\n

Query WAAS/DGPS:

$PMTK401*37\r\n
  • 0 = Disabled
  • 1 = RTCM
  • 2 = WAAS

Usage

Linux

I recommend using Minicom to view the raw output. If you need to configure the GPS you can use the echo command, once you are listening to the incoming data at the right baud in minicom. Here's an example command for setting the baud rate to 9600:

echo -e '$PMTK251,9600*17\r' > /dev/ttyUSB0

Windows

Mac

Embedded

Additional Resources

Projects That Use This Component