A serial port level conversion circuit

By simplifying the design of the serial port level conversion circuit and using boost and buck modules composed of resistors, MOS transistors, and transistors, the problems of complexity and high cost of serial port level conversion in the existing technology are solved, and a more stable and efficient implementation is achieved. serial communication.

CN111427825BActive Publication Date: 2024-10-25GUANGDONG AOLING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010287990.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-13
Publication Date
2024-10-25
Estimated Expiration
2040-04-13

AI Technical Summary

Technical Problem

The existing serial port level conversion circuit is complex, resulting in high circuit cost, unstable serial port communication, and low response efficiency.

Method used

Adopt a simplified serial port level conversion circuit design, including a boost module and a buck module, using resistors, MOS tubes, and transistors to reduce the use of filter components and achieve level conversion from high voltage to low voltage and low voltage to high voltage.

Benefits of technology

It reduces the circuit cost, improves the stability and response efficiency of serial communication, and simplifies the circuit design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111427825B_ABST
    Figure CN111427825B_ABST
Patent Text Reader

Abstract

The present invention discloses a serial port level conversion circuit, comprising: a first serial port module, a second serial port module, a step-down module and a step-up module; one end of the step-up module is connected to the receiving end of the first serial port module, and the other end is connected to the transmitting end of the second serial port module; the step-up module comprises a first resistor, a second resistor, a third resistor, a MOS tube and a triode; one end of the step-down module is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; the step-down module comprises a fourth resistor and a fifth resistor; the serial port level conversion circuit disclosed by the present invention simplifies the circuit by reducing the use of filtering elements, and improves the stability and response efficiency of serial port communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of serial port communication, and in particular to a serial port level conversion circuit. Background Art

[0002] At present, in circuit design, since there are units powered by different voltages, serial ports are used for data transmission between units. The existing serial port level conversion circuits are often too complicated and require the addition of some electronic components or even dedicated chips for level conversion, such as the use of some transistors, capacitors and other filtering elements. However, doing so not only increases the circuit cost, but also easily causes phase shift and affects the timing, making the serial port communication unstable and the response efficiency low. Summary of the invention

[0003] The present invention aims at solving the problems in the prior art and provides a serial port level conversion circuit, thereby improving the stability and response efficiency of serial port communication.

[0004] To achieve the above object, an embodiment of the present invention provides a serial port level conversion circuit, comprising: a first serial port module, a second serial port module, a step-down module and a step-up module;

[0005] One end of the boost module is connected to the receiving end of the first serial port module, and the other end is connected to the transmitting end of the second serial port module; wherein the boost module includes a first resistor, a second resistor, a third resistor, a MOS tube and a triode;

[0006] One end of the first resistor is connected to the transmitting end of the first serial port module, and the other end is connected to the base of the transistor; the emitter of the transistor is grounded, and the collector is connected to one end of the second resistor and the third resistor at the same time; the source of the MOS transistor is connected to the other end of the second resistor, the gate is connected to the other end of the third resistor, and the drain is connected to the receiving end of the first serial port module;

[0007] One end of the step-down module is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; wherein the step-down module includes a fourth resistor and a fifth resistor;

[0008] One end of the fifth resistor is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; one end of the fourth resistor is grounded, and the other end is connected to the receiving end of the second serial port module; wherein the resistance value of the fourth resistor is greater than or equal to five times the impedance of the receiving end of the second serial port module.

[0009] Further, the fourth resistor and the fifth resistor satisfy the following relationship: R5=R4 / ((VCC1 / VCC2)-1); wherein R4 is the fourth resistor, R5 is the fifth resistor, VCC1 is the access voltage of the first serial port module, and VCC2 is the access voltage of the second serial port module.

[0010] Furthermore, the serial port level conversion circuit further includes a sixth resistor, one end of the sixth resistor is grounded, and the other end is connected to the drain of the MOS tube.

[0011] Furthermore, the access voltage of the first serial port module is greater than the access voltage of the second serial port module.

[0012] Furthermore, the second resistor access voltage is the same as the first serial port module access voltage.

[0013] Furthermore, the MOS tube is a PMOS tube, and the transistor is an NPN transistor.

[0014] Furthermore, the second serial port module is one of an MCU module, a NB-IOT module and a ZIGBEE module.

[0015] Furthermore, the input voltage of the second serial port module is less than or equal to 3.3V.

[0016] Furthermore, the first serial port module is one of an MCU module, a sensor module, an RS232 module, and an RS485 module.

[0017] Furthermore, the input voltage of the first serial port module is greater than or equal to 5V.

[0018] Compared with the prior art, the serial port level conversion circuit provided in the embodiment of the present invention simplifies the circuit, reduces the production cost, and improves the stability and response efficiency of the serial port module communication by reducing the use of filtering elements such as transistors and capacitors. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 The present invention provides a circuit diagram of a serial port level conversion circuit.

[0020] Figure 2 It is a module connection diagram of the serial port level conversion circuit provided by the present invention. DETAILED DESCRIPTION

[0021] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work belong to the scope of protection of the present invention.

