CN117240649A - RS485 communication circuit with optical coupling isolation and communication system - Google Patents

RS485 communication circuit with optical coupling isolation and communication system Download PDF

Info

Publication number
CN117240649A
CN117240649A CN202311154995.2A CN202311154995A CN117240649A CN 117240649 A CN117240649 A CN 117240649A CN 202311154995 A CN202311154995 A CN 202311154995A CN 117240649 A CN117240649 A CN 117240649A
Authority
CN
China
Prior art keywords
optocoupler
circuit
isolation
power supply
electrically connected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311154995.2A
Other languages
Chinese (zh)
Inventor
周荣
吴军
吴金炳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Luzhiyao Technology Co Ltd
Original Assignee
Suzhou Luzhiyao Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Luzhiyao Technology Co Ltd filed Critical Suzhou Luzhiyao Technology Co Ltd
Priority to CN202311154995.2A priority Critical patent/CN117240649A/en
Publication of CN117240649A publication Critical patent/CN117240649A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bidirectional Digital Transmission (AREA)

Abstract

The invention discloses an RS485 communication circuit with optical coupling isolation and a communication system, comprising a controller, an optical coupling receiving and transmitting isolation circuit, an optical coupling driving isolation circuit, an RS485 transceiver and an RS485 signal transmission circuit; the controller is electrically connected with the RS485 transceiver through the optocoupler receiving and transmitting isolation circuit, and is also electrically connected with the RS485 transceiver through the optocoupler driving isolation circuit, and the optocoupler receiving and transmitting isolation circuit, the optocoupler driving isolation circuit and the RS485 transceiver are all electrically connected with an external network power supply end; the RS485 transceiver is also electrically connected with external RS485 equipment through the RS485 signal transmission circuit. The invention can realize the isolation of RS485 bidirectional serial communication by using the low-cost optocoupler, has low isolation cost and improves the anti-interference performance of the RS485 communication circuit in all directions.

Description

