SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By toomuchcoffeecoder
#148692
I purchased a LS20031from spark fun last year hooked it up and saw it achieve lock. I shelved it until today and then hooked it up to a ChipKit Uno32 micro-controller board. I am able to get nema sentences out of it but am not getting a lock.
Here is an example of the out put I am getting.
Code: Select all
$GPGGA,003450.237,,,,,0,0,,,M,,M,,*4C
$GPGLL,,,,,003450.237,V,N*7E
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,003450.237,V,,,,,0.00,0.00,060180,,,N*46
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,003450.438,,,,,0,0,,,M,,M,,*45
$GPGLL,,,,,003450.438,V,N*77
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,003450.438,V,,,,,0.00,0.00,060180,,,N*4F
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
Any help would make my day :cry:
By teekay_tk
#148850
Hi

There are two reasons that I can think off.

1. The almanac data in the GPS has expired. Leaving it on for a few hours continuously in open sky may help it get the almanac and then get a lock

2. The power supply to the GPS module coming from the ChipKit Uno32 board is noisy.
By D9W
#150890
First have you gone over to the http://www.locosystech.com/ web page?

What you might want to look at is the PDF data sheet for the Ls20031. LOCOSYS Technology Inc doesn’t make this simple or easy to get at- you need to click on the Products and download page (http://www.locosystech.com).
I would give you a URL but they keep changing it. So you will just have to let your mouse click to it by starting by going to the home page.

IF you look under the Locosys banner you will see home. Look to the right of that and you will see Products & Downloads <<--- Click on it.
Then there will be a column with the heading of Products. Under that there will be something called GNSS SMART ANTENNA <--Click on it.
Then you’re looking for MTK. Under that list:
You need to look for something that looks like this >> EVK_LS20030/31/32(MT3329) Smart Antenna.

(if they don't change the URL it looks like this >> http://www.locosystech.com/product.php?zln=en&id=20)
Image
Look for the Download tab and click on it and they have a security anti-spam test window pop up and you just enter what you see and then you click on the icon to the left of Datasheet_v1.3 and there you have what you’re looking for. NOTE: If you click on the word Datasheet_v1.3 it won’t do anything, you have to click on the icon to the left of Datasheet_v1.3 or you don't get to go past 'GO'.

Reason I had you go get this is there are a bunch of information that you will need to read your NMEA sentence.
Take a look at section 5 >>

5.1 NMEA output message
Table 5.1-1 NMEA output message
NMEA------record Description
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

If you go through the list in the LOCOSYS PDF it really looks like your not getting complete sentences.
One of the locks you're looking for comes from the $GPRMC. And you are missing the "A" in the status line. But from what I am seeing your missing more than just that.

* RMC---Recommended Minimum Specific GNSS Data
Table 5.1-9 contains the values for the following example:
$GPRMC,053740.000,A,2503.6319,N,12136.0099,E,2.69,79.65,100106,,,A*53

Table 5.1-9 RMC Data Format
Name---------------------------- Example----------Units------ Description
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 1--------------------------00106-----------------------------ddmmyy
Magnetic variation---------------------------degrees-------------------
Variation sense----------------------------------------------------E=east or W=west (Not shown)
Mode --------------------------------------A------------------------A=autonomous, D=DGPS, E=DR, N=Data not valid,
R=Coarse Position, S=Simulator
Checksum---------------------*53--------------------------------------
<CR> <LF> End of message termination

The other things you might want to look at is $GPGGA and $GPGLL for the Status, but quite frankly your not getting everything.
As much as I love Sparkfun you might also want to go looking over at Adafruit for information {http://learn.adafruit.com/adafruit-ulti ... ter-wiring}. They don't sell this unit but they have a really nice how to about their GPS- what they have is a really a great thought about GPS's. What she has outline in pink block you should look at (AGAIN this info is about Adafuit’s GPS, but some of it applies here too) >>
GPS modules will always send data EVEN IF THEY DO NOT HAVE A FIX! in order to get 'Valid' (not-bank) data you must have the GPS module directly outside, with the square ceramic antenna pointing up with a clear sky view. in ideal conditions, the module can get a fix in under 45 seconds. However depending on your location, satellite configuration, solar flares, tall buildings nearby, RF noise, etc, etc it may take up to half an hour (or more) to get a fix! This does not mean your GPS module is broken, the GPS module will always work as fast as it can to get a fix.
You should see her page 7 and 8 {http://learn.adafruit.com/downloads/pdf ... te-gps.pdf}- She does an great job as to explaining the $GPRMC. (I wish Sparkfun had done this.)

also you real need to look at Adafruit's web page on the UP501 Breadboard-friendly 66 channel GPS module w/10 Hz updates - MTK3329. If you go diving down towards the bottom you will see > Then run our example sketch which will allow you to quickly set the update rate and select which NMEA sentences you want to have spit out. (https://raw.github.com/adafruit/Adafrui ... S_Test.pde)

WHY IS THIS IMPORTAINT? Well this SKETCH might not work with your micro-controller or your GPS- BUT it has the idea how to get our LS20031 GPS to work right, just we have to go back into LOCOSYS Technology Inc data sheet for the LS20031 and fill in what we need to be filled in.

PERSONALLY- I wish I had thought of this. I tried sending commands through the USB and that didn't work even with logic converter in the middle.
Her using mySerial.println( command ) is the correct way to talk to your GPS.

And AGAIN I love SPARKFUN. But every time asked for help or made a suggestion, I was given the impression they had other things to do.

NOW before you get all excited- [and something I wish SPARKFUN would do with their GPS shield {including setting up their shield so we can hook the LS20031 to it}]- you’re going to need to use a Logic Level Converter/Translator (BOB-10403) between the LS20031 and any type of micro-controller that is using 5V. This web page could help >> https://sites.google.com/site/waynehold ... g-with-gps
take a look at their picture of how to hook up a logic level converter >>

Image

But anyway you might want to use the last Sketch from Adafruit and rework it and set your GPS for 1Hz and see what happens. If you need help on hooking up the PCA9306 Level Translator Breakout board, let me know and I will see what I can do. Right now I have my boards broken down so I will need to hook it back up and see what I can do.

Also take a look at this from SparkFun >> GPS Tracking Comparisons >> http://www.sparkfun.com/tutorials/169
Image
Make sure you take a look at the last picture -> "Don't try to use GPS inside!"
I find the statement "This is why you don't rely on GPS inside of a structure." real helpful.

I about gave up on the LS20031 about a year ago, but I went back and relooked at what I could find on the subject and with some new eyes saw some of the problems with how things were hooked up and the code that was being used. If you use Mikal Hart's TinyGPS to get your data, you're only going to use two sentences to get your data. You might as well turn everything else off. In my opinion and only in my opinion I feel that you should skip softwareserial and go directly to the hardware UART. But that has to do with LS20031 spitting things out too fast for the Arduino. It looks like your having the same problem with your Micro-controller.

But there is another thought on using GPS’s. Microcontrollers like the Arduino have timing issues when it comes to keeping up with GPS like this, add trying to do something like I2C, or other interrupt stuff and you loose GPS data. So people like WYOLUM.COM {http://wyolum.com/gsp-disciplined-rtc/} and DSS Circuits {http://www.dsscircuits.com/i2c-gps-shield.html} are using their ATMEGA328 and micro SD card plus their GPS to side step timing issues by using those three things to make an I2C GPS shield. The REALLY COOL THING is Wyolum.com is talking the idea and going one step further- they are using the extra storage on their SD card and coming up with a way to get your Time Zone Automatically. Also they have an RTC for when you GPS can't lock. Again I wish SPARKFUN would go with this idea too, but put in a normal shield. HECK use Adafuit’s idea of using an external GPS antenna but use Sparkfun’s SMA Connector WRL-00593 and I think you have a winner. But our LS20031 cant do that.