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.

  • 6
    \$\begingroup\$ 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. \$\endgroup\$
    – John U
    Mar 13, 2014 at 18:03
  • \$\begingroup\$ @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) \$\endgroup\$
    – Mike
    Mar 13, 2014 at 18:40
  • \$\begingroup\$ @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. \$\endgroup\$
    – Ben Voigt
    Mar 13, 2014 at 20:20
  • 1
    \$\begingroup\$ github.com/dwelch67/raspberrypi I have serial solutions and pinouts \$\endgroup\$
    – old_timer
    Mar 14, 2014 at 5:04

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.

  • \$\begingroup\$ 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) \$\endgroup\$
    – Mike
    Mar 13, 2014 at 18:52
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Mar 13, 2014 at 19:15

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.

  • \$\begingroup\$ 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! \$\endgroup\$
    – Mike
    Mar 13, 2014 at 17:05
  • \$\begingroup\$ Note answer above is assuming that you are not connecting low voltage logic levels to high voltage inverted RS232 levels. If you are sure all signals are some flavour of RS232 then they should not be harmed by misconfiguration if they conform to specification. \$\endgroup\$
    – KalleMP
    Apr 25, 2017 at 4:56

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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