Introduction:
RS485 transceivers are widely used when the communication distance is from tens of meters to thousands of meters. RS485 transceivers use balanced transmission and differential reception, so they have the ability to suppress common-mode interference. In addition, the receiver has high sensitivity and can detect voltages as low as 200 mV, so the transmission signal can be recovered thousands of meters away.
Using the RS485 bus, a pair of twisted pairs can realize multi-station networking and form a distributed system. Its equipment is simple, low-cost, and can communicate over long distances, so it has been widely used in engineering projects. However, if the project requires a longer communication distance, beyond the reliable data transmission range that the RS485 interface can provide, a single RS485 communication control chip pair cannot be completed. At this time, a repeater must be added to the transmission line.
Based on long-term practice, the author has designed a micro-power RS485 repeater. After field testing, the communication distance can reach 1.8 times the original.
1 Repeater principle
The schematic diagram of the repeater is shown in Figure 1. Among them, U1 and U2 are the transceiver chip pair of the repeater, which are responsible for sending and receiving data. They use Sipex's 3 V low-power chip SP3485, with a single-chip standby current of 10 μA. Other logic circuits all use HC type with a standby current of 2 μA, which greatly reduces the system power consumption.
Low standby current and true fail-safe are two key features of this application. RS485 is a half-duplex communication standard, and the bus's transmit and receive states must be controlled. When the RS485 input is open, or has been terminated and not driven, U1 and U2 will make its receiving end output (RO) high. At the differential input terminals A1 and B1, if there is input byte data, a voltage jump will be generated at the RO terminal of U1, and the state machine composed of the trigger 74HC74 and the NAND gate 74HC00 will be locked to the ON state at the falling edge of RO. The state machine pulls the driver enable pin (DE) of U2 to a high level, so that the input data byte is forwarded from U2 at the RS485 level.
The state machine keeps monitoring the voltage jump of the RO pin. When a data byte is transmitted (when no falling edge is added to the state machine within a predetermined time interval, it means that the byte is transmitted), the state machine automatically resets and waits for the next data byte on either side of the interface.
After a frame of data arrives at U1, it is forwarded to the A2 port and B2 port of U2 for output. U2 releases its output 700 μs after the last jump. Other time delays can be obtained by adjusting R1/C1 and R2/C2 in Figure 1.
Similarly, if a frame of data arrives at U2, it will be forwarded to the A1 port and B1 port of U1 for output. In this way, bidirectional data transmission is realized, and due to the relay, the communication distance will theoretically increase to twice the original.
2 Test Results
Use Tektronix oscilloscope TDS2012 to observe the waveforms of the receiving and transmitting ends, and store and analyze them, as shown in Figure 2.
Among them, the vertical scale is 1 V/grid, and the horizontal scale is 400 μs/grid; the upper waveform indicates the arrival of a frame of data, and the middle and lower waveforms indicate that they are forwarded to B2 and A2 respectively. As can be seen from Figure 2, the rising and falling edges of the waveform are very steep, indicating that the data level is relatively standardized and the distortion is very small. And because of the state machine structure, it can automatically identify the direction of data transmission, which is more convenient and reliable than using software to control the direction, and meets the design requirements.
In addition, if the system allows, the baud rate should be as low as possible, because too high a baud rate will limit the transmission distance. Due to the loss of ohmic impedance and skin effect of the transmission line, the signal distortion causes the communication distance to be limited. From the experimental results, the data transmission baud rate with a repeater should not exceed 14400. After adding a repeater, the communication distance is 1.8 times the original.
In terms of power consumption, in the standby state without data transmission, the power consumption current of the whole machine is measured by a microammeter to be about 22 μA (power supply voltage 3 V).
Conclusion
Based on the in-depth analysis of RS485 bus theory and combined with practical applications, a RS485 repeater composed entirely of hardware is designed. After field testing, good results are achieved; at the same time, the use of 3 V low-power chip makes it very suitable for working in battery-powered environments. This has a certain reference value for long-distance communication of single-chip microcomputers and other systems.
Reference address:Development of a Low-Power RS485 Repeater
RS485 transceivers are widely used when the communication distance is from tens of meters to thousands of meters. RS485 transceivers use balanced transmission and differential reception, so they have the ability to suppress common-mode interference. In addition, the receiver has high sensitivity and can detect voltages as low as 200 mV, so the transmission signal can be recovered thousands of meters away.
Using the RS485 bus, a pair of twisted pairs can realize multi-station networking and form a distributed system. Its equipment is simple, low-cost, and can communicate over long distances, so it has been widely used in engineering projects. However, if the project requires a longer communication distance, beyond the reliable data transmission range that the RS485 interface can provide, a single RS485 communication control chip pair cannot be completed. At this time, a repeater must be added to the transmission line.
Based on long-term practice, the author has designed a micro-power RS485 repeater. After field testing, the communication distance can reach 1.8 times the original.
1 Repeater principle
The schematic diagram of the repeater is shown in Figure 1. Among them, U1 and U2 are the transceiver chip pair of the repeater, which are responsible for sending and receiving data. They use Sipex's 3 V low-power chip SP3485, with a single-chip standby current of 10 μA. Other logic circuits all use HC type with a standby current of 2 μA, which greatly reduces the system power consumption.
Figure 1 Schematic diagram |
Low standby current and true fail-safe are two key features of this application. RS485 is a half-duplex communication standard, and the bus's transmit and receive states must be controlled. When the RS485 input is open, or has been terminated and not driven, U1 and U2 will make its receiving end output (RO) high. At the differential input terminals A1 and B1, if there is input byte data, a voltage jump will be generated at the RO terminal of U1, and the state machine composed of the trigger 74HC74 and the NAND gate 74HC00 will be locked to the ON state at the falling edge of RO. The state machine pulls the driver enable pin (DE) of U2 to a high level, so that the input data byte is forwarded from U2 at the RS485 level.
The state machine keeps monitoring the voltage jump of the RO pin. When a data byte is transmitted (when no falling edge is added to the state machine within a predetermined time interval, it means that the byte is transmitted), the state machine automatically resets and waits for the next data byte on either side of the interface.
After a frame of data arrives at U1, it is forwarded to the A2 port and B2 port of U2 for output. U2 releases its output 700 μs after the last jump. Other time delays can be obtained by adjusting R1/C1 and R2/C2 in Figure 1.
Similarly, if a frame of data arrives at U2, it will be forwarded to the A1 port and B1 port of U1 for output. In this way, bidirectional data transmission is realized, and due to the relay, the communication distance will theoretically increase to twice the original.
2 Test Results
Use Tektronix oscilloscope TDS2012 to observe the waveforms of the receiving and transmitting ends, and store and analyze them, as shown in Figure 2.
Among them, the vertical scale is 1 V/grid, and the horizontal scale is 400 μs/grid; the upper waveform indicates the arrival of a frame of data, and the middle and lower waveforms indicate that they are forwarded to B2 and A2 respectively. As can be seen from Figure 2, the rising and falling edges of the waveform are very steep, indicating that the data level is relatively standardized and the distortion is very small. And because of the state machine structure, it can automatically identify the direction of data transmission, which is more convenient and reliable than using software to control the direction, and meets the design requirements.
In addition, if the system allows, the baud rate should be as low as possible, because too high a baud rate will limit the transmission distance. Due to the loss of ohmic impedance and skin effect of the transmission line, the signal distortion causes the communication distance to be limited. From the experimental results, the data transmission baud rate with a repeater should not exceed 14400. After adding a repeater, the communication distance is 1.8 times the original.
In terms of power consumption, in the standby state without data transmission, the power consumption current of the whole machine is measured by a microammeter to be about 22 μA (power supply voltage 3 V).
Figure 2 Waveform |
Conclusion
Based on the in-depth analysis of RS485 bus theory and combined with practical applications, a RS485 repeater composed entirely of hardware is designed. After field testing, good results are achieved; at the same time, the use of 3 V low-power chip makes it very suitable for working in battery-powered environments. This has a certain reference value for long-distance communication of single-chip microcomputers and other systems.
Previous article:PMBus——Open Standard Protocol for Digital Power Supply
Next article:Principle and Application of AD698 LVDT Signal Conditioning Circuit
Recommended ReadingLatest update time:2024-11-16 20:57
RS485 interface circuit schematic
Since the 20-channel voltage measurement module supports RS485 serial communication, in order to realize the data communication between the single-chip microcomputer and the voltage measurement module, the RS485 communication interface must be designed. The host can transmit the query information to the slave throug
[Microcontroller]
Design of RS232/RS485 converter based on STC11F02E
Introduction
With the popularization and development of communication technology, people have higher and higher requirements for the overall performance of the measurement and control system. In order to facilitate the centralized control of distributed field measurement and control equipment, fieldbus technol
[Microcontroller]
Instructions for using Smart IoT CAN to RS485 RS232
CAN communication is widely used in industrial communication, industrial Internet of Things and industrial control fields due to its high stability. Most traditional devices use serial communication such as RS485/RS232. If such devices want to access the CAN network, a CAN converter is generally required. For this a
[Embedded]
Design of an intelligent residential perimeter anti-theft alarm system based on RS485 bus
1 Introduction
With the rapid development of science and technology and economy, people's concept of home has changed from simple living to focusing on humanized housing needs, such as safe, comfortable, fast and convenient smart communities, among which safety is the primary goal of smart community design. The secur
[Microcontroller]
- Popular Resources
- Popular amplifiers
- Siemens S7-1200-PLC Programming and Application Tutorial (3rd Edition) (Edited by Shi Shouyong)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Practical training guidance for new electrician technology (Wu Qihong, Jiang Jian, Xu Kungang, Zhang Hong)
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
Latest Power Management Articles
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- Examples of Qorvo solutions for NB-IoT RF front-ends
- Are eMMC 4.0 and 5.0 compatible?
- Auto repair oscilloscope measurement of automobile accelerator pedal sensor signal and waveform analysis
- MCU driver GEC6818 program development record
- How does Altium Designer set a 2D wireframe in a PCB as a silkscreen layer?
- How smart stores equipped with multiple sensors make shopping a breeze
- ROHM R Classroom: Power supply design technical information is continuously updated. Click to download
- TPS546D24_C23 dynamic voltage regulation
- Sampling Theorem-------------What is the relationship between the detected signal and the ADC sampling rate?
- Showing off the products + CSR development board 10 years ago, when the Bluetooth market was just beginning to develop!