Wiki about RS232 to RS485 Converters and AdaptersWhat is a RS232 to RS485 converter and how is it used? How do I choose the right model and how do I connect it? What to look for when shopping for a RS232 to RS485 converter.
Here are answers to all your basic (and possible advanced) RS232 to RS485 questions in an easily understandable language.
What is a RS232 to RS485 converter?The RS232 to RS485 converter comes in many models, sizes and shapes, here are a few examples:
The main differences between these RS232 to RS485 converter units are that some of them can have a DB9 connector whereas others have a terminal screw header or RJ11 connector, some are isolated some are not, some has more than one RS485 port, some has LED lights for indicating RX/TX data flow, some are port-powered and some needs an external power supply, some are industrial strength, some are consumer products.
The RS232 to RS485 itself, regardless of what model you choose, is simply a device which can convert standard RS232 data signals into RS485 signals and vice versa. Most RS232 to RS485 converters can convert data in both directions, from RS232 to RS485 and from RS485 to RS232, this is also called a bi-directional converter.
We will here not go into the specifics of how the RS232 or RS485 protocol works, but if you are interested in this then there is lots of RS232 and RS485 information on Wikipedia, including how a USB to serial adapter works. We will however demonstrate the most common ways of connecting a RS232 to RS485 converter.
When should I use a RS232 to RS485 converter?RS232 to RS485 converters are mostly used in industrial and commercial environments. The reason is that the RS485 converter can be used for multi-drop networks, meaning that you for example can connect multiple RS485 devices to one computer. Up to 32 devices can be connected in one network to communicate on a single pair of wires (plus a ground wire), and the number can even be increased by using RS485 repeaters. This type of communication is called half-duplex communication. Most quality RS485 converters can communicate in this manner of up to 4000 feet (1200 meters). The RS485 converter is also fairly resistant to noise which is one more reason why it is favored in industrial environments.
Examples of uses for a RS232 to RS485 converter could be for connecting cameras, scales, meters, scanners, PLC's or most other industrial equipment to a computer.
RS232 to RS485 Circuit SchematicServing as an example, below schematic shows what a typical RS232 to RS485 converter circuitry looks like.
Connecting a RS232 to RS485 converter.Okay, so how do you connect a RS232 to RS485 converter? The RS232 to RS485 converter can be used for point-to-point connections (connecting one RS232 to RS485 converter directly to another RS232 to RS485 converter) and point-to-multipoint networks (connecting one RS232 to RS485 converter to multiple RS232 to RS485 converters.
Lets first take a look at the point-to-point setup which is fairly simple, it looks like this:
The RS485 Master could be a computer and the slave could for example be a camera. As you can see the data lines A- and B+ are simply connected to the RS485 Slave's A- and B+ respectively. The converters will communicate with only A- and B+ connected, however it is very important to also connect the ground wire in the finished system to establish a steady reference point to prevent data loss and other bad things.
A typical RS232 to RS485 point-to-multipoint setup could look like this:
In a RS485 network only one slave and one master can communicate at a time, either transmitting or receiving, but not at the same time, so you might wonder how this is accomplished. Simply speaking the slaves (also called nodes) must be addressed, for example node 1 has address 001, node 2 has address 002 and so forth. These addresses are usually assigned and controlled by software, either the software running at the RS485 master (PC), or software programmed in each of the slaves. Sometimes the equipment connected at the RS485 slaves is addressable by hardware instead of software. Finally, some RS232 to RS485 converters are addressable (by DIP switches) itself, this is however not used very often.
Termination.In some cases, if the communication distance is long (above 1000 feet) and if the baud rate is over 115kbit it is recommended to put a resistor (typically 100 ohm) at the RS485 node (across the A and B lines). Adding the termination resistor does however dramatically increase power consumption so it should not be done, and is mostly not needed at shorter distances. Due to the increased power consumption termination is also rarely done when using port-powered converters.
Port-powered or externally powered.Some RS232 to RS485 converters are powered from the computer's COM port (usually from either TX, RTS or DTR), others need an external power supply to work. Even with port-powered converters you should in most cases be able to communicate up to the specified 4000 feet, however adding a terminal resistor can interfere with this distance because it increases power consumption.
Many port-powered RS232 to RS485 converters provides an option for supplying external power. If in doubt, use an externally powered converter, then you are sure that it gets sufficient power. I using for example a USB to Serial adapter these same assumptions can be applied.
Isolation.RS232 to RS485 converters can be either isolated or non-isolated. An isolated RS232 to RS485 converter have optical isolators separating the data lines inside the unit, this prevents noise, high voltage spikes, surges and ground-loops from damaging your computer or the equipment you have connected to the converter. Some RS232 to RS485 converters even have the externally power supply isolated from the rest of the converter to provide additional protection. Usually isolated converters are only used if the user wants to additionally protect the equipment connected to the network (in case the equipment is of high value), or if there are reasons to suspect high voltage spikes or similar in the network.
A non-isolated converter usually only have a simple protection against static electricity and low-voltage spikes.
How to choose the right RS232 to RS485 converter.
When shopping for a RS232 to RS485 converter you should first determine if you need an industrial strength or a commercial/consumer grade converter, this depends on which environment you plan to use the converter. Next you should determine if you need and isolated or non-isolated converter, where after you can decide if you need an externally powered converter or if you can use a port-powered converter. Next you can find the connector type you need, either DB9 or DB25 connectors, terminal screw header, RJ11 connector or a combination hereof. Finally you should decide if you want LED lights for the TX/RX lines, this can be very helpful when troubleshooting.
What is called 'Automatic Send Data Control', which controls the data flow, is strongly recommended for most applications and devices, this feature is built into most modern RS232 to RS485 converters.
The short check list looks like this:
1. Industrial or consumer grade.
2. Isolated or non-isolated.
3. Externally powered converter or if you can use a port-powered.
4. Connector type.
5. LED lights.
The standard RS232 to RS485 converter
The portpowered isolated RS232 to RS485 converter
The isolated RS232 to RS485 / RS422 DB 25 converter
The isolated RS232 to RS485 DB 9 converter