RS232 Communication Circuit and Electronic Device

By designing charging circuits, charge pump circuits and discharge circuits in the RS232 communication circuit, self-power supply of RS232 communication circuits is realized, solving the problem of high power supply costs in the prior art, reducing circuit costs and realizing level conversion and isolation.

CN112765071BActive Publication Date: 2025-07-01WASION GROUP HLDG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110084679.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-21
Publication Date
2025-07-01
Estimated Expiration
2041-01-21

AI Technical Summary

Technical Problem

The existing RS232 communication circuit has a high power supply cost, resulting in an increase in the cost of the entire communication circuit.

Method used

An RS232 communication circuit is designed to retrieve power from the transmitting end of the RS232 interface through a charging circuit, store charge, and control the discharge circuit to supply power to the isolation circuit through a charge pump circuit to achieve self-power supply.

Benefits of technology

No independent power supply is required, which reduces circuit costs and enables level switching and isolation between the RS232 interface and the controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112765071B_ABST
    Figure CN112765071B_ABST
Patent Text Reader

Abstract

The present invention discloses an RS232 communication circuit and an electronic device. The RS232 communication circuit includes an RS232 interface, a charging circuit, a charge pump circuit, a discharging circuit, a first isolation circuit and a second isolation circuit; the input end of the charging circuit is connected to the sending end of the RS232 interface, the first output end is connected to the receiving end of the controller through the first isolation circuit, and the second output end is connected to the first end of the charge pump circuit; the second end and the third end of the charge pump circuit are correspondingly connected to the first end and the second end of the discharging circuit; the third end of the discharging circuit is connected to the sending end of the controller through the second isolation circuit. Among them, after the charging circuit takes power from the sending end of the RS232 interface, it supplies power to the first isolation circuit and stores charges; the charge pump circuit obtains the charges and controls the discharging circuit to supply power to the second isolation circuit, realizing self-power supply of the RS232 communication circuit without using an independent power supply, and reducing the circuit cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic technologies, and in particular, to an RS232 communication circuit and an electronic device. Background Art

[0002] The RS232 interface is a full-duplex communication interface, mainly used for communication between two devices. Currently, the RS232 communication circuit generally includes an RS232 interface, an RS232 communication chip, an isolation optocoupler, and an independent power supply. The power supply powers the RS232 communication chip and the isolation optocoupler. The RS232 interface realizes the conversion and isolation functions between TTL level and RS232 level through the RS232 communication chip and the isolation optocoupler.

[0003] The power supply in the RS232 communication circuit usually draws power from the mains, and converts the AC voltage into the 5V voltage required for the operation of the RS232 communication chip and the isolation optocoupler through a transformer and a voltage conversion chip. According to the IEC (International Electrotechnical Commission) standard, the power supply needs to reach 4kV AC withstand voltage, resulting in a high cost of the power supply in the RS232 communication circuit, and further increasing the cost of the entire RS232 communication circuit. Summary of the Invention

[0004] The main object of the present invention is to provide an RS232 communication circuit and an electronic device, aiming to solve the technical problem of high cost of the RS232 communication circuit in the prior art.

[0005] To achieve the above object, the present invention provides an RS232 communication circuit, and the circuit includes:

[0006] An RS232 interface, a charging circuit, a charge pump circuit, a discharging circuit, a first isolation circuit, and a second isolation circuit; the input end of the charging circuit is connected to the sending end of the RS232 interface, the first output end of the charging circuit is connected to the receiving end of the controller through the first isolation circuit, the second output end of the charging circuit is connected to the first end of the charge pump circuit, the second end of the charge pump circuit is connected to the first end of the discharging circuit, the third end of the charge pump circuit is connected to the second end of the discharging circuit, and the third end of the discharging circuit is connected to the sending end of the controller through the second isolation circuit; wherein,

[0007] The charging circuit is configured to draw power from the sending end of the RS232 interface, supply power to the first isolation circuit, and store charges;

[0008] The charge pump circuit is used to obtain the charge from the charging circuit and control the discharge circuit to supply power to the second isolation circuit according to the charge.

[0009] Preferably, the receiving end of the RS232 interface is connected to the sending end of the controller through the second isolation circuit; wherein,

[0010] The charging circuit is further used to transmit the first level signal to the first isolation circuit when the sending end of the RS232 interface sends the first level signal;

[0011] The first isolation circuit is used to convert the first level signal into a second level signal and send it to the receiving end of the controller when receiving the first level signal;

