An LED control circuit and its control method
By introducing a combination of NPN type and PNP type transistors into the LED control circuit, and using N+M IO interfaces to drive M×N LED lamps, the problem of insufficient IO interface is solved, and more efficient LED lamp driving and lower hardware costs are achieved.
Patent Information
- Application Number
- CN202510652652.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The traditional scanning LED array driving method cannot provide sufficient resources when the IO interface is insufficient, resulting in the inability to drive more LED lights.
The structure of N first IO control units, M second IO control units and N LED lamp groups is adopted. Each LED lamp group includes M parallel connected LED branches, and M×N LED lamps are driven by N+M IO interfaces, and a larger current driving is achieved through the combination of NPN type and PNP type transistors.
In the case of insufficient IO interface, more LED lights can be driven, the number of driving ports can be reduced, the hardware cost can be reduced, and the brightness of the LED lights can be ensured.
Smart Images

Figure CN120183321B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of LED lamp control, and particularly to an LED control circuit and its control method. Background Art
[0002] With the continuous progress of health technology, as an important tool for health management and treatment, the functions and user experience of the life monitoring and health care instrument have been increasingly emphasized. As a key component in the life monitoring and health care instrument, the driving method of the LED array directly affects the performance and display effect of the device. With the rapid development of LED display technology, the scanning-based LED array driving method has been widely used in the fields of LED displays, LED lighting, etc. due to its high efficiency and low cost. However, under certain harsh application conditions, the control unit MCU simply cannot provide enough IO interface resources to drive the LED array. Summary of the Invention
[0003] The purpose of this application is to provide an LED control circuit and its control method, which can drive more LED lights with a small number of IO interfaces, make full use of the IO interface resources, and reduce the hardware cost.
[0004] To achieve the above purpose, this application provides the following solutions:
[0005] In a first aspect, this application provides an LED control circuit, including: N first IO control units, M second IO control units, and N LED lamp groups; each LED lamp group includes M LED branches connected in parallel; each LED branch includes at least one LED lamp; M>1, N>1;
[0006] The positive terminals of the LED branches in the same LED lamp group are connected to the same first IO control unit;
[0007] The negative terminals of the LED branches in the same LED lamp group are respectively connected to M second IO control units in a one-to-one correspondence; the N first IO control units and the M second IO control units correspond to the N+M IO interfaces of the LED controller.
[0008] Optionally, each of the first IO control units includes: a first resistor unit, a second resistor unit, a third resistor unit, a fourth resistor unit, a first PNP transistor, and a first NPN transistor;
[0009] One end of the first resistor unit and the emitter of the first PNP transistor are both connected to an external power supply. The other end of the first resistor unit is respectively connected to the base of the first PNP transistor and one end of the second resistor unit. The other end of the second resistor unit is connected to the collector of the first NPN transistor. The base of the first NPN transistor is respectively connected to one end of the third resistor unit and one end of the fourth resistor unit. The other end of the third resistor unit is connected to the first IO interface of the LED controller. The other end of the fourth resistor unit and the emitter of the first NPN transistor are grounded;
[0010] The collector of the first PNP transistor is respectively connected to the positive electrodes of the LED branches in the corresponding LED lamp group.
[0011] Optionally, each of the second IO control units includes: a second NPN transistor, a fifth resistor unit, and a sixth resistor unit;
[0012] The collector of the second NPN transistor is respectively connected to the negative electrodes of the LED branches in the corresponding LED lamp group. The base of the second NPN transistor is respectively connected to one end of the fifth resistor unit and one end of the sixth resistor unit. The other end of the sixth resistor unit and the emitter of the second NPN transistor are grounded. The other end of the fifth resistor unit is connected to the second IO interface of the LED controller.
[0013] Optionally, the LED control circuit further includes: a first additional LED control unit between any two first IO control units; the first additional LED control unit includes:
[0014] a seventh resistor unit, an eighth resistor unit, a ninth resistor unit, a tenth resistor unit, an eleventh resistor unit, a twelfth resistor unit, an additional LED lamp, a second PNP transistor, a third NPN transistor, and a fourth NPN transistor;
[0015] One end of the seventh resistor unit is connected to the first IO interface corresponding to the target first IO control unit, and one end of the eighth resistor unit is grounded; the other end of the seventh resistor unit and the other end of the eighth resistor unit are connected to the base of the third NPN transistor; the emitter of the third NPN transistor is grounded; the collector of the third NPN transistor is connected to one end of the ninth resistor unit, and the other end of the ninth resistor unit is connected to one end of the tenth resistor unit and the base of the second PNP transistor; the other end of the tenth resistor unit and the emitter of the second PNP transistor are connected to an external power supply; the collector of the second PNP transistor is connected to the collector of the fourth NPN transistor through an additional LED, the emitter of the fourth NPN transistor is grounded, the base of the fourth NPN transistor is connected to one end of the eleventh resistor unit and one end of the twelfth resistor unit, the other end of the eleventh resistor unit is connected to the first IO interface corresponding to another first IO control unit, and the other end of the twelfth resistor unit is grounded; the target first IO control unit refers to any one of the two first IO control units; the other first IO control unit refers to the first IO control unit other than the target first IO control unit among any two first IO control units.
[0016] Optionally, the LED control circuit further includes: a second additional LED control unit between any two second IO control units; the second additional LED control unit has the same structure as the first additional LED control unit;
[0017] One end of the seventh resistor unit in the second additional LED control unit is connected to the second IO interface corresponding to the target second IO control unit, and one end of the eleventh resistor unit in the second additional LED control unit is connected to the second IO interface corresponding to another second IO control unit; the target second IO control unit refers to any one of the two second IO control units; the other second IO control unit refers to the second IO control unit other than the target second IO control unit among any two second IO control units.
[0018] Optionally, each of the first resistor unit to the twelfth resistor unit includes at least one resistor.
[0019] Optionally, each LED branch further includes a first current-limiting resistor unit; the first current-limiting resistor unit is used to perform current-limiting protection on the LED in the branch where it is located;
[0020] A second current-limiting resistor unit is also connected in series with the additional LED; the second current-limiting resistor unit is used to perform current-limiting protection on the additional LED.
[0021] Optionally, each of the first current-limiting resistor unit and the second current-limiting resistor unit includes at least one resistor.
[0022] Second aspect, the present application proposes an LED control method based on the above-mentioned LED control circuit. The LED control method includes:
[0023] Controlling the first IO interface corresponding to the nth first IO control unit to maintain a high level, and controlling the first IO interfaces corresponding to other first IO control units to maintain a low level; n = 1, 2,..., N; other first IO control units refer to the first IO control units except the nth first IO control unit;
[0024] Controlling the second IO interface corresponding to the mth second IO control unit to maintain a high level, and controlling the second IO interfaces corresponding to other second IO control units to maintain a low level, then the LED corresponding to the mth LED branch in the nth LED light group lights up; m = 1, 2,..., M; other second IO control units refer to the second IO control units except the mth second IO control unit;
[0025] Let m = m + 1, and return to the step of "controlling the second IO interface corresponding to the mth second IO control unit to maintain a high level";
[0026] Let n = n + 1, and return to the step of "controlling the first IO interface corresponding to the nth first IO control unit to maintain a high level".
[0027] Optionally, the lighting duration of the LED corresponding to each LED branch is a preset duration.
[0028] According to the specific embodiments provided by the present application, the following technical effects are disclosed in the present application:
[0029] The present application provides an LED control circuit and its control method, which are provided with N first IO control units, M second IO control units and N LED light groups; each LED light group includes M LED branches connected in parallel; each LED branch includes at least one LED; the positive terminals of the LED branches in the same LED light group are connected to the same first IO control unit; the negative terminals of the LED branches in the same LED light group are respectively connected to M second IO control units in one-to-one correspondence; the present application uses M + N IO interfaces to drive at least M × N LEDs, and can drive more LEDs with a small number of IO interfaces when the IO interfaces of the LED controller are insufficient, reducing the required number of drive ports, thereby reducing the hardware cost. Description of the Drawings
[0030] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0031] Figure 1 Schematic diagram of the structure of an LED control circuit in an embodiment of the present application;
[0032] Figure 2 Schematic diagram of the association relationship between the single-chip microcomputer IO interface and the LED driving matrix provided in an embodiment of the present application;
[0033] Figure 3 Schematic diagram of the structure of an additional LED control unit in an embodiment of the present application;
[0034] Figure 4 Schematic flowchart of an LED control method provided in an embodiment of the present application;
[0035] Figure 5 Provided by an embodiment of the present application Figure 1 Schematic flowchart of the corresponding LED control method;
[0036] Figure 6 Provided by an embodiment of the present application Figure 1 Schematic diagram of the corresponding LED lamp scanning control timing; Detailed implementation manners
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0038] The present application provides an LED control circuit and its control method, aiming to develop a new scanning-based LED array driving method to solve the limitations of the prior art, meet the driving requirements of the number of LED lamps in the case of insufficient IO interfaces, and achieve higher-quality display effects and lower energy consumption.
[0039] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0040] Embodiment
[0041] As Figure 1 AndFigure 2 As shown in the figure, this embodiment provides an LED control circuit, which includes: N first IO control units, M second IO control units, and N LED lamp groups; each LED lamp group includes M LED branches connected in parallel; each LED branch includes at least one LED lamp; M>1, N>1.
[0042] The positive electrodes of the LED branches in the same LED lamp group are connected to the same first IO control unit.
[0043] The negative electrodes of the LED branches in the same LED lamp group are correspondingly connected to M second IO control units one by one; the N first IO control units and the M second IO control units correspond to the N+M IO interfaces of the LED controller (single-chip microcomputer MCU).
[0044] Figure 1 A specific example is shown in the figure, where N = 3 and M = 3, that is, 3 first IO control units are used (corresponding to Figure 1 the IO1 part, IO2 part, and IO3 part in the figure), 3 second IO control units are used (corresponding to Figure 1 the IO4 part, IO5 part, and IO6 part in the figure), and 3 LED lamp groups ( Figure 1 in the figure, LED1 to LED3 are in one group, LED4 to LED6 are in one group, LED7 to LED9 are in one group. Among LED1 to LED9, each branch where an LED lamp is located is an LED branch).
[0045] Figure 1 The example in the figure is only for more clearly explaining the LED control circuit of this application, and it is only a feasible example without any limiting effect. Different values of M and N will form different LED control circuits.
[0046] In another exemplary embodiment of this application, as shown in Figure 1 the figure, each of the first IO control units includes: a first resistor unit (corresponding to Figure 1 R32, R37, and R40 in the figure), a second resistor unit (corresponding to Figure 1 R65, R66, and R67 in the figure), a third resistor unit (corresponding to Figure 1 R33, R35, and R38 in the figure), a fourth resistor unit (corresponding to Figure 1 R34, R36, and R39 in the figure), a first PNP transistor (corresponding to Figure 1 Q5, Q8, and Q10 in the figure), and a first NPN transistor (corresponding to Figure 1 Q6, Q7, and Q9 in the figure).
[0047] One end of the first resistor unit and the emitter of the first PNP transistor are both connected to an external power supply (corresponding toFigure 1 +5V therein), the other end of the first resistor unit is respectively connected to the base of the first PNP transistor and one end of the second resistor unit, the other end of the second resistor unit is connected to the collector of the first NPN transistor, the base of the first NPN transistor is respectively connected to one end of the third resistor unit and one end of the fourth resistor unit, the other end of the third resistor unit is connected to the first IO interface of the LED controller (corresponding to Figure 1 IO1 interface, IO2 interface and IO3 interface therein), and the other end of the fourth resistor unit and the emitter of the first NPN transistor are grounded.
[0048] The collector of the first PNP transistor is respectively connected to the positive extreme ends of each LED branch in the corresponding LED lamp group.
[0049] In another exemplary embodiment of the present application, each of the second IO control units includes: a second NPN transistor (corresponding to Figure 1 Q11, Q12 and Q13 therein), a fifth resistor unit (corresponding to Figure 1 R50, R52 and R54 therein) and a sixth resistor unit (corresponding to Figure 1 R51, R53 and R55 therein).
[0050] The collector of the second NPN transistor is respectively connected to the negative extreme ends of each LED branch in the corresponding LED lamp group, the base of the second NPN transistor is respectively connected to one end of the fifth resistor unit and one end of the sixth resistor unit, the other end of the sixth resistor unit and the emitter of the second NPN transistor are grounded, and the other end of the fifth resistor unit is connected to the second IO interface of the LED controller (corresponding to Figure 1 IO4 interface, IO5 interface and IO6 interface therein).
[0051] In another exemplary embodiment of the present application, each of the first resistor unit to the sixth resistor unit includes at least one resistor. Figure 1 The first resistor units of the 3 first IO control units in Figure 1 correspond to R32, R37 and R40 in Figure 1 respectively, the second resistor units correspond to R65, R66 and R67 in Figure 1 respectively, the third resistor units correspond to R33, R35 and R38 in Figure 1 respectively, and the fourth resistor units correspond to R34, R36 and R39 in Figure 1 The fifth resistor units of the 3 second IO control units in Figure 1 correspond to R50, R52 and R54 in Figure 1 respectively, and the sixth resistor units correspond to R51, R53 and R55 in
[0052] In this application, by using the control of NPN and PNP transistors, a larger driving current can be obtained to ensure the brightness of the LED lamp. Since the positive electrode of the LED is turned on by the power transistor PNP, and the negative electrode is turned on by the power transistor NPN, the transistor can drive components with large current with small current. Therefore, the supply voltage of the LED lamp can be externally connected to 5V, and the driving voltage of the single-chip microcomputer is 3.3V, which can make up for the problem of low driving current caused by scanning the LED lamp.
[0053] In another exemplary embodiment of the present application, each LED branch further includes a first current-limiting resistor unit; the first current-limiting resistor unit is used to perform current-limiting protection on the LED lamp on the corresponding branch.
[0054] In another exemplary embodiment of the present application, the first current-limiting resistor unit includes at least one resistor (corresponding to Figure 1 R41 to R49).
[0055] In another exemplary embodiment of the present application, the present application can also add LED lamps on the basis of the six IO interfaces of Figure 1 and introduce the relevant structures of NPN transistors, PNP transistors and LED lamps between the IO1 interface and the IO2 interface. Similarly, relevant structures of NPN transistors, PNP transistors and LED lamps are introduced between the IO1 interface and the IO3 interface, between the IO2 interface and the IO3 interface, between the IO4 interface and the IO5 interface, between the IO4 interface and the IO6 interface, and between the IO5 interface and the IO6 interface, so that Figure 1 the designed control circuit can theoretically connect 15 LED lamps. Such a circuit design can not only save the IO port resources of the single-chip microcomputer, but also drive more LED lamps. Since an LED lamp needs to turn on its corresponding two IO ports at the same time to form a path, one IO port connected to +5V and one IO port connected to ground are turned on, as Figure 3 shown, which shows the introduction of relevant structures of NPN transistors, PNP transistors and LED lamps between the IO1 interface and the IO2 interface, between the IO1 interface and the IO3 interface, between the IO2 interface and the IO3 interface, between the IO4 interface and the IO5 interface, between the IO4 interface and the IO6 interface, and between the IO5 interface and the IO6 interface. Among them, Figure 3Among them, three resistors R0603, resistor R64, resistor R62, resistor R28, resistor R29, NPN transistor Q15, PNP transistor Q16, NPN transistor Q14, and LED10 are introduced between the IO1 interface and the IO2 interface. Three resistors R0603, resistor R79, resistor R78, resistor R61, resistor R63, NPN transistor Q21, PNP transistor Q22, NPN transistor Q20, and LED11 are introduced between the IO1 interface and the IO3 interface. Three resistors R0603, resistor R86, resistor R85, resistor R81, resistor R82, NPN transistor Q24, PNP transistor Q25, NPN transistor Q23, and LED12 are introduced between the IO2 interface and the IO3 interface. Three resistors R0603, resistor R93, resistor R92, resistor R88, resistor R89, NPN transistor Q27, PNP transistor Q28, NPN transistor Q26, and LED13 are introduced between the IO4 interface and the IO5 interface. Three resistors R0603, resistor R100, resistor R99, resistor R95, resistor R96, NPN transistor Q30, PNP transistor Q31, NPN transistor Q29, and LED14 are introduced between the IO4 interface and the IO6 interface. Three resistors R0603, resistor R107, resistor R106, resistor R102, resistor R103, NPN transistor Q33, PNP transistor Q34, NPN transistor Q32, and LED15 are introduced between the IO5 interface and the IO6 interface.
[0056] When LED10 is lit, the IO1 interface and the IO2 interface are pulled high, the IO1 interface is connected to the 5V power supply, and the IO2 interface is grounded. When LED11 is lit, the IO1 interface and the IO3 interface are pulled high, the IO1 interface is connected to the 5V power supply, and the IO3 interface is grounded. When LED12 is lit, the IO2 interface and the IO3 interface are pulled high, the IO2 interface is connected to the 5V power supply, and the IO3 interface is grounded.
[0057] When LED13 is lit, the IO4 interface and the IO5 interface are pulled high, the IO4 interface is connected to the 5V power supply, and the IO5 interface is grounded. When LED14 is lit, the IO4 interface and the IO6 interface are pulled high, the IO4 interface is connected to the 5V power supply, and the IO6 interface is grounded. When LED15 is lit, the IO5 interface and the IO6 interface are pulled high, the IO5 interface is connected to the 5V power supply, and the IO6 interface is grounded.
[0058] Therefore, in an exemplary embodiment of the present application, the LED control circuit further includes: a first additional LED control unit between any two first IO control units; the first additional LED control unit includes: a seventh resistor unit, an eighth resistor unit, a ninth resistor unit, a tenth resistor unit (corresponding Figure 3R64, R79, R86 in), the eleventh resistor unit (corresponding to Figure 3 R28, R61, R81 in), the twelfth resistor unit (corresponding to Figure 3 R29, R63, R82 in), the additional LED lights (corresponding to Figure 3 LED10 to LED12 in), the second PNP transistor (corresponding to Figure 3 Q16, Q22, Q25 in), the third NPN transistor (corresponding to Figure 3 Q15, Q21, Q24 in), and the fourth NPN transistor (corresponding to Figure 3 Q14, Q20, Q23 in). The seventh resistor unit, the eighth resistor unit, and the ninth resistor unit correspond to Figure 3 resistor R0603 in (a) to (c). Each of the seventh resistor unit to the twelfth resistor unit includes at least one resistor.
[0059] One end of the seventh resistor unit is connected to the first IO interface corresponding to the target first IO control unit, and one end of the eighth resistor unit is grounded; the other end of the seventh resistor unit and the other end of the eighth resistor unit are connected to the base of the third NPN transistor; the emitter of the third NPN transistor is grounded; the collector of the third NPN transistor is connected to one end of the ninth resistor unit, and the other end of the ninth resistor unit is connected to one end of the tenth resistor unit and the base of the second PNP transistor; the other end of the tenth resistor unit and the emitter of the second PNP transistor are connected to an external power supply; the collector of the second PNP transistor is connected to the collector of the fourth NPN transistor through the additional LED lights, the emitter of the fourth NPN transistor is grounded, the base of the fourth NPN transistor is connected to one end of the eleventh resistor unit and one end of the twelfth resistor unit, the other end of the eleventh resistor unit is connected to the first IO interface corresponding to the other first IO control unit, and the other end of the twelfth resistor unit is grounded; the target first IO control unit refers to any one of the two first IO control units; the other first IO control unit refers to the first IO control unit other than the target first IO control unit among any two first IO control units. The first additional LED control unit between any two first IO control units, such as the first additional LED control unit between the IO1 interface and the IO2 interface, the first additional LED control unit between the IO1 interface and the IO3 interface, and the first additional LED control unit between the IO2 interface and the IO3 interface.
[0060] The described LED control circuit further includes: a second additional LED control unit between any two second IO control units; the second additional LED control unit has the same structure as the first additional LED control unit.
[0061] The second additional LED control unit includes: a seventh resistor unit, an eighth resistor unit, a ninth resistor unit, a tenth resistor unit (corresponding to Figure 3 R93, R100, R107 in), the eleventh resistor unit (corresponding to Figure 3 R88, R95, R102 in the 12th resistor unit (corresponding to Figure 3 R89, R96, R103), additional LED lights (corresponding Figure 3 LED13 to LED15 in the second PNP transistor (corresponding to Figure 3 Q28, Q31, Q34 in), the third NPN transistor (corresponding to Figure 3 Q27, Q30, Q33) and the fourth NPN transistor (corresponding to The seventh resistor unit, the eighth resistor unit, and the ninth resistor unit correspond to Q26, Q29, and Q32 in FIG. Figure 3 Resistor R0603 in (d) to (f).
[0062] One end of the seventh resistor unit in the second additional LED control unit is connected to the second IO interface corresponding to the target second IO control unit, and one end of the eleventh resistor unit in the second additional LED control unit is connected to the second IO interface corresponding to another second IO control unit. The target second IO control unit refers to any one of the two second IO control units, and the another second IO control unit refers to any two second IO control units other than the target second IO control unit. The second additional LED control units of any two second IO control units include, for example, the second additional LED control unit between the IO4 interface and the IO5 interface, the second additional LED control unit between the IO4 interface and the IO6 interface, and the second additional LED control unit between the IO5 interface and the IO6 interface.
[0063] The additional LED lamp is also connected in series with a second current limiting resistor unit; the second current limiting resistor unit is used to provide current limiting protection for the additional LED lamp. The second current limiting resistor unit includes at least one resistor. Figure 3 R62, R78, R85, R92, R99, and R106.
[0064] In this application, on the one hand, using a small number of IO ports to drive more LED lights can fully utilize the IO interface resources of the microcontroller and reduce hardware costs. On the other hand, NPN transistors and PNP transistors can drive high current output to achieve the required brightness of the LED lights. Because transistors have the characteristic of controlling high current switches with small currents, using transistors to control both the positive and negative poles of the LED lights can achieve the maximum current required by the LED lights and ensure the brightness of the LED lights.
[0065] In another exemplary embodiment of the present application, a LED control method implemented based on the above LED control circuit is provided. As Figure 3 shown, the LED control method includes:
[0066] S100: Control the first IO interface corresponding to the nth first IO control unit to maintain a high level, and control the first IO interfaces corresponding to other first IO control units to maintain a low level; n = 1, 2,..., N; other first IO control units refer to the first IO control units other than the nth first IO control unit.
[0067] S200: Control the second IO interface corresponding to the mth second IO control unit to maintain a high level, and control the second IO interfaces corresponding to other second IO control units to maintain a low level, then the LED in the mth LED branch of the nth LED light group is lit; m = 1, 2,..., M; other second IO control units refer to the second IO control units other than the mth second IO control unit.
[0068] S300: Let m = m + 1, and return to the step "Control the second IO interface corresponding to the mth second IO control unit to maintain a high level".
[0069] S400: Let n = n + 1, and return to the step "Control the first IO interface corresponding to the nth first IO control unit to maintain a high level".
[0070] Taking Figure 4 the shown LED control circuit as an example, combined with Figure 1 to illustrate the specific process of controlling each LED to light up:
[0071] When LED1 is lit, the IO1 interface is pulled high (i.e., at a high level), Q6 conducts, Q5 also conducts, the IO6 interface is pulled high (i.e., at a high level), Q11 conducts, and the IO2 interface, IO3 interface, IO5 interface, and IO4 interface are all pulled low (i.e., at a low level). In this way, all LEDs from LED2 to LED9 except LED1 are extinguished, and only LED1 is lit at this moment. However, LED1 is only lit for 1 ms at this moment. Immediately afterwards, the IO1 interface and the IO5 interface are pulled high according to the same steps, and the other IO interfaces are pulled low. In this way, LED2 can also be lit alone for 1 ms. The IO1 interface and the IO4 interface are pulled high, LED3 is lit for 1 ms, the IO2 interface and the IO6 interface are pulled high for 1 ms, LED4 is lit for 1 ms, the IO2 interface and the IO5 interface are pulled high for 1 ms, LED5 is lit for 1 ms, the IO2 interface and the IO4 interface are pulled high for 1 ms, LED6 is lit for 1 ms, the IO3 interface and the IO6 interface are pulled high for 1 ms, LED7 is lit for 1 ms, the IO3 interface and the IO5 interface are pulled high for 1 ms, LED8 is lit for 1 ms, the IO3 interface and the IO4 interface are pulled high for 1 ms, LED9 is lit for 1 ms. Starting from LED1 again in this way, it is also lit for 1 ms, and this cycle repeats. Each LED is lit for 1 ms. Because of the visual persistence of the human eye, the continuous cyclic lighting of the LEDs makes it look like they are lit simultaneously, thus achieving the effect of driving the LEDs with a single IO interface. According to the existing driving method, driving nine LEDs should require nine IO interfaces, but currently only six IO interfaces are needed, saving three IO interfaces.
[0072] As Figure 5 Figure 6 shown, t1 is the turn-on time of each LED. When LED1 is lit, the IO1 interface and the IO6 interface are turned on. When LED2 is lit, the IO1 interface and the IO5 interface are turned on. When LED3 is lit, the IO1 interface and the IO4 interface are turned on. When LED4 is lit, the IO2 interface and the IO6 interface are turned on. When LED5 is lit, the IO2 interface and the IO5 interface are turned on. When LED6 is lit, the IO2 interface and the IO4 interface are turned on. When LED7 is lit, the IO3 interface and the IO6 interface are turned on. When LED8 is lit, the IO3 interface and the IO5 interface are turned on. When LED9 is lit, the IO3 interface and the IO4 interface are turned on.
[0073] This application proposes a driving display technology for a scanning-based LED array, which activates the LEDs in the LED array row by row or column by column to reduce the number of required driving ports, save the MCU IO port resources, and thus reduce the hardware cost.
[0074] The present application also provides an application scenario, which applies the above-mentioned LED control circuit and its control method. Specifically: The LED control circuit and its control method provided in this embodiment can be applied in health care devices, such as a life monitoring and calling health care instrument, and can also be applied to products such as smart home and smart air conditioner.
[0075] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0076] Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. An LED control circuit, characterized in that, The LED control circuit includes: N first IO control units, M second IO control units, and N LED lamp groups; each LED lamp group includes M LED branches connected in parallel; each LED branch includes at least one LED lamp; M>1, N>1; The positive electrodes of the LED branches in the same LED lamp group are connected to the same first IO control unit; The negative electrodes of the LED branches in the same LED lamp group are respectively and correspondingly connected to the M second IO control units; the N first IO control units and the M second IO control units correspond to the N+M IO interfaces of the LED controller; Each of the first IO control units includes: a first resistor unit, a second resistor unit, a third resistor unit, a fourth resistor unit, a first PNP transistor, and a first NPN transistor; One end of the first resistor unit and the emitter of the first PNP transistor are both connected to an external power supply. The other end of the first resistor unit is respectively connected to the base of the first PNP transistor and one end of the second resistor unit. The other end of the second resistor unit is connected to the collector of the first NPN transistor. The base of the first NPN transistor is respectively connected to one end of the third resistor unit and one end of the fourth resistor unit. The other end of the third resistor unit is connected to the first IO interface of the LED controller. The other end of the fourth resistor unit and the emitter of the first NPN transistor are grounded; The collector of the first PNP transistor is respectively connected to the positive electrodes of the LED branches in the corresponding LED lamp group; The LED control method of the LED control circuit includes: Controlling the first IO interface corresponding to the nth first IO control unit to maintain a high level, and controlling the first IO interfaces corresponding to other first IO control units to maintain a low level; n = 1, 2... N; other first IO control units refer to the first IO control units except the nth first IO control unit; Controlling the second IO interface corresponding to the mth second IO control unit to maintain a high level, and controlling the second IO interfaces corresponding to other second IO control units to maintain a low level, then the LED lamp corresponding to the mth LED branch in the nth LED lamp group lights up; m = 1, 2... M; other second IO control units refer to the second IO control units except the mth second IO control unit; Let m = m + 1, and return to the step of controlling the second IO interface corresponding to the mth second IO control unit to maintain a high level; Let n = n + 1, and return to the step of controlling the first IO interface corresponding to the nth first IO control unit to maintain a high level.
2. The LED control circuit according to claim 1, wherein, Each of the second IO control units includes: a second NPN transistor, a fifth resistor unit, and a sixth resistor unit; The collector of the second NPN transistor is respectively connected to the negative electrodes of the LED branches in the corresponding LED lamp group. The base of the second NPN transistor is respectively connected to one end of the fifth resistor unit and one end of the sixth resistor unit. The other end of the sixth resistor unit and the emitter of the second NPN transistor are grounded. The other end of the fifth resistor unit is connected to the second IO interface of the LED controller.
3. The LED control circuit according to claim 2, wherein, The described LED control circuit further includes: a first additional LED control unit between any two first IO control units; the first additional LED control unit includes: a seventh resistor unit, an eighth resistor unit, a ninth resistor unit, a tenth resistor unit, an eleventh resistor unit, a twelfth resistor unit, an additional LED lamp, a second PNP transistor, a third NPN transistor, and a fourth NPN transistor; One end of the seventh resistor unit is connected to the first IO interface corresponding to the target first IO control unit, and one end of the eighth resistor unit is grounded; the other end of the seventh resistor unit and the other end of the eighth resistor unit are connected to the base of the third NPN transistor; the emitter of the third NPN transistor is grounded; the collector of the third NPN transistor is connected to one end of the ninth resistor unit, and the other end of the ninth resistor unit is connected to one end of the tenth resistor unit and the base of the second PNP transistor; the other end of the tenth resistor unit and the emitter of the second PNP transistor are connected to an external power supply; the collector of the second PNP transistor is connected to the collector of the fourth NPN transistor through the additional LED lamp, the emitter of the fourth NPN transistor is grounded, the base of the fourth NPN transistor is connected to one end of the eleventh resistor unit and one end of the twelfth resistor unit, the other end of the eleventh resistor unit is connected to the first IO interface corresponding to the other first IO control unit, and the other end of the twelfth resistor unit is grounded; the target first IO control unit refers to any one of the two first IO control units; the other first IO control unit refers to the first IO control unit other than the target first IO control unit among any two first IO control units.
4. The LED control circuit according to claim 3, characterized in that, The described LED control circuit further includes: a second additional LED control unit between any two second IO control units; the second additional LED control unit has the same structure as the first additional LED control unit; One end of the seventh resistor unit in the second additional LED control unit is connected to the second IO interface corresponding to the target second IO control unit, and one end of the eleventh resistor unit in the second additional LED control unit is connected to the second IO interface corresponding to the other second IO control unit; the target second IO control unit refers to any one of the two second IO control units; the other second IO control unit refers to the second IO control unit other than the target second IO control unit among any two second IO control units.
5. The LED control circuit according to claim 4, wherein Each of the first resistor unit to the twelfth resistor unit includes at least one resistor.
6. The LED control circuit according to claim 5, characterized in that, Each LED branch further includes a first current-limiting resistor unit; the first current-limiting resistor unit is used to perform current-limiting protection on the LED lamp on the corresponding branch. A second current-limiting resistor unit is also connected in series with the additional LED lamp; the second current-limiting resistor unit is used to perform current-limiting protection on the additional LED lamp.
7. The LED control circuit according to claim 6, wherein Each of the first current-limiting resistor unit and the second current-limiting resistor unit includes at least one resistor.
8. The LED control circuit according to claim 1, wherein The lighting duration of the LED lamp corresponding to each LED branch is a preset duration.
Citation Information
Patent Citations
Electronic device and driving device and method of LED array
CN110390904A
Multi-LED lamp control circuit
CN112911750A