Circuit for controlling indicator lights using a single port in accordance with output voltage

By designing a circuit structure that includes a comparator circuit, a level conversion circuit, and a logic circuit, and using a single GPIO port to control the conduction and cutoff of an LED, the problem of LED color display under different voltages in the prior art is solved, and the function of controlling the LED color according to different output voltage values ​​is realized.

CN116685019BActive Publication Date: 2026-01-30KEBODA TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310871221.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2026-01-30
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

Existing technology cannot use a single GPIO port to control the LED indicator light to display different colors based on the different output voltage values ​​of USB PD fast charging.

Method used

A circuit structure including a comparator circuit, a level conversion circuit, a logic circuit, an LED, and a switching transistor was designed. By comparing the output voltage with a threshold, the LED is controlled to turn on and off using a single GPIO port, so that different colors of LEDs can be emitted under different voltages.

Benefits of technology

It enables the control of LED color changes using a single port based on different output voltage values, allowing users to understand the output power consumption status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116685019B_ABST
    Figure CN116685019B_ABST
Patent Text Reader

Abstract

This invention provides a circuit for controlling indicator lights based on output voltage using a single port. The circuit includes a comparator circuit, a level shifting circuit, a logic circuit, LEDs D1, D2, and D4, switching transistors Q1, Q2, Q3, Q5, and Q6, and resistors R3 and R6. When the output voltage Vbus is less than a first voltage threshold Vth1, LED D1 is off, LED D2 is on, and LED D4 is off. When the output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to a second voltage threshold Vth2, LEDs D1 and D2 are off, and LED D4 is on. When the output voltage Vbus is greater than the second voltage threshold Vth2, LED D1 is on, LED D2 is off, and LED D4 is off. Compared to existing technologies, this invention can control different LED indicator lights based on different output voltage values ​​using a single port, allowing users to understand the current output power status through the indicator lights.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of circuit design technology, and in particular to a circuit that controls an indicator light based on the output voltage and using a single port. [Background Technology]

[0002] USB (Universal Serial Bus) connectors and PD (Power Delivery, a fast charging technology in USB connectors) fast charging products have output voltage values ​​of 5V, 9V, 12V, 15V, and 20V, which can be classified according to the output voltage value. 5V is classified as one category, 9V, 12V, and 15V as another, and 20V as yet another (the voltage classification can be based on actual needs).

[0003] Depending on the different output voltage values ​​of PD fast charging, a single GPIO (General-purpose input / output) port can be used to control the indicator light color, thereby enabling three different LEDs (light-emitting diodes) to emit light. Currently, there is no existing technology that can achieve this function.

[0004] Therefore, it is necessary to propose a circuit that controls the indicator light based on the output voltage and using a single port. [Summary of the Invention]

[0005] One of the objectives of this invention is to provide a circuit that controls an indicator light based on the output voltage and using a single port. This circuit can illuminate different LED indicators based on different output voltage values ​​using a single port, allowing the user to know the current output power consumption status through the indicator light.

[0006] According to one aspect of the present invention, a circuit for controlling an indicator light based on an output voltage and utilizing a single port is provided. The circuit includes a comparator circuit, a level shifting circuit, a logic circuit, LEDs D1, D2, and D4, switching transistors Q1, Q2, Q3, Q5, and Q6, resistors R3 and R6. The input terminal of the comparator circuit is connected to the output voltage Vbus, and its output terminal is connected to the first input terminal E of the logic circuit. The input terminal of the level shifting circuit is connected to the single port, and its output terminal is connected to the second input terminal G of the logic circuit. The single port is used to receive control signals. LEDs D4 and Q6 are connected in series between the output voltage Vbus and ground. The control terminal of Q6 is connected to the output terminal F of the logic circuit. The first connection of Q5... The first terminal of the switch Q1 is connected to the output voltage Vbus, its control terminal is connected to the output terminal of the level conversion circuit, and its second terminal is grounded; the first terminal of the switch Q1 is connected to the output voltage Vbus, its control terminal is connected to the connection node A, and its second terminal is connected to the first terminal of the switch Q2; the first terminal and control terminal of the switch Q2 are both connected to the connection node B, its second terminal is connected to the positive terminal of the LED D2, and the negative terminal of the LED D2 is grounded; the resistor R3 is connected between the first terminal of the switch Q1 and the connection node A; one end of the resistor R6 is connected to the connection node A, and the other end is connected to the output terminal F of the logic circuit; the LED D1 and the switch Q3 are connected in series between the output voltage Vbus and the ground terminal, and the control terminal of the switch Q3 is connected to the connection node B.

[0007] Compared with the prior art, the present invention can realize different LED indicator lights based on different output voltage values ​​and using a single port, so that users can know the current output power status through the indicator lights. [Attached Image Description]

