Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I have a Raspberry Pi that I want to hook up to a serial (RS232) cable. I've found and read some information about this, so I know what pins on my RPi are Rx/Tx/3.3V/Gnd...

Now the cable I'm hooking it up to has a standard RS232 connector on one end, the other end is just four female header connectors. I do not know which if the 4 connectors is which Pin for the RS232.

Will I cause any trouble if I "guess" which pin on the RPi should be connected to which of the header connectors? I'm thinking it just won't work right until I get the combination right, but I'd hate to screw up the board because I guessed wrong.

The cable has been around for a while, there's no documentation or anything. It has HAURTIAN E164535 and I bunch of other stuff printed on it, but when I searched for that it just showed a standard RS232-RS232 cable, not what I have. Also I can't seem to find this "HAURTIAN" company to check for documentation there.

share|improve this question
Are you SURE the Raspberry Pi's UART is RS-232 voltage? It could be logic-level (3.3v) in which case you may well damage it plugging RS232 in. –  John U Mar 13 at 18:03
@JohnU - No... I guess I was just assuming that would work. I was having a hard time finding information about using a true RS232 cable (mostly I found usb<->RS232) –  Mike Mar 13 at 18:40
@Mike: Plugging a USB->RS232 converter into one of the Pi's USB ports would be the easiest option for talking to a true RS-232 device. –  Ben Voigt Mar 13 at 20:20
github.com/dwelch67/raspberrypi I have serial solutions and pinouts –  dwelch Mar 14 at 5:04
add comment

3 Answers 3

The Raspberry Pi's seriall port pins on the GPIO header are 3.3 volt logic levels direct from the processor. The processor will likely be damaged if you connect real RS-232 signals to those pins. You will need an RS-232 interface chip (MAX3232 or similar) to invert the RS232 signals, and convert them to 3.3 volt logic levels.

Then you should use a multimeter to determine which wires in the cable connect to which pins on the RS-232 connector.

share|improve this answer
Thanks for that extra information before I blew up my board. Stupid question, how was I to know that? (that RS232 signals would be too much for the RPi's GPIOs) –  Mike Mar 13 at 18:52
I should have mentioned that RS-232 signals may be up to +/-25 volts, although +/-12 volts or so is most common. Also, RS-232 signals are inverted, relative to what a microcontroller wants: 0 volts from the micro is +12 on RS-232, and +3.3 V on the micro is -12 on RS-232. On the DE-9 RS-232 connector pins 2 and 3 are transmit and receive data (not necessarily in that order), and pin 5 is ground. –  Peter Bennett Mar 13 at 19:15
add comment

Your best option would be to get a multimeter and use it to figure out what's connected to what between the two ends of the cable.

However, in general, as long as the equipment uses proper RS-232 interface chips, there's no harm in guessing. The drivers are specifically designed to be current-limiting, so connecting two outputs together or an output to ground won't damage anything.

Homebrew interface designs, on the other hand, might not be as forgiving. You can still guess, but I'd recommend using a series resistor (about 1kΩ) on any connection you're not sure of.

share|improve this answer
Good point, I don't know why I didn't think about getting a multimeter, I'll go see if I can dig one up. Thanks! –  Mike Mar 13 at 17:05
add comment

Yes you can...if you only hook the rx of whatever device you are using to talk to/from the raspberry pi and guess at the tx, then load a program on the raspberry pi (remove the sd card, etc) if you see characters then you have that right, when you hook the tx from your other device to the raspberry pi if you guess wrong there you could hurt one or both devices/boards. Not hard to count the pins on a raspberry pi though to find rx and tx.

note this is NOT RS232, RS232 is a line level thing not a serial standard thing. this is uart or serial but not RS232...If your other device is RS232 yes you will hurt the raspberry pi even if you wire tx and rx properly.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.