What is RS232 and How to get started

For years, RS-232 has been a serial communication standard in the industry. It’s still widely used and commonly heard in the industry though it dates back to 1969. However, with technological advancements, there are now faster data transmission methods.

Despite that, do you know all about the RS232? This blog will help introduce the RS232 and help you get started in no time!

I’ll cover the following:

  • Introduction: What is RS232
  • How does RS232 work?
  • Advantages of RS232
  • RS232 Devices; USB to RS232, Arduino and Raspberry Pi boards

Introduction: What is RS232

Grove – RS232

The RS232 is officially defined as the “Interface between data terminal equipment and data communications equipment using serial binary data exchange”.

Sounds confusing? To simply put it, it’s a form of serial communication or a way to transmit data. RS232 supports both asynchronous and synchronous data transfer modes, though asynchronous is more widely used for communication with PC and other devices.

Asynchronous Serial communication?

  • Being a form of serial communication, the RS232 protocol transmits data one bit at a time, over a single communications line. This makes it suitable for long-distance communications!
  • Asynchronous refers to when bits of data is sent, it’s not in a predefined time slot/synchronized by a clock pulse

For more information on serial communication and its characteristics, check out my previous article, where we took a further look into it!

RS232 Features and Parameters

Parameters RS232
Transmission Mode Simplex
Max connected devices 2 devices:
1 driver, 1 receiver
Max. transmission rate 20Kbps
Max. cable length 15m
Operation mode Single-ended (unbalanced type)
Features Short distance
Full-duplex
1:1 connection

Note: RS232 standard is a protocol of the physical level and does not define the transmission speed of all related devices. Transport protocols vary based on devices used.

How does RS232 work?

DB9 Serial Port from Grove – RS232

Now that you’ve gotten an idea of what is RS232, we’ll dive into understanding RS232 connection and signals to give you an understanding of how it works!

Step 1: Understanding RS232 Functionality, Data Transmission Process

We know the RS232 transmit data one bit at a time, but what is its function? It connects DTE and DCE together!

  • DTE: Data Transmission Equipment, E.g. Computer
  • DCE: Data Communication Equipment, E.g. Modem

Once connected, the data transmission process will begin;

Data transmission process on the RS232

  1. Firstly, from the DTE, RTS generates a request for data to be sent
  2. The DCE side receives the request, and CTS clears the path to receive data
  3. When data is cleared, it will give a signal for DTE side to send the signal
  4. Data transmission starts, bits are transmitted through the RS232 from DTE to DCE

Terms explained:

  • RTS: REQUEST TO SEND
  • CTS: CLEAR TO SEND

Step 2: RS232 Pin Configuration

We’ve understood how the data transmission process is like, but how are DTE and DCE connected? We’ll now take a look at the DB9 pin connector, more commonly used nowadays for asynchronous data exchange as compared to the B-25 pin.

Pins included in a DB9 pin connector:

Female DB9 Header on Grove – RS232
Pin Name Pin Description
CD (Carrier Detect) Incoming signal from DCE
RD (Receive Data) Receives incoming data from the DTE
TD (Transmit Data) Transmit/Send outgoing data to DCE
DTR (Data Terminal Ready) Outgoing handshaking signal
GND (Signal Ground) Common reference voltage
DSR (Data Set Ready) Incoming handshaking signal
RTS (Request to Send) Outgoing signal for controlling flow
CTS (Clear to Send) Incoming signal for controlling flow
RI (Ring Indicator) Incoming signal from DCE

Step 3: RS232 Handshaking 

Handshaking? No not the one with human interaction, but the process known as flow control, to prevent the receiver from overloading. This process is crucial to ensure DTE and DCE transmits and receives data successfully.

There are two types of handshaking; Hardware Handshaking and Software Handshaking

Hardware Handshaking

  • Uses control signals; DTR, DSR, RTS, CTS signals
  • It stops the data being replaced in the receiver buffer, where signals are kept in a high state (logic ‘1’) to activate handshaking