[0008] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0009] Figure 1 This is a schematic diagram of a circuit in one embodiment of the present invention that controls an indicator light based on the output voltage and using a single port.

Detailed Implementation Methods

[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0011] The term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the invention. The phrase "in one embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that excludes other embodiments. Unless otherwise specified, the terms coupling, connecting, linking, and interlocking, indicating electrical connection, all refer to direct or indirect connection. For example, A being connected to B includes both a direct electrical connection between A and B and a connection between A and B via electrical components or circuits. In this invention, "greater than or equal to" means greater than or equal to, and "less than or equal to" means less than or equal to.

[0012] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0013] Please refer to Figure 1 As shown, it is a schematic diagram of a circuit in one embodiment of the present invention that controls an indicator light based on the output voltage and using a single port. Figure 1 The circuit shown, which controls the indicator lights based on the output voltage and using a single port, includes a comparator circuit 110, a level shifting circuit 120, a logic circuit 130, LEDs D1, D2, and D4, switching transistors Q1, Q2, Q3, Q5, and Q6, and resistors R3 and R6.

[0014] The input of comparator circuit 110 is connected to the output voltage Vbus, and its output is connected to the first input E of logic circuit 130. The input of level conversion circuit 120 is connected to a single port (e.g., a GPIO port), and its output is connected to the second input G of logic circuit 130. The single port (e.g., a GPIO port) is used to receive control signals.

[0015] LED D4 and switch Q6 are connected in series between the output voltage Vbus and ground. The control terminal of switch Q6 is connected to the output terminal F of logic circuit 130. The first connection terminal of switch Q5 is connected to connection node B, its control terminal is connected to the output terminal of level conversion circuit 120, and its second connection terminal is grounded. The first connection terminal of switch Q1 is connected to the output voltage Vbus, its control terminal is connected to connection node A, and its second connection terminal is connected to the first connection terminal of switch Q2. The first connection terminal and control terminal of switch Q2 are both connected to connection node B, and its second connection terminal is connected to the positive terminal of LED D2, while the negative terminal of LED D2 is grounded. Resistor R3 is connected between the first connection terminal of switch Q1 and connection node A. One end of resistor R6 is connected to connection node A, and the other end is connected to the output terminal F of logic circuit 130. LED D1 and switch Q3 are connected in series between the output voltage Vbus and ground. The control terminal of switch Q3 is connected to connection node B. Figure 1 In the specific embodiment shown, the positive terminal of LED lamp D4 is connected to the output voltage Vbus, its negative terminal is connected to the first connection terminal of switch transistor Q6, and the second connection terminal of switch transistor Q6 is grounded; the positive terminal of LED lamp D1 is connected to the output voltage Vbus, its negative terminal is connected to the first connection terminal of switch transistor Q3, and the second connection terminal of switch transistor Q3 is grounded.

[0016] The comparator circuit 110 is used to compare the output voltage Vbus with the first voltage threshold Vth1 and output the comparison result through its output terminal. When the output voltage Vbus is less than the first voltage threshold Vth1, the output terminal of the comparator circuit 110 outputs a first logic level (e.g., low level); when the output voltage Vbus is greater than or equal to the first voltage threshold Vth1, the output terminal of the comparator circuit 110 outputs a second logic level (e.g., high level).

[0017] The level conversion circuit 120 is used to convert the level of the control signal received by a single port (e.g., GPIO port) and output the level-converted control signal through its output terminal. When the output voltage Vbus is less than or equal to the second voltage threshold Vth2, the control signal received by the single port (e.g., GPIO port) is at the second logic level (e.g., high level), and the output terminal of the level conversion circuit 120 outputs the second logic level (e.g., high level); when the output voltage Vbus is greater than the second voltage threshold Vth2, the control signal received by the single port (e.g., GPIO port) is at the first logic level (e.g., low level), and the output terminal of the level conversion circuit 120 outputs the first logic level (e.g., low level).

[0018] Logic circuit 130 performs logical operations on the comparison result output by comparator circuit 110 and the level-converted control signal output by level conversion circuit 120, and outputs the logical operation result through its output terminal F. When both the output terminal of comparator circuit 110 and the output terminal of level conversion circuit 120 output a second logic level (e.g., high level), the output terminal F of logic circuit 130 outputs a second logic level (e.g., high level); otherwise, the output terminal F of logic circuit 130 outputs a first logic level (e.g., low level). The first voltage threshold Vth1 is less than the second voltage threshold Vth2.

