CN210402335U - RS485 and RS232 multiplexing serial port communication circuit with isolation - Google Patents

RS485 and RS232 multiplexing serial port communication circuit with isolation Download PDF

Info

Publication number
CN210402335U
CN210402335U CN201921226165.5U CN201921226165U CN210402335U CN 210402335 U CN210402335 U CN 210402335U CN 201921226165 U CN201921226165 U CN 201921226165U CN 210402335 U CN210402335 U CN 210402335U
Authority
CN
China
Prior art keywords
resistor
unit
pin
triode
diode
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.)
Active
Application number
CN201921226165.5U
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.)
Xi'an Tonghairuineng Electronic Technology Co ltd
Original Assignee
Xi'an Tonghairuineng Electronic 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 Xi'an Tonghairuineng Electronic Technology Co ltd filed Critical Xi'an Tonghairuineng Electronic Technology Co ltd
Priority to CN201921226165.5U priority Critical patent/CN210402335U/en
Application granted granted Critical
Publication of CN210402335U publication Critical patent/CN210402335U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electronic Switches (AREA)

Abstract

The utility model particularly relates to a RS485 and the multiplexing serial ports communication circuit of RS232 of area isolation mainly solves the problem that current RS485 and RS232 multiplexing circuit cost is higher, the resource occupation flexibility ratio is not high, development cycle length. The RS485 and RS232 multiplexing serial port communication circuit with the isolation comprises an isolation unit, an RS232 unit, an RS485 unit, a signal switching unit and a communication port; the TX and RX signals of a UART unit of the CPU are isolated by an isolation unit to obtain TXO and RXI; the RS232 unit and the RS485 unit share TXO and RXI signals, the signals passing through the RS232 unit and the RS485 unit are input into the signal switching unit, and the signal switching unit is configured to output RS232 signals or RS485 signals to the communication port.

Description

