RS485 4 Click-Platine
RS485 4 Click-Platine
Overview
Das RS485 4 Click Board™ bietet eine UART-zu-RS485-Signalumwandlung und verfügt über den ADM2795E-Spezial-IC mit vollständiger galvanischer Trennung. Digitale Eingangs- und Ausgangssignale werden über die Isolationsbarriere übertragen, indem der ICoupler‘ verwendet wird, eine IC-Skalentransformatortechnologie, die eine magnetische Kopplung von Signalen über die Isolationsbarriere innerhalb des IC ermöglicht und so eine galvanische Trennung für bis zu 5 KV und Datenübertragungsraten von bis zu 2,5 Mbit/s bietet.
Der ADM2795E ist als sehr robuster und zuverlässiger UART-zu-RS485-Transceiver konzipiert und kann daher in sehr rauen Industrieumgebungen oder anderen lauten Umgebungen eingesetzt werden.
The ADM2795E, as the main component of the RS485 4 Click Board™ 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, the RS485 4 Click Board™ can be used in harsh industrial environments such as in stage DMX lighting, Remote Controller lines, etc.
How Does The RS485 4 Click Board™ 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 the RS485 4 Click Board™k satisfies in full.
The main active component of the RS485 4 Click Board™ 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 | The RS485 4 Click Board™ 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 |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
Pinout diagram
This table shows how the pinout on the RS485 4 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Receiver Enable | RE | 2 | RST | INT | 15 | NC | |
Driver Enable | DE | 3 | CS | RX | 14 | TXD | UART Transmit |
NC | 4 | SCK | TX | 13 | RXD | UART Receive | |
NC | 5 | MISO | SCL | 12 | NC | ||
NC | 6 | MOSI | SDA | 11 | NC | ||
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
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 Board™ 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 Byte
Example Description
The application is composed of the three sections :
- System Initialization - Initializes UART module and sets RST and CS pin as OUTPUT.
- Application Initialization - Driver intialization.
- Application Task - (code snippet) - Checks if new data byte have received in rx buffer (ready for reading), and if ready than reads one byte from rx buffer. In second case application task writes message data via UART.
void applicationTask() { char tmp; uint8_t rdyFlag; // RECEIVER - UART polling rdyFlag = rs4854_byteReady(); if (1 == rdyFlag) { tmp = rs4854_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } // TRANSMITTER - 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 Information
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
The RS485 4 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.
Software Support
We provide a library for the RS485 4 Click Board™ 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 Byte
Example Description
The application is composed of the three sections :
- System Initialization - Initializes UART module and sets RST and CS pin as OUTPUT.
- Application Initialization - Driver intialization.
- Application Task - (code snippet) - Checks if new data byte have received in rx buffer (ready for reading), and if ready than reads one byte from rx buffer. In second case application task writes message data via UART.
void applicationTask() { char tmp; uint8_t rdyFlag; // RECEIVER - UART polling rdyFlag = rs4854_byteReady(); if (1 == rdyFlag) { tmp = rs4854_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } // TRANSMITTER - 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 Information
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
The RS485 4 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.