Software handshaking

  • Uses two control characters; XON and XOFF, where the receiver will send these control characters to pause transmitters, disallowing for further transmission
  • When the receiver has recovered, it can then transmit the XON signal to notify the transmitter that it’s fine to re-start transmission

Advantages of RS232

  • Low cost
  • Widely available and applicable due to its long presence in the telecommunications industry
    • Many manufacturers still using RS232 to connect PLCs to devices like HMIs, input and output modules, motor drives, etc.
  • Simple wiring and connectors will only max support for 1 driver and 1 receiver
  • Suitable for long-distance transmissions
  • Similar to microcontroller serial signals; transmit bits one at a time, at specific baud rates, with/without parity and/or stop bits
    • Still requires max232 to avoid voltages to destroy microcontroller serial pins

RS232 Communication devices

Now that you’ve understood about the RS232, let’s take a look at a few RS232 devices and its usages:

Grove – RS232: Stable and high-speed option

The Grove – RS232 is made for an easy microcontroller connection with your computer. It allows simple Arduino serial communication to take place, through plug and play instead of having to solder, use jumper wires, etc.

It’s based on the Max3232, ensuring safe voltage converting and inverting, with support for multiple baud rate communication of up to 230400bps baud.

Can’t believe how easy it is? Thanks to our Grove system, it’s indeed that easy!

It’s Features include:

  • Easy to use
  • Stable, high speed
  • High-cost performance
  • ±15-kV ESD Protection
  • Low power consumption
  • Two Drivers and Two Receivers
  • Female DB9 Header

RS232 Arduino Shield

This RS232 shield is a standard communication port for industry equipment. Based on MAX232 and integrating DB9 female connectors, it’ll provide a connection to various devices with RS232!

What’s more is, the RS232 headers will facilitate your connections and commissioning, with welding areas provided that allows you to make full use of extra space. A highly convenient choice for prototyping!

It’ll work with the following boards:

  • Arduino Uno/Seeeduino v4.2
  • Arduino Mega/Seeeduino Mega
  • Arduino Leonardo/Seeeduino Lite

*Seeeduino is Seeed’s very own Arduino, built with upgrades over the original boards. If you do not own any of the above Arduino and wish to try this shield, consider Seeeduino!

For more information and a pairing guide, you can check out its wiki page!

RS232 Raspberry Pi Board

We’ve talked about RS232 for the Arduino, what about for the Raspberry Pi? This is an option build for, and made for the Raspberry Pi that you can heavily consider!

Similar to the previous RS232 shield, this Raspberry Pi RS232 Board is based on MAX232 and integrates DB9 female connectors, providing a connection to various devices with RS232!

It’s Features:

  • Low Supply Current:300μA
  • Guaranteed Data Rate:120kbps
  • Meets EIA/TIA-232 Specifications Down to 3.0V
  • Pin Compatible with Industry-Standard MAX232
  • Guaranteed Slew Rate:6V/μs
  • LED Indicator
  • DB9 Connectors(female)

For more information and a pairing guide, you can check out its wiki page!

USB TO RS232: USB TO RS232 / RS485 / TTL Industrial Isolated Converter

  • This is an industrial USB to RS232/485/TTL isolated converter with the original FT232RL inside
  • The USB TO RS232/485/TTL is very easy to use, fully automatic transceiving without delay. Due to its fast communication, stability, reliability, and safety, it is an ideal choice for industrial control equipment and/or applications with high communication requirements.
  • It features:
    • Embedded protection circuits such as power isolation, ADI magnetical isolation, and TVS diode, etc.
    • An aluminum alloy enclosure which makes it solid and durable

Summary

To this day, the RS232 standard is still widely used with its low cost and high availability. Though being “replaced” by advanced USB, it’s still very much applicable with microcontroller boards (Arduino, Raspberry Pi, etc.) and other PLC, CNC machines.

For more:

Still unsure about serial communication? Feel free to can check out my serial communication guide for more!

Want to find out more about RS485, another serial communication protocol and its differences with RS232? Check out this post for more!

About Author

Calendar

December 2019
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031