The ADM2795E, as the main component of the RS485 4 click complies with many regulations: Level 4 EMC protection, IEC 61000-4-5 surge protection (±4kV), IEC 61000-4-4 electrical fast transient (EFT) protection (±2 kV), IEC 61000-4-2 electrostatic discharge (ESD) regulation… (the complete list can be found in the ADM2795E datasheet). In addition, it is protected of miswiring, featuring ±42V bus overvoltage protection. It can also operate with the extended bus voltage of ±25V, for the improved performance in very noisy conditions. Equipped with such a robust, reliable, and fast UART to RS485 signal converter, RS485 4 click can be used in harsh industrial environments such as in stage DMX lighting, Remote Controller lines, etc.
How does it work?
RS485 is a serial communication standard, which is commonly used in several industries. It is a used in serial communication systems, supporting both full and half-duplex communication. RS485 standard uses balanced signaling, which is a good solution for noisy environments and longer bus lines. Also, it features somewhat larger signal levels compared to TTL logic levels used in the most embedded applications. Therefore, to allow communication over the RS485 bus, electronic components with TTL signal levels must use UART to RS485 signal converters, such as RS485 4 click. On the other hand, the converter circuit should offer enough ESD protection to prevent damage of sensitive TTL electronic components, a requirement that RS485 4 click satisfies in full.
The main active component of the RS485 4 click is the ADM2795E, an integrated dual channel RS485 driver/receiver, with the ICoupler® isolation technology, made by Analog Devices. This integrated circuit features integrated galvanic isolation elements, providing the required isolation level. RS485 level signals are encoded into waveforms that are used to energize primary windings of the integrated transformers. At the secondary windings, the induced waveforms are decoded back into their original values and routed to the UART pins, with the appropriate TTL signal levels. The same working principle is applied in the opposite direction. This way, the digital signals are effectively conducted through the isolation barrier.
Output lines are internally routed through a set of transient filters, ESD suppressors, surge protection components, etc., replacing the complete set of commonly used external components (TVS diodes, TIPS®…). This reduces the number of reasonably expensive external protection components, cutting the time to market. There are also some other protections, such as miswiring protection, tolerance for up to ±42V on RS485 bus lines, etc.
RX and TX UART lines from the mikroBUS™ are routed to RXD and TXD pins of the ADM2795E. The CS pin of the mikroBUS™ is routed to the DE pin of the ADM2795E. It is used to activate the RS485 transmission driver. Similarly, RST pin of the mikroBUS™ is routed to the RE pin of the ADM2795E, and it is used to activate the receiver. Logic HIGH level on the DE pin activates the transmitter, and thus the UART TX session, while LOW logic level on the RE pin activates the receiver, and thus the UART RX session. The inverted logic on these pins is not a result of a random decision: they could be connected to a single point and driven by a single MCU pin: when there is a LOW level, the driver is disabled, while the receiver is enabled. This is not the case at this Click board™, as it is made for general use. However, in the case of most commonly used half-duplex communication topology, this can be very useful, reducing the number of required MCU pins.
Specifications
Type | RS485 |
Applications | RS485 4 click can be used in harsh industrial environments such as in stage DMX lighting, Remote Controller lines, etc. |
On-board modules | ADM2795E, an integrated dual channel RS485 driver/receiver, with the ICoupler® isolation technology, made by Analog Devices. |
Key Features | High voltage galvanic isolation of RS485 lines, high speed communication, up to 2.5 Mbps, compliance with EMI, ESD, EDC protection regulations, miswiring protection… |
Interface | UART |
Input Voltage | 3.3V or 5V |
Click board size | M (42.9 x 25.4 mm) |
Pinout Diagrams
This table shows how the pinout on RS485 4 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
RS485 4 Click Electrical Specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Receiver inputs voltage range | -30 | +30 | V |
Onboard Settings And Indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
JP1 | VCC SEL | Left | Power supply voltage selection: left position 3V3, right position 5V |
TB1, TB2 | - | - | RS485 bus connector |
Software Support
We provide a library for the RS485 4 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Initializes and defines UART bus driver, and defines driver's functions for comunication (reading and writing) between RS485 4 clicks.
Key functions:
uint8_t rs4854_byteReady()
- Check for new byte receiveduint8_t rs4854_readByte()
- Read Single Bytevoid rs4854_writeByte(uint8_t input)
- Write Single ByteExamples description
The application is composed of the three sections :
void applicationTask() { char tmp; uint8_t rdyFlag; // RECEIVER - UART polling rdyFlag = rs4854_byteReady(); if (1 == rdyFlag) { tmp = rs4854_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } // TRANSMITER - TX each 2 sec /* for (tmp = 0; tmp < 9; tmp++) { rs4854_writeByte( MESSAGE_DATA[tmp] ); mikrobus_logWrite( "MESSAGE SENT", _LOG_LINE ); } Delay_ms(2000);*/ }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
UART
Conversions
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
This click board is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.
Downloads