LED lamp control circuit
Through the combined control of PWM signal and DC signal, N IO ports control the individual or overall light-off of 2N-1 LED lamps, solving the problem of waste of resources and inflexible control in the existing technology, and adapting to more application scenarios.
Patent Information
- Application Number
- CN202210928936.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-08-03
AI Technical Summary
The existing LED lamp control circuit has the problem of wasting resources on chip IO ports and the inability to control a certain LED lamp separately. In some application scenarios, the control signal cannot achieve synchronous turn-on and turn-off of adjacent LEDs.
An LED lamp control circuit is adopted to control 2N-1 LED lamps through the combined control of PWM signal and DC signal, and N IO ports are used to control 2N-1 LED lamps, supporting individual or overall control, and using different signal combinations of current limiting resistors and chip ports to realize the LED on and off.
It saves chip IO port resources, realizes individual or overall control of LEDs, adapts to more application scenarios, and solves the problems of waste of resources and inflexible control in the existing technology.
Smart Images

Figure CN115209588B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a lighting control circuit, in particular to an LED lamp control circuit. Background Art
[0002] LED light control circuits are often used in electronic display modules in smart homes, urban construction, industrial manufacturing and other fields. Currently, most LED lights are controlled by the digital IO ports of the chip. The main technical solutions for control circuits are as follows:
[0003] Solution 1: The positive poles of all LEDs are connected to different digital IO ports, and the negative poles are grounded, so that N LEDs can be controlled by N IO ports.
[0004] Solution 2: The positive pole of the first LED in the circuit is connected to the power supply VCC, the negative pole of the last LED is grounded, and the positive and negative poles of the remaining middle LEDs are connected to two adjacent digital IO ports respectively, so that N IO ports can control N+1 LEDs.
[0005] Solution 3: Assign N IO ports to rows and columns, with LEDs located at the intersections of the row and column lines, thus forming an array. Each row IO port serves as the common terminal for a row of LEDs, connected to the LED's positive (negative) terminal. Each column IO port serves as the common terminal for a column of LEDs, connected to the LED's negative (positive) terminal. This solution uses row and column IO ports to control an LED array.
[0006] In practical applications, chip I / O port resources are extremely limited and valuable. Both Solution 1 and Solution 2 suffer from the problem of excessive chip I / O resource usage by the LED control circuit. Solution 3's array-style LED control circuit only demonstrates its I / O resource-saving advantage over Solution 2 when the application requires controlling more than eight LEDs. Furthermore, this solution suffers from the inability to individually control the on / off of individual LEDs. Besides wasting digital I / O port resources, the control signals in all existing solutions are DC signals in a single application scenario. Consequently, Solution 2 cannot simultaneously control the on / off of adjacent LEDs, rendering it impossible to control the overall on / off of the LEDs. Summary of the Invention
[0007] In response to the above-mentioned problems existing in current LED control circuits, the present invention provides an LED lamp control circuit that controls one or more LEDs according to a control signal. Ultimately, N IO ports can be used to control 2N-1 LEDs, and the LEDs can be turned on and off individually or as a whole.
[0008] The technical solution adopted by the present invention to solve the technical problem is: an LED lamp control circuit, including a chip with multiple ports, and multiple LED lamp control units, each LED lamp control unit is controlled by a driving signal output by a corresponding port, and a first LED lamp control unit includes: the positive pole of the first LED lamp is connected to the first port through a first resistor, and the negative pole of the first LED lamp is grounded; the negative pole of the second LED lamp is connected to the first port, and the positive pole of the second LED lamp is connected to the second port through one end of the second resistor; the negative pole of the third LED lamp is connected to the other end of the second resistor and the second port, and the positive pole of the third LED lamp is connected to a power supply through a third resistor; the positive pole of the fourth LED lamp is connected to the negative pole of the third LED lamp through a fourth resistor, and the negative pole of the fourth LED lamp is connected to an adjacent LED lamp control unit; the lighting or extinguishing of each LED lamp is controlled by the driving signals of the first port and the second port.
[0009] Furthermore, the driving signal of each port is a PWM signal or a DC signal.
[0010] Furthermore, the PWM signal is a PWM signal with a duty cycle of 50%.
[0011] Furthermore, when the driving signals of the first port and the second port are PWM signals that are in opposite phases to each other, all LED lights are on.
[0012] Furthermore, when the driving signals of the first port and the second port are high-impedance DC signals, all LED lights are turned off.
[0013] Furthermore, when the driving signals of the first port and the second port are at a low level and the power supply is in a power-off state, all LED lights are turned off.
[0014] Furthermore, when the first port outputs a high level and the outputs of other ports of the chip are in a high-impedance state, the first LED light is on alone; or when the first port outputs a low level, the second port outputs a high level, and the outputs of other ports of the chip are in a high-impedance state, the second LED light is on alone; or when the second port outputs a low level and the outputs of other ports of the chip are in a high-impedance state, the third LED light is on alone; or when the second port outputs a high level, the third port outputs a low level, and the outputs of other ports of the chip are in a high-impedance state, the fourth LED light is on alone.
[0015] Furthermore, when the first port outputs a low level and the other adjacent ports of the chip output PWM signals of mutually inverted phases, the first LED lamp is turned off alone; or when the first port and the second port output the same-phase PWM signals and the other adjacent ports of the chip output the same-phase PWM signals, the second LED lamp is turned off alone; or when the second port outputs a high level and the other adjacent ports of the chip output the same-phase PWM signals, the third LED lamp is turned off alone; or the chip includes a third port and a fourth port, and the third port and the fourth port are connected to a second LED lamp control unit; when the second port and the third port output the same-phase PWM signals and the other adjacent ports of the chip output the same-phase PWM signals, the fourth LED lamp is turned off alone.
[0016] Furthermore, when the first port and the second port output the same-phase PWM signals, the second port and the third port output the same-phase PWM signals, and the other adjacent ports of the chip output PWM signals of opposite phases, the second LED lamp and the fourth LED lamp are off, and the other LED lamps of the control circuit are on; or the chip includes a third port and a fourth port, when the first port and the second port output the same-phase PWM signals, the third port and the fourth port output the same-phase PWM signals, and the other adjacent ports of the chip output PWM signals of opposite phases, the second LED lamp and the sixth LED lamp are off, and the other LED lamps of the control circuit are on.
[0017] Furthermore, when the first port outputs a high-impedance state, the second port and a third port output in-phase PWM signals, and the other adjacent ports of the chip output PWM signals that are inverted to each other, the first LED lamp, the second LED lamp and the fourth LED lamp are off, and the other LED lamps of the control circuit are on; or when the first port outputs a high-impedance state, the second port outputs a high level, and the other adjacent ports of the chip output PWM signals that are inverted to each other, the first LED lamp, the second LED lamp and the third LED lamp are off, and the other LED lamps of the control circuit are on.
[0018] Beneficial effects of the present invention: Using the LED lamp control circuit of the present invention can greatly save valuable chip IO port resources, realize N IO ports to control the on and off of 2N-1 LED lamps, and realize individual or overall control of LEDs to adapt to more application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is an overall block diagram of the present invention;
[0020] Figure 2 is a circuit structure diagram of the present invention;
[0021] Figure 3 This is the waveform diagram of the IO port output when all LED lights in the present invention are on;
[0022] Figure 4 This is the waveform diagram of the IO port output when LED_1 is turned off alone in the present invention;
[0023] Figure 5 This is the waveform diagram of the IO port output when LED_2 is turned off alone in the present invention;
[0024] Figure 6 This is the waveform diagram of the IO port output when LED_3 is turned off alone in the present invention;
[0025] Figure 7 This is the waveform diagram of the IO port output when LED_4 is turned off alone in the present invention;
[0026] Figure 8 This is the waveform diagram of the IO port output when only LED_2 and LED_4 are off in the present invention;
[0027] Figure 9 This is the waveform diagram of the IO port output when only LED_2 and LED_6 are off in the present invention;
[0028] Figure 10 This is the waveform diagram of the IO port output when only LED_1, LED_2 and LED_4 are off in the present invention;
[0029] Figure 11 This is a waveform diagram of the IO port output when only LED_1, LED_2 and LED_3 are off in the present invention. DETAILED DESCRIPTION
[0030] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several variations and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0031] Figure 1 The LED light control circuit includes a chip U1 having multiple ports, and multiple LED light control units, such as LED light control unit 21, LED light control unit 22, and LED light control unit 2N. Each LED light control unit is controlled by a drive signal output from a port of chip U1.
[0032] According to the application scenario, Figure 2In addition to DC signals, the control signals output by the ports of chip U1 can also use PWM signals to control multiple LEDs. (Since the human eye's recognition frequency is generally 24Hz, the PWM signal frequency used here is greater than the 60Hz refresh rate of most LCD displays to achieve a "constantly on" state for the LEDs.) Ultimately, N IO ports can be used to control 2N-1 LEDs, where N is an even number greater than 2, and the LEDs can be turned on and off individually or as a whole.
[0033] Figure 2 The circuit structure diagram of the present invention shows a current-limiting resistor R that can control the brightness of an LED lamp. Taking the LED lamp control unit 21 as an example, the digital IO port P01 of chip U1 is connected to the cathode of LED_2 and one end of resistor R1. The anode of LED_2 is connected to one end of resistor R2, and the other end of resistor R2 is connected to the digital IO port P02 of chip U1. The other end of resistor R1 is connected to the anode of LED_1, and the cathode of LED_1 is grounded. The digital IO port P02 of chip U1 is connected to one end of R4 and the cathode of LED_3. The other end of R4 is connected to the anode of LED_4, and the cathode of LED_4 is connected to the digital IO port P03 of chip U1. The anode of LED_3 is connected to one end of R3, and the other end of R3 is connected to the power supply VCC. R5, R6, R7, R8, LED_5, LED_6, LED_7, LED_8, power supply, and ground constitute the next-level LED light control unit 22. In the N / 2 LED light control units, chip U1's digital IO port P0N-1 is connected to the cathode of LED_2N-2 and one end of resistor R2N-3. The anode of LED_2N-2 is connected to one end of resistor R2N-2, and the other end of resistor R2N-2 is connected to chip U1's digital IO port P0N. The other end of resistor R2N-3 is connected to the anode of LED_2N-3, and the cathode of LED_2N-3 is grounded. Chip U1's digital IO port P0N is connected to the cathode of LED_2N-1, and the anode of LED_2N-1 is connected to power supply VCC through resistor R2N-1. With this connection, N IO ports can control the on / off of 2N-1 LEDs.
[0034] The basic principle of the control signal output by chip U1 is: for LEDs sandwiched between two adjacent IO ports (such as LED_2 and LED_4), when the output signals of the two IO ports are in phase, the corresponding LED lights up. When the output signals of the two IO ports are in phase, the corresponding LED lights up. For LEDs with one end controlled by a fixed ground or power supply and the other end connected to an IO port, such as LED_1 and LED_3, if the output signal of the IO port is a PWM waveform or a DC signal that is opposite to the fixed signal at the other end, the LED lights up; if the output signal is a DC signal that is the same as the fixed signal at the other end, the LED lights up. When the output signal of the digital IO port is a high-impedance state, all LEDs connected to this digital IO port lights up.
[0035] The specific control logic will be divided into the following five cases for explanation:
[0036] 1. All LED lights are on:
[0037] according to Figure 2 In the circuit shown, P01 to P0N output PWM signals with a frequency of f0 (f0>=60HZ) and a duty cycle of 50%. The PWM signals of adjacent IO ports have a phase difference of 180 degrees (i.e., they are inverse phase signals). The waveform of the specific output signal is shown as follows: Figure 3 As shown, by controlling the waveform of this output signal, the LED can be fully lit.
[0038] 2. A single LED light is on:
[0039] In this scenario, only one of the controlled LEDs is on, and the rest are off. The control signal is a DC signal, which can be directly described by "0", "1", and "Z" ("0" represents a low level, "1" represents a high level, and "Z" represents a high impedance state). Figure 2 Assuming N=4, the logic table in Table 1 describes the signal form of the IO port when the LED in the circuit is lit alone. The LED name and IO port name both point to Figure 2The LEDs and IO ports in the circuit. The first column indicates the name of the LED that lights up individually, and the next four columns indicate the output states of the IO ports of chip U1. The specific control logic is: When P01 outputs a high level "1" and the remaining ports of chip U1 output a high impedance state, LED_1 lights up individually. When P01 outputs a low level "0", P02 outputs a high level "1", and the remaining ports of chip U1 output a high impedance state, LED_2 lights up individually. When P02 outputs a low level "0" and the remaining ports of chip U1 output a high impedance state, LED_3 lights up individually. When P02 outputs a high level, P03 outputs a low level, and the remaining ports of chip U1 output a high impedance state, LED_4 lights up individually. Table 1 uses seven LEDs to cover the IO port control signal conditions when all LEDs light up individually, and this truth table can be used to infer the IO port signals when other LEDs light up individually.
[0040] Table 1. IO port control signal logic table for LED lighting alone
[0041]
[0042] 3. A single LED light goes out:
[0043] according to Figure 2 The circuit diagram shows that different control signals and different positions of the LED in the circuit can control a single LED to turn off. Figure 4 、 Figure 5 、 Figure 6 、 Figure 7 The following diagrams respectively represent the IO port output signal waveforms when LED_1, LED_2, LED_3, and LED_4 are individually off. These four different situations cover all cases. Figure 4 In the circuit, P01 outputs a DC low level "0", and the other ports of chip U1 output PWM signals, then LED_1 turns off and the other LEDs turn on. Figure 5 In the example, PO1 and P02 ports output the same-phase PWM signals, and the other ports of chip U1 output PWM signals that are opposite in phase to the adjacent ports. Then LED_2 is off and the other LEDs are on. Figure 6 In the circuit, P02 outputs a DC high level "1", and the other ports of chip U1 output mutually inverted PWM signals, then LED_3 is off and the rest of the LEDs are on. Figure 7 In the example, PO2 and P03 ports output the same-phase PWM signals, and the other ports of chip U1 output PWM signals that are opposite in phase to the adjacent ports. Then LED_4 is off and the other lights are on.
[0044] 4. All LED lights are off:
[0045] There are two solutions to turn off all LEDs: a. Set all IO ports to high impedance. b. Set the output of all IO ports to "0" (low level), and the VCC controlled by the chip U1 port is also low, that is, the power supply is off.
[0046] 5. Other situations:
[0047] In addition to controlling the on and off of a certain LED as a whole or individually, the present invention can also control the on and off of two or more LED lights individually.
[0048] like Figure 8 As shown, P01 and P02 output the same-phase PWM signals, turning LED_2 off. P02 and P03 output the same-phase PWM signals, turning LED_4 off. The other adjacent IO ports all output PWM signals with opposite phases, so the remaining lights are all on. Therefore, this waveform can turn LED_2 and LED_4 off, leaving the remaining lights on.
[0049] like Figure 9 As shown, P01 and P02 output the same-phase PWM signals, turning off LED_2. P03 and P04 output the same-phase PWM signals, turning off LED_6. The other adjacent IOs all output opposite-phase PWM signals, turning on the remaining LEDs. Therefore, this waveform can turn off LED_2 and LED_6, leaving the remaining LEDs on.
[0050] like Figure 10 As shown in the figure, P01 outputs a high-impedance state, causing the two LED lights LED_1 and LED_2 connected to P01 to turn off. P02 and P03 output the same-phase PWM signal to turn off LED_4. The other adjacent IOs all output PWM signals with opposite phases, and the rest of the lights are on. Therefore, this waveform can turn off LED_1, LED_2, and LED_4, and the rest of the lights are on.
[0051] like Figure 11 As shown, P01 outputs a high-impedance state, causing the two LED lights LED_1 and LED_2 connected to P01 to turn off. P02 outputs a high level of "1", causing LED_3 to turn off. The other adjacent IOs all output mutually inverted PWM signals, and the other lights are all on. Therefore, this waveform can turn off LED_1, LED_2 and LED_3.
[0052] The LED lamp control circuit of the present invention can not only save valuable chip IO port resources and realize N IO ports to control the on and off of 2N-1 LED lamps, but also realize individual or overall control of LEDs to adapt to more application scenarios.
[0053] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. An LED lamp control circuit, comprising a chip having multiple ports, and N / 2 LED lamp control units, where N is an even number greater than 2, each LED lamp control unit being controlled by a drive signal output by a corresponding IO port, characterized in that: The LED lamp control circuit can control the on and off of 2N-1 LED lamps through N IO ports; The LED lamp control circuit includes at least one first LED lamp control unit and one N / 2th LED control unit, wherein the first LED lamp control unit includes: The positive electrode of the first LED lamp is connected to the first port through the first resistor, and the negative electrode of the first LED lamp is grounded; The cathode of the second LED lamp is connected to the first port, and the anode of the second LED lamp is connected to the second port via one end of the second resistor; The cathode of the third LED lamp is connected to the other end of the second resistor and the second port, and the anode of the third LED lamp is connected to the power supply through the third resistor; The positive electrode of the fourth LED lamp is connected to the second port through a fourth resistor, and the negative electrode of the fourth LED lamp is connected to the adjacent LED lamp control unit; Controlling the on or off of each LED lamp through the driving signals of the first port and the second port; When the adjacent LED lamp control unit is not the last-stage LED lamp control unit, the adjacent LED lamp control unit is a second LED lamp control unit having the same circuit structure as the first LED lamp control unit, and the cathode of the fourth LED lamp of the first LED lamp control unit is connected to the cathode of the sixth LED lamp of the second LED lamp control unit; and so on; When the adjacent LED lamp control unit is the N / 2th LED lamp control unit of the last level, the N / 2th LED lamp control unit includes: the anode of LED_2N-3 is connected to the port P0N-1 through the resistor R2N-3, and the cathode of LED_2N-3 is grounded; the cathode of LED_2N-2 is connected to the port P0N-1, and the anode of LED_2N-2 is connected to the port P0N through the resistor R2N-2; the cathode of LED_2N-1 is connected to the port P0N, and the anode of LED_2N-1 is connected to the power supply through the resistor R2N-1.
2. The LED lamp control circuit according to claim 1, characterized in that: The driving signal of each port is a PWM signal or a DC signal.
3. The LED lamp control circuit according to claim 2, characterized in that: The PWM signal is a PWM signal with any duty cycle and is used to adjust the brightness of the LED lamp.
4. The LED lamp control circuit according to claim 1, characterized in that: When the driving signals of the first port and the second port are PWM signals with opposite phases, all LED lights are on.
5. The LED lamp control circuit according to claim 1, characterized in that: When the driving signals of the first port and the second port are high-impedance DC signals, all LED lights are off.
6. The LED lamp control circuit according to claim 1, characterized in that: When the driving signals of the first port and the second port are at a low level and the power supply is in a power-off state, all LED lights are off.
7. The LED lamp control circuit according to claim 1, characterized in that: When the first port outputs a high level and the outputs of other ports of the chip are in a high impedance state, the first LED light is on alone; or When the first port outputs a low level, the second port outputs a high level, and the other ports of the chip output a high impedance state, the second LED light is on alone; or When the second port outputs a low level and the other ports of the chip output a high impedance state, the third LED light is on alone; or The chip further includes a third port and a fourth port. When the second port outputs a high level, the third port outputs a low level, and other ports of the chip output a high impedance state, the fourth LED light is on alone.
8. The LED lamp control circuit according to claim 1, characterized in that: When the first port outputs a low level and the other adjacent ports of the chip output PWM signals that are inversely phased to each other, the first LED lamp is turned off alone; or When the first port and the second port output the same-phase PWM signals, and other adjacent ports of the chip output PWM signals with opposite phases, the second LED light is turned off alone; or When the second port outputs a high level and the other adjacent ports of the chip output PWM signals that are inversely phased to each other, the third LED light is turned off alone; or The chip also includes a third port and a fourth port, and the third port and the fourth port are connected to the second LED lamp control unit; when the second port and the third port output the same-phase PWM signal and the other adjacent ports of the chip output the opposite-phase PWM signal, the fourth LED lamp is turned off alone.
9. The LED lamp control circuit according to claim 1, characterized in that: The chip includes a third port and a fourth port. When the first port and the second port output in-phase PWM signals, the second port and the third port output in-phase PWM signals, and other adjacent ports of the chip output PWM signals that are inverted to each other, the second LED lamp and the fourth LED lamp are off, and the other LED lamps of the control circuit are on; or when the first port and the second port output in-phase PWM signals, the third port and the fourth port output in-phase PWM signals, and other adjacent ports of the chip output PWM signals that are inverted to each other, the second LED lamp and the sixth LED lamp are off, and the other LED lamps of the control circuit are on.
10. The LED lamp control circuit according to claim 1, characterized in that: When the first port outputs a high-impedance state, the second port and the third port of the chip output in-phase PWM signals, and the other adjacent ports of the chip output mutually anti-phase PWM signals, the first LED lamp, the second LED lamp, and the fourth LED lamp are off, and the other LED lamps of the control circuit are on; or When the first port outputs a high impedance state, the second port outputs a high level, and the other adjacent ports of the chip output PWM signals that are inverted to each other, the first LED lamp, the second LED lamp and the third LED lamp are off, and the other LED lamps of the control circuit are on.
Citation Information
Patent Citations
Multiplexing circuit and electric vehicle
CN212256061U
Lamp control circuit and electrical equipment
CN216752180U