RS485 and RS232 multiplexing serial port communication circuit with isolation
Technical Field
The utility model relates to a serial ports communication circuit, concretely relates to RS485 and the multiplexing serial ports communication circuit of RS232 that area was kept apart.
Background
RS485 and RS232 are common serial communication interface standards, and are widely used. The RS232 communication distance is short, and full duplex one-to-one communication is supported; RS485 has long communication distance and supports half-duplex one-to-many or many-to-many communication. The serial communication interface applied to the FSU of the moving-ring monitoring host is relatively wide, most of equipment in a machine room mainly supports RS485 communication, and occasionally, individual equipment supports RS232 communication, so that RS232 and RS485 need to be considered simultaneously for the serial communication interface of the moving-ring monitoring host. However, the number of serial ports on the master control device is limited, and RS485 and RS232 multiplexing needs to be considered. The above problems are currently solved by the following methods: firstly, the traditional common optical coupler is used for direct isolation, but the common optical coupler directly isolates the communication baud rate of 9600bps, and can not be adjusted to a higher baud rate; secondly, magnetic isolation or high-speed optocouplers are used, but the cost is higher in the mode; thirdly, RS232 and RS485 use independent serial ports, but the resource occupation flexibility is not high in the method; and fourthly, a special isolation transceiving module is used, and an optical coupler solid-state relay is used for switching a communication mode to realize multiplexing, but the mode has high cost, large software workload and long development period.
SUMMERY OF THE UTILITY MODEL
The utility model aims at solving the problems that the cost of the existing RS485 and RS232 multiplexing circuits is higher, the resource occupation flexibility ratio is not high, and the development cycle is long, providing a RS485 and RS232 multiplexing serial communication circuit with isolation, which is a low-cost and reliable isolation communication technology.
In order to achieve the above object, the utility model discloses a following technical scheme realizes:
an RS485 and RS232 multiplexing serial port communication circuit with isolation comprises an isolation unit, an RS232 unit, an RS485 unit, a signal switching unit and a communication port; the TX and RX signals of a UART unit of the CPU are isolated by an isolation unit to obtain TXO and RXI; the RS232 unit and the RS485 unit share TXO and RXI signals, the signals passing through the RS232 unit and the RS485 unit are input into the signal switching unit, and the signal switching unit is configured to output RS232 signals or RS485 signals to the communication port.
Further, the isolation unit comprises a TX signal isolation module and an RX signal isolation module; the TX signal isolation module comprises an optocoupler U1, a resistor R2, a resistor R8, a triode Q1, a capacitor C4, a resistor R5 and a resistor R1; the positive electrode of the input end of the optocoupler U1 is connected with a voltage VCC through a resistor R2, the negative electrode of the input end is connected with a UART unit of a CPU, the collector of the output end is connected with a voltage VDD, the emitter of the output end is connected with the base electrode of a triode Q1 through a resistor R5, the collector of the triode Q1 is respectively connected with the sending input end of an RS232 unit and the sending input end of an RS485 unit, the emitter of the triode Q is grounded, one end of the resistor R8 is connected with the emitter of the output end of the optocoupler U1, and; the capacitor C4 is connected in parallel at two ends of the resistor R5, one end of the resistor R1 is connected with the collector of the triode Q1, and the other end is connected with the voltage VDD; the RX signal isolation module comprises an optocoupler U3, a resistor R13, a resistor R19, a triode Q3, a capacitor C7, a resistor R16 and a resistor R11; the positive electrode of the input end of the optocoupler U3 is connected with a voltage VDD through a resistor R13, the negative electrode of the input end is respectively connected with the receiving output end of the RS232 unit and the receiving output end of the RS485 unit, the collector of the output end is connected with a voltage VCC, the emitter of the output end is connected with the base electrode of a triode Q3 through a resistor R16, the collector of the triode Q3 is connected with a UART unit of a CPU, the emitter of the triode Q3 is grounded, one end of the resistor R19 is connected with the emitter of the output end of the optocoupler U3; the capacitor C7 is connected in parallel at two ends of the resistor R16, one end of the resistor R11 is connected with the collector of the triode Q3, and the other end of the resistor R11 is connected with the voltage VCC.
Further, the TX signal isolation module further includes a resistor R6, wherein one end of the resistor R6 is connected to the emitter of the transistor Q1, and the other end is connected to the collector of the transistor Q1.
Furthermore, the RX signal isolation module further includes a resistor R17, wherein one end of the resistor R17 is connected to the emitter of the transistor Q3, and the other end is connected to the collector of the transistor Q3.
Further, the TX signal isolation module further includes a first communication indication circuit, where the first communication indication circuit includes a resistor R9, a transistor Q2, a diode LED1 and a resistor R3, one end of the resistor R9 is connected to the base of the transistor Q1, the other end of the resistor R9 is connected to the base of the transistor Q2, the emitter of the transistor Q2 is grounded, and the collector of the resistor R3 is connected to the voltage VDD through the diode LED 1.
Further, the RX signal isolation module further includes a second communication indication circuit, the second communication indication circuit includes a resistor R20, a transistor Q4, a diode LED2 and a resistor R14, one end of the resistor R20 is connected to the base of the transistor Q3, the other end is connected to the base of the transistor Q4, the emitter of the transistor Q4 is grounded, and the collector is connected to the voltage VCC through the diode LED2 and the resistor R14.
Further, a diode D3 is connected between the negative electrode of the input end of the optocoupler U3 and the receiving output end of the RS232 unit in series, and a diode D5 is connected between the negative electrode of the input end of the optocoupler U3 and the receiving output end of the RS485 unit in series.
Further, the signal switching unit includes pin header JP1 and pin header JP2, and the communication port includes JP 3; the 1 st pin of the pin bank JP1 is connected with the differential signal A end of the RS485 unit, the 2 nd pin is connected with the 1 st pin of JP3, the 3 rd pin is connected with the transmitting output end of the RS232 unit, the 1 st pin of the pin bank JP2 is connected with the differential signal B end of the RS485 unit, the 2 nd pin is connected with the 2 nd pin of JP3, the 3 rd pin is connected with the receiving input end of the RS232 unit, a tripolar gas discharge tube G1 is connected between the 1 st pin and the 2 nd pin of the communication port JP3 in parallel, the gas discharge tube G1 is commonly connected with the chassis ground, the 3 rd pin of the communication port JP3 is connected with the chassis ground through the gas discharge tube G2, and a capacitor C9 is connected between the chassis ground and the signal ground.
Further, the protection circuit comprises a first protection circuit, wherein the first protection circuit comprises a diode D1, a diode D2, a resistor R4, a resistor R7 and a resistor R10; one end of the diode D1 is connected with the transmitting output end of the RS232 unit, the other end of the diode D2 is connected with the receiving input end of the RS232 unit, the other end of the diode D2 is connected with the ground, one end of the resistor R4 is connected with the transmitting output end of the RS232 unit, the other end of the resistor R4 is connected with the 3 rd pin of the pin header JP1, one end of the resistor R7 is connected with the receiving input end of the RS232 unit, the other end of the resistor R10 is connected with the 3 rd pin of the pin header JP2, and the other end of the resistor R10 is connected with the ground and the 3 rd.
Further, a second protection circuit is also included, the second protection circuit including a diode D6, a diode D7, a diode D4, a resistor R15, and a resistor R21; one end of the diode D6 is connected with the differential signal B end of the RS485 unit, the other end of the diode D4 is grounded, one end of the diode D7 is connected with the differential signal A end of the RS485 unit, the other end of the diode D7 is grounded, one end of the resistor R15 is connected with the differential signal B end of the RS485 unit, the other end of the resistor R15 is connected with the 1 st pin of the pin bank JP2, one end of the resistor R21 is connected with the differential signal A end of the RS485 unit, and the other end of the resistor R21 is connected with the 1 st pin of the pin bank JP 1.
Compared with the prior art, the beneficial effects of the utility model are that:
1. the utility model has simple circuit and no complex software control and hardware logic, thus having low cost and good reliability; the communication baud rate 9600bps is kept apart in connecing of ordinary opto-coupler, the utility model discloses circuit communication baud rate can reach 115200bps, therefore it can realize the high-speed rate communication.
2. The utility model discloses the RS485 of area isolation and the multiplexing serial communication circuit of RS 232's flexibility ratio are higher, and it is convenient to switch, can select the communication type to be RS485 or RS232 according to actual need, and the in-process only needs two short circuits of manual switching to emit the position can.
3. The utility model discloses the RS485 of area isolation and the multiplexing serial communication circuit of RS232 can manually switch, and the cost is reduced and development cycle has been shortened, does not need customization control software alone, and the range of application is extensive.
Drawings
Fig. 1 is a schematic diagram of a serial communication circuit with isolated RS485 and RS232 multiplexing according to the present invention;
fig. 2 is a circuit diagram of the TX signal isolation module of the present invention;
fig. 3 is a circuit diagram of the TX signal isolation module of the present invention;
fig. 4 is a circuit diagram of the RS232 unit of the present invention;
fig. 5 is a circuit diagram of the RS485 unit of the present invention;
fig. 6 is a circuit diagram of the automatic transceiving control module of the R485 unit of the present invention;
fig. 7 is a circuit diagram of the signal switching unit and the communication port of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following drawings and specific embodiments.
At present, communication interfaces of most sensors and intelligent equipment adopt RS485 interfaces, and RS232 communication is adopted for communication of a high-power supply occasionally in the installation process of the moving ring monitoring host. The RS232 interface special for the dynamic ring host reservation is mostly not used, and one serial port resource is also occupied. Therefore, the utility model provides a RS485 and the multiplexing serial ports communication circuit of RS232 of area isolation, this circuit use ordinary opto-coupler to realize the high rate communication, and it is with low costs, the good reliability, and the mode flexibility ratio of the multiplexing communication of RS232 and RS485 is high, uses extensively.
As shown in fig. 1, the serial communication circuit with isolated RS485 and RS232 multiplexing of the present invention comprises an isolation unit, an RS232 unit, an RS485 unit, a signal switching unit and a communication port; the TX and RX signals of a UART unit of the CPU are isolated by an isolation unit to obtain TXO and RXI; the RS232 unit and the RS485 unit share TXO and RXI signals, the signals are input into the signal switching unit through the RS232 unit and the RS485 unit, and the signal switching unit can manually configure and output RS232 signals or RS485 signals to the communication port according to actual needs. The voltage of the main board of the moving loop monitoring host is VCC5V and VCC3V3, and the system ground is GND; the isolation voltage of the serial communication module is VDD5V, and the isolation is UGND. The UART module of the mainboard CPU sends a signal TX and receives a signal RX. The isolation unit may specifically comprise a TX signal isolation module and an RX signal isolation module.
As shown in fig. 2, the TX signal isolation module includes an optocoupler U1, a resistor R2, a resistor R8, a transistor Q1, a capacitor C4, a resistor R5, and a resistor R1; the positive electrode of the input end of the optocoupler U1 is connected with a voltage VCC through a resistor R2, the negative electrode of the input end is connected with a UART unit of a CPU, the collector of the output end is connected with a voltage VDD, the emitter of the output end is connected with the base electrode of a triode Q1 through a resistor R5, the collector of the triode Q1 is respectively connected with the transmitting input end of an RS232 unit and the transmitting input end of an RS485 unit, the emitter of the triode is grounded, one end of a resistor R8 is connected with the emitter of the output end of the optocoupler U1; the capacitor C4 is connected in parallel to two ends of the resistor R5, one end of the resistor R1 is connected to the collector of the transistor Q1, and the other end is connected to the voltage VDD.
The TX signal isolation module further includes a resistor R6, wherein one end of the resistor R6 is connected to the emitter of the transistor Q1, and the other end is connected to the collector of the transistor Q1. When no signal is transmitted, the TX _ OUT level is the divided voltage (high level) of R1 and R6, when a "0" signal is transmitted, the transistor Q1 is turned on, and the TX _ OUT level is low level, at this time, if a "1" signal is transmitted, the TX _ OUT level is switched to high level along with the turning-off of the Q1, and if the R6 is not set, the output signal may generate jitter or overshoot. In actual use, however, the low baud rate may not be connected to R6.
The TX signal isolation module further comprises a first communication indicating circuit, the first communication indicating circuit comprises a resistor R9, a triode Q2, a diode LED1 and a resistor R3, one end of the resistor R9 is connected with the base of the triode Q1, the other end of the resistor R9 is connected with the base of the triode Q2, the emitter of the triode Q2 is grounded, the collector of the triode Q2 is connected with the voltage VDD through the diode LED1 and the resistor R3, and when signals are sent, the LED1 can flicker.
The TX signal isolation module adopts a common optical coupler U1, and is of the type EL 357N. And transmitting 0 and 1 signals sent by TX by using optical coupling isolation, which is equivalent to a switching signal. If current of the optical coupler is adjusted through R2, Ic current of the optical coupler is adjusted through R8, and a proper CTR optical coupler is selected, so that Ic is less than CTR x If, and at the moment, TX phase signals can be output at the joint of R8 and the optical coupler Pin3, and the phases are opposite. If the baud rate is about 9600, the isolation can be realized directly without a rear triode circuit of Q1. The gear TX output is low (0V), and the Pin3 output of U1 is high (5V). However, as the baud rate increases, the signal frequency increases, and when the time for TX to switch from 1 to 0 to 1 is fast, the time for the Pin3 output of U1 to transition from low (0V) to high (5V) to low (0V) is also fast. At this time, a pulse spike of about 0.8V to 2V is generated, and the pulse spike RS232 chip and the RS485 chip can not be identified occasionally, so that the output signal is in error. In order to solve the problem, a Q1 triode is added to work in a switching state, a spike pulse signal output by U1 is identified by using a base voltage of 0.7V threshold, and the communication baud rate is controlled by adjusting the values of C4 and R5. At present, the circuit can stably support a baud rate of 115200bps and support most communication occasions, and the LED1 is a TX (transmission) signal indicating lamp.
As shown in fig. 3, the RX signal isolation module includes an optocoupler U3, a resistor R13, a resistor R19, a transistor Q3, a capacitor C7, a resistor R16, and a resistor R11; the positive electrode of the input end of the optocoupler U3 is connected with a voltage VDD through a resistor R13, the negative electrode of the input end is respectively connected with the receiving output end of the RS232 unit and the receiving output end of the RS485 unit, the collector of the output end is connected with a voltage VCC, the emitter of the output end is connected with the base electrode of the triode Q3 through a resistor R16, the collector of the triode Q3 is connected with a UART unit of a CPU, the emitter of the triode Q3 is grounded, one end of the resistor R19 is connected with the emitter of the output end of the optocoupler; the capacitor C7 is connected in parallel to two ends of the resistor R16, one end of the resistor R11 is connected to the collector of the transistor Q3, and the other end is connected to the voltage VCC.
The RX signal isolation module further includes a resistor R17, wherein one end of the resistor R17 is connected to the emitter of the transistor Q3, and the other end is connected to the collector of the transistor Q3. When no signal is received, the RX level is the divided voltage (high level) of R11 and R17, when a "0" signal is received, the transistor Q3 is turned on, and the TX _ OUT is low level, at this time, if a "1" signal is sent, the TX _ OUT will be switched to high level along with the turn-off of the Q1, and if the R17 is not set, the output signal will generate jitter or overshoot. In actual use, the low baud rate may not be connected to R17.
The RX signal isolation module further comprises a second communication indicating circuit, the second communication indicating circuit comprises a resistor R20, a triode Q4, a diode LED2 and a resistor R14, one end of the resistor R20 is connected with the base of the triode Q3, the other end of the resistor R20 is connected with the base of the triode Q4, the emitter of the triode Q4 is grounded, the collector of the resistor R14 is connected with the voltage VCC through the diode LED2, and when a signal is sent, the LED1 can flicker.
The RX signal isolation module and the TX signal isolation module use the same scheme, except that the signal direction is different, and the parameter of R13 needs to be adjusted to ensure that the working state Ic of the optical coupler is less than CTR × If, IN fig. 3, RX _ IN is connected to the receiving output pins of the RS232 chip and the RS485 chip, and RX is connected to the UART unit of the CPU.
As shown IN fig. 4, the RS232 unit circuit is processed IN the same manner as a normal communication circuit, and it should be noted that the receiving signal RX _ IN is connected to the RS232 chip and the RS485 chip at the same time, and a diode D3 is connected IN series to form an and logic to prevent interference of the input signal, that is, a diode D3 is also connected IN series between the negative electrode of the input terminal of the optocoupler U3 and the receiving output terminal of the RS232 unit.
As shown IN fig. 5, the RS485 unit circuit is processed IN the same manner as a normal communication circuit, and it should be noted that the circuit receives a signal RX _ IN and is connected to an RS232 chip and an RS485 chip at the same time, and a diode D5 and logic are connected IN series to prevent interference of input signals, that is, a diode D5 is also connected IN series between the negative terminal of the input terminal of the optocoupler U3 and the receiving output terminal of the RS485 unit, IN the figure, J1 is a Pin of 2Pin for selectively matching a 120 ohm resistor.
As shown in fig. 7, the signal switching unit includes pin header JP1 and pin header JP2, and the communication port includes JP 3; the signal switching is completed by adopting two 3Pin pins, the pins 1 and 2 are connected by RS485 interfaces JP1 and JP3, and the pins 2 and 3 are connected by RS232 interfaces JP1 and JP 3. The communication port adopts a 3Pin terminal, and the interface signal is TX/A, RX/B, G232. The interface can output signals of TX, RX and G232 supporting RS232 standard through the signal switching unit, and can also output A, B signals supporting RS485 standard. Specifically, the 1 st pin of the pin header JP1 is connected with the differential signal a end of the RS485 unit, the 2 nd pin is connected with the 1 st pin of the communication port JP3, and the 3 rd pin is connected with the transmission output end of the RS232 unit; the 1 st pin of the pin header JP2 is connected with the B end of the differential signal of the RS485 unit, the 2 nd pin is connected with the 2 nd pin of the communication port JP3, and the 3 rd pin is connected with the receiving input end of the RS232 unit; a tripolar gas discharge tube G1 is connected in parallel between the 1 st pin and the 2 nd pin of the communication port JP3, the gas discharge tube G1 is commonly connected with the chassis ground, the 3 rd pin of the communication port JP3 is connected with the chassis ground through the gas discharge tube G2, and a capacitor C9 is connected between the chassis ground and the signal ground.
FIG. 6 shows an automatic transmission/reception control circuit of an RS485 unit when using a circuit with an automatic transmission/reception function
In the MAX13487 chip, R24, R25 and Q5 are not welded. The automatic transmit and receive logic is illustrated as follows:
receiving: and when no data is defaulted, the TX _ OUT is in a high level, the triode Q5 is conducted, the RE low level of the RS485 chip is enabled, the RO receives the data, and at the moment, what data received from the AB port of the RS485 chip is transmitted to the UART unit of the CPU through the RO channel, so that the data receiving process is completed.
And (3) sending: when transmitting data, TX _ OUT will have a pull-down level indicating that data transmission is to begin, transistor Q5 is turned off and DE is high transmit enable. When data '0' is transmitted, since the DI port is connected to TX _ OUT, data '0' is transmitted to the AB port a-B <0, and data '0' is transmitted, completing low level transmission. When '1' is sent, the triode is conducted at the moment, the RO is enabled in a theory, at the moment, because the RS485 chip is still in a data sending state, the state is determined by the pull-up resistance of A and pull-down resistance of B, and at the moment, the transmission of '1' is completed when A-B > 0.
The gas discharge tubes G1 and G2, the resistors R4, R7, R10, the TVS tubes D1 and D2 form a first protection circuit of the RS232 interface circuit, and the first protection circuit comprises a diode D1, a diode D2, a resistor R4, a resistor R7 and a resistor R10; diode D1's one end is connected with the transmission output of RS232 unit, and the other end ground, diode D2's one end is connected with the receipt input of RS232 unit, and the other end ground, and the one end of resistance R4 is connected with the transmission output of RS232 unit, and the other end is connected with 3 rd pin of row needle JP1, and the one end of resistance R7 is connected with the receipt input of RS232 unit, and the other end is connected with 3 rd pin of row needle JP2, and the one end ground of resistance R10, the other end is connected with the 3 rd pin of JP 3.
The gas discharge tube G1, the resistors R15 and R21, the TVS tubes D4, D6 and D7 form a second protection circuit of the RS485 interface circuit, and the second protection circuit comprises a diode D6, a diode D7, a diode D4, a resistor R15 and a resistor R21; one end of a diode D6 is connected with a differential signal B end of the RS485 unit, the other end of the diode D6 is connected with a differential signal A end of the RS485 unit, one end of a diode D4 is connected with a differential signal B end of the RS485 unit, the other end of the diode D4 is grounded, one end of a diode D7 is connected with a differential signal A end of the RS485 unit, the other end of the diode D7 is grounded, one end of a resistor R15 is connected with a differential signal B end of the RS485 unit, the other end of the resistor R15 is connected with a 1 st pin of the pin JP2, one end of a resistor R21 is connected with a differential signal A end of the RS485 unit.
The surge impact protection principle is as follows: when surge impact occurs, the resistor limits the current, so that instantaneous large current cannot rapidly reach the rear end, the gas discharge tube is conducted, and a large amount of surge current is discharged to the ground; the residual voltage and current are attenuated by the resistor; and then the TVS tube is quickly conducted to the rear end, and the TVS tube conducts the clamping voltage and discharges current, so that the rear-end element is protected from being damaged.