[0022] See also Figure 1 , a circuit diagram of a serial port level conversion circuit provided by an embodiment of the present invention includes: a first serial port module, a second serial port module, a buck module and a boost module;

[0023] One end of the boost module is connected to the receiving end of the first serial port module, and the other end is connected to the transmitting end of the second serial port module; wherein the boost module includes a first resistor, a second resistor, a third resistor, a MOS tube and a triode;

[0024] One end of the first resistor is connected to the transmitting end of the first serial port module, and the other end is connected to the base of the transistor; the emitter of the transistor is grounded, and the collector is connected to one end of the second resistor and the third resistor at the same time; the source of the MOS transistor is connected to the other end of the second resistor, the gate is connected to the other end of the third resistor, and the drain is connected to the receiving end of the first serial port module;

[0025] One end of the step-down module is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; wherein the step-down module includes a fourth resistor and a fifth resistor;

[0026] One end of the fifth resistor is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; one end of the fourth resistor is grounded, and the other end is connected to the receiving end of the second serial port module; wherein the resistance value of the fourth resistor is greater than or equal to five times the impedance of the receiving end of the second serial port module.

[0027] In this embodiment, a serial port level conversion circuit is provided, wherein the first serial port module access voltage and the second serial port module access voltage are VCC1 and VCC2 respectively, and VCC1 is greater than VCC2; since VCC1 and VCC2 are not equal, the transmitting and receiving ends of the two serial port units cannot be directly connected, so it is necessary to Figure 1 The level conversion circuit shown is switched, where R4 and R5 form a set of step-down circuits to enable the high-voltage powered serial port module to transmit data to the low-voltage powered serial port module. Specifically, the transmitting pin of the high-voltage power supply unit is stepped down by resistors R4 and R5 and directly converted into a voltage suitable for the receiving pin of the low-voltage unit. The selection of R4 and R5 is that R4 must be more than 5 times greater than the impedance of the receiving end of the low-voltage unit.

[0028] R1, R2, R3 and Q1, Q2 form a set of boost circuit and pulse control circuit, which can realize the serial port module with low voltage power supply to transmit data to the serial port module with high voltage power supply. When the serial port transmitting end with low voltage power supply is at high level, the high level is VCC2, which passes through R1 to turn on NPN transistor Q2. At this time, the gate of PMOS tube Q1 is pulled down due to Q2 turning on, so that Q1 is also turned on, that is, VCC1 is directly connected to the serial port receiving end of the high voltage power supply unit, that is, the receiving end is also at high level VCC1 at this time, and when the serial port transmitting end with low voltage power supply is at low level, the low level passes through R1 to turn off NPN transistor Q2, so that the serial port receiving end of the high voltage power supply unit is directly pulled into low level by R6. Since the turn-on and turn-off time of Q1 and Q2 are very fast, the signal transmitted by the low voltage serial port can be converted into a high voltage serial port receiving signal without delay. In this boost module, specific values ​​can be entered to enable a low-voltage powered serial port module to transmit data to a high-voltage powered serial port module; for example, using: R1=1K, R2=10K, R3=470Ω, a PMOS tube Q1 of model AO3401, and a transistor Q2 of model SS8050, a 3.3V serial port can transmit data to a serial port above 5V.

[0029] In a serial port level conversion circuit provided in a certain embodiment of the present invention, the fourth resistor and the fifth resistor satisfy the following relationship: R5=R4 / ((VCC1 / VCC2)-1); wherein R4 is the fourth resistor, R5 is the fifth resistor, VCC1 is the access voltage of the first serial port module, and VCC2 is the access voltage of the second serial port module.

[0030] In this embodiment, after the resistance value of R4 is determined, R5 = R4 / ((VCC1 / VCC2)-1); for example, by using resistors R4 = 10K and R5 = 5.1K, a 5V-powered serial port circuit can transmit data to a 3.3V-powered serial port, and the high-voltage serial port transmission signal can be simply and stably converted into a low-voltage serial port reception signal without delay.

[0031] A serial port level conversion circuit provided in an embodiment of the present invention further includes a sixth resistor, one end of the sixth resistor is grounded, and the other end is connected to the drain of the MOS tube.

[0032] In a certain embodiment of the present invention, a serial port level conversion circuit is provided, wherein the first serial port module access voltage is greater than the second serial port module access voltage.

[0033] In a serial port level conversion circuit provided in one embodiment of the present invention, the second resistor access voltage is the same as the first serial port module access voltage.

[0034] In a serial port level conversion circuit provided in a certain embodiment of the present invention, the MOS tube is a PMOS tube, and the transistor is an NPN transistor.

