Raspberry Pi – RS232 Serial Interface Options (Revisit)

In the previous article Raspberry Pi – Installing a RS232 Serial Port we discussed how to install a RS232 port on the Raspberry Pi.  This is a follow up article to suggest a few alternative interface options as the XBit RS232 level-shifter board has been unavailable (sold out) for while now.

There are two primary RS232 interface options you can choose from for serial connectivity:

  • USB (USB to Serial Adapter)
  • DB9 (Level Shifter)

Raspberry Pi - RS232 Serial Interface Options (Revisit)

Once you have a serial interface connected you can use the serial port for

(Click one of the above options to jump to that part of the article.)

Shopping List

The following items are included in this article:

Serial Communication via USB

If you are just looking to communicate to your Raspberry Pi via its serial UART, then you may prefer a USB interface.  Most recent models of computers and laptops do not have the traditional RS232 DB9 port anymore, so connecting using a USB port may be preferred.

The following adapter is only $5.47 USD and it provides a USB to serial converter chip:

This adapter is based on the Prolific PL2303HX chipset.  To use this USB to serial interface you will have to install a USB serial port driver on your host operating system.  Many operating systems already include support for theserolific drivers.  But in case you need it, the drivers can be found here:  http://prolificusa.com/portfolio/pl-2303hx-usb-to-serial-bridge-controller/

NOTE:  Please secure the RED lead from the USB adapter so that it does not come into contact with any of the other pins or components on the Raspberry Pi.  This RED pin carries +5VDC and could damage the Pi if it makes contact.

Now that you have the serial interface connected, you can skip down to the Serial Console section to test the interface.

Serial Communication via DB9 (Level Shifter)

For certain applications and especially project involving interfacing with other hardware devices a standard RS232 serial device with a DB9 connector is preferred.  A standard serial port such as this does not require any drivers.  RS232 serial communication is standardized at the hardware layer.  RS232 communication can also achieve longer distance runs (maximum distance depends on baud rate).

The following interface adapter is available for $9.99 USD:

In addition to the adapter, you will need at least 4 female to female 2.54mm .1 in jumper wires.

Here are a couple of purchase options:

Why is special circuitry (level shifter) needed for RS232 serial communication?

So .. what a level shifter  and why is it needed you ask.  A level shifter is a circuit that can take the low voltage (±3.3VDC) TTL signals for serial transmit (TX) and receive (RX) from the UART on the Pi and shift them to ±5VDC the voltage signals required for RS232 standard communication.  Want to know more?  Click here.

Now that you have the serial interface connected, you can skip down to the Serial Console section to test the interface.
(Use a straight-thru cable for connecting to a computer.)

Raspberry Pi - RS232 Serial Interface Options (Revisit) Schematic

Serial Console

The Debian/Raspbian distribution images include support out-of-the-box for accessing the shell console via the hardware serial port.  This can be extremely convenient if you need to access your Raspberry Pi when it is not connected to a monitor and network remote access is not available.

Open a terminal emulation software such as Hyperterminal, Procom Plus, or Indigo Terminal Emulator and connect to the serial port using settings “115200, N, 8, 1”.   You may need to press the enter key a time or two to see the prompt.  Authenticate using your credentials and you are good to go.

Software use of the Serial Port

If you intend to use the serial port for a software application running on the Raspberry Pi, there is a bit of configuration required to disable the console from using this port.   By default, the serial port is configured as a console port for interacting with the Linux OS shell.  The following steps will guide you through disabling the port from console access.


For more detail: Raspberry Pi – RS232 Serial Interface Options (Revisit)

© 2015 Powered By Engineering Projects Team, Raspberry Pi Projects

Scroll to top