RS485 communication circuit with optical coupling isolation and communication system
Technical Field
The invention relates to the field of RS485 communication, in particular to an RS485 communication circuit with optical coupling isolation and a communication system.
Background
The RS485 bus is a common serial bus standard, adopts a mode of balanced transmission and differential reception, has the capability of inhibiting common-mode interference, has a maximum transmission distance of up to kilometers, and is an industrial field bus commonly adopted for communication between different devices in an industrial field. In general, the electromagnetic environment of the equipment working site and the path of the transmission circuit is complex, and in order to avoid the remote communication from being interfered by the bus, electrical isolation needs to be performed between the bus interface and the main control MCU.
However, the existing general RS485 communication circuit is non-isolated or is isolated by adopting a dual-power chip, the non-isolated RS485 communication circuit is easy to break down, and particularly when the whole communication system is provided with a plurality of paths of RS485 communication circuits, and the distance between networking equipment of each path of RS485 communication circuit is larger, the fault rate is extremely high, and the anti-interference performance is poor; when the isolated RS485 communication circuit is realized by adopting the dual-power chip, the networking equipment of each path of RS485 communication circuit is required to provide dual power, so that the design of the networking equipment of the whole communication system is more complex and the cost is higher, one power supply in each path of RS485 communication circuit can be added into a large network of the whole communication system, the risk of signal interference can be still brought, and the anti-interference performance is poor.
Disclosure of Invention
In view of the above, the invention provides an RS485 communication circuit with optical coupling isolation and a communication system, which are used for solving the problems of poor anti-interference performance and high isolation cost of the existing RS485 communication circuit.
The invention provides an RS485 communication circuit with optical coupling isolation, which comprises a controller, an optical coupling receiving and transmitting isolation circuit, an optical coupling driving isolation circuit, an RS485 transceiver and an RS485 signal transmission circuit, wherein the controller is connected with the optical coupling receiving and transmitting isolation circuit;
the controller is electrically connected with the RS485 transceiver through the optocoupler receiving and transmitting isolation circuit, and is also electrically connected with the RS485 transceiver through the optocoupler driving isolation circuit, and the optocoupler receiving and transmitting isolation circuit, the optocoupler driving isolation circuit and the RS485 transceiver are all electrically connected with an external network power supply end; the RS485 transceiver is also electrically connected with external RS485 equipment through the RS485 signal transmission circuit.
Optionally, the optical coupling receiving and transmitting isolation circuit comprises an optical coupling transmitting isolation sub-circuit and an optical coupling receiving isolation sub-circuit;
the input end of the optical coupler transmission isolation sub-circuit is electrically connected with the output end of the controller, the output end of the optical coupler transmission isolation sub-circuit is electrically connected with the input end of the RS485 transceiver, the input end of the optical coupler receiving isolation sub-circuit is electrically connected with the output end of the RS485 transceiver, and the output end of the optical coupler receiving isolation sub-circuit is electrically connected with the input end of the controller; and the optical coupler transmitting isolation sub-circuit and the optical coupler receiving isolation sub-circuit are also respectively and electrically connected with the network power supply end.
Optionally, the network power supply terminal is specifically a 5V network power supply terminal;
the optocoupler transmission isolation subcircuit comprises a first optocoupler Q2, a first resistor R37, a second resistor R38 and a third resistor R39;
the positive electrode pin of the emitting tube of the first optocoupler Q1 is electrically connected with the power supply end of the 3.3V internal circuit through the second resistor R38, the negative electrode pin of the emitting tube of the first optocoupler Q2 is electrically connected with the output end of the controller, and the 2 empty pins of the first optocoupler Q2 are suspended;
the power supply pin and the enabling pin of the first optocoupler Q2 are electrically connected with the 5V network power supply end, and the output pin of the first optocoupler Q2 is electrically connected with the input end of the RS485 transceiver through the third resistor R39; the first end of the first resistor R37 is connected to a common connection end between the power supply pin of the first optocoupler Q2 and the 5V network power supply end, and the second end of the first resistor R37 is connected to a common connection end between the output pin of the first optocoupler Q2 and the third resistor R39; the grounding pin of the first optocoupler Q2 is grounded.
Optionally, the network power supply terminal is specifically a 5V network power supply terminal;
the optocoupler receiving isolation subcircuit comprises a second optocoupler Q1, a fourth resistor R33 and a fifth resistor R34;
the positive electrode pin of the emitting tube of the second optocoupler Q1 is electrically connected with the 5V network power supply end through the fifth resistor R34, the negative electrode pin of the emitting tube of the second optocoupler Q1 is electrically connected with the output end of the RS485 transceiver, and the 2 empty pins of the second optocoupler Q1 are suspended;
the power supply pin and the enabling pin of the second optocoupler Q1 are electrically connected with the power supply end of the 3.3V internal circuit, the output pin of the second optocoupler Q1 is electrically connected with the input end of the controller, the first end of the fourth resistor R33 is connected to the common connection end between the power supply pin of the second optocoupler Q1 and the power supply end of the 3.3V internal circuit, and the second end of the fourth resistor R33 is connected to the common connection end between the output pin of the second optocoupler Q1 and the input end of the controller; the grounding pin of the second optocoupler Q1 is grounded.
Optionally, the network power supply terminal is specifically a 5V network power supply terminal;
the optocoupler driving isolation circuit comprises a third optocoupler Q5 and a sixth resistor R35;
the positive electrode pin of the transmitting tube of the third optocoupler Q5 is electrically connected with the power supply end of the 3.3V internal circuit through the sixth resistor R35, the negative electrode pin of the transmitting tube of the third optocoupler Q5 is electrically connected with the output end of the controller, the collector electrode pin of the receiving tube of the third optocoupler Q5 is electrically connected with the power supply end of the 5V network, and the emitter electrode pin of the receiving tube of the third optocoupler Q5 is electrically connected with the input end of the RS485 transceiver.
Optionally, the network power supply terminal is specifically a 5V network power supply terminal;
the RS485 transceiver comprises an RS485 transceiver chip U8, a seventh resistor R70, an eighth resistor R74, a ninth resistor R73 and a first capacitor C43;
the power pin VCC of the RS485 transceiver chip U8 is electrically connected with the 5V network power supply end, the first end of the first capacitor C43 is connected to a common connection end between the power pin VCC of the RS485 transceiver chip U8 and the 5V network power supply end, and the second end of the second capacitor C43 is grounded; the grounding pin GND of the RS485 transceiver chip U8 is grounded; the receiver output pin RO of the RS485 transceiver chip U8 is electrically connected with the input end of the optocoupler transceiver isolation circuit, the first end of the seventh resistor R70 is connected to the common connection end between the power supply pin VCC of the RS485 transceiver chip U8 and the 5V network power supply end, and the second end of the seventh resistor R70 is connected to the common connection end between the receiver output pin RO of the RS485 transceiver chip U8 and the input end of the optocoupler transceiver isolation circuitThe public connection end; the driver input pin DI of the RS485 transceiver chip U8 is electrically connected with the output end of the optocoupler transceiver isolation circuit; the receiver output enable control pin of the RS485 transceiver chip U8The driver output enable control pin DE is electrically connected with the output end of the optocoupler drive isolation circuit, the first end of the eighth resistor R74 is the receiver output enable control pin of the RS485 transceiver chip U8The second end of the eighth resistor R74 is grounded on a common connection end between the eighth resistor R74 and the output end of the optocoupler driving isolation circuit; the in-phase input and output pin A and the anti-phase input and output pin B of the RS485 transceiver chip U8 are electrically connected with the RS485 signal transmission circuit, and the in-phase input and output pin A of the RS485 transceiver chip U8 is electrically connected with the 5V network power supply end through the ninth resistor R73.
Optionally, the RS485 signal transmission circuit includes a tenth resistor R72, a second capacitor C44, and a third capacitor C45;
the first end of the tenth resistor R72 and the first end of the second capacitor C44 are both connected to a common connection end between the inverting input output pin B of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the tenth resistor R72 and the second end of the second capacitor C44 are both grounded; the first end of the third capacitor C45 is connected to a common connection end between the in-phase input/output pin A of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the third capacitor C45 is grounded.
Optionally, the RS485 signal transmission circuit further includes an eleventh resistor R71, a first bidirectional TVS pipe D12, a second bidirectional TVS pipe D13, and a third bidirectional TVS pipe D14;
the first end of the eleventh resistor R71, the first end of the first bidirectional TVS tube D12 and the first end of the second bidirectional TVS tube D13 are all connected to a common connection end between the inverting input output pin B of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, the second end of the first bidirectional TVS tube D12 is grounded, and the second end of the eleventh resistor R71 and the second end of the second bidirectional TVS tube D13 are all connected to a common connection end between the non-inverting input output pin a of the RS485 transceiver chip U8 and the RS485 signal transmission circuit; the first end of the third bidirectional TVS tube D14 is connected to a common connection end between the in-phase input/output pin A of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the third bidirectional TVS tube D14 is grounded.
Optionally, the controller includes a single chip microcomputer having at least one signal input/output interface and at least one set of communication interfaces; wherein each group of communication interfaces comprises a transmitting interface and a receiving interface;
the input end of the optocoupler driving isolation circuit is electrically connected with the singlechip through one of the signal input and output interfaces, and the optocoupler receiving and transmitting isolation circuit is electrically connected with the singlechip through one group of the communication interfaces.
In addition, the invention also provides a communication system which comprises a network power supply end and at least one path of RS485 communication circuit with optical coupling isolation;
and each path of RS485 communication circuit with optical coupling isolation is electrically connected with the network power supply end.
The invention has the beneficial effects that: an optical coupling receiving and transmitting isolation circuit is added between the controller and the RS485 transceiver, so that the electric isolation effect on RS485 receiving and transmitting signals (comprising data signals sent by the controller to the RS485 transceiver and data signals sent by the RS485 transceiver received by the controller) can be achieved; an optical coupler driving isolation circuit is further added between the controller and the RS485 transceiver, so that an electric isolation effect on driving signals sent by the controller to the RS485 transceiver can be achieved; based on the optocoupler receiving and transmitting isolation circuit and the optocoupler driving isolation circuit, the driving control of the RS485 transceiver is carried out through the controller, the RS485 transceiver carries out data interaction with external RS485 equipment through the RS485 signal transmission circuit, bidirectional RS485 serial communication between the controller and the external RS485 equipment is achieved, isolation of RS485 serial communication can be achieved through the optocoupler with low cost, isolation cost is low, and anti-interference performance of the RS485 communication circuit is improved in all directions.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and should not be construed as limiting the invention in any way, in which:
fig. 1 shows a block diagram of an RS485 communication circuit with optocoupler isolation in a first embodiment of the invention;
fig. 2 shows a design diagram of an optocoupler transmitting isolator sub-circuit, an optocoupler receiving isolator sub-circuit, an optocoupler driving isolator circuit, an RS485 transceiver and an RS485 signal transmission circuit in the first embodiment of the present invention;
FIG. 3 is a schematic diagram of a controller according to a first embodiment of the present invention;
fig. 4 shows a block diagram of a communication system according to a second embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
Example 1
As shown in FIG. 1, the RS485 communication circuit with the optical coupling isolation comprises a controller, an optical coupling receiving and transmitting isolation circuit, an optical coupling driving isolation circuit, an RS485 transceiver and an RS485 signal transmission circuit;
the controller is electrically connected with the RS485 transceiver through the optocoupler receiving and transmitting isolation circuit, and is also electrically connected with the RS485 transceiver through the optocoupler driving isolation circuit, and the optocoupler receiving and transmitting isolation circuit, the optocoupler driving isolation circuit and the RS485 transceiver are all electrically connected with an external network power supply end; the RS485 transceiver is also electrically connected with external RS485 equipment through the RS485 signal transmission circuit.
The RS485 communication circuit with the optical coupling isolation of the embodiment is added with the optical coupling receiving and transmitting isolation circuit between the controller and the RS485 transceiver, so that the electrical isolation effect on RS485 receiving and transmitting signals (comprising data signals sent by the controller to the RS485 transceiver and data signals sent by the RS485 transceiver received by the controller) can be achieved; an optical coupler driving isolation circuit is further added between the controller and the RS485 transceiver, so that an electric isolation effect on driving signals sent by the controller to the RS485 transceiver can be achieved; based on the optocoupler receiving and transmitting isolation circuit and the optocoupler driving isolation circuit, the driving control of the RS485 transceiver is carried out through the controller, the RS485 transceiver carries out data interaction with external RS485 equipment through the RS485 signal transmission circuit, bidirectional RS485 serial communication between the controller and the external RS485 equipment is achieved, isolation of RS485 serial communication can be achieved through the optocoupler with low cost, isolation cost is low, and anti-interference performance of the RS485 communication circuit is improved in all directions.
The working principle of the RS485 communication circuit with optical coupling isolation in this embodiment is as follows:
the controller drives the isolation circuit to send an isolated driving signal to the RS485 transceiver through the optical coupler, and the RS485 transceiver starts working according to the isolated driving signal; on one hand, the controller sends an isolated data signal (particularly a TTL level signal) to the RS485 transceiver through the optocoupler receiving and transmitting isolation circuit, the RS485 transceiver decomposes the data signal into two RS485 differential signals, and data transmission is carried out to external equipment through the RS485 signal transmission circuit; on the other hand, the RS485 transceiver receives an RS485 differential signal sent by external equipment through an RS485 signal transmission circuit, the RS485 transceiver converts the RS485 differential signal to obtain a data signal, and the data signal is transmitted to the controller after being isolated by the optical coupling receiving and transmitting isolation circuit, so that bidirectional RS485 communication between the controller and the external equipment is realized.
In addition, in the RS485 communication circuit, the optocoupler receiving and transmitting isolation circuit, the optocoupler driving isolation circuit and the RS485 transceiver are all electrically connected with an external network power supply end, so that the same network power supply end can be shared when the RS485 communication system is provided with multiple paths of the RS485 communication circuits, and a corresponding network power supply end is not required to be arranged in each path of the RS485 communication circuit, and further, on one hand, the network power supply end of the whole communication system can be arranged independently of all the RS485 communication circuits, and standardization and maintenance are facilitated; on the other hand, for a single RS485 communication circuit, only a single power supply is required to supply power to the circuit, so that the hardware cost is further reduced.
It should be noted that, the invention improves the electrical connection relationship between the hardware circuit of the RS485 communication circuit with optical coupling isolation and the hardware circuit to realize the RS485 communication circuit with low isolation cost and strong anti-interference performance, and does not relate to the improvement of computer programs, wherein the related computer programs are all existing computer programs.
Preferably, the optical coupling receiving and transmitting isolation circuit comprises an optical coupling transmitting isolation sub-circuit and an optical coupling receiving isolation sub-circuit;
the input end of the optical coupler transmission isolation sub-circuit is electrically connected with the output end of the controller, the output end of the optical coupler transmission isolation sub-circuit is electrically connected with the input end of the RS485 transceiver, the input end of the optical coupler receiving isolation sub-circuit is electrically connected with the output end of the RS485 transceiver, and the output end of the optical coupler receiving isolation sub-circuit is electrically connected with the input end of the controller; and the optical coupler transmitting isolation sub-circuit and the optical coupler receiving isolation sub-circuit are also respectively and electrically connected with the network power supply end.
Through setting up opto-coupler transmission isolation subcircuit and opto-coupler reception isolation subcircuit respectively, can realize the two-way isolation of communication signal between controller and the outside RS485 equipment, effectively promote the interference immunity of whole RS485 communication circuit.
Specifically, the network power supply terminal in this embodiment is specifically a 5V network power supply terminal. Of course, the network power supply end can also be a power supply end with other specifications, and depends on specific power supply requirements of the optocoupler receiving and transmitting isolation circuit, the optocoupler driving isolation circuit and the RS485 transceiver in the RS485 communication circuit.
Preferably, as shown in fig. 2, the optocoupler transmission isolation subcircuit includes a first optocoupler Q2, a first resistor R37, a second resistor R38, and a third resistor R39;
the positive electrode pin of the emitting tube of the first optocoupler Q1 is electrically connected with the power supply end of the 3.3V internal circuit through the second resistor R38, the negative electrode pin of the emitting tube of the first optocoupler Q2 is electrically connected with the output end of the controller, and the 2 empty pins of the first optocoupler Q2 are suspended;
the power supply pin and the enabling pin of the first optocoupler Q2 are electrically connected with the 5V network power supply end, and the output pin of the first optocoupler Q2 is electrically connected with the input end of the RS485 transceiver through the third resistor R39; the first end of the first resistor R37 is connected to a common connection end between the power supply pin of the first optocoupler Q2 and the 5V network power supply end, and the second end of the first resistor R37 is connected to a common connection end between the output pin of the first optocoupler Q2 and the third resistor R39; the grounding pin of the first optocoupler Q2 is grounded.
Preferably, as shown in fig. 2, the optocoupler receiving isolation sub-circuit includes a second optocoupler Q1, a fourth resistor R33, and a fifth resistor R34;
the positive electrode pin of the emitting tube of the second optocoupler Q1 is electrically connected with the 5V network power supply end through the fifth resistor R34, the negative electrode pin of the emitting tube of the second optocoupler Q1 is electrically connected with the output end of the RS485 transceiver, and the 2 empty pins of the second optocoupler Q1 are suspended;
the power supply pin and the enabling pin of the second optocoupler Q1 are electrically connected with the power supply end of the 3.3V internal circuit, the output pin of the second optocoupler Q1 is electrically connected with the input end of the controller, the first end of the fourth resistor R33 is connected to the common connection end between the power supply pin of the second optocoupler Q1 and the power supply end of the 3.3V internal circuit, and the second end of the fourth resistor R33 is connected to the common connection end between the output pin of the second optocoupler Q1 and the input end of the controller; the grounding pin of the second optocoupler Q1 is grounded.
The optical coupler transmission isolation sub-circuit and the optical coupler reception isolation sub-circuit have similar structures, the optical coupler transmission isolation sub-circuit is used for isolating data signals transmitted to the RS485 transceiver by the controller, and the optical coupler reception isolation sub-circuit is used for isolating level signals transmitted to the controller by the RS485 transceiver after conversion, so that bidirectional isolation of RS485 communication signals is realized.
Specifically, in this embodiment, the first optocoupler Q2 and the second optocoupler Q1 are high-speed optocouplers of model 6N137S, and resistors and capacitors in the optocoupler transmitting isolation sub-circuit and the optocoupler receiving isolation sub-circuit are selected to be of appropriate models according to actual situations, which are not listed here.
Of course, the 3.3V internal power supply terminal and the 5V network power supply terminal of the present embodiment may be other power supply terminals according to specific power supply conditions of the first optocoupler Q2 and the second optocoupler Q1.
For the RS485 communication system, when the system comprises multiple paths of RS485 communication circuits, the power supply end of the internal circuit in each path of RS485 communication circuit can be a 3.3V power supply end or other specifications of power supply ends, so that the power supply potentials of different RS485 communication circuits in the RS485 communication system can be the same or different.
Preferably, as shown in fig. 2, the optocoupler driving isolation circuit includes a third optocoupler Q5 and a sixth resistor R35;
the positive electrode pin of the transmitting tube of the third optocoupler Q5 is electrically connected with the power supply end of the 3.3V internal circuit through the sixth resistor R35, the negative electrode pin of the transmitting tube of the third optocoupler Q5 is electrically connected with the output end of the controller, the collector electrode pin of the receiving tube of the third optocoupler Q5 is electrically connected with the power supply end of the 5V network, and the emitter electrode pin of the receiving tube of the third optocoupler Q5 is electrically connected with the input end of the RS485 transceiver.
Through the optocoupler driving isolation circuit with the structure, the effective electric isolation of the driving level signal sent by the controller to the RS485 transceiver can be realized by the optocoupler with a simple circuit structure and low cost.
Specifically, in this embodiment, the third optocoupler Q5 is an optocoupler of the GX817C-S model, which has the advantages of fast transmission speed, high precision, low power consumption and good isolation performance, and can perform a good isolation function on the driving signal. The resistor in the optocoupler driving isolation circuit can be selected to be of a proper specification or model according to practical situations, and the specification or model is not listed here.
In a specific circuit design, since the collector pin of the receiving tube of the third optocoupler Q5 needs to be connected to the 5V network power supply end, and the positive pin of the transmitting tube of the second optocoupler Q1 in the optocoupler receiving isolation sub-circuit also needs to be connected to the 5V network power supply end through the fifth resistor R34, and the 5V network power supply end to which the collector pin of the receiving tube of the third optocoupler Q5 needs to be connected is the same network power supply end, the collector pin of the receiving tube of the third optocoupler Q5 can be connected between the fifth resistor R34 and the 5V network power supply end, so that the circuit wiring design is simplified under the condition that the optocoupler driving isolation circuit and the optocoupler receiving isolation sub-circuit share the same network power supply end. Of course, the power supply pin VCC and the enable pin (which are pins in the first optocoupler Q2 and need to be connected with the 5V network power supply end) of the first optocoupler Q2 in the optocoupler transmission isolation subcircuit may also be connected with the collector pin of the receiving tube of the third optocoupler Q5, so as to further simplify the circuit wiring design.
Preferably, as shown in fig. 2, the RS485 transceiver includes an RS485 transceiver chip U8, a seventh resistor R70, an eighth resistor R74, a ninth resistor R73, and a first capacitor C43;
the power pin VCC of the RS485 transceiver chip U8 is electrically connected with the 5V network power supply end, the first end of the first capacitor C43 is connected to a common connection end between the power pin VCC of the RS485 transceiver chip U8 and the 5V network power supply end, and the second end of the second capacitor C43 is grounded; the grounding pin GND of the RS485 transceiver chip U8 is grounded; the receiver output pin RO of the RS485 transceiver chip U8 is electrically connected with the input end of the optocoupler transceiver isolation circuit, the first end of the seventh resistor R70 is connected to the public connection end between the power supply pin VCC of the RS485 transceiver chip U8 and the 5V network power supply end, and the second end of the seventh resistor R70 is connected to the public connection end between the receiver output pin RO of the RS485 transceiver chip U8 and the input end of the optocoupler transceiver isolation circuit; the driver input pin DI of the RS485 transceiver chip U8 is electrically connected with the output end of the optocoupler transceiver isolation circuit; the receiver output enable control pin of the RS485 transceiver chip U8The driver output enable control pin DE is electrically connected with the output end of the optocoupler drive isolation circuit, the first end of the eighth resistor R74 is the receiver output enable control pin of the RS485 transceiver chip U8The second end of the eighth resistor R74 is grounded on a common connection end between the eighth resistor R74 and the output end of the optocoupler driving isolation circuit; the in-phase input and output pin A and the anti-phase input and output pin B of the RS485 transceiver chip U8 are electrically connected with the RS485 signal transmission circuit, and the in-phase input and output pin A of the RS485 transceiver chip U8 is electrically connected with the 5V network power supply end through the ninth resistor R73.
The RS485 transceiver with the structure is connected to the network power supply end by using the VCC pin of the RS485 transceiver chip U8, so that unified power supply of the communication circuit is realized; RS485 transceiver chip U8The pins and the DE pins are connected with driving signals output by the controller through the optocoupler isolation driving circuit, when the driving signals are at a low level, the output of the receiver is enabled and the output of the driver is disabled, so that the RO pin is output effectively, the DI pin is in a high-resistance state, namely RS485 serial receiving is carried out, and a data signal formed by converting differential signals sent by external RS485 equipment through an RS485 transceiver is sent to the controller; when the driving signal is at a low level, the output of the receiver is forbidden and the output of the driver is enabled, so that the RO pin is in a high-resistance state, the input of the DI pin is effective, namely RS485 serial transmission is carried out, and a data signal sent by the controller is converted into a differential signal through an RS485 transceiver and is sent to external RS485 equipment; namely, the bidirectional RS485 serial communication is realized.
Specifically, in this embodiment, the RS485 transceiver chip U8 is an RS485 transceiver chip of the type SIT3088EESA, which has the advantages of fast transmission speed, high reliability, low power consumption, easy integration, and the like, and can better realize bidirectional RS485 communication between the controller and external RS485 devices. The capacitance and the resistance in the RS485 transceiver can be selected to be of a proper specification or model according to practical situations, and are not listed here.
Preferably, as shown in fig. 2, the RS485 signal transmission circuit includes a tenth resistor R72, a second capacitor C44, and a third capacitor C45;
the first end of the tenth resistor R72 and the first end of the second capacitor C44 are both connected to a common connection end between the inverting input output pin B of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the tenth resistor R72 and the second end of the second capacitor C44 are both grounded; the first end of the third capacitor C45 is connected to a common connection end between the in-phase input/output pin A of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the third capacitor C45 is grounded.
In the RS485 signal transmission circuit with the structure, based on the tenth resistor R72 and the two capacitors, not only can the electric isolation be realized between the RS485 transceiver and external RS485 equipment, but also the anti-interference performance of the whole RS485 communication circuit is further improved; the filter has the function of signal filtering, and high-frequency noise and interference signals are removed; therefore, the stability and the reliability of the whole RS485 communication circuit can be effectively improved through the RS485 signal transmission circuit with the structure.
Preferably, as shown in fig. 2, the RS485 signal transmission circuit further includes an eleventh resistor R71, a first bidirectional TVS pipe D12, a second bidirectional TVS pipe D13, and a third bidirectional TVS pipe D14;
the first end of the eleventh resistor R71, the first end of the first bidirectional TVS tube D12 and the first end of the second bidirectional TVS tube D13 are all connected to a common connection end between the inverting input output pin B of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, the second end of the first bidirectional TVS tube D12 is grounded, and the second end of the eleventh resistor R71 and the second end of the second bidirectional TVS tube D13 are all connected to a common connection end between the non-inverting input output pin a of the RS485 transceiver chip U8 and the RS485 signal transmission circuit; the first end of the third bidirectional TVS tube D14 is connected to a common connection end between the in-phase input/output pin A of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the third bidirectional TVS tube D14 is grounded.
The eleventh resistor R71, the first bidirectional TVS tube D12, the second bidirectional TVS tube D13 and the third bidirectional TVS tube D14 are added in the RS485 signal transmission circuit, so that the filtering function can be further achieved in the bidirectional RS485 communication, the protection circuit can be achieved, the damage of the whole communication circuit and external RS485 equipment caused by abnormal conditions such as overvoltage and overcurrent can be prevented, and the safety of RS485 communication is improved.
Specifically, in this embodiment, TVS tubes of model SMCJ6.5CA are selected for all the three bidirectional TVS tubes, and other resistors and capacitors are selected to be of appropriate models or specifications according to actual situations, which are not listed here.
Specifically, as shown in fig. 2, the external RS485 device is connected with ports (including an RS485-B port and an RS485-a port) of two differential transmission signal lines led out from the RS485 signal transmission circuit, and differential signals of the two ports are respectively output by an inverting input output pin B and an in-phase input output pin a of the RS485 transceiver through balanced twisted pairs; in general, the RS485 transceiver will first decompose the data signal received by the controller into differential signals corresponding to two symmetric positive and negative lines (i.e. A, B signal lines) before transmitting the data signal, and then subtract the differential signals to restore the original signal after the differential signals reach the receiving end. And otherwise, the receiving end respectively transmits 2 differential signals through A, B signal lines, and the RS485 transceiver synthesizes the data signals and then transmits the synthesized data signals to the controller.
Preferably, the controller comprises a single chip microcomputer with at least one signal input/output interface and at least one group of communication interfaces; wherein each group of communication interfaces comprises a transmitting interface and a receiving interface;
the input end of the optocoupler driving isolation circuit is electrically connected with the singlechip through one of the signal input and output interfaces, and the optocoupler receiving and transmitting isolation circuit is electrically connected with the singlechip through one group of the communication interfaces.
The optocoupler driving isolation circuit is connected with the singlechip through a signal input/output interface, so that the driving level signal is conveniently received; the optical coupling receiving and transmitting isolation circuit is connected with the singlechip through a group of communication interfaces, so that the two-way transmission of RS485 signals is facilitated, and the two-way RS485 communication is realized.
Specifically, as shown in fig. 3, the single chip microcomputer in this embodiment is an MCU, which is provided with 1 signal input/output interface I/O1 and a group of communication interfaces (including TX interface and RX interface), where the signal input/output interface I/O1 is connected to a negative pin (i.e., an RE/DE port) of a transmitting tube of the third optocoupler Q5 in the optocoupler driving isolation circuit in fig. 2, the TX interface is connected to a negative pin (i.e., a TX/DI port) of a transmitting tube of the first optocoupler Q2 in the optocoupler transmitting isolation sub-circuit in fig. 2, and the RX interface is connected to an output pin (i.e., an RX/RO port) of the second optocoupler Q1 in the optocoupler receiving isolation sub-circuit in fig. 2. The singlechip can select a proper model according to actual conditions, and the singlechip is not limited.
Example two
As shown in fig. 4, a communication system includes a network power supply end and at least one RS485 communication circuit with optical coupling isolation in the first embodiment;
and each path of RS485 communication circuit with optical coupling isolation is electrically connected with the network power supply end.
The communication system of the embodiment is based on the RS485 communication circuit with optical coupling isolation in the first embodiment, can realize the bidirectional RS485 serial communication of a plurality of external RS485 devices, and has excellent isolation performance, low isolation cost and strong anti-interference performance; meanwhile, the whole system can have different power supply potentials, and has strong compatibility; each path of RS485 communication circuit can share the same network power supply end, and the network power supply end can be arranged independently of all the RS485 communication circuits, so that standardization and maintenance are facilitated; the internal power supply in each path of RS485 communication circuit can be realized only by setting a single power supply, and the hardware cost is low.
The RS485 communication circuit with optocoupler isolation in this embodiment has the same structure as the RS485 communication circuit with optocoupler isolation in the first embodiment, so details of this embodiment are not described in detail in the first embodiment and fig. 1 to 3, and are not described here again.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.

