Sunday, March 20, 2011

Arduino and GPS

I found a a cheap GPS module from a finnish electronics dealer, Partco, for only 10€. It's a bit old, from 2004 but whatever, it's cheap :) It's a Fastrax uPatch100 with a Sony chipset (CXA3355 and CXD2956). There are four different models, but the only one available is the -C9 with CMOS level serial output. Acctually that is perfect as the Arduino as you can plug it directly into the arduino (well, almost, TX can, RX needs a level conversion as the Arduino I/O pins are 5v).

I did it :)
The module outputs plain NMEA so it's easy to parse. You can also talk to it and set different parameters. Datasheets are available on the net, just google for uPatch100 and you should find them.

Anyway, I'm not very experienced with electronics but I've done my fair share of soldering, but mainly easy stuff like making my own RCA or RS-232 cables. Or easy "high" pitch breadboard.

The pitch of the device was a bit scary at first, but I was able to solder a ribbon cable just fine after some careful soldering.

I used a long flat cable and a IDC for easy attaching for any GPS project. I didn't have a female IDC connector so it cut one from an old motherboard serial port adapter and soldered that to a breadboard. And on the breadboard a pin strip for easy plugging to a solderless breadboard.
I made a very simple arduino sketch to read the serial TXD0 port from the module and output it to the serial port. I used the softserial library and first thought it was the reason for the problem I had. Only the first couple of NMEA messages came trough succesfully and then output stopped. The datasheet mentions for the RS-232 level module that "RXD0 line must be electrically connected in the uPatch100-Rx versions even if it is not used!"
My module was not the -Rx version but I connected RXD0 to ground and that fixed my problems. Clear NMEA messages startet coming!

Next is to make something fun with all this :)

1 comment:

Toni Lähdekorpi said...

I had a problem with the same device as it was only outputting certain messages and not the ones I wanted (RMC and VTG).
But I found the specs for the Sony chip inside and was able to control the interval it sends the messages by sending to the gps.println("@NC 00002150");
(GGA=0, GLL=0, GSA=0, GSV=0, RMC=2 sec, VTG=1 sec, ZDA=5 sec, PSGSA=0)

For some reason, I haven't been able to output more than 3 things at the same time.

Here's the specs for the actual CXD2951 (PDF):