matbox.de / Echolot Ranging Project

You're currently not logged in. You cannot access to all files. Why?

« back to overview of Echolot Ranging Project...

Echolot Ranging Project - GPS receiver

I am using the LS20031 GPS antenna from Locosys.

First steps with the GPS receiver (LS20031) November 4th, 2011

Locosys GPSr LS20031
Fig. 1: The Locosys GPSr.

As suggested in the respective setup manual by SparkFun Electronics, I soldered some pins to the GPS antenna (cf. Fig. 1).

The example code

void setup() {
    Serial.begin(57600);
}
void loop() {
    if (Serial.available()) {
        Serial.print(Serial.read(), BYTE);
    }
}

works out of the box and the (for now empty) NMEA data is transferred to the terminal via the Arduino.
After a few minutes, the antenna indicates fixed GPS reception by a flashing LED at 1Hz.


Setting up the GPS receiver (LS20031) January 7th, 2012

First of all: Forget about the specification sheet by Locosys. The initial baud rate is wrong (it is 57600bps in fact) and there is no information on how to configure the antenna's firmware.
The information provided at Dallas Makerspace helps along instead.

Apparently, the LS20031 delivers data at 57600bps when it is delivered. Only Arduino's hardware UART will be able to handle the data in time. This poses no problem for me at the moment, as pin 0 and 1 are still available at my Arduino.
However, disconnecting the antenna for every program-upload to the Arduino is not much fun. I thus would like to connect the LS20031 to another digital pin and use a software UART.

There is an Arduino library available, that handles the NMEA data from the antenna and stores it into variables. The library is called TinyGPS by Mikal Hart.
TinyGPS uses the software serial interface implemented in NewSoftSerial.
Reading through the comments at SparkFun Electronics gave the hint on what to do about this: Increase the buffer size by editing the line

NewSS_MAX_RX_BUFF 64
and change the definition to
NewSS_MAX_RX_BUFF 256

in the NewSoftSerial-library header NewSoftSerial.h.

The data is now displayed nicely on the display:

searching sats
Fig. 2: Waiting for satellite signal..
signal success
Fig. 3: Finally - a signal!. Full setup with Arduino, LS20031, and SerLCD.

This is some nice workaround, but it does not solve the actual problem: The antenna delivers redundant and needless data.

A programming of the antenna may be done by following up on information provided by Dallas Makerspace and DIY Drones.
I do not have an FTDI-cable at hand right now. The supplier says, the order will be shipped within two weeks.