[0035] In this embodiment, the MOS transistor used is a PMOS transistor, which can be divided into two categories: N-channel and P-channel. The hole mobility of the P-channel MOS transistor is low, so when the geometric size of the MOS transistor and the absolute value of the working voltage are equal, the transconductance of the PMOS transistor is smaller than that of the N-channel MOS transistor. In addition, the absolute value of the threshold voltage of the P-channel MOS transistor is generally high, requiring a higher working voltage. The voltage and polarity of its power supply are incompatible with the bipolar transistor-transistor logic circuit. PMOS has a large logic swing, a long charging and discharging process, and a small device transconductance, so the working speed is lower. The transistor used is an NPN transistor, whose main functions are current amplification and switching. It can convert weak electrical signals into signals of a certain intensity. This conversion still follows the law of energy conservation. It only converts the energy of the power supply into the energy of the signal. An important parameter of the transistor is the current amplification factor β. When a small current is added to the base of the transistor, a current β times the injected current can be obtained at the collector, that is, the collector current. The collector current changes with the base current, and a small change in the base current can cause a large change in the collector current, which is the amplification effect of the transistor.

[0036] In a serial port level conversion circuit provided in a certain embodiment of the present invention, the second serial port module is one of an MCU module, a NB-IOT module and a ZIGBEE module.

[0037] In this embodiment, the MCU module is a microcontroller unit, also known as a single chip microcomputer or a single chip microcomputer. It appropriately reduces the frequency and specifications of the central processing unit (CPU), and integrates memory, timer, USB, A / D conversion, UART, PLC, DMA and other peripheral interfaces, and even LCD drive circuits on a single chip to form a chip-level computer, which can perform different combination controls for different application scenarios. MCUs can be seen in mobile phones, PC peripherals, remote controls, automotive electronics, industrial stepper motors, and robot arm control.

[0038] In a serial port level conversion circuit provided in one embodiment of the present invention, the second serial port module access voltage is less than or equal to 3.3V.

[0039] In a serial port level conversion circuit provided in a certain embodiment of the present invention, the first serial port module is one of an MCU, a sensor module, an RS232 module, and an RS485 module.

[0040] In this embodiment, the RS232 / RS485 to Ethernet module is a device used to realize transparent transmission of network data packet RS232 or RS485 interface data. The sensor module can sense the measured information and transform the sensed information into electrical signals or other required forms of information output according to certain rules to meet the requirements of information transmission, processing, storage, display, recording and control. The characteristics of the sensor include: miniaturization, digitization, intelligence, multi-function, systematization and networking. It is the primary link to realize automatic detection and automatic control, and can be divided into thermal sensors, photosensitive sensors, gas sensors, force sensors, magnetic sensors, humidity sensors, sound sensors, radiation sensors, color sensors and taste sensors.

[0041] In a serial port level conversion circuit provided in one embodiment of the present invention, the input voltage of the first serial port module is greater than or equal to 5V.

[0042] What is disclosed above is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.

Claims

1. A serial port level conversion circuit, characterized in that: include: A first serial port module, a second serial port module, a voltage reduction module and a voltage increase module; One end of the boost module is connected to the receiving end of the first serial port module, and the other end is connected to the transmitting end of the second serial port module; wherein the boost module includes a first resistor, a second resistor, a third resistor, a MOS tube and a triode; One end of the first resistor is connected to the transmitting end of the first serial port module, and the other end is connected to the base of the transistor; the emitter of the transistor is grounded, and the collector is connected to one end of the second resistor and the third resistor at the same time; the source of the MOS transistor is connected to the other end of the second resistor, the gate is connected to the other end of the third resistor, and the drain is connected to the receiving end of the first serial port module; One end of the step-down module is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; wherein the step-down module includes a fourth resistor and a fifth resistor; One end of the fifth resistor is connected to the transmitting end of the first serial port module, and the other end is connected to the receiving end of the second serial port module; one end of the fourth resistor is grounded, and one end is connected to the receiving end of the second serial port module; wherein the resistance value of the fourth resistor is greater than or equal to five times the impedance of the receiving end of the second serial port module; The fourth resistor and the fifth resistor satisfy the following relationship: R5=R4 / ((VCC1 / VCC2)-1); wherein R4 is the fourth resistor, R5 is the fifth resistor, VCC1 is the access voltage of the first serial port module, and VCC2 is the access voltage of the second serial port module; The serial port level conversion circuit further includes a sixth resistor, one end of which is grounded, and the other end of which is connected to the drain of the MOS tube.

2. The serial port level conversion circuit according to claim 1, characterized in that: The first serial port module access voltage is greater than the second serial port module access voltage.

3. The serial port level conversion circuit according to claim 1, characterized in that: The second resistor access voltage is the same as the first serial port module access voltage.

4. The serial port level conversion circuit according to claim 1, characterized in that: The MOS tube is a PMOS tube, and the transistor is an NPN transistor.

5. The serial port level conversion circuit according to claim 1, characterized in that: The second serial port module is one of an MCU module, a NB-IOT module and a ZIGBEE module.

6. The serial port level conversion circuit according to claim 1, characterized in that: The input voltage of the second serial port module is less than or equal to 3.3V.

7. The serial port level conversion circuit according to claim 1, characterized in that: The first serial port module is one of an MCU module, a sensor module, an RS232 module, and an RS485 module.

8. The serial port level conversion circuit according to claim 1, characterized in that: The input voltage of the first serial port module is greater than or equal to 5V.