Claims (10)

1. The utility model provides a RS485 of area isolation and RS232 multiplexing serial ports communication circuit which characterized in that: the device comprises an isolation unit, an RS232 unit, an RS485 unit, a signal switching unit and a communication port;
the TX and RX signals of a UART unit of the CPU are isolated by an isolation unit to obtain TXO and RXI; the RS232 unit and the RS485 unit share TXO and RXI signals, the signals passing through the RS232 unit and the RS485 unit are input into the signal switching unit, and the signal switching unit is configured to output RS232 signals or RS485 signals to the communication port.
2. The RS485 and RS232 multiplexing serial communication circuit with isolation of claim 1, wherein: the isolation unit comprises a TX signal isolation module and an RX signal isolation module;
the TX signal isolation module comprises an optocoupler U1, a resistor R2, a resistor R8, a triode Q1, a capacitor C4, a resistor R5 and a resistor R1; the positive electrode of the input end of the optocoupler U1 is connected with a voltage VCC through a resistor R2, the negative electrode of the input end is connected with a UART unit of a CPU, the collector of the output end is connected with a voltage VDD, the emitter of the output end is connected with the base electrode of a triode Q1 through a resistor R5, the collector of the triode Q1 is respectively connected with the sending input end of an RS232 unit and the sending input end of an RS485 unit, the emitter of the triode Q is grounded, one end of the resistor R8 is connected with the emitter of the output end of the optocoupler U1, and; the capacitor C4 is connected in parallel at two ends of the resistor R5, one end of the resistor R1 is connected with the collector of the triode Q1, and the other end is connected with the voltage VDD;
the RX signal isolation module comprises an optocoupler U3, a resistor R13, a resistor R19, a triode Q3, a capacitor C7, a resistor R16 and a resistor R11; the positive electrode of the input end of the optocoupler U3 is connected with a voltage VDD through a resistor R13, the negative electrode of the input end is respectively connected with the receiving output end of the RS232 unit and the receiving output end of the RS485 unit, the collector of the output end is connected with a voltage VCC, the emitter of the output end is connected with the base electrode of a triode Q3 through a resistor R16, the collector of the triode Q3 is connected with a UART unit of a CPU, the emitter of the triode Q3 is grounded, one end of the resistor R19 is connected with the emitter of the output end of the optocoupler U3; the capacitor C7 is connected in parallel at two ends of the resistor R16, one end of the resistor R11 is connected with the collector of the triode Q3, and the other end of the resistor R11 is connected with the voltage VCC.
3. The RS485 and RS232 multiplexing serial communication circuit with isolation of claim 2, wherein: the TX signal isolation module further comprises a resistor R6, wherein one end of the resistor R6 is connected with an emitting electrode of the triode Q1, and the other end of the resistor R6 is connected with a collecting electrode of the triode Q1.
4. The RS485 and RS232 multiplexing serial communication circuit with isolation of claim 3, wherein: the RX signal isolation module further comprises a resistor R17, wherein one end of the resistor R17 is connected with an emitter of the transistor Q3, and the other end of the resistor R17 is connected with a collector of the transistor Q3.
5. The RS485 and RS232 multiplexing serial communication circuit with isolation of claim 4, wherein: the TX signal isolation module further comprises a first communication indicating circuit, wherein the first communication indicating circuit comprises a resistor R9, a triode Q2, a diode LED1 and a resistor R3, one end of the resistor R9 is connected with the base of a triode Q1, the other end of the resistor R9 is connected with the base of a triode Q2, the emitting electrode of the triode Q2 is grounded, and the collecting electrode of the triode Q2 is connected with a voltage VDD through the diode LED1 and the resistor R3.
6. The RS485 and RS232 multiplexing serial communication circuit with isolation of claim 5, wherein: RX signal isolation module still includes second communication indicating circuit, second communication indicating circuit includes resistance R20, triode Q4, diode LED2 and resistance R14, the one end of resistance R20 is connected with triode Q3's base, and the other end is connected with triode Q4's base, triode Q4's emitter ground, the collecting electrode passes through diode LED2, resistance R14 and is connected with voltage VCC.
7. The RS485 and RS232 multiplexing serial communication circuit with isolation of any of claims 2 to 6, wherein: and a diode D3 is also connected in series between the negative electrode of the input end of the optocoupler U3 and the receiving output end of the RS232 unit, and a diode D5 is also connected in series between the negative electrode of the input end of the optocoupler U3 and the receiving output end of the RS485 unit.
8. The RS485 and RS232 multiplexing serial communication circuit with isolation of claim 7, wherein: the signal switching unit comprises a pin header JP1 and a pin header JP2, and the communication port comprises JP 3;
the 1 st pin of the pin bank JP1 is connected with the differential signal A end of the RS485 unit, the 2 nd pin is connected with the 1 st pin of JP3, the 3 rd pin is connected with the transmitting output end of the RS232 unit, the 1 st pin of the pin bank JP2 is connected with the differential signal B end of the RS485 unit, the 2 nd pin is connected with the 2 nd pin of JP3, the 3 rd pin is connected with the receiving input end of the RS232 unit, a tripolar gas discharge tube G1 is connected between the 1 st pin and the 2 nd pin of the communication port JP3 in parallel, the gas discharge tube G1 is commonly connected with the chassis ground, the 3 rd pin of the communication port JP3 is connected with the chassis ground through the gas discharge tube G2, and a capacitor C9 is connected between the chassis ground and the signal ground.
9. The RS485 and RS232 multiplexed serial communication circuit with isolation of claim 8, wherein: the protection circuit further comprises a first protection circuit, wherein the first protection circuit comprises a diode D1, a diode D2, a resistor R4, a resistor R7 and a resistor R10; one end of the diode D1 is connected with the transmitting output end of the RS232 unit, the other end of the diode D2 is connected with the receiving input end of the RS232 unit, the other end of the diode D2 is connected with the ground, one end of the resistor R4 is connected with the transmitting output end of the RS232 unit, the other end of the resistor R4 is connected with the 3 rd pin of the pin header JP1, one end of the resistor R7 is connected with the receiving input end of the RS232 unit, the other end of the resistor R10 is connected with the 3 rd pin of the pin header JP2, and the other end of the resistor R10 is connected with the ground and the 3 rd.
10. The RS485 and RS232 multiplexed serial communication circuit with isolation of claim 9, wherein: the protection circuit further comprises a second protection circuit, wherein the second protection circuit comprises a diode D6, a diode D7, a diode D4, a resistor R15 and a resistor R21; one end of the diode D6 is connected with the differential signal B end of the RS485 unit, the other end of the diode D4 is grounded, one end of the diode D7 is connected with the differential signal A end of the RS485 unit, the other end of the diode D7 is grounded, one end of the resistor R15 is connected with the differential signal B end of the RS485 unit, the other end of the resistor R15 is connected with the 1 st pin of the pin bank JP2, one end of the resistor R21 is connected with the differential signal A end of the RS485 unit, and the other end of the resistor R21 is connected with the 1 st pin of the pin bank JP 1.
CN201921226165.5U 2019-07-31 2019-07-31 RS485 and RS232 multiplexing serial port communication circuit with isolation Active CN210402335U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201921226165.5U CN210402335U (en) 2019-07-31 2019-07-31 RS485 and RS232 multiplexing serial port communication circuit with isolation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201921226165.5U CN210402335U (en) 2019-07-31 2019-07-31 RS485 and RS232 multiplexing serial port communication circuit with isolation

