Converter for converting RS232 to RS485

By introducing an optical coupling isolation module and a hardware automatic control circuit between RS232 and RS485, the stability and reliability problems when RS232 signal is transferred to RS485 signals are solved, the control structure is simplified and the processing speed is improved.

CN223167105UActive Publication Date: 2025-07-29SINOPHARM HLDG (CHINA) FINANCIAL LEASING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422301405.0
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-07-29
Estimated Expiration
2034-09-20

AI Technical Summary

Technical Problem

When the existing RS232 signal is converted to RS485 signal, the converter is not stable and reliable, and the RS485 circuit requires an independent interface of the controller (MCU, DSP, etc.) to control the transceiver status. The control circuit structure is not simple enough and the processing speed is not fast enough.

Method used

The optical coupling isolation module is used to achieve electrical isolation between RS232 and RS485, and the transmission and reception signals are isolated through the 6N137 chip. The hardware structure of the capacitor and transistor are combined to automatically control the transmitting and receiving status of the SP3485EN chip.

Benefits of technology

Improves the stability and reliability of the converter, simplifies the control structure, and improves the processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223167105U_ABST
    Figure CN223167105U_ABST
Patent Text Reader

Abstract

The utility model discloses a converter for converting an RS232 to an RS485, which relates to the technical field of industrial control and comprises an RS232 signal receiving / transmitting module, an RS485 signal receiving / transmitting module, an RS485 signal receiving / transmitting module and an RS485 signal receiving / transmitting module, the RS232 level conversion module is connected with the RS232 signal receiving / transmitting module; the optical coupling isolation module is connected with the RS232 level conversion module; the RS485 level conversion module is connected with the optical coupling isolation module; and the RS485 signal receiving / transmitting protection module is connected with the RS485 level conversion module. Through the arrangement of the sending isolation module and the receiving isolation module, conversion and isolation between the RS232 and the RS485 are realized. Through the arrangement of the control circuit for controlling the transmitting and receiving states of the SP3485EN chip, the automatic control of the transmitting and receiving states is realized, and compared with the traditional RS485 circuit that the automatic transmitting and receiving states are switched by a controller, the control structure is simpler, and the processing speed is faster. According to the utility model, the stability and reliability of the converter can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of industrial control, and particularly relates to a converter for RS232 to RS485 conversion. Background Art

[0002] The technical background of converting RS232 signals to RS485 signals mainly involves the conversion and upgrade of communication protocols to meet the requirements of longer distances and data transmission rates. RS232 is a point-to-point communication method mainly used to connect computers and external devices such as modems, printers, etc. However, the transmission distance of RS232 is limited, generally not exceeding 15 meters, and it does not support direct communication between multiple machines. To solve these problems, the emergence of the RS232 to RS485 interface converter becomes a necessary measure. RS485 is a multi-point, half-duplex serial communication protocol that supports higher data transmission rates and longer transmission distances, and is very suitable for the complex environment of the industrial field.

[0003] By converting the single-wire signal of RS232 into the differential signal of RS485, the conversion between different communication protocols can be achieved, thus expanding the scope and function of communication. The application scenarios of this conversion technology are very extensive, including but not limited to the fields of industrial automation, building automation, environmental monitoring, etc. Since RS485 has high anti-interference ability and long-distance transmission characteristics, it is frequently used in industrial environments. In addition, this conversion technology is also common in automation equipment and data acquisition systems to achieve multi-machine response communication, improve the transmission rate, and expand the transmission distance. The design features of the converter include automatic data sending / receiving without external flow control signals, supporting a wide range of communication software and operating systems such as DOS / WIN95 / WIN98 / WIN2000 / NT / XP Linux, etc. In addition, the converter also supports a variety of transmission media such as twisted pair or shielded wire, ensuring its application flexibility and adaptability.

[0004] In the prior art, in an RS485 circuit composed of an SP3485, an independent interface of a controller (MCU, DSP, etc.) is required to control the receiving and transmitting states of the RS485, and the circuit structure is not simple enough. In addition, in the traditional solution, the conversion of RS232 signals to RS485 signals is not isolated. The disadvantages of non-isolation include risks to equipment and personal safety: when RS485 is used for communication between devices, if the two communicating devices are not isolated, and one of the devices comes into contact with a high-voltage power supply or there is a risk of high-voltage short circuit, it may cause the RS485 line to carry high voltage, thus threatening the safety of the equipment and personnel; abnormal reception at the far end: in practical applications, the communication distance may reach several kilometers, and the distance between nodes is very far. If the designer directly connects the reference ground of each node to the local ground as the signal return ground, and the ground is not an ideal "0" potential and has impedance. When a large current flows through the ground, a potential difference will be generated at both ends of the ground, resulting in abnormal reception at the far end; data anomalies and device damage: due to the potential difference of the ground between nodes, if a wire is directly used to connect the grounds of two nodes, it may cause data anomalies and device damage. This is because of the influence of the ground loop, and improper grounding methods may lead to signal interference and data errors. Utility Model Content

[0005] The purpose of the present utility model is to provide a converter for RS232 to RS485, to solve the problems in the prior art that when the conversion of RS232 signals to RS485 signals is not isolated, the stability and reliability of the converter are not high, and in the RS485 circuit composed of an SP3485EN, an independent interface of a controller (MCU, DSP, etc.) is required to control the receiving and transmitting states of the RS485, the control circuit structure is not simple enough, and the processing speed is not fast enough.

[0006] To achieve the above purpose, the technical solution adopted by the present utility model is as follows:

[0007] A converter for RS232 to RS485, characterized by comprising:

[0008] An RS232 signal receiving / sending module;

[0009] An RS232 level conversion module, connected to the RS232 signal receiving / sending module;

[0010] An optical coupling isolation module, connected to the RS232 level conversion module, for realizing electrical isolation between the RS232 side and the RS485 side;

[0011] An RS485 level conversion module, connected to the optical coupling isolation module;

[0012] An RS485 signal receiving / sending protection module, connected to the RS485 level conversion module.

[0013] Further, the optical coupling isolation module includes a transmission isolation module and a reception isolation module that are respectively connected between the RS232 level conversion module and the RS485 level conversion module.

[0014] Further, the transmission isolation module includes a resistor R2, a PNP transistor Q1, a ground terminal GND1, a light-emitting diode RXD1, a 6N137 chip IC1, a power supply VCC1, a resistor R4, a power supply VCC2, a ground terminal GND2, and a resistor R3. One end of the resistor R2 is connected to the RS232 level conversion module, and the other end is connected to the base of the PNP transistor Q1; the collector of the PNP transistor Q1 is connected to the ground terminal GND1, and its emitter is connected to the negative electrode of the light-emitting diode RXD1; one end of the resistor R4 is connected to the power supply VCC1, one end of the resistor R3 is connected to the power supply VCC2, and the 6N137 chip IC1 is respectively connected to the other end of the resistor R4, the other end of the resistor R3, the ground terminal GND2, and the power supply VCC2.

[0015] Further, the positive electrode of the light-emitting diode RXD1 is connected to the pin 3 of the 6N137 chip IC1; the other end of the resistor R4 is connected to the pin 2 of the 6N137 chip IC1; the ground terminal GND2 is connected to the pin 5 of the 6N137 chip IC1, and the pin 6 of the 6N137 chip IC1 is connected to the other end of the resistor R3; the power supply VCC2 is respectively connected to the pin 7 and the pin 8 of the 6N137 chip IC1.

[0016] Further, the reception isolation module includes a resistor R8, a PNP transistor Q3, a ground terminal GND2, a light-emitting diode TXD1, a 6N137 chip IC4, a power supply VCC2, a resistor R11, a ground terminal GND1, a power supply VCC1, and a resistor R9. One end of the resistor R8 is connected to the RS485 level conversion module, and the other end is connected to the base of the PNP transistor Q3; the collector of the PNP transistor Q3 is connected to the ground terminal GND2, and its emitter is connected to the negative electrode of the light-emitting diode TXD1; one end of the resistor R11 is connected to the power supply VCC2, one end of the resistor R9 is connected to the power supply VCC1, and the 6N137 chip IC4 is respectively connected to the other end of the resistor R11, the other end of the resistor R9, the ground terminal GND1, and the power supply VCC1.

[0017] Further, the positive electrode of the light-emitting diode TXD1 is connected to the pin 3 of the 6N137 chip IC4; the other end of the resistor R11 is connected to the pin 2 of the 6N137 chip IC4; the ground terminal GND1 is connected to the pin 5 of the 6N137 chip IC4, and the pin 6 of the 6N137 chip IC4 is connected to the other end of the resistor R9; the power supply VCC1 is respectively connected to the pin 7 and the pin 8 of the 6N137 chip IC4.

[0018] Further, an SP3485EN chip and a control circuit for controlling the transceiver state of the SP3485EN chip are provided in the RS485 level conversion module. The control circuit includes: a resistor R12, a PNP transistor Q2, a power supply VCC2, a capacitor C6, a resistor R13, and a ground terminal GND2. One end of the resistor R12 is connected to the pin 6 of the 6N137 chip IC1, and the other end is connected to the base of the PNP transistor Q2. The emitter of the PNP transistor Q2 is connected to the power supply VCC2, and its collector is respectively connected to the DE terminal and the RE terminal of the SP3485EN chip. One end of the capacitor C6 is connected to the power supply VCC2, and the other end is connected to the collector of the PNP transistor Q2. One end of the resistor R13 is connected to the ground terminal GND2, and the other end is connected to the collector of the PNP transistor Q2.

[0019] Further, the chip model of the RS232 level conversion module is ADM202E.

[0020] Compared with the prior art, the present utility model has the following beneficial effects:

[0021] Compared with the traditional non-isolated circuit for converting RS232 signals to RS485 signals, the present utility model realizes the conversion and isolation between RS232 and RS485 by adopting a transmitting isolation module and a receiving isolation module provided with a 6N137 chip. Based on optical coupling technology, the 6N137 realizes the transmission of optical signals between a light-emitting diode (LED) and a photosensitive triode. This isolation can effectively prevent noise interference and signal crosstalk between different circuits, and improve the stability and reliability of the converter.

[0022] In the traditional RS485 circuit, the automatic transceiver state is switched by a controller (MCU, DSP, etc.), while the present utility model adopts a hardware structure in which a capacitor and a triode are connected in parallel to realize the automatic control of the transceiver state of the SP3485 chip. In contrast, the control structure of the present utility model is simpler, the processing speed is faster, and the stability and reliability are higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a block diagram of the structure of the present utility model.

[0024] Figure 2 It is a circuit diagram of the RS232 signal receiving / sending module of the present utility model.

[0025] Figure 3 It is a circuit diagram of the RS232 level conversion module of the present utility model.

[0026] Figure 4 It is a circuit diagram of the transmitting isolation module of the present utility model.

[0027] Figure 5This is the circuit diagram of the receiving isolation module of the present utility model.

[0028] Figure 6 This is the circuit diagram of the RS485 level conversion module of the present utility model.

[0029] Figure 7 This is the circuit diagram of the RS485 signal receiving / sending protection module of the present utility model. Detailed implementation manners

[0030] In order to make the purpose, technical solutions and advantages of the present utility model clearer, the present utility model will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present utility model, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present utility model without creative efforts shall fall within the protection scope of the present utility model.

[0031] In the description of the present utility model, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present utility model and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, so it cannot be understood as a limitation of the present utility model.

[0032] In the description of the present utility model, it should be noted that unless otherwise clearly specified and limited, the terms "installation", "connection", "connection" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; of course, it can also be a mechanical connection or an electrical connection; in addition, it can also be directly connected or indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present utility model can be understood according to specific situations.

[0033] Embodiment 1.

[0034] As Figures 1-7 shown, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupling isolation module connected to the RS232 level conversion module for realizing electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupling isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0035] When the RS232 signal receiving / sending module receives an RS232 signal, the RS232 signal receiving / sending module sends the data signal to the RS232 level conversion module. The RS232 level conversion module converts the RS232 data signal into a TTL level signal and outputs it to the opto-coupler isolation module. The opto-coupler isolation module converts the TTL level signal into an optical signal and then converts the optical signal into an electrical signal and outputs it to the RS485 level conversion module. The RS485 level conversion module converts the received electrical signal into an RS485 differential signal and sends the RS485 differential signal to the RS485 signal receiving / sending protection module. The RS485 signal receiving / sending protection module is used to protect the RS485 communication line and equipment from the influence of destructive factors such as external overvoltage, surge, electrostatic discharge (ESD), electromagnetic interference (EMI), etc., and also has the function of receiving and sending RS485 signals. The RS485 signal receiving / sending protection module sends the received RS485 differential signal to an external device.

[0036] When the RS485 signal receiving / sending protection module receives an RS485 signal sent by an external device, the RS485 signal receiving / sending protection module sends the RS485 signal to the RS485 level conversion module. The RS485 level conversion module converts the RS485 signal into a TTL level signal and outputs it to the opto-coupler isolation module. The opto-coupler isolation module converts the TTL level signal into an optical signal and then converts the optical signal into an electrical signal and outputs it to the RS232 level conversion module. The RS232 level conversion module converts the received electrical signal into an RS232 signal and sends the RS232 signal to the RS232 signal receiving / sending module. The RS232 signal receiving / sending module sends the RS232 signal to an external device.

[0037] Therefore, Embodiment 1 can realize the bidirectional conversion between RS232 signals and RS485 signals. Compared with the prior art in which the RS232-to-RS485 converter does not have an isolator, the converter of the present utility model adds an opto-coupler isolation module between the RS232 signal and the RS485 signal, so that during the conversion process between RS232 and RS485, the signal can be isolated, less interfered, and the stability and reliability of the converter are improved.

[0038] Embodiment 2.

[0039] As Figures 1-7As shown in the figure, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupler isolation module connected to the RS232 level conversion module for achieving electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupler isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0040] The opto-coupler isolation module includes a sending isolation module and a receiving isolation module respectively connected between the RS232 level conversion module and the RS485 level conversion module.

[0041] Based on Embodiment 1, Embodiment 2 gives a more preferable structure of the opto-coupler isolation module. By setting the sending isolation module and the receiving isolation module, not only can signal isolation between the RS232 side and the RS485 side be achieved, but also the sending signal and the receiving signal do not interfere with each other, improving the stability and reliability of the converter.

[0042] Embodiment 3.

[0043] As Figures 1-7 As shown in the figure, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupler isolation module connected to the RS232 level conversion module for achieving electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupler isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0044] The opto-coupler isolation module includes a sending isolation module and a receiving isolation module respectively connected between the RS232 level conversion module and the RS485 level conversion module.

[0045] The transmission isolation module includes resistor R2, PNP transistor Q1, ground terminal GND1, light-emitting diode RXD1, 6N137 chip IC1, power supply VCC1, resistor R4, power supply VCC2, ground terminal GND2, and resistor R3. One end of resistor R2 is connected to the RS232 level conversion module, and the other end is connected to the base of PNP transistor Q1. The collector of PNP transistor Q1 is connected to ground terminal GND1, and its emitter is connected to the negative electrode of light-emitting diode RXD1. One end of resistor R4 is connected to power supply VCC1, one end of resistor R3 is connected to power supply VCC2, and 6N137 chip IC1 is respectively connected to the other end of resistor R4, the other end of resistor R3, ground terminal GND2, and power supply VCC2.

[0046] Based on Embodiment 2, Embodiment 3 gives a more preferred structure of the transmission isolation module. The transmission isolation module includes 6N137 type isolation chip IC1 and its peripheral circuit. Through such design, electrical isolation between the RS232 side and the RS485 side of the transmitted signal is achieved. This isolation can effectively prevent noise interference and signal crosstalk between different circuits, and improve the stability and reliability of the converter.

[0047] Embodiment 4.

[0048] As Figures 1-7 shown, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupling isolation module connected to the RS232 level conversion module for achieving electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupling isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0049] The opto-coupling isolation module includes a transmission isolation module and a reception isolation module respectively connected between the RS232 level conversion module and the RS485 level conversion module.

[0050] The sending isolation module includes resistor R2, PNP transistor Q1, ground terminal GND1, light-emitting diode RXD1, 6N137 chip IC1, power supply VCC1, resistor R4, power supply VCC2, ground terminal GND2, and resistor R3. One end of resistor R2 is connected to the RS232 level conversion module, and the other end is connected to the base of PNP transistor Q1. The collector of PNP transistor Q1 is connected to ground terminal GND1, and its emitter is connected to the negative electrode of light-emitting diode RXD1. One end of resistor R4 is connected to power supply VCC1, and one end of resistor R3 is connected to power supply VCC2. 6N137 chip IC1 is respectively connected to the other end of resistor R4, the other end of resistor R3, ground terminal GND2, and power supply VCC2.

[0051] The positive electrode of light-emitting diode RXD1 is connected to pin 3 of 6N137 chip IC1. The other end of resistor R4 is connected to pin 2 of 6N137 chip IC1. Ground terminal GND2 is connected to pin 5 of 6N137 chip IC1, and pin 6 of 6N137 chip IC1 is connected to the other end of resistor R3. Power supply VCC2 is respectively connected to pins 7 and 8 of 6N137 chip IC1.

[0052] Based on Embodiment 3, Embodiment 4 gives a more preferable connection of 6N137 chip IC1 and its peripheral circuit. When the sending isolation module receives the sending signal from the RS232 level converter, PNP transistor Q1 conducts, light-emitting diode RXD1 emits light, the light-emitting diode in 6N137 chip IC1 emits light, and the photosensitive transistor in 6N137 chip IC1 conducts after receiving the optical signal, thereby converting the optical signal into an electrical signal and sending it to the RS485 level conversion module for further processing, thus realizing the electrical isolation between the RS232 side and the RS485 side of the sending signal. This isolation can effectively prevent noise interference and signal crosstalk between different circuits, and improve the stability and reliability of the converter.

[0053] Embodiment 5.

[0054] As Figures 1-7 shown, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupler isolation module connected to the RS232 level conversion module for realizing electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupler isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0055] The opto-coupler isolation module includes a transmitting isolation module and a receiving isolation module that are respectively connected between the RS232 level conversion module and the RS485 level conversion module.

[0056] The receiving isolation module includes a resistor R8, a PNP transistor Q3, a ground terminal GND2, a light-emitting diode TXD1, a 6N137 chip IC4, a power supply VCC2, a resistor R11, a ground terminal GND1, a power supply VCC1, and a resistor R9. One end of the resistor R8 is connected to the RS485 level conversion module, and the other end is connected to the base of the PNP transistor Q3; the collector of the PNP transistor Q3 is connected to the ground terminal GND2, and its emitter is connected to the negative electrode of the light-emitting diode TXD1; one end of the resistor R11 is connected to the power supply VCC2, one end of the resistor R9 is connected to the power supply VCC1, and the 6N137 chip IC4 is respectively connected to the other end of the resistor R11, the other end of the resistor R9, the ground terminal GND1, and the power supply VCC1.

[0057] Based on Embodiment 2, Embodiment 5 gives a more preferable structure of the receiving isolation module. The receiving isolation module includes a 6N137 type isolation chip IC4 and a peripheral circuit connected to IC4. Through such a design, electrical isolation between the RS232 side and the RS485 side of the received signal is achieved. This isolation can effectively prevent noise interference and signal crosstalk between different circuits, and improve the stability and reliability of the converter.

[0058] Embodiment 6.

[0059] As Figures 1-7 shown, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupler isolation module connected to the RS232 level conversion module for achieving electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupler isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0060] The opto-coupler isolation module includes a transmitting isolation module and a receiving isolation module that are respectively connected between the RS232 level conversion module and the RS485 level conversion module.

[0061] The receiving isolation module includes resistor R8, PNP transistor Q3, ground terminal GND2, light-emitting diode TXD1, 6N137 chip IC4, power supply VCC2, resistor R11, ground terminal GND1, power supply VCC1, and resistor R9. One end of resistor R8 is connected to the RS485 level conversion module, and the other end is connected to the base of PNP transistor Q3. The collector of PNP transistor Q3 is connected to ground terminal GND2, and its emitter is connected to the negative electrode of light-emitting diode TXD1. One end of resistor R11 is connected to power supply VCC2, one end of resistor R9 is connected to power supply VCC1, and 6N137 chip IC4 is respectively connected to the other end of resistor R11, the other end of resistor R9, ground terminal GND1, and power supply VCC1.

[0062] The positive electrode of light-emitting diode TXD1 is connected to pin 3 of 6N137 chip IC4. The other end of resistor R11 is connected to pin 2 of 6N137 chip IC4. Ground terminal GND1 is connected to pin 5 of 6N137 chip IC4, and pin 6 of 6N137 chip IC4 is connected to the other end of resistor R9. Power supply VCC1 is respectively connected to pin 7 and pin 8 of 6N137 chip IC4.

[0063] Based on Embodiment 5, Embodiment 6 gives a more preferable connection of 6N137 chip IC4 and its peripheral circuit. When the receiving isolation module receives a signal, PNP transistor Q3 conducts, light-emitting diode TXD1 emits light, the light-emitting diode in 6N137 chip IC4 emits light, and the photosensitive transistor in 6N137 chip IC4 conducts after receiving the optical signal, thereby converting the optical signal into an electrical signal and sending it to the RS232 level conversion module for further processing, thus achieving electrical isolation between the RS232 side and the RS485 side. This isolation can effectively prevent noise interference and signal crosstalk between different circuits, improving the stability and reliability of the converter.

[0064] Embodiment 7.

[0065] As Figures 1-7 shown, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupler isolation module connected to the RS232 level conversion module for achieving electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupler isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0066] The RS485 level conversion module is provided with an SP3485EN chip and a control circuit for controlling the receiving and transmitting states of the SP3485EN chip. The control circuit includes: a resistor R12, a PNP triode Q2, a power supply VCC2, a capacitor C6, a resistor R13, and a ground terminal GND2. One end of the resistor R12 is connected to the pin 6 of the 6N137 chip IC1, and the other end is connected to the base of the PNP triode Q2. The emitter of the PNP triode Q2 is connected to the power supply VCC2, and its collector is respectively connected to the DE terminal and the RE terminal of the SP3485EN chip. One end of the capacitor C6 is connected to the power supply VCC2, and the other end is connected to the collector of the PNP triode Q2. One end of the resistor R13 is connected to the ground terminal GND2, and the other end is connected to the collector of the PNP triode Q2.

[0067] Based on Embodiment 1, Embodiment 7 gives a more preferable structure of the RS485 level conversion module. Through this design, when there is a low-level signal at the input terminal TXD out1 (the start bit of the serial port signal is a bit low level), at this time, the PNP triode Q2 in the control circuit is turned on, and the DE and RE pins of the SP3485EN become high level. Since the voltage across the capacitor C6 cannot change suddenly, when there are high and low level signals sent at TXD out1, the DE and RE pins are always at high level, and the SP3485EN chip is in the sending state. When TXD out1 is at high level during idle time, at this time, the PNP triode Q2 in the control circuit is turned off, the DE and RE pins of the SP3485EN are at low level, and the SP3485EN chip is in the receiving state, thus realizing the function of automatically controlling the receiving and transmitting states through the control circuit. Compared with the traditional RS485 circuit where the automatic receiving and transmitting states are switched by a controller (MCU, DSP, etc.), the control structure of the present utility model is simpler, the processing speed is faster, and the stability and reliability of the converter are improved.

[0068] Embodiment 8.

[0069] As Figures 1-7 shown, a converter for RS232 to RS485 includes: an RS232 signal receiving / sending module for receiving or sending RS232 signals; an RS232 level conversion module connected to the RS232 signal receiving / sending module; an opto-coupler isolation module connected to the RS232 level conversion module for realizing electrical isolation between the RS232 side and the RS485 side; an RS485 level conversion module connected to the opto-coupler isolation module; and an RS485 signal receiving / sending protection module connected to the RS485 level conversion module.

[0070] The chip model of the RS232 level conversion module adopts ADM202E.

[0071] On the basis of Embodiment 1, Embodiment 8 gives a more preferable structure of the RS232 level conversion module chip. Since the ADM202E has the advantages of low power consumption, good compatibility, high-speed data transmission, good stability, and strong anti-interference ability.

[0072] The 6N137 chip, SP3485EN chip, and ADM202E chip used in the present utility model are all existing chips and can be directly purchased and used in the market. Therefore, the structures, principles, and circuits of the 6N137 chip, SP3485EN chip, ADM202E chip, etc. will not be elaborated herein.

[0073] Finally, it should be noted that: the above embodiments are only relatively preferable embodiments of the present utility model to illustrate the technical solutions of the present utility model, rather than limiting it, and certainly not limiting the patent scope of the present utility model; although the present utility model has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present utility model; that is to say, any meaningless modifications or polishings made on the main design concept and spirit of the present utility model, as long as the technical problems solved are still the same as those of the present utility model, should be included in the protection scope of the present utility model; in addition, directly or indirectly applying the technical solutions of the present utility model to other related technical fields shall similarly be included in the patent protection scope of the present utility model.

Claims

1. A converter for RS232 to RS485, characterized in that, Including: RS232 signal receiving / sending module; RS232 level conversion module, connected to the RS232 signal receiving / sending module; Opto-coupler isolation module, connected to the RS232 level conversion module, for realizing electrical isolation between the RS232 side and the RS485 side; RS485 level conversion module, connected to the opto-coupler isolation module; RS485 signal receiving / sending protection module, connected to the RS485 level conversion module.

2. The converter for RS232 to RS485 according to claim 1, wherein, The opto-coupler isolation module includes a sending isolation module and a receiving isolation module respectively connected between the RS232 level conversion module and the RS485 level conversion module.

3. The converter for RS232 to RS485 according to claim 2, wherein, The sending isolation module includes resistor R2, PNP transistor Q1, ground terminal GND1, light-emitting diode RXD1, 6N137 chip IC1, power supply VCC1, resistor R4, power supply VCC2, ground terminal GND2, resistor R3. One end of resistor R2 is connected to the RS232 level conversion module, and the other end is connected to the base of PNP transistor Q1; the collector of PNP transistor Q1 is connected to ground terminal GND1, and its emitter is connected to the negative electrode of light-emitting diode RXD1; one end of resistor R4 is connected to power supply VCC1, one end of resistor R3 is connected to power supply VCC2, and 6N137 chip IC1 is respectively connected to the other end of resistor R4, the other end of resistor R3, ground terminal GND2, and power supply VCC2.

4. A converter for RS232 to RS485 according to claim 3, characterized in that, The positive electrode of light-emitting diode RXD1 is connected to pin 3 of 6N137 chip IC1; the other end of resistor R4 is connected to pin 2 of 6N137 chip IC1; ground terminal GND2 is connected to pin 5 of 6N137 chip IC1, and pin 6 of 6N137 chip IC1 is connected to the other end of resistor R3; power supply VCC2 is respectively connected to pins 7 and 8 of 6N137 chip IC1.

5. The converter for RS232 to RS485 according to claim 2, characterized in that, The receiving isolation module includes resistor R8, PNP transistor Q3, ground terminal GND2, light-emitting diode TXD1, 6N137 chip IC4, power supply VCC2, resistor R11, ground terminal GND1, power supply VCC1, resistor R9. One end of resistor R8 is connected to the RS485 level conversion module, and the other end is connected to the base of PNP transistor Q3; the collector of PNP transistor Q3 is connected to ground terminal GND2, and its emitter is connected to the negative electrode of light-emitting diode TXD1; one end of resistor R11 is connected to power supply VCC2, one end of resistor R9 is connected to power supply VCC1, and 6N137 chip IC4 is respectively connected to the other end of resistor R11, the positive electrode of light-emitting diode TXD1, the other end of resistor R9, ground terminal GND1, and power supply VCC1.

6. The converter for RS232 to RS485 according to claim 5, wherein, The positive electrode of light-emitting diode TXD1 is connected to pin 3 of 6N137 chip IC4; the other end of resistor R11 is connected to pin 2 of 6N137 chip IC4; ground terminal GND1 is connected to pin 5 of 6N137 chip IC4, and pin 6 of 6N137 chip IC4 is connected to the other end of resistor R9; power supply VCC1 is respectively connected to pins 7 and 8 of 6N137 chip IC4.

7. A converter for RS232 to RS485 according to claim 1, characterized in that, The RS485 level conversion module is provided with an SP3485EN chip and a control circuit for controlling the transceiver state of the SP3485EN chip. The control circuit includes: a resistor R12, a PNP transistor Q2, a power supply VCC2, a capacitor C6, a resistor R13, and a ground terminal GND2. One end of the resistor R12 is connected to pin 6 of the 6N137 chip IC1, and the other end is connected to the base of the PNP transistor Q2. The emitter of the PNP transistor Q2 is connected to the power supply VCC2, and its collector is respectively connected to the DE terminal and the RE terminal of the SP3485EN chip. One end of the capacitor C6 is connected to the power supply VCC2, and the other end is connected to the collector of the PNP transistor Q2. One end of the resistor R13 is connected to the ground terminal GND2, and the other end is connected to the collector of the PNP transistor Q2.

8. A converter for RS232 to RS485 according to claim 1, characterized in that, The chip model of the RS232 level conversion module is ADM202E.