[0012] The second isolation circuit is used to convert the third level signal into a fourth level signal and send it to the receiving end of the RS232 interface when the sending end of the controller sends the third level signal.

[0013] Preferably, the charging circuit includes a first Schottky diode and a first capacitor; the first end of the first Schottky diode is connected to the sending end of the RS232 interface, the second end of the first Schottky diode is connected to the power supply end of the first isolation circuit, the third end of the first Schottky diode is connected to the first end of the charge pump circuit, and the third end of the first Schottky diode is also connected to the first ground through the first capacitor.

[0014] Preferably, the charge pump circuit includes a charge pump chip, a second capacitor, a first resistor and a second resistor; the grounding end of the charge pump chip is respectively connected to the output end of the charge pump chip, the first end of the first resistor and the first capacitor, the enabling end of the charge pump chip is connected to the second end of the first resistor, the enabling end of the charge pump chip is also connected to the first ground through the second resistor, the input end of the charge pump chip is respectively connected to the first ground and the first end of the discharge circuit, and the external capacitor end of the charge pump chip is connected to the second end of the discharge circuit through the second capacitor.

[0015] Preferably, the discharge circuit includes a second Schottky diode and a third capacitor; the first end of the second Schottky diode is connected to the input end of the charge pump chip, the second end of the second Schottky diode is connected to the second capacitor, the third end of the second Schottky diode is connected to the power supply end of the second isolation circuit, and the third end of the second Schottky diode is also connected to the first ground through the third capacitor.

[0016] Preferably, the first isolation circuit includes a first optocoupler, a third resistor and a fourth resistor; wherein,

[0017] The first end of the first optocoupler is connected to the second end of the first Schottky diode via the third resistor. The second end of the first optocoupler is connected to the first ground. The third end of the first optocoupler is respectively connected to the receiving end of the controller and the first end of the fourth resistor. The fourth end of the first optocoupler is connected to the second ground;

[0018] The second end of the fourth resistor is connected to the power supply.

[0019] Preferably, the second isolation circuit includes a second optocoupler, a fifth resistor and a sixth resistor; wherein,

[0020] The first end of the second optocoupler is connected to the third end of the second Schottky diode. The second end of the second optocoupler is respectively connected to the first end of the fifth resistor and the receiving end of the RS232 interface. The third end of the second optocoupler is connected to the power supply. The fourth end of the second optocoupler is connected to the sending end of the controller via the sixth resistor;

[0021] The second end of the fifth resistor is respectively connected to the grounding end of the charge pump chip and the third end of the first Schottky diode.

[0022] Preferably, the RS232 communication circuit further includes a protection circuit. The first end of the protection circuit is respectively connected to the sending end of the RS232 interface and the input end of the charging circuit. The second end of the protection circuit is respectively connected to the receiving end of the RS232 interface and the second isolation circuit. The third end of the protection circuit is connected to the first ground.

[0023] Preferably, the protection circuit includes a first bidirectional transient suppression diode and a second bidirectional transient suppression diode; the first end of the first bidirectional transient suppression diode is connected to the sending end of the RS232 interface, and the second end of the first bidirectional transient suppression diode is connected to the first ground; the first end of the second bidirectional transient suppression diode is connected to the receiving end of the RS232 interface, and the second end of the second bidirectional transient suppression diode is connected to the first ground.

[0024] The present invention also provides an electronic device, and the electronic device includes the RS232 communication circuit as described above.

[0025] The present invention is provided with an RS232 interface, a charging circuit, a charge pump circuit, a discharging circuit, a first isolation circuit and a second isolation circuit in the RS232 communication circuit; the input end of the charging circuit is connected to the sending end of the RS232 interface, the first output end of the charging circuit is connected to the receiving end of the controller through the first isolation circuit, the second output end of the charging circuit is connected to the first end of the charge pump circuit, the second end of the charge pump circuit is connected to the first end of the discharging circuit, the third end of the charge pump circuit is connected to the second end of the discharging circuit, and the third end of the discharging circuit is connected to the sending end of the controller through the second isolation circuit. Among them, after the charging circuit obtains power from the sending end of the RS232 interface, it supplies power to the first isolation circuit and stores charges; the charge pump circuit obtains the charges and controls the discharging circuit to supply power to the second isolation circuit, realizing self-power supply of the RS232 communication circuit, eliminating the need for an independent power supply and reducing the circuit cost. Brief Description of the Drawings

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the structures shown in these drawings without creative efforts.

[0027] Figure 1 is a functional module diagram of an embodiment of the RS232 communication circuit of the present invention;

[0028] Figure 2 is Figure 1 a schematic structural diagram of an optional RS232 communication circuit.

[0029] Explanation of the reference numerals in the drawings:

[0030]

[0031] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the drawings. Detailed Embodiments

[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0033] It should be noted that if there are directional indications (such as up, down, left, right, front, back...) involved in the embodiments of the present invention, then such directional indications are only used to explain the relative positional relationship, movement conditions, etc. between components in a certain specific posture (as shown in the attached drawings). If this specific posture changes, then the directional indications will also change accordingly.

[0034] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, then such descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement it. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0035] The present invention provides an RS232 communication circuit.

[0036] Refer to Figure 1 In one embodiment, the circuit includes an RS232 interface J1, a charging circuit 100, a charge pump circuit 200, a discharging circuit 300, a first isolation circuit 400, and a second isolation circuit 500; the input end of the charging circuit 100 is connected to the sending end TX of the RS232 interface J1, the first output end of the charging circuit 100 is connected to the receiving end RX_RS232 of the controller MCU via the first isolation circuit 400, the second output end of the charging circuit 100 is connected to the first end of the charge pump circuit 200, the second end of the charge pump circuit 200 is connected to the first end of the discharging circuit 300, the third end of the charge pump circuit 200 is connected to the second end of the discharging circuit 300, and the third end of the discharging circuit 300 is connected to the sending end RX_RS232 of the controller MCU via the second isolation circuit 500; wherein, the charging circuit 100 is configured to take power from the sending end TX of the RS232 interface J1 and then supply power to the first isolation circuit 400 and store charges; the charge pump circuit 200 is configured to obtain the charges from the charging circuit 100 and control the discharging circuit 300 to supply power to the second isolation circuit 500 according to the charges.

[0037] Further, the receiving end RX of the RS232 interface J1 is connected to the transmitting end TX_RS232 of the controller MCU via the second isolation circuit 500; wherein, the charging circuit 100 is further configured to transmit the first level signal to the first isolation circuit 400 when the transmitting end TX of the RS232 interface J1 transmits the first level signal; the first isolation circuit 400 is configured to convert the first level signal into a second level signal and transmit it to the receiving end RX_RS232 of the controller MCU when receiving the first level signal; the second isolation circuit 500 is configured to convert the third level signal into a fourth level signal and transmit it to the receiving end RX of the RS232 interface J1 when the transmitting end of the controller MCU transmits the third level signal.

[0038] It should be understood that since the logic of the TTL level is different from that of the RS232 level, when data is transmitted between the RS232 interface J1 and the controller MCU, the TTL level signal needs to be converted into the RS232 level signal, or the RS232 level signal needs to be converted into the TTL level signal.

[0039] Normally, an independent power supply is required in the RS232 communication circuit to supply power to the RS232 communication chip and the isolation optocoupler to achieve the conversion and isolation between levels. In this embodiment, through the above circuit design, the level conversion between the RS232 interface J1 and the controller MCU can be achieved without the RS232 communication chip, and since the charging circuit 100 takes power from the transmitting end TX of the RS232 interface J1 to supply power to the isolation circuit, the self-power supply of the RS232 communication circuit is realized.

[0040] In this embodiment, an RS232 interface, a charging circuit, a charge pump circuit, a discharge circuit, a first isolation circuit and a second isolation circuit are provided in the RS232 communication circuit; the input end of the charging circuit is connected to the transmitting end of the RS232 interface, the first output end of the charging circuit is connected to the receiving end of the controller via the first isolation circuit, the second output end of the charging circuit is connected to the first end of the charge pump circuit, the second end of the charge pump circuit is connected to the first end of the discharge circuit, the third end of the charge pump circuit is connected to the second end of the discharge circuit, and the third end of the discharge circuit is connected to the transmitting end of the controller via the second isolation circuit. Among them, after the charging circuit takes power from the transmitting end of the RS232 interface, it supplies power to the first isolation circuit and stores charges; the charge pump circuit obtains the charges and controls the discharge circuit to supply power to the second isolation circuit, realizing the self-power supply of the RS232 communication circuit, without the need to use an independent power supply, and reducing the circuit cost.

