RS232 and RS485 are two standards for serial data transmission. RS485 is based on differential signals and is therefore less susceptible to noise.
Key Differences
Here are some key differences between RS232 and RS485:
- The number of wires: RS232 cables consist of nine wires (DB9) or 25 wires (DB25). Each wire serves a specific purpose in data transmission. RS485 has only three wires, one for ground and two for data transmission.
- The number of devices: With RS232 two devices can be connected. With RS485, one master can be connected to over 32 slave devices. With up to 3 repeaters up to 128 RS485 slave devices can be controlled.
- Transmission direction: RS232 is full-duplex and can transmit data in both directions, i.e. receive and transmit. RS485 is half-duplex and can only transmit in one direction at a time. Therefore a master is needed to control the data flow on a RS485 network. To achieve full-duplex communication, one needs another pair of wires (see RS422).
- Range: The maximum distance between maser and slave is 15 m (50 feet) for RS232. For RS485, the range can be up to 4,000 feet (1,200 m).
- Transmission speed: For low data speeds within short distances, the RS232 serial interface is sufficient. It can transmit at 1 Mbps up to 50 feet (15 m). The RS485 interface can transmit data at a data rate of 10 Mbps. At a maximum distance of 4,000 feet (1,200 m), the RS485 can transmit at 100 kbps.
- Voltage: RS232 uses a voltage between +12 V and -12 V, while the recommended voltage for RS485 is +5 V and -5 V.
- Single ended vs. differential signal: RS232 uses single ended signals - one line for each signal and one line for ground. RS485 uses differential or balanced signals: two lines for each signal, one line with the signal (D+=+5V) and the other line with the inverted signal (D-=-5V). We assume that the noise on both lines is the same (e.g. Vn=xV). The receiver subtracts both signals D+ minus D- => +5V - (-5V) + xV - xV => +10V. The noise is almost eliminated.
The Takeaway
The differences in the RS232 and RS485 bus can each be beneficial in different applications. RS232 is used for devices such as printers and modems. RS485 is more resistant to noise and is used in industrial automation. With an RS232-RS485 converter, you can take advantage of RS485 on devices that only have an RS232 interface. Alternatively, you can use a USB-RS485 converter or an Ethernet-RS485 converter.