Connecting GPS to Arduino - RS232 question

Hi,

I'm trying to connect an old GPS unit to an Arduino. The GPS has no useful documentation, however it did come with a lead that allowed it to be plugged into the COM1 port on a PC. It's not a USB lead, it's an old 25-way 'D' connector. There's no converter / adapter on the lead, so it's a direct connection from GPS to computer. I assume that the COM1 port on the back of the computer will use RS232 voltage levels? If this is correct then the GPS must also be using RS232 voltage levels? Therefore the GPS must NOT be wired directly to the Arduino?

I assume therefore that I need an RS232 shield such as the one provided by CuteDigi http://www.cutedigi.com/product_info.php?products_id=4329. Judging from the shield schematic it communicates with the Arduino via pins 0 and 1. Since I'm already using these 2 pins for talking to several other devices, I think I can hack the RS232 shield to connect to pins 2 and 3 instead, but if I do this I believe I have to do this in conjunction with using the NewSoftSerial Library?

Finally, I assume that if I were to use a Arduino Mega instead, then I could hack the shield to connect to pins 14 and 15 instead, and wouldn't have to use the NewSoftSerial library?

There's a lot of assumptions here, can anyone confirm which if any are correct?

Regards

I'm trying to connect an old GPS unit to an Arduino. The GPS has no useful documentation, however it did come with a lead that allowed it to be plugged into the COM1 port on a PC. It's not a USB lead, it's an old 25-way 'D' connector. There's no converter / adapter on the lead, so it's a direct connection from GPS to computer. I assume that the COM1 port on the back of the computer will use RS232 voltage levels? If this is correct then the GPS must also be using RS232 voltage levels? Therefore the GPS must NOT be wired directly to the Arduino?

YES to all - you need level conversion.

I assume therefore that I need an RS232 shield such as the one provided by CuteDigi http://www.cutedigi.com/product_info.php?products_id=4329. Judging from the shield schematic it communicates with the Arduino via pins 0 and 1. Since I'm already using these 2 pins for talking to several other devices, I think I can hack the RS232 shield to connect to pins 2 and 3 instead, but if I do this I believe I have to do this in conjunction with using the NewSoftSerial Library?

Yes - that's a cheap method to hook it up; you might also look into how older Arduino's communicated over RS-232 COM ports with PCs before USB version came along; there are different ways of doing this, like a MAX232 level converter chip, or a discrete component system (a handful of transistors and resistors, mainly), or using a 7404 (least reliable method, but very low part count!).

The shield you posted uses a MAX232, btw - IIRC, you can get the MAX232 as a DIP component, too - if you wanted to "roll your own", or do it cheaper than the shield (its only a few dollar part) - but that is a fairly cheap shield...

Finally, I assume that if I were to use a Arduino Mega instead, then I could hack the shield to connect to pins 14 and 15 instead, and wouldn't have to use the NewSoftSerial library?

Yes - you could hack it to use another hardware serial port on the Mega if you wanted.

:slight_smile: