RS485 transceiver control circuit, communication device and electric energy meter
By designing an RS485 transceiver control circuit including an optocoupling isolation circuit and an inverting control circuit, the problems of unstable and poor load capacity of the existing RS485 transceiver control circuit are solved, and the stability and reliability of the RS485 communication device are improved.
Patent Information
- Application Number
- CN202211072980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-09-02
AI Technical Summary
The existing RS485 transceiver control circuit has unstable transceiver control and poor load capacity, resulting in poor stability and reliability of the RS485 communication device.
An RS485 transceiver control circuit including a microcontroller unit (MCU), an RS485 interface chip, an optocouple isolation circuit, an inverting control circuit and an output control circuit are designed, and stable transceiver control of the RS485 interface chip is realized through the optocouple isolation circuit and an inverting control circuit.
It realizes relatively stable transmission and reception control of the RS485 interface chip, improves the load capacity and reliability of the RS485 communication device, and enhances the stability of the centralized meter reading network.
Smart Images

Figure BDA0003829955120000191 
Figure BDA0003829955120000201 
Figure HDA0005119129540000011
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an RS485 transceiver control circuit, a communication device and an electric energy meter. Background Art
[0002] RS485 is a half-duplex balanced transmission communication interface with the characteristics of strong anti-interference ability, low noise radiation, long communication distance, high communication rate, and easy networking. It has obvious advantages in wired communication and is widely used in fields such as electric energy meters and centralized meter reading.
[0003] At present, when RS485 works in half-duplex mode, it can only send or receive at the same time, and interactive communication can be completed by controlling the direction of data sending and receiving. However, the transceiver control of the traditional RS485 transceiver control circuit is not very stable and the load capacity is not very high, which leads to poor reliability and stability of RS485 communication devices such as RS485-based centralized meter reading devices. Summary of the invention
[0004] The embodiments of the present application provide an RS485 transceiver control circuit, a communication device and an electric energy meter, which are used to solve the problem in the prior art that the RS485 transceiver control is unstable and has poor load capacity, thereby resulting in poor stability and reliability of the RS485 communication device.
[0005] The technical solutions provided by the embodiments of this application are as follows:
[0006] On the one hand, an embodiment of the present application provides an RS485 transceiver control circuit, including a microcontroller unit (MCU), an RS485 interface chip, a first optical coupler isolation circuit, a second optical coupler isolation circuit, an inverting control circuit, and an output control circuit;
[0007] The first end of the first optocoupler isolation circuit is respectively connected to the first power supply end and the data sending end of the MCU, the second end of the first optocoupler isolation circuit is connected to the signal receiving end of the RS485 interface chip, the third end of the first optocoupler isolation circuit is grounded, and the fourth end of the first optocoupler isolation circuit is connected to the second power supply end; the first optocoupler isolation circuit is used to isolate between the data sending end of the MCU and the signal receiving end of the RS485 interface chip;
[0008] A first end of the second optocoupler isolation circuit is connected to a data receiving end of the MCU, a second end of the second optocoupler isolation circuit is connected to a first power supply end, a third end of the second optocoupler isolation circuit is respectively connected to a second power supply end and a driving input end of the RS485 interface chip, and a fourth end of the second optocoupler isolation circuit is grounded; the second optocoupler isolation circuit is used to isolate between the data receiving end of the MCU and the driving input end of the RS485 interface chip;
[0009] The first end of the inverting control circuit is connected to the second power supply end, the second end of the inverting control circuit is respectively connected to the receiving enable end and the sending enable end of the RS485 interface chip, and the third end of the inverting control circuit is connected to the third end of the second optocoupler isolation circuit; the inverting control circuit is used to output a low level signal to the receiving enable end and the sending enable end of the RS485 interface chip when the MCU outputs a high level signal through the third end of the second optocoupler isolation circuit so that the RS485 interface chip is in a receiving state, and when the MCU outputs a low level signal through the third end of the second optocoupler isolation circuit, the inverting control circuit outputs a high level signal to the receiving enable end and the sending enable end of the RS485 interface chip so that the RS485 interface chip is in a sending state;
[0010] The first end of the output control circuit is connected to the second power supply end and the power supply end of the RS485 interface chip respectively, the second end of the output control circuit is connected to the reverse input and output end of the RS485 interface chip, the third end of the output control circuit is connected to the same direction input and output end of the RS485 interface chip, and the fourth end of the output control circuit is grounded; the output control circuit is used to maintain a high level output when the RS485 interface chip is in a sending state, and maintain a low level input when the RS485 interface chip is in a receiving state.
[0011] In a possible implementation, the inverting control circuit includes a first transistor, a first resistor, a second resistor, and a first capacitor;
[0012] The emitter of the first transistor is connected to the second power supply terminal, the collector of the first transistor is respectively connected to the receiving enable terminal and the transmitting enable terminal of the RS485 interface chip and one end of the first parallel branch formed by the first resistor and the first capacitor, and the base of the first transistor is connected to the third end of the second optocoupler isolation circuit via the second resistor; the other end of the first parallel branch is grounded.
[0013] In a possible implementation, a third resistor is connected between the first end of the first optocoupler isolation circuit and the first power supply end; and a fourth resistor is connected between the second end of the first optocoupler isolation circuit and the signal receiving end of the RS485 interface chip.
[0014] In a possible implementation, a fifth resistor is connected between the first end of the second optocoupler isolation circuit and the data receiving end of the MCU, and a sixth resistor is connected between the third end of the second optocoupler isolation circuit and the second power supply end.
[0015] In a possible implementation, the output control circuit includes a second capacitor, a seventh resistor, and an eighth resistor;
[0016] A first end of the second capacitor is connected to the second power supply end, and a second end of the second capacitor is grounded;
[0017] The first end of the seventh resistor is connected to the second end of the second capacitor, and the second end of the seventh resistor is connected to the reverse input and output end of the RS485 interface chip and serves as the reverse input and output end of the RS485 transceiver control circuit;
[0018] The first end of the eighth resistor is connected to the second power supply end, and the second end of the eighth resistor is connected to the same-direction input and output end of the RS485 interface chip and serves as the same-direction input and output end of the RS485 transceiver control circuit.
[0019] On the other hand, the embodiment of the present application further provides an RS485 communication device, including the RS485 transceiver control circuit provided in the embodiment of the present application, a lightning protection and overvoltage protection circuit, a relay, a third optical coupler isolation circuit, a signal monitoring circuit, an overvoltage detection circuit, a transmission communication chip, and a fault detection chip;
[0020] The same-direction input and output ends of the RS485 transceiver control circuit are respectively connected to the first input end of the lightning protection and overvoltage protection circuit and the first input end of the overvoltage detection circuit, and the reverse input and output ends of the RS485 transceiver control circuit are respectively connected to the second input end of the lightning protection and overvoltage protection circuit and the second input end of the overvoltage detection circuit; the RS485 transceiver control circuit is used to control the transceiver state of the RS485 interface chip;
[0021] The first power supply terminal of the overvoltage detection circuit is connected to the third power supply terminal, and the first output terminal of the overvoltage detection circuit is connected to the first input terminal of the fault detection chip; the overvoltage detection circuit is used to perform overvoltage detection on the voltages at both ends of the same-direction input and output terminal and the reverse input and output terminal of the RS485 transceiver control circuit;
[0022] The first output end of the lightning protection and overvoltage protection circuit is connected to the first contact of the first contact group in the relay, and the second output end of the lightning protection and overvoltage protection circuit is connected to the first contact of the second contact group in the relay; the lightning protection and overvoltage protection circuit is used to perform lightning protection and overvoltage protection on the transmission communication chip;
[0023] The second contact of the first contact group in the relay is respectively connected to the first input end of the transmission communication chip and the first input end of the signal monitoring circuit, and the second contact of the second contact group in the relay is respectively connected to the second input end of the transmission communication chip and the second input end of the signal monitoring circuit; the relay is used to close or disconnect the connection between the transmission communication chip and the lightning protection and overvoltage protection circuit under the drive of the fault detection chip;
[0024] The output end of the signal monitoring circuit is connected to the second input end of the fault detection chip; the signal monitoring circuit is used to monitor whether the voltages at both ends of the same-direction input and output end and the reverse input and output end of the RS485 transceiver control circuit are lower than a set threshold;
[0025] The first output end of the transmission communication chip is connected to the transceiver enable end of the third optical coupler isolation circuit, the second output end of the transmission communication chip is respectively connected to the drive input end of the third optical coupler isolation circuit and the third input end of the fault detection chip, and the third output end of the transmission communication chip is respectively connected to the signal receiving end of the third optical coupler isolation circuit and the fourth input end of the fault detection chip; the transmission communication chip is used to transmit data according to the transceiver state of the RS485 interface chip;
[0026] The control end of the fault detection chip is connected to the driving ends of the first contact group and the second contact group in the relay; the fault detection chip is used to control the relay to disconnect the transmission communication chip from the lightning protection and overvoltage protection circuit to cut off the connection between the transmission communication chip and the RS485 communication bus when determining that an overvoltage fault occurs according to the output signal of the overvoltage detection circuit, or when determining that a short circuit fault occurs according to the first receiving signal of the signal monitoring circuit and the second receiving signal and sending signal of the transmission communication chip.
[0027] In a possible implementation, the lightning protection and overvoltage protection circuit includes a varistor, a thermistor and a transient tube;
[0028] The first end of the varistor is respectively connected to the same direction input and output end of the RS485 transceiver control circuit and the first end of the thermistor, and the second end of the varistor is respectively connected to the reverse direction input and output end of the RS485 transceiver control circuit and the first end of the transient tube;
[0029] The second end of the thermistor is connected to the second end of the transient tube and the first contact of the first contact group in the relay respectively;
[0030] The second end of the transient tube is connected to the first contact of the second contact group in the relay.
[0031] In a possible implementation, the overvoltage detection circuit includes a rectifier bridge stack, a fourth optocoupler isolation circuit, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a thirteenth resistor, a fourteenth resistor, a fifteenth resistor, a third capacitor, a fourth capacitor, a fifth capacitor, a sixth capacitor, a first diode, a second diode, a second transistor, a potentiometer, and a comparator;
[0032] The first input end of the rectifier bridge stack is connected to the same direction input and output end of the RS485 transceiver control circuit, the second input end of the rectifier bridge stack is connected to the reverse input and output end of the RS485 transceiver control circuit, and the first output end of the rectifier bridge stack is connected to the first end of the fourth optocoupler isolation circuit via the ninth resistor and connected to the second end of the fourth optocoupler isolation circuit via the tenth resistor;
[0033] The third end of the fourth optocoupler isolation circuit is connected to the second power supply end, the fourth end of the fourth optocoupler isolation circuit is connected to the non-inverting input end of the comparator via the eleventh resistor and is connected to one end of the second parallel branch formed by the twelfth resistor and the third capacitor, and the other end of the second parallel branch is connected to the first power supply end of the comparator;
[0034] The first fixed end of the potentiometer is connected to the second power supply end, the second fixed end of the potentiometer is connected to the first power supply end of the comparator, the middle adjustment end of the potentiometer is connected to the inverting input end of the comparator and a fourth capacitor is connected between the middle adjustment end of the potentiometer and the first power supply end of the comparator;
[0035] A thirteenth resistor is connected between the non-inverting input terminal of the comparator and the output terminal of the comparator, the output terminal of the comparator is connected to the base of the second transistor via the fourteenth resistor, the second power supply terminal of the comparator is respectively connected to the second power supply terminal and one end of a third parallel circuit formed by the fifth capacitor and the sixth capacitor, and the other end of the third parallel circuit is grounded;
[0036] A fifteenth resistor is connected between the base of the second triode and the first power supply terminal of the comparator, the emitter of the second triode is grounded, and the collector of the second triode is respectively connected to the first diode as the first output terminal and the second diode as the second output terminal.
[0037] In a possible implementation, the signal monitoring circuit includes a detection chip, an op amp, a seventh capacitor, an eighth capacitor, a ninth capacitor, a sixteenth resistor, a seventeenth resistor, an eighteenth resistor, a nineteenth resistor, a twentieth resistor, a twenty-first resistor, a twenty-second resistor, a twenty-third resistor, a twenty-fourth resistor, and a twenty-fifth resistor;
[0038] The power supply end of the detection chip is connected to the second power supply end and grounded via the seventh capacitor, the RS485 interface A end of the detection chip is connected to the second contact of the first contact group in the relay, the RS485 interface B end of the detection chip is connected to the second contact of the second contact group in the relay, and the ground end of the detection chip is grounded;
[0039] The sixteenth resistor is connected between the ground terminal of the detection chip and the RS485 interface B terminal of the detection chip;
[0040] The seventeenth resistor is connected between the RS485 interface A terminal of the detection chip and the RS485 interface B terminal of the detection chip;
[0041] The eighteenth resistor is connected between the power supply terminal of the detection chip and the RS485 interface A terminal of the detection chip;
[0042] The nineteenth resistor is connected between the RS485 interface A terminal of the detection chip and the non-inverting input terminal of the operational amplifier;
[0043] The twentieth resistor is connected between the RS485 interface B terminal of the detection chip and the inverting input terminal of the operational amplifier;
[0044] The non-inverting input terminal of the operational amplifier is connected to one end of a first series branch formed by the twenty-first resistor and the twenty-second resistor, and the other end of the first series branch is grounded; the inverting input terminal of the operational amplifier is connected to one end of a second series branch formed by the twenty-third resistor and the twenty-fourth resistor, and the other end of the second series branch is connected to the second power supply terminal; the output terminal of the operational amplifier is connected to the second input terminal of the fault detection chip; the first power supply terminal of the operational amplifier is grounded; the second power supply terminal of the operational amplifier is respectively connected to the second power supply terminal and one end of a fourth parallel branch formed by the seventh capacitor and the eighth capacitor, and the other end of the fourth parallel branch is grounded;
[0045] The twenty-fifth resistor is connected between a first connection node between the twenty-first resistor and the twenty-second resistor and a second connection node between the twenty-third resistor and the twenty-fourth resistor.
[0046] On the other hand, an embodiment of the present application also provides an electric energy meter, including an MCU, and an RS485 communication device provided in an embodiment of the present application; the first input end of the MCU is connected to the second output end of the overvoltage detection circuit in the RS485 communication device, the second input end of the MCU is respectively connected to the data receiving end, data sending end and transceiver enable end of the third optocoupler isolation circuit in the RS485 communication device, the third input end of the MCU is connected to the output end of the fault detection chip in the RS485 communication device, and the fourth input end of the MCU is connected to the RO end, DI end and CTR1A end of the detection chip in the signal monitoring circuit in the RS485 communication device.
[0047] The beneficial effects of the embodiments of the present application are as follows:
[0048] In the embodiment of the present application, when the MCU has no data to send, the data receiving end of the MCU is at a high level, and after being isolated by the second optocoupler isolation circuit, a high level is output, and after being inverted by the inverting control circuit, a low level is output to the receiving enable end and the sending enable end of the RS485 interface chip to put the RS485 interface chip in a receiving state; when the MCU has data to send, the data receiving end of the MCU is at a low level, and after being isolated by the second optocoupler isolation circuit, a low level is output, and after being inverted by the inverting control circuit, a high level is output to the receiving enable end and the sending enable end of the RS485 interface chip to put the RS485 interface chip in a sending state, thereby achieving relatively stable receiving and transmitting control of the RS485 interface chip without affecting the load capacity of the RS485 interface chip. Moreover, the output signal of the RS485 interface chip is divided into two paths, one of which is sent to the overvoltage detection circuit and its output signal is sent to the fault detection chip for fault detection, and the other is sent to the transmission communication chip and the signal monitoring circuit through the relay after passing through the lightning protection and overvoltage protection circuit, and its output signal is divided into two paths, one of which is sent to the fault detection chip for fault detection, and the other is output through the third optical coupling isolation circuit to complete the communication. Therefore, when the fault detection chip determines that an overvoltage fault occurs according to the output signal of the overvoltage detection circuit, or determines that a short circuit fault occurs according to the first receiving signal of the signal monitoring circuit and the second receiving signal and the sending signal of the transmission communication chip, not only can the connection between the fault circuit and the RS485 communication bus be cut off by controlling the relay to disconnect the connection between the transmission communication chip and the lightning protection and overvoltage protection circuit, so as to achieve timely isolation of the fault circuit and the RS485 communication bus, but also the communication line can be ensured to be unobstructed, thereby improving the stability and reliability of the RS485 centralized meter reading network.
[0049] Other features and advantages of the present application will be described in the subsequent description, and in part, will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0051] Figure 1 A circuit structure diagram of the RS485 transceiver control circuit in the embodiment of the present application;
[0052] Figure 2 Another circuit structure diagram of the RS485 transceiver control circuit in the embodiment of the present application;
[0053] Figure 3 This is a schematic diagram of the circuit structure of the RS485 communication device in the embodiment of the present application;
[0054] Figure 4 Schematic diagram of the circuit structure of the lightning protection and overvoltage protection circuit in the embodiment of the present application;
[0055] Figure 5 Schematic diagram of the circuit structure of the overvoltage detection circuit in the embodiment of the present application;
[0056] Figure 6a Schematic diagram of the circuit structure of the signal monitoring circuit in the embodiment of the present application;
[0057] Figure 6b Schematic diagram of the equivalent circuit structure of the signal monitoring circuit in the embodiment of the present application;
[0058] Figure 7a This is a schematic diagram of the circuit structure of the RS485 communication management chip in the embodiment of the present application;
[0059] Figure 7b It is a schematic diagram of the general flow of the fault detection method in the embodiment of the present application;
[0060] Figure 7c Schematic diagram of the specific process of the fault detection method in the embodiment of the present application. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0062] The present application embodiment provides an RS485 transceiver control circuit, see Figure 1 As shown, the RS485 transceiver control circuit provided in the embodiment of the present application includes an MCU, an RS485 interface chip U1, a first optical coupler isolation circuit E1, a second optical coupler isolation circuit E2, an inverting control circuit RTC, and an output control circuit OUT;
[0063] The first end of the first optocoupler isolation circuit E1 is connected to the first power supply terminal VDD and the data sending terminal RXD of the MCU respectively, the second end of the first optocoupler isolation circuit E1 is connected to the signal receiving terminal R of the RS485 interface chip U1, the third end of the first optocoupler isolation circuit E1 is grounded, and the fourth end of the first optocoupler isolation circuit E1 is connected to the second power supply terminal V485; the first optocoupler isolation circuit E1 is used to isolate between the data sending terminal RXD of the MCU and the signal receiving terminal R of the RS485 interface chip U1;
[0064] A first end of the second optocoupler isolation circuit E2 is connected to the data receiving terminal TXD of the MCU, a second end of the second optocoupler isolation circuit E2 is connected to the first power supply terminal VDD, a third end of the second optocoupler isolation circuit E2 is respectively connected to the second power supply terminal V485 and the driving input terminal D of the RS485 interface chip U1, and a fourth end of the second optocoupler isolation circuit E2 is grounded; the second optocoupler isolation circuit E2 is used to isolate between the data receiving terminal TXD of the MCU and the driving input terminal D of the RS485 interface chip U1;
[0065] The first end of the inverting control circuit RTC is connected to the second power supply terminal V485, the second end of the inverting control circuit RTC is respectively connected to the receiving enable terminal / RE and the sending enable terminal DE of the RS485 interface chip U1, and the third end of the inverting control circuit RTC is connected to the third end of the second optocoupler isolation circuit E2; the inverting control circuit RTC is used to output a low level signal to the receiving enable terminal / RE and the sending enable terminal DE of the RS485 interface chip U1 when the MCU outputs a high level signal through the third end of the second optocoupler isolation circuit E2, so that the RS485 interface chip U1 is in a receiving state, and when the MCU outputs a low level signal through the third end of the second optocoupler isolation circuit E2, output a high level signal to the receiving enable terminal / RE and the sending enable terminal DE of the RS485 interface chip U1 so that the RS485 interface chip U1 is in a sending state;
[0066] A first end of the output control circuit OUT is respectively connected to the second power supply terminal V485 and the power supply terminal VCC of the RS485 interface chip U1, a second end of the output control circuit OUT is connected to the reverse input and output terminal B of the RS485 interface chip U1, a third end of the output control circuit OUT is connected to the same direction input and output terminal A of the RS485 interface chip U1, and a fourth end of the output control circuit OUT is grounded; the output control circuit OUT is used to maintain a high level output when the RS485 interface chip U1 is in a sending state, and maintain a low level input when the RS485 interface chip U1 is in a receiving state.
[0067] In such Figure 1In the RS485 transceiver control circuit shown, when the MCU has no data to send, the data receiving terminal TXD of the MCU is at a high level, and after being isolated by the second optical coupling isolation circuit E2, it outputs a high level, and after being inverted by the inverting control circuit RTC, it outputs a low level to the receiving enable terminal / RE and the transmitting enable terminal DE of the RS485 interface chip U1, so that the RS485 interface chip U1 is in a receiving state. When the MCU has data to send, the data receiving terminal TXD of the MCU is at a low level, and after being isolated by the second optical coupling isolation circuit E2, it outputs a low level, and after being inverted by the inverting control circuit RTC, it outputs a high level to the receiving enable terminal / RE and the transmitting enable terminal DE of the RS485 interface chip U1, so that the RS485 interface chip U1 is in a transmitting state, thereby achieving relatively stable transceiver control of the RS485 interface chip U1 without affecting the load capacity of the RS485 interface chip U1.
[0068] In specific implementation, in the RS485 transceiver control circuit provided in the embodiment of the present application, the inverting control circuit RTC can have a variety of specific structures to realize its function. Figure 2 As shown, the inverting control circuit RTC may specifically include a first transistor Q1, a first resistor R1, a second resistor R2 and a first capacitor C1;
[0069] The emitter of the first transistor Q1 is connected to the second power supply terminal V485, the collector of the first transistor Q1 is respectively connected to the receive enable terminal / RE and the transmit enable terminal DE of the RS485 interface chip U1 and one end of the first parallel branch formed by the first resistor R1 and the first capacitor C1, the base of the first transistor Q1 is connected to the third end of the second optocoupler isolation circuit E2 via the second resistor R2; the other end of the first parallel branch is grounded.
[0070] Furthermore, in the specific implementation, see Figure 2 As shown, a third resistor R3 may be connected between the first end of the first optical coupler isolation circuit E1 and the first power supply terminal VDD; a fourth resistor R4 may be connected between the second end of the first optical coupler isolation circuit E1 and the signal receiving terminal R of the RS485 interface chip U1. Moreover, a fifth resistor R5 may be connected between the first end of the second optical coupler isolation circuit R2 and the data receiving terminal TXD of the MCU, and a sixth resistor R6 may be connected between the third end of the second optical coupler isolation circuit E2 and the second power supply terminal V485.
[0071] In addition, in the specific implementation, in the RS485 transceiver control circuit provided in the embodiment of the present application, the output control circuit OUT can have a variety of specific structures to realize its function. Figure 2 As shown, the output control circuit OUT may specifically include a second capacitor C2, a seventh resistor R7 and an eighth resistor R8;
[0072] A first end of the second capacitor C2 is connected to the second power supply terminal V485, and a second end of the second capacitor C2 is grounded;
[0073] A first end of the seventh resistor R7 is connected to the second end of the second capacitor C2, and a second end of the seventh resistor R7 is connected to the reverse input and output end B of the RS485 interface chip U1 and serves as the reverse input and output end B of the RS485 transceiver control circuit;
[0074] A first end of the eighth resistor R8 is connected to the second power supply end V485, and a second end of the eighth resistor R8 is connected to the same-direction input and output end A of the RS485 interface chip U1 and serves as the same-direction input and output end A of the RS485 transceiver control circuit.
[0075] In such Figure 2 In the RS485 transceiver control circuit shown, when the MCU has data to send, the data receiving terminal TXD of the MCU is at a low level, the driving input terminal D of the RS485 interface chip U1 is at a low level, the first transistor Q1 is saturated and turned on, and the first capacitor C1 is quickly charged, and the receiving enable terminal / RE and the transmitting enable terminal DE of the RS485 interface chip U1 also become high levels, so that the RS485 interface chip U1 is in a transmitting state; and when the MCU has no data to send, the data receiving terminal TXD of the MCU changes from a low level to a high level. Due to the existence of the first capacitor C1, the receiving enable terminal / RE of the RS485 interface chip U1 The transmission enable terminal DE also maintains a high level, that is, the RS485 interface chip U1 continues to be in the transmission state and relies on the seventh resistor R7 and the eighth resistor R8 to continue to maintain a high level output. At this time, the first capacitor C1 discharges through the first resistor R1. When the discharge is completed, the RS485 interface chip U1 switches to the receiving state, and the state of the signal receiving terminal R of the RS485 interface chip U1 is determined by the voltage difference of the RS485 communication bus. It can be seen that the RS485 interface chip U1 participates in a part of the high-level output, which can significantly improve the rising edge problem, and then improve the reliability and stability of the RS485 transceiver control circuit. It is worth mentioning that in the RS485 transceiver control circuit, in order to ensure smooth data transmission, its RC constant τ<1 / B (B is the communication rate).
[0076] Based on the same inventive concept, the present application embodiment also provides an RS485 communication device, see Figure 3 As shown, the RS485 communication device provided in the embodiment of the present application includes the above-mentioned RS485 transceiver control circuit 110 provided in the embodiment of the present application, a lightning protection and overvoltage protection circuit 120, a relay K, a third optical coupler isolation circuit E3, a signal monitoring circuit 130, an overvoltage detection circuit 140, a transmission communication chip U2, and a fault detection chip U3;
[0077] The same direction input and output terminal A of the RS485 transceiver control circuit 110 is respectively connected to the first input terminal of the lightning protection and overvoltage protection circuit 120 and the first input terminal of the overvoltage detection circuit 140, and the reverse input and output terminal B of the RS485 transceiver control circuit 110 is respectively connected to the second input terminal of the lightning protection and overvoltage protection circuit 120 and the second input terminal of the overvoltage detection circuit 140; the RS485 transceiver control circuit 110 is used to control the transceiver state of the RS485 interface chip U1;
[0078] The first power supply terminal of the overvoltage detection circuit 140 is connected to the third power supply terminal Vref, and the first output terminal of the overvoltage detection circuit 140 is connected to the first input terminal of the fault detection chip U3; the overvoltage detection circuit 140 is used to perform overvoltage detection on the voltages at both ends of the same-direction input and output terminal A and the reverse input and output terminal B of the RS485 transceiver control circuit 110;
[0079] The first output end of the lightning protection and overvoltage protection circuit 120 is connected to the first contact of the first contact group in the relay K, and the second output end of the lightning protection and overvoltage protection circuit 120 is connected to the first contact of the second contact group in the relay K; the lightning protection and overvoltage protection circuit 120 is used to perform lightning protection and overvoltage protection on the transmission communication chip U2;
[0080] The second contact of the first contact group in the relay K is respectively connected to the first input end of the transmission communication chip U2 and the first input end of the signal monitoring circuit 130, and the second contact of the second contact group in the relay K is respectively connected to the second input end of the transmission communication chip U2 and the second input end of the signal monitoring circuit 130; the relay K is used to close or disconnect the connection between the transmission communication chip U2 and the lightning protection and overvoltage protection circuit 120 under the drive of the fault detection chip U3;
[0081] The output end of the signal monitoring circuit 130 is connected to the second input end of the fault detection chip U3; the signal monitoring circuit 130 is used to monitor whether the voltages at the same direction input and output end A and the reverse input and output end B of the RS485 transceiver control circuit 110 are lower than a set threshold value (for example, 0.012V, 0V, etc.);
[0082] The first output end of the transmission communication chip U2 is connected to the transceiver enable end DE / RE of the third optical coupler isolation circuit E3, the second output end of the transmission communication chip U2 is respectively connected to the drive input end D of the third optical coupler isolation circuit E3 and the third input end of the fault detection chip U3, and the third output end of the transmission communication chip U2 is respectively connected to the signal receiving end E of the third optical coupler isolation circuit E3 and the fourth input end of the fault detection chip U3; the transmission communication chip U2 is used to transmit data according to the transceiver state of the RS485 interface chip U1;
[0083] The control end of the fault detection chip U3 is connected to the driving end of the first contact group and the second contact group in the relay K; the fault detection chip U3 is used to control the relay K to disconnect the transmission communication chip U2 from the lightning protection and overvoltage protection circuit 120 to cut off the connection between the transmission communication chip U2 and the RS485 communication bus when an overvoltage fault is determined according to the output signal of the overvoltage detection circuit 140, or when a short circuit fault is determined according to the first receiving signal of the signal monitoring circuit 130 and the second receiving signal and sending signal of the transmission communication chip U2.
[0084] In such Figure 3 In the RS485 communication device shown, the output signal of the RS485 interface chip U1 is divided into two paths, one path is sent to the overvoltage detection circuit 140 and its output signal is sent to the fault detection chip U3 for fault detection, and the other path is sent to the transmission communication chip U2 and the signal monitoring circuit 130 through the relay K after passing through the lightning protection and overvoltage protection circuit 120, and its output signal is divided into two paths, one path is sent to the fault detection chip U3 for fault detection, and the other path is output through the third optical coupling isolation circuit E3 to complete the communication, so that when the fault detection chip U3 determines that an overvoltage fault occurs according to the output signal of the overvoltage detection circuit 140, or when a short circuit fault occurs according to the first receiving signal of the signal monitoring circuit 130 and the second receiving signal and the sending signal of the transmission communication chip U2, not only can the connection between the fault circuit and the RS485 communication bus be cut off by controlling the relay K to disconnect the connection between the transmission communication chip U2 and the lightning protection and overvoltage protection circuit 120, so as to achieve timely isolation of the fault circuit and the RS485 communication bus, but also the communication line can be ensured to be unobstructed, thereby improving the stability and reliability of the RS485 centralized meter reading network.
[0085] In specific implementation, in the RS485 communication device provided in the embodiment of the present application, the lightning protection and overvoltage protection circuit 120 can have a variety of specific structures to achieve its functions. Figure 4 As shown, the lightning protection and overvoltage protection circuit 120 may specifically include a varistor RV, a thermistor PTC and a transient tube TVS;
[0086] The first end of the varistor RV is respectively connected to the same direction input and output terminal A of the RS485 transceiver control circuit 110 and the first end of the thermistor PTC, and the second end of the varistor RV is respectively connected to the reverse input and output terminal B of the RS485 transceiver control circuit and the first end of the transient tube TVS;
[0087] The second end of the thermistor PTC is connected to the second end of the transient tube TVS and the first contact of the first contact group in the relay K respectively;
[0088] The second end of the transient transistor TVS is connected to the first contact of the second contact group in the relay K.
[0089] In such Figure 4 In the lightning protection and overvoltage protection circuit 120 shown, when there is an external 380V input, the voltage is first clamped at about 8V by the transient tube TVS, and a current of about 18A flows through the thermistor PTC when it is in a cold state. Under the action of such a large current, the thermistor PTC immediately operates in a high-resistance state, thereby playing a protective role. When encountering a lightning strike, the varistor RV is relied on to absorb it. At the same time, the thermistor PTC and the transient tube TVS also play a certain protective role to suppress the influence of the residual pressure of the lightning strike on the circuit.
[0090] In specific implementation, in the RS485 communication device provided in the embodiment of the present application, the overvoltage detection circuit 140 may have a variety of specific structures to realize its function. Figure 5 As shown, the overvoltage detection circuit 140 may specifically include a rectifier bridge D, a fourth optocoupler isolation circuit E4, a ninth resistor R9, a tenth resistor R10, an eleventh resistor R11, a twelfth resistor R12, a thirteenth resistor R13, a fourteenth resistor R14, a fifteenth resistor R15, a third capacitor C3, a fourth capacitor C4, a fifth capacitor C5, a sixth capacitor C6, a first diode D1, a second diode D2, a second transistor Q2, a potentiometer R, and a comparator U4;
[0091] The first input end of the rectifier bridge stack D is connected to the same direction input and output end A of the RS485 transceiver control circuit 100, the second input end of the rectifier bridge stack D is connected to the reverse input and output end B of the RS485 transceiver control circuit 100, and the first output end of the rectifier bridge stack D is connected to the first end of the fourth optical coupler isolation circuit E4 through the ninth resistor R9 and connected to the second end of the fourth optical coupler isolation circuit E4 through the tenth resistor R10;
[0092] A third end of the fourth optical coupling isolation circuit E4 is connected to the second power supply end V485, a fourth end of the fourth optical coupling isolation circuit E4 is connected to the non-inverting input end of the comparator U4 via the eleventh resistor R11 and is connected to one end of the second parallel branch formed by the twelfth resistor R12 and the third capacitor C3, and the other end of the second parallel branch is connected to the first power supply end of the comparator U4;
[0093] The first fixed end of the potentiometer R is connected to the second power supply end V485, the second fixed end of the potentiometer R is connected to the first power supply end of the comparator U4, the middle adjustment end of the potentiometer R is connected to the inverting input end of the comparator U4 and a fourth capacitor C4 is connected between the middle adjustment end of the potentiometer R and the first power supply end of the comparator U4;
[0094] A thirteenth resistor R13 is connected between the non-inverting input terminal of the comparator U4 and the output terminal of the comparator U4, the output terminal of the comparator U4 is connected to the base of the second transistor Q2 via the fourteenth resistor R14, the second power supply terminal of the comparator U4 is respectively connected to the second power supply terminal V485 and one end of the third parallel circuit formed by the fifth capacitor C5 and the sixth capacitor C6, and the other end of the third parallel circuit is grounded;
[0095] A fifteenth resistor R15 is connected between the base of the second transistor Q2 and the first power supply terminal of the comparator U4, the emitter of the second transistor Q2 is grounded, and the collector of the second transistor Q2 is respectively connected to the first diode D1 as a first output terminal and connected to the second diode D2 as a second output terminal.
[0096] In such Figure 5 In the overvoltage detection circuit 140 shown, when the voltage across the same-direction input and output terminal A and the reverse input and output terminal B of the RS485 transceiver control circuit 110, that is, the input voltage of the RS485 communication bus is greater than 36V, an alarm is required. Its maximum input voltage is 380V. Since the voltage input amplitude is large, thermistor PTC and transient tube TVS are added for protection, and its protection point is set at about 68V to ensure good linearity below 68V. Based on this, the voltage across the same-direction input and output terminal A and the reverse input and output terminal B of the RS485 transceiver control circuit 110, that is, the input voltage of the RS485 communication bus, is sent to the rectifier bridge D and bypassed by the ninth resistor R9 and the tenth resistor R10 to drive the fourth optocoupler isolation circuit E4 to make it work in the linear region. After being isolated by the fourth optocoupler isolation circuit E4, it forms an emitter output circuit with the twelfth resistor R12, and is filtered by the third capacitor C3 and sent to the comparator U4 through the eleventh resistor R11. The potentiometer R and the fourth capacitor C4 form a reference circuit. Since the current transmission ratio consistency of the fourth optocoupler isolation circuit E4 is poor, the potentiometer R is used to adjust it in order to accurately alarm when it is greater than 36V. The eleventh resistor R1, the thirteenth resistor R13 and the comparator U4 form a comparator with hysteresis characteristics, and its hysteresis voltage is 0.35V. Converted to the input end, it alarms when it is greater than 36V, and the alarm is released when it is lower than 28V. The fourteenth resistor R14 is a current limiting resistor, the fifteenth resistor R15 is a leakage resistor, the fifth capacitor C5 and the sixth capacitor C6 are decoupling capacitors of the comparator U4, and the output signal of the comparator U4 is divided into two paths after being driven by the second transistor Q2, one path is sent to the MCU in the electric energy meter, and the other path is sent to the fault detection chip U3 for alarm output through the LED light, and the first diode D1 and the second diode D2 realize the line-AND function and signal isolation function.
[0097] In specific implementation, in the RS485 communication device provided in the embodiment of the present application, the signal monitoring circuit 130 may have a variety of specific structures to implement its functions. Figure 6aAs shown, the signal monitoring circuit 130 may specifically include a detection chip U5 (using 65LBC184), an operational amplifier U6, a seventh capacitor C7, an eighth capacitor C8, a ninth capacitor C9, a sixteenth resistor R16, a seventeenth resistor R17, an eighteenth resistor R18, a nineteenth resistor R19, a twentieth resistor R20, a twenty-first resistor R21, a twenty-second resistor R22, a twenty-third resistor R23, a twenty-fourth resistor R24, and a twenty-fifth resistor R25;
[0098] The power supply terminal VCC of the detection chip U5 is connected to the second power supply terminal V485 and grounded via the seventh capacitor C7, the RS485 interface A terminal of the detection chip U5 is connected to the second contact of the first contact group in the relay K, the RS485 interface B terminal of the detection chip U5 is connected to the second contact of the second contact group in the relay K, and the ground terminal GND of the detection chip U5 is grounded;
[0099] The sixteenth resistor R16 is connected between the ground terminal GND of the detection chip U5 and the RS485 interface B terminal of the detection chip U5;
[0100] The seventeenth resistor R17 is connected between the RS485 interface A terminal of the detection chip U5 and the RS485 interface B terminal of the detection chip U4;
[0101] An eighteenth resistor R18 is connected between the power supply terminal VCC of the detection chip U5 and the RS485 interface A terminal of the detection chip U5;
[0102] The nineteenth resistor R19 is connected between the RS485 interface A terminal of the detection chip U5 and the non-inverting input terminal of the operational amplifier U6;
[0103] The twentieth resistor R20 is connected between the RS485 interface B terminal of the detection chip U5 and the inverting input terminal of the operational amplifier U6;
[0104] The non-inverting input terminal of the operational amplifier U6 is connected to one end of a first series branch formed by the twenty-first resistor R21 and the twenty-second resistor R22, and the other end of the first series branch is grounded; the inverting input terminal of the operational amplifier U6 is connected to one end of a second series branch formed by the twenty-third resistor R23 and the twenty-fourth resistor R24, and the other end of the second series branch is connected to the second power supply terminal V485; the output terminal of the operational amplifier U5 is connected to the second input terminal of the fault detection chip U3; the first power supply terminal of the operational amplifier U6 is grounded; the second power supply terminal of the operational amplifier U6 is respectively connected to the second power supply terminal V485 and one end of a fourth parallel branch formed by the seventh capacitor C7 and the eighth capacitor C8, and the other end of the fourth parallel branch is grounded;
[0105] The twenty-fifth resistor R25 is connected between a first connection node between the twenty-first resistor R21 and the twenty-second resistor R22 and a second connection node between the twenty-third resistor R23 and the twenty-fourth resistor R24.
[0106] In such Figure 6a In the signal monitoring circuit 130 shown, the sixteenth resistor R16 (47k), the seventeenth resistor R17 (4.7k), the eighteenth resistor R18 (47k), the nineteenth resistor R19 (100k), and the twentieth resistor R20 (100k) form a static bias circuit of the detection chip U5. In the absence of communication, the voltage of the AB port is 0.238V, which can avoid the uncertain state of the detection chip U5 when it is static. The operational amplifier U6 and the twenty-first resistor R21 (100k), the twenty-second resistor R22 (2M), the twenty-third resistor R23 (100k), the twenty-fourth resistor R24 (2M), and the twenty-fifth resistor R25 (12k) form a pre-biased differential comparison circuit as the core circuit of the signal monitoring circuit 130. The signal monitoring circuit 130 can be simplified as follows using the Thevenin theorem. Figure 6b The equivalent circuit shown in the figure, where in+ and in- are the positive and negative input terminals of the op amp U2, Figure 6b The equivalent circuit shown can easily calculate the input voltage Uin = 0.115V of the operational amplifier U6 in static state, and its output signal is high level. The purpose of adding negative bias to the input terminal of the operational amplifier U6 is to reliably detect the short circuit fault in the RS485 communication device. Figure 6b It can be seen from the equivalent circuit shown that when the voltage across the same-direction input and output terminal A and the reverse input and output terminal B of the RS485 transceiver control circuit 110 is lower than 0.012V, the output of the operational amplifier U6 flips and outputs a low level. When a short circuit occurs in the RS485 communication device, the voltage across the same-direction input and output terminal A and the reverse input and output terminal B of the RS485 transceiver control circuit 110 is 0V, and the output of the operational amplifier U6 flips and outputs a low level and is sent to the fault detection chip U3 for alarm.
[0107] In addition, an embodiment of the present application also provides an electric energy meter, including an MCU, and the above-mentioned RS485 communication device provided in the embodiment of the present application; the first input end of the MCU is connected to the second output end of the overvoltage detection circuit 140 in the RS485 communication device, the second input end of the MCU is respectively connected to the data receiving end, data sending end and transceiver enable end of the third optocoupler isolation circuit E3 in the RS485 communication device, the third input end of the MCU is connected to the output end of the fault detection chip U3 in the RS485 communication device, and the fourth input end of the MCU is connected to the RO end, DI end and CTR1A end of the detection chip U5 in the signal monitoring circuit 130 in the RS485 communication device.
[0108] After introducing the RS485 transceiver control circuit, RS485 communication device and electric energy meter provided in the embodiments of the present application, the fault detection method involved in the embodiments of the present application is described in detail.
[0109] The fault detection method provided in the embodiment of the present application can be applied to Figure 7a The MCU in the electric energy meter shown in the figure can be the fault detection chip U3 in the aforementioned RS485 communication device, or it can be the RS485 communication management chip U4 in the electric energy meter. When the MCU is the RS485 communication management chip U4 in the electric energy meter, the RS485 communication management chip U4 controls the disconnection and connection of the relay K through the fault detection chip U3, thereby realizing the disconnection and connection between the transmission communication chip U2 and the RS485 communication bus. For details, refer to Figure 7b As shown, the general process of the fault detection method provided in the embodiment of the present application is as follows:
[0110] Step 701: Detect whether an overvoltage fault occurs in the RS485 communication device according to the output signal of the overvoltage detection circuit 140 in the RS485 communication device.
[0111] Step 702: Detect whether a short circuit fault occurs in the RS485 communication device according to the first received signal of the signal monitoring circuit 130 in the RS485 communication device and the second received signal and the transmitted signal of the transmission communication chip U2 in the RS485 communication device.
[0112] Step 703: When it is determined that an overvoltage fault or a short circuit fault occurs in the RS485 communication device, the relay K in the RS485 communication device is controlled to disconnect the transmission communication chip U2 in the RS485 communication device from the lightning protection and overvoltage protection circuit 120 in the RS485 communication device to cut off the connection between the transmission communication chip U2 in the RS485 communication device and the RS485 communication bus.
[0113] In a specific implementation, when detecting whether an overvoltage fault occurs in the RS485 communication device according to the output signal of the overvoltage detection circuit 140 in the RS485 communication device, and detecting whether a short circuit fault occurs in the RS485 communication device according to the first receiving signal of the signal monitoring circuit 130 in the RS485 communication device and the second receiving signal and the sending signal of the transmission communication chip U2 in the RS485 communication device, the type of short circuit fault occurring in the RS485 communication device and the fault handling method can be determined by comprehensively analyzing the relationship between the three signals of the first receiving signal RO' of the signal monitoring circuit 130, the second receiving signal RO of the transmission communication chip U2 and the sending signal DI, as shown in Table 1 below:
[0114] Table 1.
[0115]
[0116]
[0117] Table 1 lists the fault types and their processing methods in various situations. The following describes the processing methods of the fault types in various situations in combination with the circuit structure of the RS485 communication device provided in the embodiment of the present application.
[0118] From the above situation, we can conclude that there are several types of faults:
[0119] 1) Internal faults, the fault types include:
[0120] a. Failure of transmission communication chip U2
[0121] b. Failure of the signal monitoring chip (i.e., signal monitoring circuit 130)
[0122] c. There is a constant "0" signal output inside
[0123] The processing methods for the above three internal faults are the same, that is, the MCU outputs an alarm signal with a frequency of 1Hz from the 7th pin, and controls the relay K to be energized through the 6th pin, thereby cutting off the connection between the RS485 communication device and the external RS485 communication network.
[0124] 2) External faults, the fault types include:
[0125] a. There is a constant "0" signal input on the network
[0126] b. Network short circuit
[0127] c. There is a voltage greater than 36V on the network
[0128] The processing methods for the two external faults a and b are the same, that is, the MCU outputs an alarm signal with a frequency of 1Hz from the 7th pin, and controls relay K to be energized through the 6th pin. When relay K is energized, the fault phenomenon disappears, and the MCU releases relay K after one second. If the fault on the external RS485 communication network has not been eliminated, the MCU will detect the fault again in about 140us and send out an alarm signal, and control relay K to be energized again through the 6th pin. The signal line of the MCU and the external RS485 communication network are disconnected, and the MCU outputs an alarm signal with a frequency of 1Hz from the 7th pin.
[0129] The method for handling external short-circuit fault c is that after the op amp U6 detects this type of fault, it outputs a high level, which is driven by the second transistor Q2 and sent to the MCU of the energy meter. The other way lights up the LED and outputs a low-level alarm signal. After receiving the signal from the second transistor Q2, the MCU controls the relay K to close through the 6th pin, outputs an alarm signal with a frequency of 1Hz from the 7th pin, and outputs a low level after the low-level alarm signal line output by the second transistor Q2 is combined.
[0130] Based on the above analysis, the specific process of the fault detection method provided in the embodiment of the present application can be found in Figure 7c As shown, the fault detection method provided in the embodiment of the present application can realize accurate detection of various fault types occurring in the RS485 communication device, thereby further improving the reliability and stability of the RS485 communication device. Moreover, the RS485 communication device and electric energy meter provided in the embodiment of the present application can greatly improve the reliability of the centralized meter reading system because of its fault detection function, which brings great convenience to the management and maintenance of the entire centralized meter reading system.
[0131] It should be noted that the above embodiments are only used to illustrate the technical solution of the present application, rather than to limit it. Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0132] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An RS485 transceiver control circuit, characterized in that: It includes a micro control unit MCU, an RS485 interface chip, a first optical coupler isolation circuit, a second optical coupler isolation circuit, an inverting control circuit, and an output control circuit; The first end of the first optocoupler isolation circuit is respectively connected to the first power supply end and the data sending end of the MCU, the second end of the first optocoupler isolation circuit is connected to the signal receiving end of the RS485 interface chip, the third end of the first optocoupler isolation circuit is grounded, and the fourth end of the first optocoupler isolation circuit is connected to the second power supply end; the first optocoupler isolation circuit is used to isolate between the data sending end of the MCU and the signal receiving end of the RS485 interface chip; The first end of the second optocoupler isolation circuit is connected to the data receiving end of the MCU, the second end of the second optocoupler isolation circuit is connected to the first power supply end, the third end of the second optocoupler isolation circuit is respectively connected to the second power supply end and the driving input end of the RS485 interface chip, and the fourth end of the second optocoupler isolation circuit is grounded; the second optocoupler isolation circuit is used to isolate between the data receiving end of the MCU and the driving input end of the RS485 interface chip; The first end of the inverting control circuit is connected to the second power supply end, the second end of the inverting control circuit is respectively connected to the receiving enable end and the sending enable end of the RS485 interface chip, and the third end of the inverting control circuit is connected to the third end of the second optocoupler isolation circuit; the inverting control circuit is used to output a low level signal to the receiving enable end and the sending enable end of the RS485 interface chip when the MCU outputs a high level signal through the third end of the second optocoupler isolation circuit so that the RS485 interface chip is in a receiving state, and when the MCU outputs a low level signal through the third end of the second optocoupler isolation circuit, a high level signal is output to the receiving enable end and the sending enable end of the RS485 interface chip so that the RS485 interface chip is in a sending state; The first end of the output control circuit is connected to the second power supply end and the power supply end of the RS485 interface chip respectively, the second end of the output control circuit is connected to the reverse input and output end of the RS485 interface chip, the third end of the output control circuit is connected to the same direction input and output end of the RS485 interface chip, and the fourth end of the output control circuit is grounded; the output control circuit is used to maintain a high level output when the RS485 interface chip is in a sending state, and maintain a low level input when the RS485 interface chip is in a receiving state.
2. The RS485 transceiver control circuit as claimed in claim 1, wherein: The inverting control circuit includes a first transistor, a first resistor, a second resistor and a first capacitor; The emitter of the first transistor is connected to the second power supply end, the collector of the first transistor is respectively connected to the receive enable end and the transmit enable end of the RS485 interface chip and one end of the first parallel branch formed by the first resistor and the first capacitor, the base of the first transistor is connected to the third end of the second optocoupler isolation circuit via the second resistor; the other end of the first parallel branch is grounded.
3. The RS485 transceiver control circuit as claimed in claim 1, wherein: A third resistor is connected between the first end of the first optocoupler isolation circuit and the first power supply end; and a fourth resistor is connected between the second end of the first optocoupler isolation circuit and the signal receiving end of the RS485 interface chip.
4. RS485 transceiver control circuit as claimed in claim 1, characterized in that, A fifth resistor is connected between the first end of the second optocoupler isolation circuit and the data receiving end of the MCU, and a sixth resistor is connected between the third end of the second optocoupler isolation circuit and the second power supply end.
5. The RS485 transceiver control circuit as claimed in claim 1, characterized in that, The output control circuit includes a second capacitor, a seventh resistor and an eighth resistor; A first end of the second capacitor is connected to the second power supply end, and a second end of the second capacitor is grounded; The first end of the seventh resistor is connected to the second end of the second capacitor, and the second end of the seventh resistor is connected to the reverse input and output end of the RS485 interface chip and serves as the reverse input and output end of the RS485 transceiver control circuit; The first end of the eighth resistor is connected to the second power supply end, and the second end of the eighth resistor is connected to the same-direction input and output end of the RS485 interface chip and serves as the same-direction input and output end of the RS485 transceiver control circuit.
6. An RS485 communication device, characterized in that: It comprises the RS485 transceiver control circuit as described in any one of claims 1 to 5, a lightning protection and overvoltage protection circuit, a relay, a third optical coupler isolation circuit, a signal monitoring circuit, an overvoltage detection circuit, a transmission communication chip, and a fault detection chip; The same-direction input and output ends of the RS485 transceiver control circuit are respectively connected to the first input end of the lightning protection and overvoltage protection circuit and the first input end of the overvoltage detection circuit, and the reverse input and output ends of the RS485 transceiver control circuit are respectively connected to the second input end of the lightning protection and overvoltage protection circuit and the second input end of the overvoltage detection circuit; the RS485 transceiver control circuit is used to control the transceiver state of the RS485 interface chip; The first power supply terminal of the overvoltage detection circuit is connected to the third power supply terminal, and the first output terminal of the overvoltage detection circuit is connected to the first input terminal of the fault detection chip; the overvoltage detection circuit is used to perform overvoltage detection on the voltages at both ends of the same-direction input and output terminal and the reverse input and output terminal of the RS485 transceiver control circuit; The first output end of the lightning protection and overvoltage protection circuit is connected to the first contact of the first contact group in the relay, and the second output end of the lightning protection and overvoltage protection circuit is connected to the first contact of the second contact group in the relay; the lightning protection and overvoltage protection circuit is used to perform lightning protection and overvoltage protection on the transmission communication chip; The second contact of the first contact group in the relay is respectively connected to the first input end of the transmission communication chip and the first input end of the signal monitoring circuit, and the second contact of the second contact group in the relay is respectively connected to the second input end of the transmission communication chip and the second input end of the signal monitoring circuit; the relay is used to close or disconnect the connection between the transmission communication chip and the lightning protection and overvoltage protection circuit under the drive of the fault detection chip; The output end of the signal monitoring circuit is connected to the second input end of the fault detection chip; the signal monitoring circuit is used to monitor whether the voltages at both ends of the same-direction input and output end and the reverse input and output end of the RS485 transceiver control circuit are lower than a set threshold; The first output end of the transmission and communication chip is connected to the transceiver enable end of the third optical coupler isolation circuit, the second output end of the transmission and communication chip is respectively connected to the drive input end of the third optical coupler isolation circuit and the third input end of the fault detection chip, and the third output end of the transmission and communication chip is respectively connected to the signal receiving end of the third optical coupler isolation circuit and the fourth input end of the fault detection chip; The transmission communication chip is used for transmitting data according to the receiving and sending state of the RS485 interface chip; The control end of the fault detection chip is connected to the driving ends of the first contact group and the second contact group in the relay; the fault detection chip is used to control the relay to disconnect the transmission communication chip from the lightning protection and overvoltage protection circuit to cut off the connection between the transmission communication chip and the RS485 communication bus when an overvoltage fault is determined according to the output signal of the overvoltage detection circuit, or when a short circuit fault is determined according to the first receiving signal of the signal monitoring circuit and the second receiving signal and sending signal of the transmission communication chip.
7. The RS485 communication device as claimed in claim 6, characterized in that, The lightning protection and overvoltage protection circuit includes a varistor, a thermistor and a transient tube; The first end of the varistor is respectively connected to the same direction input and output end of the RS485 transceiver control circuit and the first end of the thermistor, and the second end of the varistor is respectively connected to the reverse input and output end of the RS485 transceiver control circuit and the first end of the transient tube; The second end of the thermistor is connected to the second end of the transient tube and the first contact of the first contact group in the relay respectively; The second end of the transient tube is connected to the first contact of the second contact group in the relay.
8. The RS485 communication device as claimed in claim 6, characterized in that, The overvoltage detection circuit includes a rectifier bridge stack, a fourth optocoupler isolation circuit, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a thirteenth resistor, a fourteenth resistor, a fifteenth resistor, a third capacitor, a fourth capacitor, a fifth capacitor, a sixth capacitor, a first diode, a second diode, a second transistor, a potentiometer, and a comparator; The first input end of the rectifier bridge stack is connected to the same-direction input and output end of the RS485 transceiver control circuit, the second input end of the rectifier bridge stack is connected to the reverse input and output end of the RS485 transceiver control circuit, and the first output end of the rectifier bridge stack is connected to the first end of the fourth optocoupler isolation circuit via the ninth resistor and connected to the second end of the fourth optocoupler isolation circuit via the tenth resistor; The third end of the fourth optical coupling isolation circuit is connected to the second power supply end, the fourth end of the fourth optical coupling isolation circuit is connected to the non-inverting input end of the comparator via the eleventh resistor and is connected to one end of the second parallel branch formed by the twelfth resistor and the third capacitor, and the other end of the second parallel branch is connected to the first power supply end of the comparator; The first fixed end of the potentiometer is connected to the second power supply end, the second fixed end of the potentiometer is connected to the first power supply end of the comparator, the middle adjustment end of the potentiometer is connected to the inverting input end of the comparator and the fourth capacitor is connected between the middle adjustment end of the potentiometer and the first power supply end of the comparator; The thirteenth resistor is connected between the non-inverting input terminal of the comparator and the output terminal of the comparator, the output terminal of the comparator is connected to the base of the second transistor via the fourteenth resistor, the second power supply terminal of the comparator is respectively connected to the second power supply terminal and one end of a third parallel circuit formed by the fifth capacitor and the sixth capacitor, and the other end of the third parallel circuit is grounded; The fifteenth resistor is connected between the base of the second transistor and the first power supply end of the comparator, the emitter of the second transistor is grounded, and the collector of the second transistor is respectively connected to the first diode as the first output end and the second diode as the second output end.
9. The RS485 communication device as claimed in claim 6, characterized in that, The signal monitoring circuit includes a detection chip, an operational amplifier, a seventh capacitor, an eighth capacitor, a ninth capacitor, a sixteenth resistor, a seventeenth resistor, an eighteenth resistor, a nineteenth resistor, a twentieth resistor, a twenty-first resistor, a twenty-second resistor, a twenty-third resistor, a twenty-fourth resistor, and a twenty-fifth resistor; the model of the detection chip is 65LBC184; The power supply end of the detection chip is connected to the second power supply end and grounded via the seventh capacitor, the RS485 interface A end of the detection chip is connected to the second contact of the first contact group in the relay, the RS485 interface B end of the detection chip is connected to the second contact of the second contact group in the relay, and the ground end of the detection chip is grounded; The sixteenth resistor is connected between the ground terminal of the detection chip and the RS485 interface B terminal of the detection chip; The seventeenth resistor is connected between the RS485 interface A terminal of the detection chip and the RS485 interface B terminal of the detection chip; The eighteenth resistor is connected between the power supply terminal of the detection chip and the RS485 interface A terminal of the detection chip; The nineteenth resistor is connected between the RS485 interface A terminal of the detection chip and the non-inverting input terminal of the operational amplifier; The twentieth resistor is connected between the RS485 interface B terminal of the detection chip and the inverting input terminal of the operational amplifier; The non-inverting input terminal of the operational amplifier is connected to one end of a first series branch formed by the twenty-first resistor and the twenty-second resistor, and the other end of the first series branch is grounded; the inverting input terminal of the operational amplifier is connected to one end of a second series branch formed by the twenty-third resistor and the twenty-fourth resistor, and the other end of the second series branch is connected to the second power supply terminal; the output terminal of the operational amplifier is connected to the second input terminal of the fault detection chip; the first power supply terminal of the operational amplifier is grounded; the second power supply terminal of the operational amplifier is respectively connected to the second power supply terminal and one end of a fourth parallel branch formed by the seventh capacitor and the eighth capacitor, and the other end of the fourth parallel branch is grounded; The twenty-fifth resistor is connected between a first connection node between the twenty-first resistor and the twenty-second resistor and a second connection node between the twenty-third resistor and the twenty-fourth resistor.
10. An electric energy meter, characterized in that: It comprises an RS485 communication management chip and an RS485 communication device as described in any one of claims 6 to 9; the RS485 communication management chip controls the disconnection and connection of a relay through a fault detection chip to realize the disconnection and connection between the transmission communication chip and the RS485 communication bus.
Citation Information
Patent Citations
Communication circuit detecting RS485 interface voltage
CN204244219U
High-speed RS-485 communication circuit applied to intelligent electric energy meter
CN216901648U