[0041] Please refer to Figure 1 and Figure 2 , Figure 2 ForFigure 1 Optional structural schematic diagram of the RS232 communication circuit.

[0042] In this embodiment, the charging circuit 100 includes a first Schottky diode D1 and a first capacitor C1; the first end of the first Schottky diode D1 is connected to the transmission end TX of the RS232 interface J1, the second end of the first Schottky diode D1 is connected to the power supply end of the first isolation circuit 400, the third end V- of the first Schottky diode D1 is connected to the first end of the charge pump circuit 200, and the third end V- of the first Schottky diode D1 is also connected to the first ground GND_SYS through the first capacitor C1.

[0043] It should be understood that the first Schottky diode D1 preferably uses a low-drop Schottky diode, so that the forward voltage drop loss can be effectively reduced.

[0044] When the RS232 cable is connected, the initial state of the transmission end TX of the RS232 interface J1 is logic '1'. Since RS232 is negative logic, without considering the voltage drop of the first Schottky diode D1, the voltage of the transmission end TX of the RS232 interface J1 is -15V to -5V. The negative level on the transmission end TX of the RS232 interface J1 charges the first capacitor C1 through the first Schottky diode D1, and a -15V to -5V level is formed on the V- network.

[0045] Further, the charge pump circuit 200 includes a charge pump chip U3, a second capacitor C2, a first resistor R1 and a second resistor R2; the ground end GND of the charge pump chip U3 is respectively connected to the output end OUT of the charge pump chip U3, the first end of the first resistor R1 and the first capacitor C1, the enable end EN of the charge pump chip U3 is connected to the second end of the first resistor R1, the enable end EN of the charge pump chip U3 is also connected to the first ground GND_SYS through the second resistor R2, the input end IN of the charge pump chip U3 is respectively connected to the first ground GND_SYS and the first end of the discharge circuit 300, and the external capacitor terminal CFLY+ of the charge pump chip U3 is connected to the second end of the discharge circuit 300 through the second capacitor C2.

[0046] In specific implementation, appropriate values should be selected for the first resistor R1 and the second resistor R2 to enable the charge pump chip U3 to work when the RS232 level fluctuates between 5V and 15V.

[0047] In one embodiment, the charge pump chip U3 uses the SGM3209 charge pump chip of SG micro Corporation. The chip internally designs a solid-state switch with a default frequency of 120 kHz, and the output capacity can reach 100 mA. It can continuously pump the charge on the first capacitor C1 to the discharge circuit 300. Correspondingly, the capacitances of the first capacitor C1 and the second capacitor C2 are 10 uF.

[0048] It should be understood that when a voltage level of -15 to -5 V is formed on the V- network, since V- is connected to the ground terminal GND of the charge pump chip U3, the voltage of the ground terminal GND of the charge pump chip U3 is -15 to -5 V at this time. The input terminal IN of the charge pump chip U3 is connected to the first ground GND_SYS. Therefore, a positive voltage of 5 to 15 V is formed between the input terminal IN and the ground terminal GND of the charge pump chip U3. After this positive voltage is divided by the first resistor R1 and the second resistor R2, the level of the enable terminal EN of the charge pump chip U3 is raised above the threshold voltage of 1.4 V for chip operation, and the charge pump chip U3 starts to work.

[0049] Further, the discharge circuit 300 includes a second Schottky diode D2 and a third capacitor C3; the first terminal of the second Schottky diode D2 is connected to the input terminal IN of the charge pump chip U3, the second terminal of the second Schottky diode D2 is connected to the second capacitor C2, the third terminal of the second Schottky diode D2 is connected to the power supply terminal V+ of the second isolation circuit 500, and the third terminal of the second Schottky diode D2 is also connected to the first ground GND_SYS through the third capacitor C3.

[0050] It should be understood that the second Schottky diode D2 preferably uses a low-drop Schottky diode, so that the forward voltage drop loss can be effectively reduced.

[0051] In a specific implementation, according to the operating logic of the charge pump chip U3, the charge pump chip U3 bridges and pumps the negative voltage on the first capacitor C1 to the third capacitor C3 through the second capacitor C2 in the second half cycle of each switching cycle. Without considering the voltage drops of the first Schottky diode D1 and the second Schottky diode D2, the voltage on the third capacitor C3 reaches +5 to +15 V. Furthermore, a positive voltage is formed on the V+ network of the second isolation circuit 500, achieving the purpose of supplying power to the second isolation circuit 500.

