Serial port debugger suitable for low-power-consumption test
By combining the communication level conversion unit and the level selection switch unit in the serial debugger, presetting multiple levels and using the MOS tube level conversion circuit, the problems of MCU communication level complexity and measurement deviation in low-power application scenarios are solved, and high-precision serial debugging and independent power supply are achieved.
Patent Information
- Application Number
- CN202422015367.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2034-08-20
AI Technical Summary
In low-power application scenarios, the communication level of the MCU is complex and changeable, and ordinary serial debuggers transmit power through the serial port, resulting in measurement deviation.
A serial debugger suitable for low-power testing is designed, using the cooperation of the communication level conversion unit and the level selection switch unit, preset 5V, 3.3V and 1.8V levels, select the communication level through a single-pole multi-throw switch, and use the MOS tube level conversion circuit to isolate the equipment for power supply.
It realizes accurate debugging of serial communication in low-power scenarios, avoids level judgment errors, improves the accuracy of serial debugging, and ensures independent power supply between the equipment and external communication devices.
Smart Images

Figure CN222914199U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of serial port debuggers, in particular to a serial port debugger suitable for low power consumption testing. Background Art
[0002] With the development of embedded systems and IoT devices, serial communication has become an important data transmission method in the research and development and testing of equipment. At present, embedded systems and IoT devices include embedded IoT technology, UART communication technology, voltage level and level conversion technology of embedded devices. Among them, embedded IoT technology is a technology that combines embedded system technology with IoT technology. Embedded systems are the product of combining advanced computer technology, semiconductor technology and electronic technology with specific applications in various industries. IoT is a communication perception technology through intelligent perception, recognition technology and ubiquitous computing.
[0003] UART communication technology is the abbreviation of Universal Asynchronous Receiver / Transmitter. It is simple, flexible and versatile. UART communication is a common communication method in embedded systems and microcontroller programming. It can be used for serial communication with external devices, and can also be used by the host computer to monitor the device and query data.
[0004] In the voltage level of embedded devices, the supply voltage range of embedded devices is 1.8V to 5V, among which 1.8V, 2.5V, 3.3V and 5V are more common supply voltages. For application scenarios that require higher performance, it is usually in the range of 3.3V or even 5V; for application scenarios that are more sensitive to power consumption, such as some low-power sensor nodes, the supply voltage is generally lower, often in the range of 1.8V or 2.5V;
[0005] Level conversion technology: Communication between a microcontroller and other devices. When the voltage specifications of two devices are different, they cannot be directly connected for communication. At this time, a level converter is needed to convert the signal level of one device into a signal level acceptable to another device, thereby realizing communication between devices.
[0006] However, in some low-power application scenarios, the communication level of the MCU is complex and changeable. In addition, ordinary serial port debuggers will transfer power to the first-test device through the serial port, which will cause measurement deviations. Therefore, we need to propose a serial port debugger suitable for low-power testing to solve the above problems. Summary of the invention
[0007] The purpose of the utility model is to provide a serial port debugger suitable for low-power consumption testing. Through the cooperation of a communication level conversion unit and a level selection switch unit, 5V, 3.3V and 1.8V levels are preset in the circuit, and different communication levels can be selected through different gears of a single-pole multi-throw switch. The single-pole multi-throw switch is used to intuitively display the voltage value of the current serial port level, thereby avoiding level judgment errors during use and improving the accuracy of serial port debugging, so as to solve the problems raised in the background technology.
[0008] To achieve the above-mentioned purpose, the utility model provides the following technical solutions: a serial port debugger suitable for low-power consumption testing, comprising a communication level conversion unit and a level selection switch unit, wherein the level selection switch unit comprises a single-pole multi-throw switch which can intuitively display the current serial port level voltage value, one side of the single-pole multi-throw switch is connected to a multi-level level selection circuit preset with 5V, 3.3V and 1.8V levels, the communication level conversion unit comprises a MOS tube level conversion circuit, the other side of the single-pole multi-throw switch is connected to one end of the MOS tube level conversion circuit, and the other end of the MOS tube level conversion circuit is connected to an access port.
[0009] Preferably, the MOS tube level conversion circuit includes a MOS tube Q1 and a MOS tube Q2, a resistor R6 and a resistor R7 are connected in series between the gate and the drain of the MOS tube Q1, a resistor R9 and a resistor R10 are connected in series between the gate and the drain of the MOS tube Q2, a connecting end of the resistor R6 and the resistor R7 and a connecting end of the resistor R9 and the resistor R10 are both provided with a VOUT terminal, and the VOUT terminal is connected to three pins of a single-pole multi-throw switch, a source of the MOS tube Q1 is provided with a TX terminal, a drain of the MOS tube Q1 is provided with a TX_OUT terminal, a source of the MOS tube Q2 is provided with an RX terminal, and a drain of the MOS tube Q2 is provided with an RX_OUT terminal.
[0010] Preferably, when the TX terminal is at a high level, the gate and source of the MOS tube Q1 are not conducting, and the TX terminal and the TX_OUT terminal are both at a high level; when the TX terminal is at a low level, the gate and source of the MOS tube Q1 are conducting, and the TX terminal and the TX_OUT terminal are both at a low level.
[0011] Preferably, the multi-level level selection circuit includes a resistor R2 having one end connected to a 5V power supply VDD, a resistor R3 having one end connected to a 3.3V power supply, and a resistor R4 having one end connected to a 1.8V power supply, the other end of the resistor R2 is connected to a light-emitting diode LED2, one end of which is connected to pin ten of a single-pole multi-throw switch, the other end of the resistor R3 is connected to a light-emitting diode LED3, one end of which is connected to pin nine of the single-pole multi-throw switch, the other end of the resistor R4 is connected to a light-emitting diode LED4, one end of which is connected to pin seven of the single-pole multi-throw switch.
[0012] Preferably, eight pins of the single-pole multi-throw switch are grounded, two pins of the single-pole multi-throw switch are connected to a 3.3V voltage, and four pins of the single-pole multi-throw switch are connected to a 1.8V voltage.
[0013] Preferably, the access port includes a USBA interface and a Type-C interface, the USBA interface is connected to the TX_OUT end, and the Type-C interface is connected to the RX_OUT end.
[0014] Preferably, the access port further comprises an RS485 interface, one end of the RS485 interface is connected to an expansion board.
[0015] Compared with the prior art, the beneficial effects of the utility model are:
[0016] The utility model presets 5V, 3.3V and 1.8V levels in the circuit through the cooperation of the communication level conversion unit and the level selection switch unit, and can select different communication levels through different gears of the single-pole multi-throw switch. The single-pole multi-throw switch is used to intuitively display the voltage value of the current serial port level, thereby avoiding level judgment errors during use and improving the accuracy of serial port debugging.
[0017] The utility model sets a MOS tube level conversion circuit and utilizes the characteristics of the MOS tube level conversion circuit. When the external communication power supply is completely independent of the device, due to the presence of the MOS tube body diode, the power supply from our device to the external communication device can be isolated. At this time, if normal communication is required, the external device needs to supply power to the gate and source ends of the MOS. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a system block diagram of the utility model;
[0019] Figure 2 This is a circuit diagram of a level selection switch unit of the utility model;
[0020] Figure 3 This is a circuit diagram of a communication level conversion unit of the utility model. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the utility model to clearly and completely describe the technical solutions in the embodiments of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.
[0022] See also Figure 1-3 The utility model provides a technical solution: a serial port debugger suitable for low power consumption testing, including a communication level conversion unit and a level selection switch unit, the level selection switch unit includes a single-pole multi-throw switch that can intuitively display the current serial port level voltage value, one side of the single-pole multi-throw switch is connected to a multi-level level selection circuit preset with 5V, 3.3V and 1.8V levels, the communication level conversion unit includes a MOS tube level conversion circuit, the other side of the single-pole multi-throw switch is connected to one end of the MOS tube level conversion circuit, the other end of the MOS tube level conversion circuit is connected to an access port, and a 1.8V level is added to the traditional 5V and 3.3V communication levels, thereby increasing the available range of the device.
[0023] The MOS tube level conversion circuit includes a MOS tube Q1 and a MOS tube Q2. Resistors R6 and R7 are connected in series between the gate and drain of the MOS tube Q1. Resistors R9 and R10 are connected in series between the gate and drain of the MOS tube Q2. The connecting ends of the resistors R6 and R7 and the connecting ends of the resistors R9 and R10 are both provided with VOUT terminals, and the VOUT terminals are connected to the three pins of the single-pole multi-throw switch. The source of the MOS tube Q1 is provided with a TX terminal, the drain of the MOS tube Q1 is provided with a TX_OUT terminal, the source of the MOS tube Q2 is provided with an RX terminal, and the drain of the MOS tube Q2 is provided with an RX_OUT terminal. By utilizing the characteristics of the MOS tube level conversion circuit, when the external power supply of the communication is completely independent of the device, due to the existence of the MOS tube body diode, the power supply from our device to the external communication device can be isolated. At this time, if normal communication is required, the external device needs to supply power to the gate and source terminals of the MOS.
[0024] When the TX terminal is at a high level, the gate and source of the MOS tube Q1 are not conducting, and the TX terminal and TX_OUT terminal are both at a high level; when the TX terminal is at a low level, the gate and source of the MOS tube Q1 are conducting, and the TX terminal and TX_OUT terminal are both at a low level. Taking the MOS tube Q1 as an example, the power supply of the VOUT terminal comes from the selection of the single-pole multi-throw switch. When TX is high, there is no voltage drop between the gate and source of the MOS tube, so it is not connected, and TX and TX_OUT are both at a high level. When TX is low, the MOS tube is turned on, and TX and TX_OUT are both at a low level; when the single-pole multi-throw switch selects the floating position, the LED indicating the communication voltage will go out. At this time, if normal communication is required, an external device needs to be connected to the VOUT port to power the GS terminal of the MOS. When TX is high, there is no voltage drop between the MOS tube GS, so it is not connected, and TX and TX_OUT are both at a high level, but the voltages are independent of each other, and the VOUT device will not be powered through TX and RX. The working principle of the MOS tube Q2 is the same as that of the MOS tube Q1, and will not be described in detail here.
[0025] The multi-level level selection circuit includes a resistor R2 with one end connected to a 5V power supply VDD, a resistor R3 with one end connected to a 3.3V power supply, and a resistor R4 with one end connected to a 1.8V power supply. The other end of the resistor R2 is connected to a light-emitting diode LED2, and one end of the light-emitting diode LED2 is connected to the tenth pin of a single-pole multi-throw switch. The other end of the resistor R3 is connected to a light-emitting diode LED3, and one end of the light-emitting diode LED3 is connected to the nineth pin of the single-pole multi-throw switch. The other end of the resistor R4 is connected to a light-emitting diode LED4, and one end of the light-emitting diode LED4 is connected to the seventh pin of the single-pole multi-throw switch. The eightth pin of the single-pole multi-throw switch is grounded, the twoth pin of the single-pole multi-throw switch is connected to a 3.3V voltage, and the fourth pin of the single-pole multi-throw switch is connected to a 1.8V voltage. The compact single-pole multi-throw switch can also turn on the corresponding LED light when selecting the communication level, so as to judge the current communication voltage conveniently during use.
[0026] The access ports include USBA interface and Type-C interface. The USBA interface is connected to the TX_OUT end, and the Type-C interface is connected to the RX_OUT end. The USBA and Type-C superimposed layout is adopted. When different communication levels are selected, the corresponding light-emitting diode will be lit to prevent level errors and improve the accuracy of level use.
[0027] The access port also includes an RS485 interface, one end of which is connected to an expansion board. Through the RS485 interface reserved at the lower end of the device, the RS485 function can be added to the device by subsequently adding an expansion board.
[0028] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A serial port debugger suitable for low power consumption testing, comprising a communication level conversion unit and a level selection switch unit, characterized in that: The level selection switch unit includes a single-pole multi-throw switch that can intuitively display the current serial port level voltage value, one side of the single-pole multi-throw switch is connected to a multi-level level selection circuit preset with 5V, 3.3V and 1.8V levels, the communication level conversion unit includes a MOS tube level conversion circuit, the other side of the single-pole multi-throw switch is connected to one end of the MOS tube level conversion circuit, and the other end of the MOS tube level conversion circuit is connected to an access port.
2. A serial port debugger suitable for low power consumption testing according to claim 1, characterized in that: The MOS tube level conversion circuit includes a MOS tube Q1 and a MOS tube Q2, wherein a resistor R6 and a resistor R7 are connected in series between a gate and a drain of the MOS tube Q1, and a resistor R9 and a resistor R10 are connected in series between a gate and a drain of the MOS tube Q2, and a connecting end of the resistor R6 and the resistor R7 and a connecting end of the resistor R9 and the resistor R10 are both provided with a VOUT end, and the VOUT end is connected to three pins of a single-pole multi-throw switch, a source of the MOS tube Q1 is provided with a TX end, a drain of the MOS tube Q1 is provided with a TX_OUT end, a source of the MOS tube Q2 is provided with an RX end, and a drain of the MOS tube Q2 is provided with an RX_OUT end.
3. A serial port debugger suitable for low power consumption testing according to claim 2, characterized in that: When the TX terminal is at a high level, the gate and source of the MOS tube Q1 are not conducting, and the TX terminal and the TX_OUT terminal are both at a high level; when the TX terminal is at a low level, the gate and source of the MOS tube Q1 are conducting, and the TX terminal and the TX_OUT terminal are both at a low level.
4. A serial port debugger suitable for low power consumption testing according to claim 3, characterized in that: The multi-level level selection circuit includes a resistor R2 with one end connected to a 5V power supply VDD, a resistor R3 with one end connected to a 3.3V power supply, and a resistor R4 with one end connected to a 1.8V power supply. The other end of the resistor R2 is connected to a light-emitting diode LED2, and one end of the light-emitting diode LED2 is connected to pin 10 of a single-pole multi-throw switch. The other end of the resistor R3 is connected to a light-emitting diode LED3, and one end of the light-emitting diode LED3 is connected to pin 9 of the single-pole multi-throw switch. The other end of the resistor R4 is connected to a light-emitting diode LED4, and one end of the light-emitting diode LED4 is connected to pin 7 of the single-pole multi-throw switch.
5. A serial port debugger suitable for low power consumption testing according to claim 4, characterized in that: Eight pins of the single-pole multi-throw switch are grounded, two pins of the single-pole multi-throw switch are connected to a 3.3V voltage, and four pins of the single-pole multi-throw switch are connected to a 1.8V voltage.
6. A serial port debugger suitable for low power consumption testing according to claim 5, characterized in that: The access port includes a USBA interface and a Type-C interface, the USBA interface is connected to the TX_OUT end, and the Type-C interface is connected to the RX_OUT end.
7. A serial port debugger suitable for low power consumption testing according to claim 6, characterized in that: The access port also includes an RS485 interface, one end of which is connected to an expansion board.