Go Down

Topic: Can't read data from GPS module (Read 4 times) previous topic - next topic


I'm setting up an arduino system for a "space balloon" that's going to be launching soon(I'm working on this as a project with an engineering club at my University).  I'm using the arduino to log data from sensors onto an SD card.  However, one sensor that I cannot get it to take in data from is the GPS. 

In the payload we have the "Byonics GPS4" GPS module, with the serial data output from it connected to both the Arduino and a HAM radio transmitter. 

The GPS works just fine, I can see the location of it using aprs.fi from the HAM radio broadcast. 

However, I cannot get the data from it using the arduino. 

The GPS module outputs 4800 baud NMEA 0183 serial.  From what I've read, that uses RS-232 electrical signalling. 

As the GPS runs off of 5v power, it puts out a signal that goes from -5v to 5v(RS-232 uses the negative voltage, rather than a 0 voltage).  Using a diode and a pull-down resistor I changed the -5v signal to 0v.  I tested that on an oscilloscope, and it does work. 

Now, I ran that into the RX1 port on my Arduino Mega board, but the data was garbled looking.  Using the "Mega multple serial test" example code(slightly modified), I ran the GPS into the computer through USB.  Here is what that looked like:

(the receiving serial is set to 4800 baud, line breaks are inserted after every 100 chars received)

The GPS data is supposed to look like: "$GPGGA,201548.000,3014.5529,N,09749.5808,W,1,07,1.5,225.6,M,-22.5,M,18.8,0000*78" (example data from TinyGPS library)

I also saw some information saying that TTL and RS-232 use opposite signalling for logical 1 and 0.  That is, one uses +v as a logial 1, the other uses +v as a logical 0. 

So, I added a not gate into the circuit, taking in the 0v and 5v signal (which I convert from -5v and 5v), and inverting it to a 5v an 0v signal.  I verified that this was working with an oscilloscope.  I fed this into the arduino, and got nothing.  Rather than garbled data, I got no data.  No characters coming in through the arduino's RX line. 

So, I'm wondering what's going on here.  Should I be doing some software transformation to the garbled looking data that I'm receiving?  Is there something else I need to do to convert NMEA 0183 serial to TTL serial? 

Any help you can offer would be really appreciated. 


A MAX232 chip will solve all of your problems. Just whacking off the -5V signal isn't enough.


Unfortunately, I don't have one of those, and I don't have time to get one. 

Is there any way to do this in software, or by using more general purpose hardware components? 


Are you using one of those TinyTrak units to convert the RS232 data to the radio?


I'm using this: http://www.byonics.com/mt-rtg

but with the Bionics GPS4 (for higher altitude readings). 

Go Up