RS485 3 Click is an RS422/485 transceiver Click board™, which can be used as an interface between the TTL level UART and the RS422/485 communication bus. It features a full-duplex communication capability, bus Idle, open, and short-circuit detection, glitch free power-up and power-down for hot-plugging applications, driver current limiting, thermal shutdown, and more. It is well suited for transmitting data packets over long distances and noisy areas, using the four-wire bus, allowing for full-duplex communication. Internal ESD protection circuits protect the transceiver bus terminals against ±16-kV Human Body Model (HBM) electrostatic discharges.
Due to its robustness and reliability, the RS485 3 Click can be used in various applications that require reliable data transfer in various noisy environments, or over a substantial distance, when data rate transfer up to 5 Mbps is sufficient. RS485 3 Click can be used for controlling various building automation systems, intelligent lighting systems (DMX), Point-of-Sale (POS) networks, and various other devices that need to establish a reliable communication over the RS422/485 bus, that can be up to 1500m in length.
RS485 3 Click uses the SN65HVD31DR, a tristate differential line driver and differential input line receiver, from Texas Instruments. This Click is intended to be used as a physical layer device, often referred to as PHY, providing physical interfacing of the MCU TTL level UART lines with the RS422/485 bus. It is well suited for transmitting smaller blocks of data over long distances, using two differential pairs, one for TX and other for RX line, allowing for full-duplex asynchronous communication. The SN65HVD31DR transceiver consists of a separate driver and receiver sections, which are always active upon powering the device. Driver section is used to drive the RS422/485 bus with the signal received on the UART RX line labeled as D on the IC, while the receiver section returns data from the bus back to the MCU via the UART TX line, labeled as R on the IC in the schematics.
RS422/485 standard only specifies electrical characteristics of the transmitter and the receiver. It does not specify or recommend any communications protocol, only the physical layer. The top layer communication protocol of choice can be used, such as the MODBUS or DMX protocols. Therefore RS485 3 click offers UART RX and TX pins, routed to the appropriate mikroBUS™ TX and RX UART pins. These pins are used by the MCU to send data to the RS485, in a form determined by the used protocol. Please note that RS485 3 click supports only 3.3V MCUs and it is not intended to be connected or controlled via the 5V MCU without a proper level shifting circuitry.
The SN65HVD31DR IC allows communication with data rates up to 5 Mbps. However, the maximal transfer speed is determined by the bus length: longer bus lines will result in less transfer speed. The RS422/RS485 bus needs to be terminated with the resistor on both ends, which is equal to the characteristic impedance of the used cable, in order to prevent line reflections. The RS485 standard prescribes using a twisted pair cable as the data bus. Twisted pair cable tends to cancel common-mode noise and causes cancellation of the magnetic fields generated by the current flowing through each wire, thereby reducing the effective inductance of the pair.
The RS-485 standard specifies that a compliant driver must be able to drive 32 unit loads (UL), where 1 unit load represents a load impedance of approximately 12 kΩ. Since the SN65HVD31 device is 1/8 UL, up to 256 such receivers can be supported by a single driver.
When used as the controller, the driver section of the RS485 3 click is always active. The same is true for the peripheral receivers on this same signal pair. In the case when peripherals need to communicate back to the controller, they are using another pair and the peripheral device drivers have to be intermittently enabled and disabled so that only one driver on a peripheral is enabled at a time. Since the SN65HVD31 device does not contain RE and DE (Receiver Enable and Driver Enable) pins, peripheral driver cannot be disabled, resulting with bus contention, where the differential voltage can increase so that the resulting current can damage the IC. In that case, the driver current protection is activated, limiting this current to 250mA.
Differential inputs contain internal Schmitt trigger circuits, preventing uncertain states of the pins. This ensures that the outputs are always in a defined state, also providing noise immunity. To further improve the signal integrity, RS485 3 click is equipped with two transient voltage suppression diodes (TVS diodes) used to protect the circuit from transients that can occur on the RS422/485 bus.
There are two 2-pole screw terminals on board (RX+, Rx-, Tx+, Tx-) for connecting RS422/485 bus twisted pair cables, along with two screw terminals (GND) for common ground connection. The cables should be connected as close as possible to the termination resistors, preventing signal reflections in the parts of the signal cable that is not terminated by the resistor, so-called stubs.
MikroElektronika provides a library that contains functions compatible with the MikroElektronika compilers, which can be used for working with the RS485 3 Click. The library also contains an example application, which demonstrates their use. This example application can be used as a reference for custom designs.
No reviews yet.