HELP: gps not talking?

For the discussion of Arduino related topics.

Moderator: phalanx

Re: HELP: gps not talking?

Postby coms418 » Wed Feb 16, 2011 12:34 am

well if its nema 0183 thats it is looking for I am going to just give up right now, well all the ardurino gear and all my electronics, as I can not get these gps units talking.
I bet a kid still in high school can, but some one that has a heavy electronics and electrical back ground can not.

Bets me why, what do I have to buy every thing for these cpus from a dealer?

cheers

Paul
coms418
 
Posts: 8
Joined: Wed Feb 09, 2011 4:30 pm

Re: HELP: gps not talking?

Postby n1ist » Wed Feb 16, 2011 7:50 am

Paul-
Just to see where we are:

- You connected your GPS through a MAX232 to your PC, and it worked.
- You connected your Arduino to the PC, and can see serial output (ie, the "Waiting for GPS time ... " message in your sample code
- You connected your GPS directly to the Arduino, to the pins listed in the constructor "NewSoftSerial serial_gps = NewSoftSerial(3, 2); // receive on pin 3", and ran the sample code, but did not see the time output.

Have you written code that simply takes whatever is received by serial_gps and output that on Serial, with the GPS connected to the Arduino, and the Arduino connected to the PC? If so, did you get anything? You should be seeing NMEA data. This will tell you if the data is making it to the Arduino; if it is, the problem is in the parsing or display of the data. If it isn't, take your level shifter and connect it's input to the GPS output, while the output is connected to the Arduino, so you can use it to "spy" on the signal.

Another test to do is to connect your MAX232 level shifter to the arduino instead of the GPS (make sure it's output is connected to the pin that serial_gps is expecting its input on), run the passthrough program that just copies from serial_gps to Serial, and see if you can get that path working.

The whole trick is to break the problem down into smaller chunks, test each one, and figure out where the problem is. In this case, get serial output from the Arduino to the PC working so you have some way (other than by blinking LEDs) to debug. Then get the soft serial input working, get soft serial from the GPS working, and finally add the code to parse the NMEA strings.

/mike
n1ist
 
Posts: 750
Joined: Wed Mar 22, 2006 11:02 am

Re: HELP: gps not talking?

Postby D9W » Tue Feb 14, 2012 2:02 pm

Be warned if you are using the 'NEW' Arduino 1.0 that the TinyGPS and SoftwareSerial will throw a fit with the LS20031 GPS.

I did the direct GPS dump to the monitor (using pin 0) like it says to do in the LS20031 GPS Assembly Guide {http://www.sparkfun.com/tutorials/176}, and you get good clean GPS output (you can see this in my last example).

But using the following code >>

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()
{
Serial.begin(115200);// old 57600 New 115200
Serial.println("Goodnight moon!");

// set the data rate for the SoftwareSerial port
mySerial.begin(57600); // old 4800 new 57600
mySerial.println("Hello, world?");
}

void loop() // run over and over
{
if (mySerial.available()){
Serial.write(mySerial.read());
}
}

I get the extended characters mixed in with the GPS sentence when using SoftwareSerial >>

PG ‚6 A$GPGGA,182924.000,4751.6603,N,12142.3928,W,1,9,0.97,64.7,M,-16.9,M,,*5B
$GPGLL,4751.6603,N,12142.3928,W,182924.000,A,A*4F
$GPG ‚6 A±$GPGGA,182924.200,4751.6603,N,12142.3928,W,1,9,0.97,64.7,M,-16.9,M,,*59
$GPGLL,4751.6603,N,12142.3928,W,182924.200,A,A*4D
$GPG b¢r$GPGGA,182924.400,4751.6603,N,12142.3928,W,1,9,0.97,64.7,M,-16.9,M,,*5F
$GPGLL,4751.6603,N,12142.3928,W,182924.400,A,A*4B
$GPG42“r±$GPGGA,182924.600,4751.6603,N,12142.3928,W,1,9,0.97,64.7,M,-16.9,M,,*5D
$GPGLL,4751.6603,N,12142.3928,W,182924.600,A,A*49
$GPG 5ºAr$GPGGA,182924.800,4751.6603,N,12142.3928,W,1,9,0.97,64.7,M,-16.9,M,,*53
$GPGLL,4751.6603,N,1214™—¦'&'éŊ’ʒ¢r†‚‚b

That is even before TinyGPS get’s a hold of the GPS sentences.
I have tried changing the baud rate both in the Arduino code, and for the serial monitor and still I get these “, &Rb¢*” characters in the stream.
I know the baud rate is not the problem because if you get it wrong you get nonsense. You don’t even get what you see up above.

Here is what it’s supposed to look like using the following code –

void setup() {
Serial.begin(57600);
}
void loop() {
if (Serial.available()) {
#if ARDUINO >= 100 //For Arduino v1.0+
Serial.write(Serial.read());
#else //For Arduino v0023 or earlier
Serial.print(Serial.read(), BYTE);
#endif
}
}

---- >>

$GPGSA,A,3,03,18,06,19,22,27,,,,,,,3.38,2.24,2.53*0B
$GPGSV,3,1,12,18,69,061,37,22,63,252,45,06,52,253,42,21,51,114,21*7F
$GPGSV,3,2,12,03,46,270,46,48,33,195,29,15,30,051,21,19,29,311,35*71
$GPGSV,3,3,12,14,19,186,16,27,16,069,22,09,13,095,,16,05,246,16*70
$GPRMC,183446.800,A,4751.6605,N,12142.3934,W,0.01,241.74,140212,,,A*72
$GPVTG,241.74,T,,M,0.01,N,0.03,K,A*3B
$GPGGA,183447.000,4751.6605,N,12142.3934,W,1,6,2.24,63.6,M,-16.9,M,,*5A
$GPGLL,4751.6605,N,12142.3934,W,183447.000,A,A*4D
$GPGSA,A,3,03,18,06,19,22,27,,,,,,,3.38,2.24,2.53*0B
$GPGSV,3,1,12,18,69,061,37,22,63,252,45,06,52,253,42,21,51,114,21*7F
$GPGSV,3,2,12,03,46,270,46,48,33,195,29,15,30,051,21,19,29,311,35*71
$GPGSV,3,3,12,14,19,186,16,27,16,069,22,09,13,095,,16,05,246,16*70
$GPRMC,183447.000,A,4751.6605,N,12142.3934,W,0.01,241.74,140212,,,A*7B
$GPVTG,241.74,T,,M,0.01,N,0.02,K,A*3A

So I am at lost what the problem is.
One note- SoftwareSerial – is the library that comes with the NEW Arduino 1.0 IDE. That’s the library that used to be call NewSoftSerial.

What kills me is I got his OLD tinyGPS to work with the Arduino .22 IDE.
D9W
 
Posts: 13
Joined: Wed Dec 21, 2011 1:22 am

Re: HELP: gps not talking?

Postby wholder » Mon Apr 02, 2012 4:49 pm

I believe the problem is that the buffer size used to hold received characters in SoftwareSerial was reduced in Arduino 1.0. For some background on this, see my post at:

https://sites.google.com/site/wayneholder/self-driving-rc-car/navigating-with-gps

Wayne
wholder
 
Posts: 36
Joined: Mon Dec 24, 2007 1:39 pm

Re: HELP: gps not talking?

Postby bborncr » Wed Jun 13, 2012 9:27 am

Thanks Wayne,
Changing the buffer size in SoftwareSerial.h from 64 to 128 fixed the problem for me as explained in the above post:

#define _SS_MAX_RX_BUFF 64 // RX buffer size
to
#define _SS_MAX_RX_BUFF 128 // RX buffer size
bborncr
 
Posts: 2
Joined: Tue Nov 22, 2011 2:41 pm

Re: HELP: gps not talking?

Postby D9W » Tue Jan 29, 2013 12:46 pm

Coming back at this- I agree buffer size is part of the equation- the other side if your using TinyGPS is to limit what SoftwareSerial is getting feed--
GpsSerial.print("$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n");
// turn on only GPRMC and GPGGA ----- TinyGPS only uses these two, all others can be turned off
D9W
 
Posts: 13
Joined: Wed Dec 21, 2011 1:22 am

Previous

Return to Arduino

Who is online

Users browsing this forum: No registered users and 6 guests