Can´t read GPS NMEA

Hello everyone!

At my University we have a project where we have to capture the meterological data in Siberia.
Now I got the task to get the data from a Methansensor to a SD-Card. In order to do this, I need a Timestamp.
On the probe (Helipod->http://www.awi.de/fileadmin/user_upload/Research/Research_Divisions/Climate_Sciences/Polar_Meteorology/campaigns/WARPS-helipod.jpg) we have a GPS-Computer trasmitting data via RS-232.

To test everything at home i´ve lend a GPS-Modul (ublox LEA-4T->http://www.u-blox.com/images/downloads/Product_Docs/LEA-4x_Data_Sheet(GPS.G4-MS4-06143).pdf)

Unfortunately i´m not quite sure what signal it is sending. The Data-sheet says UART but i´m not quite sure wheter it is RS-232 oder already TTL. I assumed it was RS232 so i bought a MAX232N-Chip and hooked it up, although i was not quite sure how to connect Vs+ and Vs-. In the Datasheet (http://pdf1.alldatasheet.com/datasheet-pdf/view/27230/TI/MAX232N.html) it says it has to be connected to 8.5v and -8.5v… I connected it to 5v and ground.
When i read the signal with the analog input, i recognize that the signal is reversed, so i assume the RS232 is working…

But i still get something similiar looking like this → http://img37.imageshack.us/img37/5079/serialdatafromgps.png

I coded the bare minimum to directly get the Serial:

void setup(){}
void loop(){}

What am I doing wrong? And sorry for my noobish questions but I am quite new to Arduino…

The GPS chip you have at home is NOT RS232 it is just plain serial. You can hook it to an UNO via software serial or use one of the other hardware serial ports on the mega or due.

Mark

You need to write code which will read from the GPS and write the results to the serial monitor.

Mark

it says it has to be connected to 8.5v and -8.5v… I connected it to 5v and ground.

5 != 8.5
0 != -8.5

If the data sheet says that it a UART device, why did you assume that that meant RS232?

When i read the signal with the analog input, i recognize that the signal is reversed, so i assume the RS232 is working.

How did you read “the signal” fast enough to know anything? What signal are you reading?

I coded the bare minimum to directly get the Serial:

With no Serial.begin() statement, no Serial.read(), and no Serial.print() statements, it’s hard to understand exactly what you think you’ve learned.

If the gps output is TTL, connect the gps tx to the arduino rx, and connect the gps/arduino grounds together. Below is some basic serial echo code that you might try with the serial monitor.

//zoomkat serial echo test 7-31-2011

char input; // incoming serial data
//byte input; // incoming serial data

void setup() {
  Serial.begin(9600);  // set serial port at desired value
  Serial.println("serial echo test 0021"); // echo test
  }

void loop() {
  if (Serial.available() > 0) { // check for serial buffer input
    input = Serial.read(); // read the rx incoming byte 
    //Serial.write(input); // print the input to tx output
    Serial.print(input); // print the input to tx output
  }
}

Thank you for your answers!

@PaulS I thought i could bypass the Arduinochip. They did the same on Adafruit, although i´m not quite sure, what i was doing. With the analog Reading I only wanted to check the range of the output. I know, that it´s not fast enough. And yes, i know that 5v are not 8.5v but there were no other connections on the arduino. I thought this might work as well.. I´m in the learning by doing procecess.. At the moment it´s quite a lot of input and Í´m just hoping to get something working ;)

@holmes I will try to read the Signal with myserial.. thank you :)

@zoomkat thank you! I will try it.. EDIT: It´s still not working.. I´ve tried diffrent Baudrates and i still just get garbage....

You can invert an rs232 signal into a TL signal using two resistors and an NPN transistor like below.

http://www.scienceprog.com/alternatives-of-max232-in-low-budget-projects/

Hanskraut: Unfortunately i´m not quite sure what signal it is sending. The Data-sheet says UART but i´m not quite sure wheter it is RS-232 oder already TTL.

That is the crux of the matter. The manufacturer supplied data sheets ought to make this clear. If you have access to an oscilloscope then you could work it out for yourself. Don't connect it to an Arduino input pin unless you're sure it is TTL 5V.

Check your connections and then cut and paste what ever your getting in the serial monitor.

Mark

That´s what i get:

https://dl.dropboxusercontent.com/u/101381485/Serial_Monitor_NMEA.jpg

The output voltage of the GPS-UART is 3,3v... Might that be a problem for the logic threshhold of the Arduino? I have a "operating-voltage-switch" on my Saintsmart Arduino Uno and can switch the voltage to 3.3V.. But does this affect the comperator or threshold of the digital input? When i do it, is still get this rustle like in the picture above.... :(

Edit: I was just playing around with a potentiometer and I the switch affects the threshold... With 5v it´s ~0v-2.5v for 0 and ~2,5v-5v for 1 and with 3,3v its ~0-1.65v for 0 and ~1.65v-3.3v for 1 so I don´t think the 3.3V UART is the problem...

Check the baud rate on the serial monitor. Does it match the one for your Serial.begin().

Don’t do a screen print highlight the text in the serial monitor then copy and paste to your post! Screen prints are almost unreadable.

Mark

With a Baudrate of 115200 i was able to receive sth. like this:

$GPTXT,01,01,02,ANTARIS ATR062x HW 00040001*2E

$GPTXT,01,01,02,EXT CORE       5.00    May 11 2006 14:40:17*72
$GPTXT,01,01,02,INT EXT0 (RCV) M4T1.2  May 11 2006 14:40:17*77

$GPTXT,01,01,02,LIC 85E7-6E21-710B-0272-42DC*56

$GPTXT,01,01,02,QDS 6572500193*23

Because the GPS is programable i´m starting to think, that the people at my University played to much with this module... Also the fact that the Serial updates at 1Hz seems a little bit curious...

I think I will wait for the GPS-Computer and see, what he gives me for input ;)

Insofar thanks everyone for your help! I will give you an update wheter things were working with the GPS-computer...