Claims (10)

1. The RS485 communication circuit with the optical coupling isolation is characterized by comprising a controller, an optical coupling receiving and transmitting isolation circuit, an optical coupling driving isolation circuit, an RS485 transceiver and an RS485 signal transmission circuit;
the controller is electrically connected with the RS485 transceiver through the optocoupler receiving and transmitting isolation circuit, and is also electrically connected with the RS485 transceiver through the optocoupler driving isolation circuit, and the optocoupler receiving and transmitting isolation circuit, the optocoupler driving isolation circuit and the RS485 transceiver are all electrically connected with an external network power supply end; the RS485 transceiver is also electrically connected with external RS485 equipment through the RS485 signal transmission circuit.
2. The RS485 communication circuit with optocoupler isolation according to claim 1, wherein the optocoupler transceiver isolation circuit comprises an optocoupler transmit isolator sub-circuit and an optocoupler receive isolator sub-circuit;
the input end of the optical coupler transmission isolation sub-circuit is electrically connected with the output end of the controller, the output end of the optical coupler transmission isolation sub-circuit is electrically connected with the input end of the RS485 transceiver, the input end of the optical coupler receiving isolation sub-circuit is electrically connected with the output end of the RS485 transceiver, and the output end of the optical coupler receiving isolation sub-circuit is electrically connected with the input end of the controller; and the optical coupler transmitting isolation sub-circuit and the optical coupler receiving isolation sub-circuit are also respectively and electrically connected with the network power supply end.
3. The RS485 communication circuit with optocoupler isolation according to claim 2, wherein the network power supply terminal is specifically a 5V network power supply terminal;
the optocoupler transmission isolation subcircuit comprises a first optocoupler Q2, a first resistor R37, a second resistor R38 and a third resistor R39;
the positive electrode pin of the emitting tube of the first optocoupler Q1 is electrically connected with the power supply end of the 3.3V internal circuit through the second resistor R38, the negative electrode pin of the emitting tube of the first optocoupler Q2 is electrically connected with the output end of the controller, and the 2 empty pins of the first optocoupler Q2 are suspended;
the power supply pin and the enabling pin of the first optocoupler Q2 are electrically connected with the 5V network power supply end, and the output pin of the first optocoupler Q2 is electrically connected with the input end of the RS485 transceiver through the third resistor R39; the first end of the first resistor R37 is connected to a common connection end between the power supply pin of the first optocoupler Q2 and the 5V network power supply end, and the second end of the first resistor R37 is connected to a common connection end between the output pin of the first optocoupler Q2 and the third resistor R39; the grounding pin of the first optocoupler Q2 is grounded.
4. The RS485 communication circuit with optocoupler isolation according to claim 2, wherein the network power supply terminal is specifically a 5V network power supply terminal;
the optocoupler receiving isolation subcircuit comprises a second optocoupler Q1, a fourth resistor R33 and a fifth resistor R34;
the positive electrode pin of the emitting tube of the second optocoupler Q1 is electrically connected with the 5V network power supply end through the fifth resistor R34, the negative electrode pin of the emitting tube of the second optocoupler Q1 is electrically connected with the output end of the RS485 transceiver, and the 2 empty pins of the second optocoupler Q1 are suspended;
the power supply pin and the enabling pin of the second optocoupler Q1 are electrically connected with the power supply end of the 3.3V internal circuit, the output pin of the second optocoupler Q1 is electrically connected with the input end of the controller, the first end of the fourth resistor R33 is connected to the common connection end between the power supply pin of the second optocoupler Q1 and the power supply end of the 3.3V internal circuit, and the second end of the fourth resistor R33 is connected to the common connection end between the output pin of the second optocoupler Q1 and the input end of the controller; the grounding pin of the second optocoupler Q1 is grounded.
5. The RS485 communication circuit with optocoupler isolation according to claim 1, wherein the network power supply terminal is specifically a 5V network power supply terminal;
the optocoupler driving isolation circuit comprises a third optocoupler Q5 and a sixth resistor R35;
the positive electrode pin of the transmitting tube of the third optocoupler Q5 is electrically connected with the power supply end of the 3.3V internal circuit through the sixth resistor R35, the negative electrode pin of the transmitting tube of the third optocoupler Q5 is electrically connected with the output end of the controller, the collector electrode pin of the receiving tube of the third optocoupler Q5 is electrically connected with the power supply end of the 5V network, and the emitter electrode pin of the receiving tube of the third optocoupler Q5 is electrically connected with the input end of the RS485 transceiver.
6. The RS485 communication circuit with optocoupler isolation according to claim 1, wherein the network power supply terminal is specifically a 5V network power supply terminal;
the RS485 transceiver comprises an RS485 transceiver chip U8, a seventh resistor R70, an eighth resistor R74, a ninth resistor R73 and a first capacitor C43;
the power pin VCC of the RS485 transceiver chip U8 is electrically connected with the 5V network power supply end, the first end of the first capacitor C43 is connected to a common connection end between the power pin VCC of the RS485 transceiver chip U8 and the 5V network power supply end, and the second end of the second capacitor C43 is grounded; the grounding pin GND of the RS485 transceiver chip U8 is grounded; the receiver output pin RO of the RS485 transceiver chip U8 is electrically connected with the input end of the optocoupler transceiver isolation circuit, the first end of the seventh resistor R70 is connected to the public connection end between the power supply pin VCC of the RS485 transceiver chip U8 and the 5V network power supply end, and the second end of the seventh resistor R70 is connected to the public connection end between the receiver output pin RO of the RS485 transceiver chip U8 and the input end of the optocoupler transceiver isolation circuit; the driver input pin DI of the RS485 transceiver chip U8 is electrically connected with the output end of the optocoupler transceiver isolation circuit; the receiver output enable control pin of the RS485 transceiver chip U8The driver output enable control pin DE is electrically connected with the output end of the optocoupler drive isolation circuit, the first end of the eighth resistor R74 is the receiver output enable control pin of the RS485 transceiver chip U8The second end of the eighth resistor R74 is grounded on a common connection end between the eighth resistor R74 and the output end of the optocoupler driving isolation circuit; the in-phase input and output pin A and the anti-phase input and output pin B of the RS485 transceiver chip U8 are electrically connected with the RS485 signal transmission circuit, and the in-phase input and output pin A of the RS485 transceiver chip U8 is electrically connected with the 5V network power supply end through the ninth resistor R73.
7. The RS485 communication circuit with optocoupler isolation according to claim 6, wherein the RS485 signal transmission circuit comprises a tenth resistor R72, a second capacitor C44 and a third capacitor C45;
the first end of the tenth resistor R72 and the first end of the second capacitor C44 are both connected to a common connection end between the inverting input output pin B of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the tenth resistor R72 and the second end of the second capacitor C44 are both grounded; the first end of the third capacitor C45 is connected to a common connection end between the in-phase input/output pin A of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the third capacitor C45 is grounded.
8. The RS485 communication circuit with optocoupler isolation according to claim 7, wherein the RS485 signal transmission circuit further comprises an eleventh resistor R71, a first bi-directional TVS tube D12, a second bi-directional TVS tube D13 and a third bi-directional TVS tube D14;
the first end of the eleventh resistor R71, the first end of the first bidirectional TVS tube D12 and the first end of the second bidirectional TVS tube D13 are all connected to a common connection end between the inverting input output pin B of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, the second end of the first bidirectional TVS tube D12 is grounded, and the second end of the eleventh resistor R71 and the second end of the second bidirectional TVS tube D13 are all connected to a common connection end between the non-inverting input output pin a of the RS485 transceiver chip U8 and the RS485 signal transmission circuit; the first end of the third bidirectional TVS tube D14 is connected to a common connection end between the in-phase input/output pin A of the RS485 transceiver chip U8 and the RS485 signal transmission circuit, and the second end of the third bidirectional TVS tube D14 is grounded.
9. The RS485 communication circuit with optocoupler isolation according to any of claims 1 to 8, wherein the controller comprises a single chip microcomputer with at least one signal input output interface and at least one set of communication interfaces; wherein each group of communication interfaces comprises a transmitting interface and a receiving interface;
the input end of the optocoupler driving isolation circuit is electrically connected with the singlechip through one of the signal input and output interfaces, and the optocoupler receiving and transmitting isolation circuit is electrically connected with the singlechip through one group of the communication interfaces.
10. A communication system, comprising a network power supply end and at least one RS485 communication circuit with optical coupling isolation according to any one of claims 1 to 9;
and each path of RS485 communication circuit with optical coupling isolation is electrically connected with the network power supply end.
CN202311154995.2A 2023-09-08 2023-09-08 RS485 communication circuit with optical coupling isolation and communication system Pending CN117240649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311154995.2A CN117240649A (en) 2023-09-08 2023-09-08 RS485 communication circuit with optical coupling isolation and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311154995.2A CN117240649A (en) 2023-09-08 2023-09-08 RS485 communication circuit with optical coupling isolation and communication system