Publications (1)

Publication Number Publication Date
CN210402335U true CN210402335U (en) 2020-04-24

Family

ID=70357532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201921226165.5U Active CN210402335U (en) 2019-07-31 2019-07-31 RS485 and RS232 multiplexing serial port communication circuit with isolation

Country Status (1)

Country Link
CN (1) CN210402335U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113985750A (en) * 2021-09-30 2022-01-28 中国兵器工业集团第二一四研究所苏州研发中心 Interface circuit board level integrated circuit board
CN115029894A (en) * 2022-06-24 2022-09-09 创维电器股份有限公司 Washing machine monitoring system for realizing uart serial control by using Lua language
CN117909276A (en) * 2024-03-19 2024-04-19 四川华鲲振宇智能科技有限责任公司 Method for constructing RS232-RS485 switching circuit based on discrete device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113985750A (en) * 2021-09-30 2022-01-28 中国兵器工业集团第二一四研究所苏州研发中心 Interface circuit board level integrated circuit board
CN115029894A (en) * 2022-06-24 2022-09-09 创维电器股份有限公司 Washing machine monitoring system for realizing uart serial control by using Lua language
CN115029894B (en) * 2022-06-24 2023-12-12 创维电器股份有限公司 Washing machine monitoring system for realizing uart serial control by using Lua language
CN117909276A (en) * 2024-03-19 2024-04-19 四川华鲲振宇智能科技有限责任公司 Method for constructing RS232-RS485 switching circuit based on discrete device