[0052] Every time the level of the sending end of the RS232 interface J1 is -15 to -5 V, the charge pump chip U3 will supply energy to the third capacitor C3, that is, the V+ network, to maintain the level on V+.

[0053] Further, the first isolation circuit 400 includes a first optocoupler DS1, a third resistor R3, and a fourth resistor R4; wherein, a first end of the first optocoupler DS1 is connected to a second end of the first Schottky diode D1 via the third resistor R3, a second end of the first optocoupler DS1 is connected to a first ground GND_SYS, a third end of the first optocoupler DS1 is respectively connected to a receiving end RX of the controller MCU and a first end of the fourth resistor R4, a fourth end of the first optocoupler DS1 is connected to a second ground DGND; a second end of the fourth resistor R4 is connected to a power supply V1.

[0054] It should be understood that the second ground DGND and the first ground GND_SYS are different grounds, wherein the second ground DGND refers to the ground of the controller MCU.

[0055] Further, the second isolation circuit 500 includes a second optocoupler DS2, a fifth resistor R5, and a sixth resistor R6; wherein, a first end of the second optocoupler DS2 is connected to a third end of the second Schottky diode D2, a second end of the second optocoupler DS2 is respectively connected to a first end of the fifth resistor R5 and a receiving end RX of the RS232 interface J1, a third end of the second optocoupler DS2 is connected to the power supply V1, a fourth end of the second optocoupler DS2 is connected to a transmitting end TX of the controller MCU via the sixth resistor R6; a second end of the fifth resistor R5 is respectively connected to a ground end GND of the charge pump chip U3 and a third end V- of the first Schottky diode D1.

[0056] It should be noted that the first optocoupler DS1 and the second optocoupler DS2 are used to achieve isolation between the R232 interface and the controller MCU, so as to ensure that people are not affected by the potential risk of high voltage on the power grid at the power supply V1 end when operating the RS232 communication circuit. The design of the first optocoupler DS1 and the second optocoupler DS2 can meet the IEC standard, that is, the isolation ability requirement reaches 4 kV.

[0057] In a specific implementation, when +15V and -15V of RS232 are simultaneously applied to the fifth resistor R5, the power is about 0.09W. In order to ensure the stability of the circuit, the power tolerance of the fifth resistor R5 needs to meet the requirement of being greater than 0.09W.

[0058] Further, the RS232 communication circuit further includes a protection circuit 600. A first end of the protection circuit 600 is respectively connected to a transmitting end TX of the RS232 interface J1 and an input end of the charging circuit 100. A second end of the protection circuit 600 is respectively connected to a receiving end RX of the RS232 interface J1 and the second isolation circuit 500. A third end of the protection circuit 600 is connected to the first ground GND_SYS.

[0059] Further, the protection circuit 600 includes a first bidirectional transient voltage suppressor diode TVS1 and a second bidirectional transient voltage suppressor diode TVS2; a first end of the first bidirectional transient voltage suppressor diode TVS1 is connected to a transmitting end of the RS232 interface J1, and a second end of the first bidirectional transient voltage suppressor diode TVS1 is connected to a first ground GND_SYS; a first end of the second bidirectional transient voltage suppressor diode TVS2 is connected to a receiving end of the RS232 interface J1, and a second end of the second bidirectional transient voltage suppressor diode TVS2 is connected to the first ground GND_SYS.

[0060] It should be understood that the first bidirectional transient voltage suppressor diode TVS1 and the second bidirectional transient voltage suppressor diode TVS2 are used to absorb instantaneous overvoltage signals on the RS232 communication circuit to protect the circuit 600. In one embodiment, the first bidirectional transient voltage suppressor diode TVS1 and the second bidirectional transient voltage suppressor diode TVS2 are voltage-resistant devices that can continuously withstand 4 kV AC.

[0061] Hereinafter, in combination with Figure 1 and Figure 2 the implementation principle of the power supply V1 in this embodiment will be described:

[0062] When the RS232 cable is connected, the initial state of the transmitting end TX of the RS232 interface J1 is logic '1'. Since RS232 is a negative logic, without considering the voltage drop of the first Schottky diode D1, the voltage of the transmitting end TX of the RS232 interface J1 is -15 V to -5 V. The negative level on the transmitting end TX of the RS232 interface J1 charges the first capacitor C1 through the first Schottky diode D1, and a -15 V to -5 V level is formed on the V- network.

[0063] Since V- is connected to the ground terminal GND of the charge pump chip U3, the voltage of the ground terminal GND of the charge pump chip U3 is -15 V to -5 V at this time. The input terminal IN of the charge pump chip U3 is connected to the first ground GND_SYS. Therefore, a positive voltage of 5 V to 15 V is formed between the input terminal IN and the ground terminal GND of the charge pump chip U3. After being divided by the first resistor R1 and the second resistor R2, the level of the enable terminal EN of the charge pump chip U3 is raised above the threshold voltage of 1.4 V for chip operation, and the charge pump chip U3 starts to operate.

[0064] According to the operating logic of the charge pump chip U3, the charge pump chip U3 bridges and pumps the negative voltage on the first capacitor C1 to the third capacitor C3 through the second capacitor C2 in the second half cycle of each switching cycle. Without considering the voltage drops of the first Schottky diode D1 and the second Schottky diode D2, the voltage on the third capacitor C3 reaches +5 V to +15 V. Furthermore, a positive voltage is formed on the V+ network of the second isolation circuit 500, achieving the purpose of supplying power to the second isolation circuit 500.

[0065] In this embodiment, the implementation principle of RS232 communication is as follows:

[0066] When the transmitting end TX of the RS232 interface J1 jumps from logic '1' to logic '0', the RS232 interface J1 sends data. Since RS232 is negative logic, the voltage of the transmitting end of the RS232 interface J1 is 5 - 15V. This 5 - 15V voltage is transmitted to the first optocoupler DS1 after passing through the first Schottky diode D1. The light-emitting diode of the first optocoupler DS1 conducts, and the level of the receiving end RX_RS232 of the controller MCU is pulled to DGND, realizing the transmission of logic '0'.

[0067] When the transmitting end TX of the RS232 interface J1 jumps from logic '0' to logic '1', the level of the transmitting end of the RS232 interface J1 is -15 - -5V. The light-emitting diode of the first optocoupler DS1 is cut off, and the level of the receiving end RX_RS232 of the controller MCU is pulled up by the power supply V1, realizing the transmission of logic '1'.

[0068] When the transmitting end TX_RS232 of the controller MCU sends a high-level signal, the light-emitting diode of the second optocoupler DS2 is cut off. The receiving end RX of the RS232 interface J1 is pulled down to the V- voltage, that is, -15 - -5V, by the fifth resistor R5. According to the RS232 logic, its logic is '1', realizing the transmission of logic '1'.

[0069] When the transmitting end TX_RS232 of the controller MCU sends a low-level signal, the light-emitting diode of the second optocoupler DS2 conducts. The receiving end RX of the RS232 interface J1 is pulled up to 5 - 15V by V+. According to the RS232 logic, its logic is '0', realizing the transmission of logic '0'.

[0070] In this embodiment, through the specific design of the charging circuit, charge pump circuit, discharging circuit, first isolation circuit and second isolation circuit, power is taken from the transmitting end of RS232 and the charge is stored in the first capacitor. By the operation of the charge pump chip, a positive voltage is accumulated on the third capacitor to supply power to the isolation circuit, realizing RS232 communication and self-power supply, and solving the power supply problem of the RS232 communication circuit at low cost.

[0071] The present invention also proposes an RS232 communication device. The RS232 communication device includes the RS232 communication circuit as described above. The circuit structure of the RS232 communication circuit of the RS232 communication device can refer to the above embodiment and will not be elaborated here. It can be understood that since the RS232 communication device of this embodiment adopts the technical solution of the above RS232 communication circuit, the RS232 communication device has all the above beneficial effects.

[0072] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.

Claims

1. An RS232 communication circuit, characterized in that, It includes an RS232 interface, a charging circuit, a charge pump circuit, a discharging circuit, a first isolation circuit and a second isolation circuit; the input end of the charging circuit is connected to the sending end of the RS232 interface, the first output end of the charging circuit is connected to the receiving end of the controller via the first isolation circuit, the second output end of the charging circuit is connected to the first end of the charge pump circuit, the second end of the charge pump circuit is connected to the first end of the discharging circuit, the third end of the charge pump circuit is connected to the second end of the discharging circuit, and the third end of the discharging circuit is connected to the sending end of the controller via the second isolation circuit; wherein, the charging circuit is used for taking power from the sending end of the RS232 interface, supplying power to the first isolation circuit, and storing charges; the charge pump circuit is used for obtaining the charges from the charging circuit and controlling the discharging circuit to supply power to the second isolation circuit according to the charges. When data is transmitted between the RS232 interface and the controller, it is necessary to convert the TTL level signal into an RS232 level signal, or convert the RS232 level signal into a TTL level signal. The receiving end of the RS232 interface is connected to the sending end of the controller via the second isolation circuit; wherein, the charging circuit is further used for transmitting the first level signal to the first isolation circuit when the sending end of the RS232 interface sends the first level signal; the first isolation circuit is used for converting the first level signal into a second level signal and sending it to the receiving end of the controller when receiving the first level signal; the second isolation circuit is used for converting the third level signal into a fourth level signal and sending it to the receiving end of the RS232 interface when the sending end of the controller sends the third level signal.

2. The RS232 communication circuit according to claim 1, characterized in that, The charging circuit includes a first Schottky diode and a first capacitor; the first end of the first Schottky diode is connected to the sending end of the RS232 interface, the second end of the first Schottky diode is connected to the power supply end of the first isolation circuit, the third end of the first Schottky diode is connected to the first end of the charge pump circuit, and the third end of the first Schottky diode is also connected to the first ground via the first capacitor.

3. The RS232 communication circuit according to claim 2, characterized in that, The charge pump circuit includes a charge pump chip, a second capacitor, a first resistor and a second resistor; the grounding end of the charge pump chip is respectively connected to the output end of the charge pump chip, the first end of the first resistor and the first capacitor, the enabling end of the charge pump chip is connected to the second end of the first resistor, the enabling end of the charge pump chip is also connected to the first ground via the second resistor, the input end of the charge pump chip is respectively connected to the first ground and the first end of the discharging circuit, and the external capacitor end of the charge pump chip is connected to the second end of the discharging circuit via the second capacitor.

4. The RS232 communication circuit according to claim 3, characterized in that, The discharge circuit includes a second Schottky diode and a third capacitor; a first end of the second Schottky diode is connected to an input end of the charge pump chip, a second end of the second Schottky diode is connected to the second capacitor, a third end of the second Schottky diode is connected to a power supply end of the second isolation circuit, and the third end of the second Schottky diode is also connected to a first ground through the third capacitor.

5. The RS232 communication circuit according to claim 4, characterized in that, The first isolation circuit includes a first optocoupler, a third resistor, and a fourth resistor; wherein, a first end of the first optocoupler is connected to a second end of the first Schottky diode through the third resistor, a second end of the first optocoupler is connected to a first ground, a third end of the first optocoupler is respectively connected to a receiving end of the controller and a first end of the fourth resistor, and a fourth end of the first optocoupler is connected to a second ground; a second end of the fourth resistor is connected to a power supply.

6. The RS232 communication circuit according to claim 5, wherein, The second isolation circuit includes a second optocoupler, a fifth resistor, and a sixth resistor; wherein, a first end of the second optocoupler is connected to a third end of the second Schottky diode, a second end of the second optocoupler is respectively connected to a first end of the fifth resistor and a receiving end of the RS232 interface, a third end of the second optocoupler is connected to the power supply, and a fourth end of the second optocoupler is connected to a sending end of the controller through the sixth resistor; a second end of the fifth resistor is respectively connected to a grounding end of the charge pump chip and a third end of the first Schottky diode.

7. The RS232 communication circuit according to any one of claims 1 to 6, characterized in that The RS232 communication circuit further includes a protection circuit, a first end of the protection circuit is respectively connected to a sending end of the RS232 interface and an input end of the charging circuit, a second end of the protection circuit is respectively connected to a receiving end of the RS232 interface and the second isolation circuit, and a third end of the protection circuit is connected to a first ground.

8. The RS232 communication circuit according to claim 7, characterized in that, The protection circuit includes a first bidirectional transient voltage suppressor diode and a second bidirectional transient voltage suppressor diode; a first end of the first bidirectional transient voltage suppressor diode is connected to the sending end of the RS232 interface, and a second end of the first bidirectional transient voltage suppressor diode is connected to a first ground; a first end of the second bidirectional transient voltage suppressor diode is connected to the receiving end of the RS232 interface, and a second end of the second bidirectional transient voltage suppressor diode is connected to a first ground.

9. An electronic device, characterized in that, It includes the RS232 communication circuit according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Passive isolation type RS232 serial port communication circuit

    CN109547010A

  • RS232 communication circuit and electronic equipment

    CN214098413U