Publications (1)

Publication Number Publication Date
CN117240649A true CN117240649A (en) 2023-12-15

Family

ID=89087197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311154995.2A Pending CN117240649A (en) 2023-09-08 2023-09-08 RS485 communication circuit with optical coupling isolation and communication system

Country Status (1)

Country Link
CN (1) CN117240649A (en)

Similar Documents

Publication Publication Date Title
CN111858425B (en) USB-optical fiber conversion device and USB communication equipment
CN1731788B (en) Communication equipment interface and interface converter using the interface
CN105515927A (en) Remote serial port communication system and method based on Ethernet Cat.5 wiring framework
CN101470151A (en) CAN bus isolation circuit
CN102055634A (en) CAN node interconnection device based on optical fibers
CN110855316B (en) RS485 automatic receiving and transmitting isolation circuit
CN203847102U (en) CAN bus and 485 bus node circuit
CN210867765U (en) Remote control network switch
CN117240649A (en) RS485 communication circuit with optical coupling isolation and communication system
CN105812216B (en) PBUS transformerless EtherCAT communication circuit and application method
CN220935198U (en) CAN communication circuit and CAN communication system with optical coupling isolation
CN103489302B (en) A kind of signals collecting terminal and chamber data acquisition system (DAS)
CN213957869U (en) Internet gateway circuit
CN203301498U (en) Redundant communication circuit based on RS485 serial interface
CN204440391U (en) A kind of full isolated form RS485 bus transceiver
CN207283578U (en) CAN node ports protect circuit
CN117278350A (en) CAN communication circuit and CAN communication system with optical coupling isolation
CN103179012A (en) FlexRay network node adopting iCoupler magnetic isolation protecting measures
CN203490827U (en) Signal acquisition terminal and test box data acquisition system
CN202904869U (en) RS485 bus interface with relay function
CN207529181U (en) A kind of RS485 telecommunication circuits
CN206149237U (en) Multichannel differential signal changes TTL level signal's conversion and protection system
CN200996972Y (en) Multi-charge ratio and single-phase active electric-energy meter
CN201569170U (en) Communication system of gas water heater with function of stagger joint and remedy
CN217404398U (en) 485 communication circuit capable of reducing occupation of chip port

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination