Communication direction control circuit of intelligent distribution network equipment
By combining components such as input optocouplers and NPN transistors, the problems of high cost and IO port occupation in RS-485 communication chip data direction control methods are solved, achieving efficient data transmission control, applicable to domestic 485 chips, and reducing hardware costs.
Patent Information
- Application Number
- CN202520324820.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2035-02-27
AI Technical Summary
Existing RS-485 communication chips have issues with data direction control methods that occupy I/O ports, have high costs or high prices, especially when multiple 485 devices are connected in series, resulting in large data transmission and reception delays. Furthermore, domestically produced chips lack automatic direction control functionality.
By employing a combination of input optocouplers, NPN transistors, output optocouplers, clamping resistors, PTC resistors, and ESD protection devices, data direction control is achieved by controlling the enable pin of the 485 chip. Combined with current-limiting resistors and pull-up resistors, this ensures that the A and B terminals of the 485 chip can send or receive data, reducing hardware costs and improving data transmission efficiency.
Without increasing hardware costs, it achieves effective control of the communication direction of the 485 chip, improves data transmission efficiency, and is applicable to domestic 485 chips, reducing reliance on expensive automatic direction control chips.
Smart Images

Figure CN223624540U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of circuit control technology, and in particular to a communication direction control circuit for intelligent distribution network equipment. Background Technology
[0002] RS-485 communication is commonly used in industries such as industrial automation, automotive, and building management. In terms of hardware design, RS-485 communication consists of a microcontroller, an isolation optocoupler, a RS-485 chip, and various resistors and capacitors. The microcontroller is responsible for sending and receiving data; the isolation optocoupler isolates the microcontroller from the RS-485 chip; and the RS-485 chip is responsible for both sending and receiving RS-485 data. Since the RS-485 chip can both send and receive data from external devices, there is a question regarding the direction of data transmission and reception. Currently, the industry uses the following methods to control the direction of RS-485 data transmission and reception:
[0003] 1. Use software I / O ports to control the transmit and receive enable pins of the 485 chip; however, the disadvantages of this method are: it requires I / O ports, and each data transmission requires extension to reduce the bit error rate; the data transmission and reception delay is significant when multiple 485 devices are connected in series. 2. Use the CTS and RTS pins of the microcontroller's serial port to control the 485 data direction enable, which can accurately control the transmit and receive enable pins of the 485 chip; however, the disadvantages of this method are: many microcontrollers only have TX and RX pins on their serial ports, lacking CTS and RTS pins; microcontrollers with CTS and RTS pins are expensive, which is not conducive to low-cost product design. 3. Use a 485 chip with automatic direction control, such as the MAX13487EESA+ chip, which automatically controls the transmit and receive enable direction; however, the disadvantages of this method are: high price; most domestic chips do not have this function, and domestic 485 chips with this function are expensive, resulting in high costs. Utility Model Content
[0004] The purpose of this application is to provide a communication direction control circuit for intelligent distribution network equipment to solve the problems in the prior art.
[0005] To address the aforementioned technical problems, this application provides a communication direction control circuit for intelligent distribution network equipment, comprising:
[0006] The system includes an input optocoupler, an NPN transistor, an output optocoupler, a clamping resistor, a PTC resistor, and ESD protection devices. The negative terminal of the input optocoupler is connected to the transmit communication pin of the microcontroller, and the emitter of the input optocoupler is connected to the signal input pin of the 485 chip. The base of the NPN transistor is connected to the signal input pin of the 485 chip through a current-limiting resistor, and the emitter of the NPN transistor is connected to the enable pin of the 485 chip. One end of the clamping resistor is connected to the emitter of the NPN transistor, and the other end is grounded. The emitter of the output optocoupler is connected to the receive communication pin of the microcontroller, and the negative terminal of the output optocoupler is connected to the signal output pin of the 485 chip.
[0007] One end of the PTC resistor and one end of the ESD protection device are both connected to pin A of the 485 chip, and the other end of the ESD protection device is connected to pin B of the 485 chip. A terminating resistor is connected in parallel between pin A and pin B. A pull-down resistor is connected between pin B and the ground terminal of the 485 chip. A first pull-up resistor is connected between pin A and the power supply terminal of the 485 chip.
[0008] The positive and collector terminals of the input optocoupler, the collector terminal of the NPN transistor, and the positive and collector terminals of the output optocoupler are all connected to the positive terminal of the power supply.
[0009] In a preferred embodiment, a communication direction control circuit for a smart distribution network device further includes a capacitor, one end of which is connected to the power supply terminal of the 485 chip, and the other end of which is grounded.
[0010] In a preferred embodiment, a communication direction control circuit for a smart distribution network device further includes an isolation power supply, wherein the power supply terminal of the 485 chip is connected to the positive terminal of the isolation power supply, and the ground terminal of the 485 chip is connected to the positive terminal of the isolation power supply.
[0011] In a preferred embodiment, a communication direction control circuit for a smart distribution network device includes a second pull-up resistor connected to the positive terminal and collector of the input optocoupler and the positive terminal of the output optocoupler, and a third pull-up resistor connected between the collector and emitter of the output optocoupler.
[0012] The solution requires detailed explanation of a communication direction control circuit for an intelligent power distribution network device, wherein the ESD protection device is a bidirectional ESD diode.
[0013] Compared with the prior art, the intelligent distribution network equipment communication direction control circuit provided by this utility model includes an input optocoupler, an NPN transistor, an output optocoupler, a clamping resistor, a PTC resistor, and an ESD protection device. The negative terminal of the input optocoupler is connected to the transmit communication pin of the microcontroller, and the emitter of the input optocoupler is connected to the signal input pin of the 485 chip. The base of the NPN transistor is connected to the signal input pin of the 485 chip through a current-limiting resistor, and the emitter of the NPN transistor is connected to the enable pin of the 485 chip. One end of the clamping resistor is connected to the emitter of the NPN transistor, and the other end is grounded. The output optocoupler... The emitter of the optocoupler is connected to the microcontroller's receive communication pin, and the negative terminal of the output optocoupler is connected to the signal output pin of the 485 chip. One end of the PTC resistor and one end of the ESD protection device are both connected to pin A of the 485 chip, and the other end of the ESD protection device is connected to pin B of the 485 chip. A terminating resistor is connected in parallel between pins A and B. A pull-down resistor is connected between pin B and the ground terminal of the 485 chip, and a first pull-up resistor is connected between pin A and the power supply terminal of the 485 chip. The positive and collector terminals of the input optocoupler, the collector of the NPN transistor, and the positive and collector terminals of the output optocoupler are all connected to the positive terminal of the power supply. In practical use, the microcontroller sends a signal to the input optocoupler, which, through the NPN transistor and the current-limiting and clamping resistors, outputs a high or low level to the enable pin of the 485 chip, thereby controlling the A and B terminals of the 485 chip to send or receive data, thus controlling the communication direction of the 485 chip. Without increasing hardware costs, it improves data transmission efficiency, and this control circuit is not picky about 485 chips and is compatible with domestic 485 chips. Attached Figure Description
[0014] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0015] Figure 1 This is a schematic diagram of a communication direction control circuit for an intelligent distribution network device provided in an embodiment of this application;
[0016] Figure 2 This is a schematic diagram of an isolated power supply structure provided in an embodiment of this application. Detailed Implementation
[0017] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0018] The core of this application is to provide a communication direction control circuit for intelligent distribution network equipment, which solves the problems in the prior art.
[0019] Figure 1 This is a schematic diagram of a communication direction control circuit for an intelligent power distribution network device provided in an embodiment of this application. Figure 2 This is a schematic diagram of an isolated power supply U9 structure provided in an embodiment of this application. See also... Figures 1 to 2 As shown.
[0020] Example 1
[0021] A communication direction control circuit for an intelligent power distribution network device includes an input optocoupler U18, an NPN transistor Q6, an output optocoupler U17, a clamping resistor R79, a PTC resistor TH3, and an ESD protection device. The negative terminal of the input optocoupler U18 is connected to the transmit communication pin of the microcontroller, and the emitter of the input optocoupler U18 is connected to the signal input pin of the 485 chip U11. The base of the NPN transistor Q6 is connected to the signal input pin DI of the 485 chip U11 through a current-limiting resistor R81, and the emitter of the NPN transistor Q6 is connected to the enable pins (RE, DE) of the 485 chip U11. One end of the clamping resistor R79 is connected to the emitter of the NPN transistor Q6, and the other end is grounded. The emitter of the output optocoupler U17 is connected to the receive communication pin of the microcontroller, and the negative terminal of the output optocoupler U17 is connected to the signal output pin RO of the 485 chip U11.
[0022] Both the PTC resistor TH3 and the ESD protection device are connected at one end to pin A of the 485 chip U11, and the other end of the ESD protection device is connected to pin B of the 485 chip U11. A terminating resistor R70 is connected in parallel between pins A and B. A pull-down resistor R80 is connected between pin B and the ground terminal GND of the 485 chip U11, and a first pull-up resistor R78 is connected between pin A and the power supply terminal VCC of the 485 chip U11. The PTC resistor TH3 is a protection device; when a large surge voltage occurs on the signal line of the 485 chip U11, the resistance of the PTC resistor TH3 will rise rapidly, suppressing and reducing the excessive surge voltage. The ESD protection device is used to protect signal line A of the chip U11 or signal line B of the 4855 chip U11 from damage when subjected to electrostatic interference. The terminating resistor R70 is used to match the impedance of the bus, eliminate internal reflected signals, and avoid signal interference and loss.
[0023] The positive and collector terminals of the input optocoupler U18, the collector terminal of the NPN transistor Q6, and the positive and collector terminals of the output optocoupler U17 are all connected to the positive terminal of the power supply.
[0024] The microcontroller's serial ports RX1 (receive communication pin) and TX1 (transmit communication pin) are the communication ports of the 485 chip U11. TX (transmit) is connected to pin 2 of optocoupler U18, and RX is connected to pin 4 of optocoupler U17. The transmit enable pin 3 (DE) of the 485 chip U11 is connected to pin 2 (emitter) of the NPN transistor, and the receive enable pin 2 (RE) of the 485 chip U11 is connected to pin 2 of the NPN transistor. Pin 8 (VCC) of the 485 chip U11 is connected to pin 6 of the 5V isolation power supply U9; pin 5 (GND) of the 485 chip U11 is connected to pin 4 of the isolation power supply U9. Pin 6 of the 485 chip U11 is the input / output A pin, and pin 7 of the 485 chip U11 is the input / output B pin.
[0025] When the microcontroller sends data TX, the data format is: 1 0 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 0 / 1 1… The data format is explained in Table 1 below, where data bits 0 / 1 indicate that the data can be either 0 or 1.
[0026] Table 1 Serial Output Transmitted Data Format
[0027]
[0028] When the microcontroller sends data, the data transmission start bit is 0. At this time, the primary-side optocoupler diode of the input optocoupler U18 is turned on, the primary-side optocoupler diode of the input optocoupler U18 is lit, the secondary-side phototransistor is turned on, and the DI pin of the 485 chip U11 is high. At this time, the base of the NPN transistor Q6 is high, and the NPN transistor Q6 is turned on. The DE enable pin of the 485 chip U11 is high. According to Table 2, the output pin A is 1 and the output pin B is 0.
[0029] Table 2 is the truth table for 485 chip communication.
[0030]
[0031] When the microcontroller sends data, if the first data bit is 1, the primary-side optocoupler diode of the input optocoupler U18 is not conducting, the secondary-side phototransistor is cut off, and pin DI of the 485 chip U11 is low. At this time, the base of the NPN transistor Q6 is low, so Q6 is not conducting. The enable pin DE of the 485 chip U11 is low. According to Table 2, output pins A and B are both high impedance, so output pin A is 1 and output pin B is 0. The logic for sending the remaining data bits is the same as sending 0 or 1.
[0032] When the microcontroller receives data, the transmit TX bit is idle and the level is high; the receive enable RE of the 485 chip U11 is low. According to the 485 chip data truth table (Table 2), the data reception is normal at this time.
[0033] The 485 chip U11 operates in the following ways:
[0034] 1. When the 485 chip U11 is used as a driver, the 485 chip U11 driver enable pin DE is high, and the 485 chip U11 driver output pin DI is high. When this is the case, output pin A is 1 and output pin B is 0.
[0035] 2. When the 485 chip U11 is used as a driver, the 485 chip U11 driver enable pin DE is at a high level, and the 485 chip driver output pin DI is at a low level. When this is the case, output pin A is 0 and output pin B is 1.
[0036] 3. When the 485 chip U11 is used as a receiver, the receive enable pin RE of the 485 chip U11 is at a low level, the voltage difference between input pins A and B is greater than -10mV, and the input pin RO is 1.
[0037] 4. When the 485 chip U11 is used as a receiver, the receive enable pin RE of the 485 chip U11 is at a low level, the voltage difference between input pins A and B is less than -200mV, and the input pin RO is 0.
[0038] 5. When the 485 chip U11 is used as a receiver, the receive enable pin RE of the 485 chip U11 is at a low level, the input pins A and B are short-circuited or open-circuited, and the input pin RO is 1.
[0039] Example 2
[0040] Based on Embodiment 1, a communication direction control circuit for an intelligent power distribution network device further includes a capacitor C62. One end of the capacitor C62 is connected to the power supply terminal of the 485 chip U11, and the other end of the capacitor C62 is grounded. The capacitor C62 is a decoupling capacitor for the 485 chip U11, which can filter out noise flowing into the 485 chip U11.
[0041] Based on Embodiment 1, a communication direction control circuit for an intelligent power distribution network device further includes an isolation power supply U9. The power supply terminal of the 485 chip U11 is connected to the positive terminal of the isolation power supply U9, and the ground terminal of the 485 chip U11 is connected to the positive terminal of the isolation power supply U9. The power supply of the 485 chip U11 is physically isolated from the power supply circuit through the isolation power supply U9.
[0042] Based on Embodiment 1, in order to ensure that the corresponding pins are at a certain level and prevent voltage drift from causing circuit instability, a second pull-up resistor is preferably connected to the positive terminal and collector of the input optocoupler U18 and the positive terminal of the output optocoupler U17. The positive terminal of the input optocoupler U18 corresponds to the second pull-up resistor R82, the collector of the input optocoupler U18 corresponds to the second pull-up resistor R83, and the positive terminal of the output optocoupler U17 corresponds to the second pull-up resistor R76. A third pull-up resistor R77 is also connected between the collector and emitter of the output optocoupler U17.
[0043] Based on Example 1, a communication direction control circuit for a smart distribution network device uses a bidirectional ESD protection device, TSS1, as the ESD protection device.
[0044] In practical use, the microcontroller sends a signal to the input optocoupler U18. Through the NPN transistor Q6, current-limiting resistor R81, and clamping resistor R79, a high or low level is supplied to the enable pin of the 485 chip U11. This controls the A and B terminals of the 485 chip U11 to send or receive data, thus controlling the communication direction of the 485 chip U11. Without increasing hardware costs, this improves data transmission efficiency, and the control circuit is compatible with both domestically produced and imported 485 chip U11s.
[0045] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and incorporate common knowledge or customary techniques in the art disclosed herein. The specification and examples are to be considered exemplary only, and the true scope of this application is indicated by the claims.
[0046] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The embodiments of this application described above do not constitute a limitation on the scope of protection of this application.
Claims
1. A communication direction control circuit for intelligent power distribution network equipment, characterized in that, include: The system includes an input optocoupler, an NPN transistor, an output optocoupler, a clamping resistor, a PTC resistor, and ESD protection devices. The negative terminal of the input optocoupler is connected to the transmit communication pin of the microcontroller, and the emitter of the input optocoupler is connected to the signal input pin of the 485 chip. The base of the NPN transistor is connected to the signal input pin of the 485 chip through a current-limiting resistor, and the emitter of the NPN transistor is connected to the enable pin of the 485 chip. One end of the clamping resistor is connected to the emitter of the NPN transistor, and the other end is grounded. The emitter of the output optocoupler is connected to the receive communication pin of the microcontroller, and the negative terminal of the output optocoupler is connected to the signal output pin of the 485 chip. One end of the PTC resistor and one end of the ESD protection device are both connected to pin A of the 485 chip, and the other end of the ESD protection device is connected to pin B of the 485 chip. A terminating resistor is connected in parallel between pin A and pin B. A pull-down resistor is connected between pin B and the ground terminal of the 485 chip. A first pull-up resistor is connected between pin A and the power supply terminal of the 485 chip. The positive and collector terminals of the input optocoupler, the collector terminal of the NPN transistor, and the positive and collector terminals of the output optocoupler are all connected to the positive terminal of the power supply.
2. The intelligent distribution network equipment communication direction control circuit according to claim 1, characterized in that, It also includes a capacitor, one end of which is connected to the power supply terminal of the 485 chip, and the other end of which is grounded.
3. The communication direction control circuit for intelligent distribution network equipment according to claim 1, characterized in that, It also includes an isolation power supply, wherein the power supply terminal of the 485 chip is connected to the positive terminal of the isolation power supply, and the ground terminal of the 485 chip is connected to the positive terminal of the isolation power supply.
4. The communication direction control circuit for intelligent distribution network equipment according to claim 1, characterized in that, The positive terminal and collector of the input optocoupler and the positive terminal of the output optocoupler are also connected to a second pull-up resistor, and a third pull-up resistor is also connected between the collector and emitter of the output optocoupler.
5. The communication direction control circuit for intelligent distribution network equipment according to claim 1, characterized in that, The ESD protection device is a bidirectional ESD diode.