Skip to content
Archived from the legacy DMS wiki — content may be outdated.

LS20031 GPS

LS20031 GPS
Ls20031 gps.jpg
Small, lightweight, easy to use and accurate.
Device Information
Manufacturer LOCOSYS
Chipset MediaTek MT3329
Interface TTL Serial
Baud Rate 4800 to 115200
Update Rate 1 to 10Hz
Voltage 3.3v
Channels 66
DGPS Capable of SBAS (WAAS, EGNOS, MSAS)
LED Indicator Yes, blinks once per second when locked
Dimensions 30 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.

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.

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.

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 is set with the $PMTK251 command. For example, to set the baud rate to 9600:

$PMTK251,9600*17\r\n

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

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

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

Migrated from the legacy DMS wiki: original page