How to use USB to RS485 converter
- What is RS485?
- What is Modbus?
- How to make USB to RS485 Modbus converter?
- Software USB to RS485 adapter
- Hardware converter USB to RS485
What is RS485?
You are probably familiar with the RS232 serial protocol. It is the most popular serial interface that is implemented on consumer and commercial computers. You may not be aware of the fact that there are less well-known serial communication protocols such as RS422, RS423, and RS485. They have interesting properties and are used in scenarios where an RS232 interface is not a suitable choice. We are now going to take a closer look at the RS485 interface.
The popularity of the RS485 interface is that it performs well on the four points defined by the EIA. It is a versatile protocol that is commonly employed in situations where multiple nodes need to communicate among themselves such as in data acquisition and control systems.
A drawback of RS232 interfaces is that noise can be introduced into the signal lines. The transmitting and receiving devices perform a comparison of the handshake and data lines over one common zero line. Harmful effects can ensue if a shift in ground level occurs. To overcome this issues the RS232 port has a trigger level of ±3 Volts which is quite high. This allows noise to be picked up easily limiting both the communication speed and maximum distance between devices.
A major difference in the RS485 specification is the lack of a common zero as a signal reference. Voltage differences of a few volts in the RS485 transmitter and receiver’s ground level will not cause any noise issues. A Sig+ line and a Sig- line are used to transmit each floating signal using the RS485 protocol. A comparison of the voltage difference is performed at the RS485 receiver rather than using the signal line’s absolute voltage. Using twisted Sig+ and Sig- lines results in the best performance and helps minimize ground loops which can commonly cause issues in transmission.
The point of using twisted cables is to minimize noise. Noise in a straight cable is all traveling in the same direction and can generate a looping current as in traditional transformers. In a twisted cable the noise is dispersed as in sections of the cable the noise current is moving in a different direction than in other parts. This greatly lowers the levels of noise generated. The twisted cable pairs used in RS485 implementations are better at eliminating noise that the shielding that is used with RS232 lines to protect them from detrimental magnetic fields. To achieve even higher levels of noise immunity, twisting and shielding are used together as in networking cables.
These are called STP, shielded twisted pairs and FTP, foiled twisted pairs of cables. The combination of differential signals and cable twisting enables communication to be enacted over longer distances with the RS485 protocol when compared to RS232. Distances of 1200 meters are attainable using the RS485 protocol.
Another benefit of using differential signal lines is that higher communication speed can be achieved. Transmission speed is a limiting factor of RS232. An RS485 driver can reach data speeds of 35 Mbps.
What is Modbus?
The Modbus protocol was developed in 1979 by PLC manufacturer Modicon which has since become a brand of Schneider Electric's Telemecanique. Modbus was designed as an interface to be used in a multi-drop network that employs a master/slave architecture. It is an open protocol in which communication is conducted by passing messages between the nodes of the Modbus network. The protocol can be employed on various physical interfaces and was first used with RS232 devices. The higher speeds, longer distances supported, and the potential of creating a multi-drop network moved later implementations of Modbus in the direction of the RS485 protocol. Modbus became popular with hardware vendors due to its simplicity and cost-effectiveness and has become the standard for industrial communication networks worldwide.
How to make USB to RS485 Modbus converter?
You have two options if you need a USB to RS485 converter. You can use a hardware USB to RS485 adapter or you can perform the conversion using software. The software solution is the simplest way to go if you need to convert USB to serial 485 signals.
Software USB to RS485 converter
Most modern computers are equipped with USB ports for communicating with peripheral electronic devices. Unfortunately, many devices still employ older COM ports which cannot be directly connected to most computers.
A USB to serial RS485 converter is required if you are attempting to connect serial applications or devices to a computer that only has USB interfaces. A USB to RS485 adapter converts between serial and USB data in both directions. Eltima’s USB to Serial Сonverter is a software application that lets you create reliable connections between a computer’s USB ports and serial applications and devices. It uses an existing USB port to create a virtual serial port.
This is a specialized application that serves as a USB to 485 converter by creating virtual serial ports that communicate with physical COM ports that are built into serial devices. It is an excellent solution to creating secure communications between devices employing the USB and RS485 protocols.
How to make a hardware USB to RS485 adapter
The RS485 cable is used to connect peripheral devices like printers and barcode readers to your computer. In the absence of RS485 ports, you will be forced to convert signals between USB and RS485 protocols using a USB to RS485 converter adapter. You can enact a USB to RS485 Modbus adapter using several pieces of equipment to make a USB-to-RS485 converter.
- The first step is to connect one end of your RS485 cable to the port on your USB-to-RS485 cable.
- Connect the RS485 connection of your new cable to the serial port that is on your RS485 device.
- Attach the USB connection to an open USB port on your computer. Now your devices are connected.
As one of the most popular protocols used in industrial networks for talking to PLCs and other equipment, the RS485 interface is here to stay. Accessing the RS485 port from computers with USB interfaces will require the use of a USB to RS485 adapter. Based on your usage scenario and the physical USB to RS485 converter price you may decide to use the software solution offered by Eltima. USB to Serial Converter is the most efficient way to convert between USB and RS485 signals. The solution supports the Windows, Mac, and Linux operating systems and will allow you to easily connect any serial program or device to your USB equipped machine.