[0019] When the output voltage Vbus is less than the first voltage threshold Vth1, the output of the comparator circuit 110 outputs the first logic level, the control signal received by a single port (e.g., GPIO port) is the second logic level, the output of the level conversion circuit 120 outputs the second logic level, and the output of the logic circuit 130 outputs the first logic level. At this time, the switching transistors Q1, Q2, Q3, Q6, and Q5 are turned on, so that LED D1 does not light up, LED D2 lights up, and LED D4 does not light up.

[0020] When the output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, the output of the comparator circuit 110 outputs the second logic level. The control signal received by a single port (e.g., GPIO port) is the second logic level. The output of the level conversion circuit 120 outputs the second logic level. The output of the logic circuit 130 outputs the second logic level. At this time, the switching transistors Q1, Q2, and Q3 are cut off, Q6 and Q5 are turned on, so that LED D1 does not light up, LED D2 does not light up, and LED D4 lights up.

[0021] When the output voltage Vbus is greater than the second voltage threshold Vth2, the output of the comparator circuit 110 outputs the second logic level, the control signal received by a single port (e.g., GPIO port) is the first logic level, the output of the level conversion circuit 120 outputs the first logic level, and the output of the logic circuit 130 F outputs the first logic level. At this time, the switching transistors Q1, Q2, Q3, Q6, and Q5 are turned on, causing LED D1 to light up, LED D2 to not light up, and LED D4 to not light up.

[0022] In summary, this invention enables different LED indicator lights (e.g., LED D1, LED D2, and LED D4) to illuminate based on different output voltage values ​​and using a single port, allowing users to know the current output power consumption status through the indicator lights.

[0023] exist Figure 1 In the specific embodiment shown, the output voltage value Vbus is the output voltage of the USB connector PD fast charging product; a single port is a GPIO port; LED D1 is LED_green, LED D2 is LED_red, and LED D4 is LED_blue, that is, LED D1, LED D2, and LED D4 are LEDs with different colors.

[0024] exist Figure 1 In the specific embodiment shown, the comparator circuit 110 includes resistors R11 and R14, a Zener diode D6, and a voltage comparator U1. One end of resistor R11 is connected to the output voltage Vbus, and the other end is connected to connection node C. Resistor R14 is connected between connection node C and ground. The negative terminal of Zener diode D6 is connected to connection node D, and its positive terminal is grounded. Connection node D is connected to the output voltage Vbus. The first input terminal of voltage comparator U1 is connected to connection node C, its second input terminal is connected to connection node D, its output terminal serves as the output terminal of comparator circuit 110, and its power supply terminal is connected to the power supply voltage VDD1. The operating voltage of Zener diode D6 is less than the first voltage threshold Vth1. The level conversion circuit 120 includes a switch Q4. The first connection terminal of switch Q4 is connected to the power supply voltage VDD1, its control terminal serves as the input terminal of level conversion circuit 120, and its second connection terminal serves as the output terminal of level conversion circuit 120.

[0025] exist Figure 1 In the specific embodiment shown, the comparator circuit 110 further includes a resistor R13 and a capacitor C1. The resistor R13 is connected between the output voltage Vbus and the connection node D; the capacitor C1 is connected between the connection node C and the ground terminal; the level conversion circuit 120 further includes a resistor R5 and a resistor R7. The resistor R5 is connected between the power supply voltage VDD1 and the first connection terminal of the switching transistor Q4; the resistor R7 is connected between a single port (e.g., a GPIO port) and the control terminal of the switching transistor Q4.

[0026] Among them, resistors R13, R5 and R7 are current-limiting resistors, which limit the current and prevent the voltage comparator U1 and the transistor from burning out due to excessive circuit current; capacitor C1 is a filter capacitor, which filters the circuit.

[0027] exist Figure 1In the specific embodiment shown, switch Q1 is a PNP transistor, and its first connection terminal, second connection terminal, and control terminal are the emitter, collector, and base of the PNP transistor, respectively; switch Q2 is a PNP transistor, and its first connection terminal, second connection terminal, and control terminal are the emitter, collector, and base of the PNP transistor, respectively; switch Q3 is an NPN transistor, and its first connection terminal, second connection terminal, and control terminal are the collector, emitter, collector, and base of the NPN transistor, respectively. The transistors are: collector, emitter, and base; switch Q4 is an NPN transistor, with its first connection terminal, second connection terminal, and control terminal being the collector, emitter, and base, respectively; switch Q5 is an NPN transistor, with its first connection terminal, second connection terminal, and control terminal being the collector, emitter, and base, respectively; switch Q6 is an NPN transistor, with its first connection terminal, second connection terminal, and control terminal being the collector, emitter, and base, respectively.

[0028] exist Figure 1 In the specific embodiment shown, the first input terminal and the second input terminal of the voltage comparator U1 are its non-inverting input terminal and its inverting input terminal, respectively; the first logic level of the control signal received by a single port (e.g., GPIO port) is low, and its second logic level is high; the first logic level output by the output terminal of the level conversion circuit 120 is low, and the second logic level output is high.

[0029] When the output voltage Vbus is less than the first voltage threshold Vth1, the Zener diode D6 may or may not operate. The values ​​of resistors R11 and R14 are required to ensure that when the output voltage Vbus is less than the first voltage threshold Vth1, the voltage at connection node D is higher than the voltage at connection node C, and the output of voltage comparator U1 is low. When the output voltage Vbus is greater than or equal to the first voltage threshold Vth1, the Zener diode D6 operates, the voltage at connection node D is lower than the voltage at connection node C, and the output of voltage comparator U1 is high. When the output voltage Vbus is less than or equal to the second voltage threshold Vth2, the control signal received by a single port (e.g., a GPIO port) is high, and the output of level conversion circuit 120 is high. When the output voltage Vbus is greater than the second voltage threshold Vth2, the control signal received by a single port (e.g., a GPIO port) is low, and the output of level conversion circuit 120 is low.

[0030] exist Figure 1In the specific embodiment shown, the logic circuit 130 is an AND gate circuit, which includes diodes D3 and D5. The cathode of diode D5 serves as the first input terminal E of the logic circuit 130, and its anode is connected to the output terminal F of the logic circuit 130. The cathode of diode D3 serves as the second input terminal G of the logic circuit 130, and its anode is connected to the output terminal F of the logic circuit 130. The output terminal F of the logic circuit 130 is connected to the power supply voltage VDD2. The power supply voltage VDD2 is greater than the power supply voltage VDD1, and the power supply voltage VDD1 is greater than the second voltage threshold Vth2.

[0031] exist Figure 1 In the specific embodiment shown, the circuit that controls the indicator light using a single port based on the output voltage further includes resistors R1, R2, R4, R8, R9, R10, R12, and R15. Specifically, resistor R1 is connected in series with LED D1 and switch Q3 between the output voltage Vbus and ground; resistor R2 and LED D2 are connected in series between the second connection terminal of switch Q2 and ground; resistor R4 is connected between the first connection terminal of switch Q2 and connection node B; resistor R8 is connected between the output terminal of level conversion circuit 120 and the control terminal of switch Q5; resistor R9 is connected between power supply voltage VDD2 and the output terminal F of logic circuit 130; resistor R10 is connected in series with LED D4 and switch Q6 between the output voltage Vbus and ground; resistor R12 is connected between the output terminal F of logic circuit 130 and the control terminal of switch Q6; and resistor R15 is connected between connection node B and the control terminal of switch Q3. Figure 1 In the specific embodiment shown, resistor R1 is connected between the output voltage Vbus and the positive terminal of LED D1; resistor R2 is connected between the second terminal of switching transistor Q2 and the positive terminal of LED D2; and resistor R10 is connected between the output voltage Vbus and the positive terminal of LED D4. Resistors R1, R2, and R10 control the current in the three branches of LEDs D1, D2, and D4, providing brightness control and protection for the LED indicator lights. Resistors R4, R8, R9, R12, and R15 are current-limiting resistors, preventing excessive current from burning out the transistors.

[0032] The following is a detailed introduction Figure 1 The circuit shown illustrates the working principle of the indicator light that automatically adjusts based on the output voltage.

[0033] When the PD fast charging output voltage Vbus is less than the first voltage threshold Vth1, the red light illuminates while the green and blue lights remain off. When the PD fast charging output voltage Vbus is less than the first voltage threshold Vth1, the control signal received by a single port (e.g., GPIO port) is high, and the output of the level conversion circuit 120 outputs a high level (or, the output of the level conversion circuit 120 outputs a second logic level), causing transistor Q5 to conduct. This results in a low voltage at node B, causing transistor Q3 to cut off, and LED D1 to remain off, meaning the green light branch is cut off, thus preventing the green light from illuminating. When the PD fast charging output voltage Vbus is less than the first voltage threshold Vth1, since the Zener diode D6 can work or not, the values ​​of resistors R11 and R14 need to be matched to ensure that when the output voltage Vbus is less than the first voltage threshold Vth1, the voltage at connection node D is higher than the voltage at connection node C. Therefore, the output of voltage comparator U1 is low (or, the output of comparator circuit 110 is the first logic level), which makes the output of logic circuit 130 F low (or, the output of logic circuit 130 is the first logic level), causing transistor Q4 to be cut off, LED D4 to not light up, that is, the blue light branch is cut off, thus making the blue light not light up. Since the output terminal F of logic circuit 130 is at a low level, the voltage at connection node A is obtained by voltage division by resistors R3 and R6. As a result, the voltage at connection node A is less than the PD fast charging output voltage Vbus, causing transistor Q1 to conduct. The collector voltage of transistor Q1 is at a high level, which means the emitter voltage of transistor Q2 is at a high level. Since the voltage at connection node B is at a low level at this time, the emitter voltage of transistor Q2 is higher than the base voltage, causing transistor Q2 to conduct. The collector voltage of transistor Q2 is at a high level, and LED D2 lights up, that is, the red light branch is turned on, thus realizing the red light. In other words, when the PD fast charging output voltage Vbus is less than the first voltage threshold Vth1, the control signal received by a single port (e.g., GPIO port) is high, the output of the level conversion circuit 120 is high, the Zener diode D6 can work or not work, the output of the voltage comparator U1 is low, the output of the logic circuit 130 is low, and the voltage of the connection node A is less than the PD fast charging output voltage Vbus. At this time, the switching transistors Q1, Q2, Q3, Q6, and Q5 are turned on, so that LED D1 does not light up, LED D2 lights up, and LED D4 does not light up.

[0034] When the PD fast charging output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, the blue light can illuminate while the green and red lights remain off. When the PD fast charging output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, the control signal received by a single port (e.g., GPIO port) is at a high level, and the output of the level conversion circuit 120 outputs a high level (or, in other words, the output of the level conversion circuit 120 outputs a second logic level). Simultaneously, when the PD fast charging output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, due to the operation of Zener diode D6, the voltage at connection node D is lower than the voltage at connection node C. Therefore, the output of voltage comparator U1 is high (or, in other words, the output of comparator circuit 110 outputs the second logic level), thereby making the output of logic circuit 130 high (or, in other words, the output of logic circuit 130 outputs the second logic level). Transistor Q6 conducts, LED D4 illuminates, i.e., the blue light branch is activated, thus enabling the blue light to illuminate. When the PD fast charging output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, When the threshold voltage Vth2 is reached, since the power supply voltage VDD2 is greater than the power supply voltage VDD1, and the power supply voltage VDD1 is greater than the second voltage threshold Vth2, the voltage at node A is greater than the PD fast charging output voltage Vbus. This causes transistor Q1 to be cut off, resulting in a low collector voltage for transistor Q1, which in turn causes a low emitter voltage for transistor Q2. Transistor Q2 is cut off, and LED D2 does not light up, meaning the red light branch is cut off, thus the red light is off. Since the output of the level conversion circuit 120 is high, transistor Q5 is turned on, resulting in a low voltage at node B. Transistor Q3 is cut off, and LED D1 does not light up, meaning the green light branch is cut off, thus the green light is off. In other words, when the PD fast charging output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, the control signal received by a single port (e.g., GPIO port) is high, the output of the level conversion circuit 120 is high, the Zener diode D6 is working, the output of the voltage comparator U1 is high, the output of the logic circuit 130 is high, and the voltage of the connection node A is greater than the PD fast charging output voltage Vbus. At this time, the switching transistors Q1, Q2, and Q3 are cut off, Q6 and Q5 are turned on, so that LED D1 does not light up, LED D2 does not light up, and LED D4 lights up.

[0035] When the PD fast charging output voltage Vbus is greater than the second voltage threshold Vth2, the green light illuminates while the red and blue lights remain off. When the PD fast charging output voltage Vbus is greater than the second voltage threshold Vth2, the control signal received by a single port (e.g., a GPIO port) is low, and the output of the level conversion circuit 120 is low (or, in other words, the output of the level conversion circuit 120 outputs the first logic level). Simultaneously, when the PD fast charging output voltage Vbus is greater than the second voltage threshold Vth2, due to the operation of the Zener diode D6, the voltage at connection node D is lower than the voltage at connection node C. Therefore, the output of the voltage comparator U1 is high (or, in other words, the output of the comparator circuit 110 outputs the second logic level), resulting in a low output (or, in other words, the output of the logic circuit 130 outputs the first logic level) at the logic circuit 130. Because the output of the logic circuit 130 is low, the transistor Q6 is cut off, LED D4 does not illuminate, i.e., the blue light branch is cut off, thus preventing the blue light from illuminating. Since the output F of logic circuit 130 is low, the voltage at node A is obtained by voltage division by resistors R3 and R6. Therefore, the voltage at node A is less than the output voltage Vbus, causing transistor Q1 to conduct. The collector voltage of transistor Q1 is high, meaning the emitter voltage of transistor Q2 is also high. Because the output of level conversion circuit 120 is low, transistor Q5 is cut off. Since the emitter voltage of transistor Q2 is high, the voltage at node B is high and approximately equal to the emitter voltage of transistor Q2. This causes transistor Q2 to cut off, and LED D2 does not light up, meaning the red light branch is cut off, thus the red light is off. Because the voltage at node B is high, transistor Q3 conducts, and LED D1 lights up, meaning the green light branch is on, thus the green light is on. In other words, when the PD fast charging output voltage Vbus is greater than the second voltage threshold Vth2, the control signal received by a single port (e.g., GPIO port) is low, the output of the level conversion circuit 120 is low, the Zener diode D6 is working, the output of the voltage comparator U1 is high, the output of the logic circuit 130 is low, and the voltage of the connection node A is less than the PD fast charging output voltage Vbus. At this time, the switching transistor Q1 is on, the switching transistor Q2 is off, the switching transistor Q3 is on, the switching transistor Q6 is off, the switching transistor Q5 is off, the LED D1 lights up, the LED D2 does not light up, and the LED D4 does not light up.

[0036] In summary, the present invention can realize the illumination (e.g., color display) of different LEDs (e.g., LED D1, LED D2, and LED D4) by using a single port according to different output voltage values, so that users can know the current status of PD fast charging output power consumption through the indicator light color.

[0037] It should be noted that any modifications made by those skilled in the art to the specific embodiments of the present invention do not depart from the scope of the claims. Accordingly, the scope of the claims is not limited to the foregoing specific embodiments.

Claims

1. A circuit for controlling an indicator lamp from an output voltage and using a single port, characterized in that, It includes comparison circuit, level conversion circuit, logic circuit, LED lamp D1, LED lamp D2, LED lamp D4, switch tube Q1, switch tube Q2, switch tube Q3, switch tube Q5, switch tube Q6, resistance R3 and resistance R6, The input end of the comparison circuit is connected with the output voltage Vbus, and the output end is connected with the first input end E of the logic circuit; The input end of the level conversion circuit is connected with a single port, and the output end is connected with the second input end G of the logic circuit, and the single port is used for receiving a control signal; The LED lamp D4 and the switch tube Q6 are connected in series between the output voltage Vbus and the ground end, the control end of the switch tube Q6 is connected with the output end F of the logic circuit, the first connection end of the switch tube Q5 is connected with the connection node B, the control end is connected with the output end of the level conversion circuit, and the second connection end is grounded, the first connection end of the switch tube Q1 is connected with the output voltage Vbus, the control end is connected with the connection node A, and the second connection end is connected with the first connection end of the switch tube Q2, the first connection end and the control end of the switch tube Q2 are both connected with the connection node B, the second connection end is connected with the positive pole of the LED lamp D2, and the negative pole is grounded, the resistance R3 is connected between the first connection end of the switch tube Q1 and the connection node A, one end of the resistance R6 is connected with the connection node A, and the other end is connected with the output end F of the logic circuit, the LED lamp D1 and the switch tube Q3 are connected in series between the output voltage Vbus and the ground end, and the control end of the switch tube Q3 is connected with the connection node B, When the output voltage Vbus is less than the first voltage threshold Vth1, the output end of the comparison circuit outputs the first logic level, the control signal received by the single port is the second logic level, the output end of the level conversion circuit outputs the second logic level, and the output end F of the logic circuit outputs the first logic level, at this time, the switch tube Q1 is turned on, the switch tube Q2 is turned on, the switch tube Q3 is cut off, the switch tube Q6 is cut off, and the switch tube Q5 is turned on, so that the LED lamp D1 does not emit light, the LED lamp D2 emits light, and the LED lamp D4 does not emit light; When the output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, the output end of the comparison circuit outputs the second logic level, the control signal received by the single port is the second logic level, the output end of the level conversion circuit outputs the second logic level, and the output end F of the logic circuit outputs the second logic level, at this time, the switch tube Q1 is cut off, the switch tube Q2 is cut off, the switch tube Q3 is cut off, the switch tube Q6 is turned on, and the switch tube Q5 is turned on, so that the LED lamp D1 does not emit light, the LED lamp D2 does not emit light, and the LED lamp D4 emits light. When the output voltage Vbus is greater than the second voltage threshold Vth2, the output end of the comparison circuit outputs a second logic level, the control signal received by the single port is a first logic level, the output end of the level conversion circuit outputs a first logic level, and the output end F of the logic circuit outputs a first logic level. At this time, the switch tube Q1 is turned on, the switch tube Q2 is turned off, the switch tube Q3 is turned on, the switch tube Q6 is turned off, and the switch tube Q5 is turned off, so that the LED lamp D1 emits light, the LED lamp D2 does not emit light, and the LED lamp D4 does not emit light, wherein the first voltage threshold Vth1 is less than the second voltage threshold Vth2, the output voltage Vbus is the output voltage of a USB connector PD fast charging product, the output voltage of the USB connector PD fast charging product is 5V, 9V, 12V, 15V or 20V, the output voltage Vbus is divided into three categories according to the value of the output voltage Vbus, and the first voltage threshold Vth1 and the second voltage threshold Vth2 are set to distinguish the three categories of output voltages.

2. The circuit according to claim 1, wherein the comparison circuit is configured to compare the output voltage Vbus and the first voltage threshold Vth1, and output a comparison result through an output end thereof; the level conversion circuit is configured to perform level conversion on the control signal received by the single port, and output a level-converted control signal through an output end thereof; the logic circuit is configured to perform logical operation on the comparison result output by the comparison circuit and the level-converted control signal output by the level conversion circuit, and output a logical operation result through an output end F thereof.

3. The circuit according to claim 2, wherein the anode of the LED lamp D4 is connected to the output voltage Vbus, and the cathode thereof is connected to the first connection end of the switch tube Q6, and the second connection end of the switch tube Q6 is grounded; the anode of the LED lamp D1 is connected to the output voltage Vbus, and the cathode thereof is connected to the first connection end of the switch tube Q3, and the second connection end of the switch tube Q3 is grounded.

4. The circuit according to claim 2, wherein The comparison circuit comprises a resistor R11, a resistor R14, a voltage stabilizer D6 and a voltage comparator U1, one end of the resistor R11 is connected with the output voltage Vbus, and the other end thereof is connected with a connection node C; the resistor R14 is connected between the connection node C and a ground terminal; the negative electrode of the voltage stabilizer D6 is connected with a connection node D, and the positive electrode thereof is grounded; the connection node D is connected with the output voltage Vbus, the first input terminal of the voltage comparator U1 is connected with the connection node C, the second input terminal thereof is connected with the connection node D, the output terminal thereof serves as the output terminal of the comparison circuit, and the power supply terminal thereof is connected with a power supply voltage VDD1; the working voltage of the voltage stabilizer D6 is less than the first voltage threshold Vth1; The level conversion circuit comprises a switch tube Q4, the first connection terminal of the switch tube Q4 is connected with the power supply voltage VDD1, the control terminal thereof serves as the input terminal of the level conversion circuit, and the second connection terminal thereof serves as the output terminal of the level conversion circuit.

5. The circuit for controlling the indicator lamp according to the output voltage and using a single port according to claim 4, wherein The comparison circuit further comprises a resistor R13 and a capacitor C1, the resistor R13 is connected between the output voltage Vbus and the connection node D; and the capacitor C1 is connected between the connection node C and the ground terminal. The level conversion circuit further comprises a resistor R5 and a resistor R7, the resistor R5 is connected between the power supply voltage VDD1 and the first connection terminal of the switch tube Q4; and the resistor R7 is connected between the single port and the control terminal of the switch tube Q4.

6. The circuit for controlling the indicator lamp according to the output voltage and using a single port according to claim 4, wherein The switch tube Q1 is a PNP type triode, the first connection terminal, the second connection terminal and the control terminal of the switch tube Q1 are the emitter, the collector and the base of the PNP type triode respectively; The switch tube Q2 is a PNP type triode, the first connection terminal, the second connection terminal and the control terminal of the switch tube Q2 are the emitter, the collector and the base of the PNP type triode respectively; The switch tube Q3 is an NPN type triode, the first connection terminal, the second connection terminal and the control terminal of the switch tube Q3 are the collector, the emitter and the base of the NPN type triode respectively; The switch tube Q4 is an NPN type triode, the first connection terminal, the second connection terminal and the control terminal of the switch tube Q4 are the collector, the emitter and the base of the NPN type triode respectively; The switch tube Q5 is an NPN type triode, the first connection terminal, the second connection terminal and the control terminal of the switch tube Q5 are the collector, the emitter and the base of the NPN type triode respectively; The switch tube Q6 is an NPN type triode, the first connection terminal, the second connection terminal and the control terminal of the switch tube Q6 are the collector, the emitter and the base of the NPN type triode respectively.

7. The circuit for controlling the indicator lamp according to the output voltage and using a single port according to claim 6, wherein The first input terminal and the second input terminal of the voltage comparator U1 are the non-inverting input terminal and the inverting input terminal respectively; The first logic level of the control signal received by the single port is low, and the second logic level is high; The first logic level output by the output terminal of the level conversion circuit is low, and the second logic level output is high; The logic circuit is an AND gate circuit.

8. The circuit according to claim 7, wherein, when the output voltage Vbus is less than the first voltage threshold Vth1, the zener D6 works or does not work, the voltage of the connection node D is higher than that of the connection node C, and the output terminal of the voltage comparator U1 outputs low level; when the output voltage Vbus is greater than or equal to the first voltage threshold Vth1, the zener D6 works, the voltage of the connection node D is lower than that of the connection node C, and the output terminal of the voltage comparator U1 outputs high level; when the output voltage Vbus is less than or equal to the second voltage threshold Vth2, the control signal received by the single port is high, and the output terminal of the level conversion circuit outputs high level; when the output voltage Vbus is greater than the second voltage threshold Vth2, the control signal received by the single port is low, and the output terminal of the level conversion circuit outputs low level.

9. The circuit according to claim 7, wherein, the logic circuit comprises a diode D3 and a diode D5, the cathode of the diode D5 is the first input terminal E of the logic circuit, and the anode thereof is connected with the output terminal F of the logic circuit; the cathode of the diode D3 is the second input terminal G of the logic circuit, and the anode thereof is connected with the output terminal F of the logic circuit; the output terminal F of the logic circuit is connected with the power voltage VDD2, wherein the power voltage VDD2 is greater than the power voltage VDD1, and the power voltage VDD1 is greater than the second voltage threshold Vth2.

10. The circuit according to claim 7 or 9, wherein, when the output voltage Vbus is less than the first voltage threshold Vth1, the control signal received by the single port is high, the output terminal of the level conversion circuit outputs high level, the zener D6 works or does not work, the output terminal of the voltage comparator U1 outputs low level, the output terminal F of the logic circuit is low, and the voltage of the connection node A is less than the output voltage Vbus, at this time, the switch tube Q1 is turned on, the switch tube Q2 is turned on, the switch tube Q3 is turned off, the switch tube Q6 is turned off, and the switch tube Q5 is turned on, so that the LED lamp D1 does not emit light, the LED lamp D2 emits light, and the LED lamp D4 does not emit light. When the output voltage Vbus is greater than or equal to the first voltage threshold Vth1 and less than or equal to the second voltage threshold Vth2, the control signal received by the single port is high level, the output end of the level conversion circuit outputs high level, the voltage stabilizing tube D6 works, the output end of the voltage comparator U1 outputs high level, the output end F of the logic circuit is high level, and the voltage of the connection node A is greater than the output voltage Vbus. At this time, the switch tube Q1 is cut off, the switch tube Q2 is cut off, the switch tube Q3 is cut off, the switch tube Q6 is turned on, the switch tube Q5 is turned on, so that the LED lamp D1 does not emit light, the LED lamp D2 does not emit light, and the LED lamp D4 emits light. When the output voltage Vbus is greater than the second voltage threshold Vth2, the control signal received by the single port is low level, the output end of the level conversion circuit outputs low level, the voltage stabilizing tube D6 works, the output end of the voltage comparator U1 outputs high level, the output end F of the logic circuit is low level, and the voltage of the connection node A is less than the output voltage Vbus. At this time, the switch tube Q1 is turned on, the switch tube Q2 is cut off, the switch tube Q3 is turned on, the switch tube Q6 is cut off, and the switch tube Q5 is cut off. The LED lamp D1 emits light, the LED lamp D2 does not emit light, and the LED lamp D4 does not emit light.

11. The circuit for controlling an indicator light from an output voltage and using a single port according to claim 9, wherein, It further comprises a resistor R1, a resistor R2, a resistor R4, a resistor R8, a resistor R9, a resistor R10, a resistor R12 and a resistor R15, Wherein, the resistor R1 is connected in series with the LED lamp D1 and the switch tube Q3 between the output voltage Vbus and the ground end; the resistor R2 and the LED lamp D2 are connected in series between the second connection end of the switch tube Q2 and the ground end; the resistor R4 is connected between the first connection end of the switch tube Q2 and the connection node B; the resistor R8 is connected between the output end of the level conversion circuit and the control end of the switch tube Q5; the resistor R9 is connected between the power supply voltage VDD2 and the output end F of the logic circuit; the resistor R10 is connected in series with the LED lamp D4 and the switch tube Q6 between the output voltage Vbus and the ground end; the resistor R12 is connected between the output end F of the logic circuit and the control end of the switch tube Q6; and the resistor R15 is connected between the connection node B and the control end of the switch tube Q3.

12. The circuit according to claim 1, wherein the single port is a GPIO port; and the LED lamp D1, the LED lamp D2 and the LED lamp D4 are LED lamps of different colors. ​ ​

Citation Information

Patent Citations

  • Voltage detection alarm device

    CN101604282A

  • Device and method for controlling indicator lights

    CN102159010A

  • Circuit for controlling indicating lamp according to output voltage and by using single port

    CN220673970U

  • Intelligent pilot lamp

    KR101178427B1