Similar Documents

Publication Publication Date Title
CN210402327U (en) RS485 and RS422 multiplexing serial communication circuit with isolation
CN210402335U (en) RS485 and RS232 multiplexing serial port communication circuit with isolation
CN203658996U (en) Chip interface multiplex circuit and mobile terminal
CN106095708B (en) Current loop communication system for two-wire system half-duplex multi-machine communication
CN105159194A (en) Switching circuit and switching method for switching data receiving/sending operation of RS-485 serial port
CN101226672A (en) Communication control alarm device
CN109412575B (en) High-speed digital photoelectric coupler with selectable transmission directions
CN101217523B (en) A serial communication signal repairing device and the corresponding method
CN115309683A (en) Serial port self-adaptive switching circuit and communication equipment
CN105629832B (en) It is a kind of to automatically switch isolation circuit and method without transmitting-receiving control terminal RS485 transmitting-receiving
AU2008200997A1 (en) A conversion circuit
CN210466075U (en) Information acquisition and control device for clothes hanger hanging system
CN104660247A (en) Two-way interface circuit
CN205142206U (en) Switch circuit of communication direction
CN113606761A (en) Current loop communication circuit and air conditioner
CN209748544U (en) RS485 half-duplex is from receiving and dispatching circuit
CN221125242U (en) Circuit for realizing high-speed communication by two optocouplers
CN209435516U (en) The communication interface circuit of wide dynamic high precision
CN215809187U (en) Current loop communication circuit and air conditioner
CN218103120U (en) Communication module and communication system
CN216016859U (en) 485 hardware automatic transmit-receive switching circuit
CN219718269U (en) Ethernet exchanger
CN219715973U (en) Digital isolation type RS485 communication circuit
CN209267569U (en) A kind of improved 485 automatic transceiving circuit
CN213213461U (en) Single-wire communication circuit capable of receiving and transmitting

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant