LED brightness segment control circuit and LED brightness segment control method
Through the PWM dimming LED brightness sampling circuit, the oscillator and effective level detection circuit are used to count the duty cycle of the PWM signal, and gradually reduce the effective duty cycle of the PWM signal, solving the problem of the inability to detect and control LEDs with high precision in the existing technology. To solve the problem of lamp brightness, brightness control and lighting time extension under battery power are realized.
Patent Information
- Application Number
- CN202111537063.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-16
AI Technical Summary
The existing technology cannot detect the brightness of the LED light with low cost and high precision and accurately control the brightness of the LED lighting when powered by a battery, resulting in the inability to effectively extend the lighting time of the LED lighting.
Using PWM dimming LED brightness sampling circuit, including oscillator, programmable PWM dimming circuit and effective level detection circuit, by counting the effective level duty cycle of the PWM signal, gradually lower the effective duty cycle of the PWM signal to control The brightness of the LED light can be reduced by steps to reduce the brightness and extend the lighting time.
It realizes low-cost, high-precision LED brightness detection and control, extends the lighting time of LED lighting, and has a simple structure and low cost.
Smart Images

Figure CN114423117B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of LED lighting, and in particular, to an LED brightness segment control circuit and an LED brightness segment control method. Background Art
[0002] Light-Emitting Diode (LED) is a light-emitting device that uses solid semiconductor chips as light-emitting materials. LED has outstanding advantages in energy saving and environmental protection. In terms of energy consumption, compared with traditional lamps, since LED is a cold light source, it does not generate too much energy during operation. Its energy consumption is one-tenth of that of incandescent lamps and one-fourth of that of energy-saving lamps. Moreover, LED does not contain any heavy metal materials, which has outstanding advantages in energy saving and environmental protection. At the same time, LED is widely used in the field of lighting.
[0003] LED lighting such as solar LED street lights and LED night lights are powered by batteries at night. Due to the limited battery capacity, the brightness of the LED lighting needs to be controlled so that it can provide better lighting throughout the night. Summary of the invention
[0004] At least one embodiment of the present disclosure provides a PWM dimming LED brightness sampling circuit, comprising: an oscillator, a programmable PWM dimming circuit, and an effective level detection circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit and the effective level detection circuit, the programmable PWM dimming circuit is configured to generate a PWM signal, and the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit.
[0005] In one embodiment of the present disclosure, when the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit, the effective level detection circuit is configured to start counting the clock signal when the PWM signal changes from an invalid level to an effective level in one cycle of the PWM signal, and the effective level detection circuit ends counting when the PWM signal changes from an effective level to an invalid level to obtain a counting result, wherein the duty cycle of the effective level of the PWM signal is N1*T CLK / Tpwm, N1 represents the counting result, TCLK represents the period of the clock signal, and Tpwm represents the period of the PWM signal.
[0006] In one embodiment of the present disclosure, the programmable PWM dimming circuit sets the duty cycle of the effective level of the PWM signal according to the connection mode of the programmable pin.
[0007] At least one embodiment of the present disclosure provides an LED brightness segment control circuit, comprising: a programmable PWM dimming circuit, a PWM signal effective level detection circuit, an oscillator and a control logic circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit, the PWM signal effective level detection circuit and the control logic circuit, the programmable PWM dimming circuit is configured to generate a first PWM signal according to a connection method of a programmable pin within a first time period, the PWM signal effective level detection circuit is configured to detect a first duty cycle of an effective level of the first PWM signal, obtain a first counting result, and send the first counting result to the control logic circuit, and the control logic circuit controls the programmable PWM dimming circuit to gradually lower the effective duty cycle of the generated PWM signal within multiple consecutive time periods after the first time period according to the first counting result.
[0008] In one embodiment of the present disclosure, the control logic circuit controls the programmable PWM dimming circuit to gradually lower the effective duty cycle of the generated PWM signal in multiple consecutive time periods after the first time period based on the first counting result, including: obtaining the nth counting result of the PWM signal effective level detection circuit in the nth time period, and sending the nth integer smaller than the nth counting result to the programmable PWM dimming circuit, so that the programmable PWM dimming circuit generates the n+1th PWM signal with the n+1th effective duty cycle according to the nth integer in the n+1th time period, until the n+1th effective duty cycle is less than or equal to the first threshold.
[0009] In one embodiment of the present disclosure, the control logic circuit controls the programmable PWM dimming circuit to gradually lower the generated PWM signal in multiple consecutive time periods after the first time period based on the first counting result, including: the control logic circuit sends the first counting result to the programmable PWM dimming circuit, and in each time period after the first time period, the programmable PWM dimming circuit outputs a PWM signal corresponding to each time period, and the effective level duration of the PWM signal corresponding to each time period is expressed as (N1-(n-1)*step)*TCLK, until the effective duty cycle corresponding to (N1-(n-1)*step)*TCLK is less than or equal to the first threshold, where n corresponds to the nth time period, and step represents the step size of each time period reduced relative to the previous time period.
[0010] In one embodiment of the present disclosure, the first threshold is a preset value greater than zero or zero.
[0011] In one embodiment of the present disclosure, when the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit, the effective level detection circuit is configured to start counting the clock signal when the PWM signal changes from an invalid level to an effective level in one cycle of the PWM signal, and the effective level detection circuit ends counting when the PWM signal changes from an effective level to an invalid level to obtain a counting result, wherein the duty cycle of the effective level of the PWM signal is N1*T CLK / Tpwm, N1 represents the counting result, TCLK represents the period of the clock signal, and Tpwm represents the period of the PWM signal.
[0012] In one embodiment of the present disclosure, the programmable PWM dimming circuit sets the duty cycle of the effective level of the PWM signal according to the connection mode of the programmable pin.
[0013] At least one embodiment of the present disclosure provides an LED brightness segment control circuit, comprising: a programmable PWM dimming circuit, a PWM signal effective level detection circuit, an oscillator, a control logic circuit, a step dimming circuit and a gating circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit, the PWM signal effective level detection circuit and the control logic circuit, the programmable PWM dimming circuit is connected to the PWM signal effective level detection circuit and the gating circuit, the PWM signal effective level detection circuit is connected to the logic control circuit, the logic control circuit is connected to the step dimming circuit and the gating circuit, the step dimming circuit is connected to the gating circuit, wherein: the programmable PWM dimming circuit is configured to be in the first A first PWM signal is generated within a time period, and the PWM signal effective level detection circuit is configured to detect a first duty cycle of the effective level of the first PWM signal, obtain a first counting result N1 and send the first counting result N1 to the control logic circuit. In each time period after the first time period, the control logic circuit is configured to control the stage dimming circuit to output a PWM signal corresponding to each time period, and the effective level duration of the PWM signal corresponding to each time period is expressed as (N1-(n-1)*step)*TCLK, wherein n corresponds to the nth time period, and step represents the step size of each time period reduced relative to the previous time period. At the same time, the control logic circuit controls the gating circuit to output a PWM signal corresponding to each time period.
[0014] In one embodiment of the present disclosure, in a first time period, the control logic circuit controls the gating circuit to output a first PWM signal generated by the programmable PWM dimming circuit, and in each time period after the first time period, the control logic circuit controls the gating circuit to output a PWM signal corresponding to each time period generated by the step dimming circuit.
[0015] At least one embodiment of the present disclosure provides a method for controlling LED brightness in segments, including: setting the brightness of an LED lamp through a programmable pin; implementing a step-by-step reduction in the brightness of the LED lamp through any of the above-mentioned LED brightness segment control circuits; and emitting light at a fixed brightness or turning off the LED lamp.
[0016] In one embodiment of the present disclosure, before setting the brightness of the LED lamp through the programmable pin, the method further includes: driving the LED lamp with a PWM signal having a duty cycle of 1. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The LED brightness control circuit known to the inventor is shown.
[0018] Figure 2 A LED brightness segment control circuit according to an embodiment of the present disclosure is shown.
[0019] Figure 3 A waveform diagram of a PWM signal is shown.
[0020] Figure 4 The diagram shows a sampling waveform diagram in the PWM signal period Tpwm and a waveform diagram of the clock signal CLK.
[0021] Figure 5 A LED brightness segment control circuit according to another embodiment of the present disclosure is shown.
[0022] Figure 6 A flow chart of a method for controlling LED brightness in segments according to an embodiment of the present disclosure is shown.
[0023] Figure 7 A flow chart of a method for controlling LED brightness in segments according to another embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0024] The specific implementation modes of the present invention are further described in detail below in conjunction with the accompanying drawings.
[0025] With the advantages of energy saving, environmental protection and high performance of LED lights, they are widely used in the lighting field. Since LED lights such as solar LED street lights and LED night lights are powered by batteries at night, considering the limited battery capacity, the lighting time of LED lights is usually controlled so that they can provide better lighting for a longer period of time, even the whole night.
[0026] Figure 1 FIG. 2 shows an LED brightness control circuit in the known technology of the inventor. Figure 1 As shown, the LED brightness control circuit 100 generates a pulse width modulation signal (PWM) according to the connection relationship of the programmable external pin 101, and sends the PWM signal to the driving circuit 106. The driving circuit 106 controls the on time and off time of the semiconductor switch 107 in one cycle according to the duty cycle of the PWM signal. The voltage source VCC provides a driving voltage to the anode of the LED lamp 108, and the cathode of the LED lamp 108 is grounded through the semiconductor switch 107. When the level of the PWM signal is an effective level, for example, a high level, the semiconductor switch 107 is turned on, and current flows through the LED lamp 108, and the LED lamp 108 emits light. When the level of the PWM signal is an invalid level, for example, a low level, the semiconductor switch 107 is turned off, and no current flows through the LED lamp 108, and the LED lamp 108 does not emit light. By adjusting the duty cycle of the PWM signal, that is, the ratio of the duration of the effective level in the PWM signal cycle to the PWM signal cycle, the overall luminous brightness of the LED lamp 108 can be adjusted.
[0027] The LED brightness control circuit 100 includes an external programmable pin 101, an analog-to-digital converter (ADC) 102, an oscillator 103, a control logic circuit 104, and a programmable PWM dimming circuit 105. The connection relationship of the external programmable pin 101 is configured to determine the duty cycle of the effective level of the PWM signal. The analog-to-digital converter 102 is configured to connect the external programmable pin 101, detect the voltage of the external programmable pin 101, convert the voltage into a discrete digital signal, and output the discrete digital signal to the control logic circuit 104. The oscillator 103 provides a clock signal for the control logic circuit 104 and the programmable PWM dimming circuit 105. The control logic circuit 104 is configured to determine the duty cycle of the effective level of the PWM signal according to the discrete digital signal. The control logic circuit 104 sends the determined duty cycle to the programmable PWM dimming circuit 105. The programmable PWM dimming circuit 105 sets the duty cycle of the effective level of the PWM signal according to the duty cycle output by the control logic circuit 104, and outputs the PWM signal to the drive circuit 106. The drive circuit 106 turns on the semiconductor switch 107 according to the effective level in the PWM signal, and turns off the semiconductor switch 107 according to the invalid level in the PWM signal, thereby controlling the LED lamp 108 to emit light or not.
[0028] In the technology known to the inventor, an analog-to-digital converter is required, but the circuit structure of the analog-to-digital converter is complex and the cost is high, especially as the conversion accuracy increases, the cost rises rapidly. Moreover, in the case where the duty cycle of the effective level of the PWM signal is set by connecting a capacitor to an external programmable pin, the analog-to-digital converter cannot obtain the size of the capacitor by detecting the external programmable pin, and the LED brightness control circuit 100 cannot work normally. Therefore, in the technology known to the inventor, it is impossible to detect the brightness of the LED lamp in a low-cost and high-precision manner, and it is impossible to accurately control the brightness of the LED lamp, and further, it is impossible to control the light emission time of the LED lighting lamp when powered by a battery.
[0029] In view of this, some embodiments of the present disclosure provide a PWM dimming LED brightness sampling circuit, which can detect the luminous brightness of an LED lamp with low cost and high precision.
[0030] A PWM dimming LED brightness sampling circuit comprises: an oscillator, a programmable PWM dimming circuit and an effective level detection circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit and the effective level detection circuit, the programmable PWM dimming circuit is configured to generate a PWM signal, and the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit.
[0031] like Figure 2 As shown, according to an embodiment of the present disclosure, a PWM dimming LED brightness sampling circuit includes: an oscillator, a programmable PWM dimming circuit and an effective level detection circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit and the effective level detection circuit, the programmable PWM dimming circuit is configured to generate a PWM signal, and the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit.
[0032] When the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit, the effective level detection circuit is configured to start counting the clock signal when the PWM signal changes from an invalid level to an effective level in one cycle of the PWM signal, and the effective level detection circuit ends counting when the PWM signal changes from an effective level to an invalid level to obtain a counting result, wherein the duty cycle of the effective level of the PWM signal is N1*T CLK / Tpwm, N1 represents the counting result, T CLK represents the period of the clock signal, and Tpwm represents the period of the PWM signal.
[0033] In one embodiment of the present disclosure, the programmable PWM dimming circuit sets the duty cycle of the effective level of the PWM signal according to the connection mode of the programmable pin.
[0034] In one embodiment of the present disclosure, the oscillator is a built-in oscillator or an external oscillator.
[0035] At least one embodiment of the present disclosure also provides an LED brightness segment control circuit, which can detect the duty cycle of the effective level of the PWM signal at low cost and high precision, and can extend the lighting time of the LED lamp when powered by a battery.
[0036] In one embodiment of the present disclosure, the LED brightness segmentation control circuit includes: a programmable PWM dimming circuit, a PWM signal effective level detection circuit, an oscillator and a control logic circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit, the PWM signal effective level detection circuit and the control logic circuit, the programmable PWM dimming circuit is configured to generate a first PWM signal according to a connection mode of a programmable pin within a first time period, the PWM signal effective level detection circuit is configured to detect a first duty cycle of an effective level of the first PWM signal, obtain a first counting result, and send the first counting result to the control logic circuit, and the control logic circuit controls the programmable PWM dimming circuit to gradually lower the effective duty cycle of the generated PWM signal within multiple consecutive time periods after the first time period according to the first counting result.
[0037] like Figure 2 As shown, the LED brightness segment control circuit includes a programmable pin 201 , a PWM signal effective level detection circuit 202 , an oscillator 203 , a control logic circuit 204 and a programmable PWM dimming circuit 205 .
[0038] The programmable pin 201 is configured to set the first duty cycle of the effective level of the PWM signal through its connection relationship. The first duty cycle is the duty cycle of the effective level of the first PWM signal generated by the LED brightness segment control circuit in the first time period (i.e. when the LED brightness segment control circuit just starts to work).
[0039] In the first time period (when the LED brightness segment control circuit starts to work), the programmable PWM dimming circuit 205 generates a periodic first PWM signal PWM1 according to the first duty cycle, and provides the first PWM signal PWM1 to the PWM signal effective level detection circuit 202 and the driving circuit 206. The oscillator 203 is configured to provide a periodic first PWM signal PWM1 to the PWM signal effective level detection circuit 202, the control logic circuit 204 and the programmable PWM dimming circuit 205. CLK The clock signal.
[0040] The PWM signal effective level detection circuit is configured to detect a PWM signal cycle T of the first PWM signal PWM1. pwm1 The clock signal within is counted, a counting result is determined and the counting result is sent to the control logic circuit 204.
[0041] The control logic circuit 204 can determine the duration of the effective level of the first PWM signal PWM1 within a PWM signal cycle according to the counting result, so as to determine the duty cycle of the effective level of the first PWM signal. At the same time, the control logic circuit 204 also performs timing according to the clock signal. After the first time period, the control logic circuit 204 sends an integer smaller than the first counting result to the programmable PWM dimming circuit 205, so that the programmable PWM dimming circuit 205 generates a second PWM signal PWM2 with a second duty cycle within a second time period, wherein the second duty cycle is smaller than the first duty cycle, and the duration of the effective level of the second PWM signal PWM2 is the sum of the integer smaller than the first counting result and T CLK The product of the light intensity of the LED lamp in the second time period is less than the light intensity of the LED lamp in the first time period. By analogy, as time goes by, the light brightness of the LED lamp gradually decreases. In this way, the light emission time of the LED lamp can be increased when powered by a battery.
[0042] When the duty cycle of the PWM signal is less than the duty cycle threshold, the duty cycle of the PWM signal no longer decreases over time, and the luminous intensity of the LED lamp no longer changes. Alternatively, the duty cycle of the PWM signal keeps decreasing until it reaches zero, and the LED lamp is turned off and no longer emits light.
[0043] Next, refer to Figure 3 and Figure 4 The working principle of the PWM signal effective level detection circuit 202 is described in detail.
[0044] The oscillator 203 outputs a clock signal CLK to the programmable PWM dimming circuit 205. The programmable PWM dimming circuit 205 generates a period T according to the duty cycle of the effective signal of the PWM signal and the clock signal CLK. pwm The PWM signal, the clock signal CLK and the PWM signal exist at the same time. Figure 3 In the present disclosure, the high level of the PWM signal is regarded as the effective level, and the low level of the PWM signal is regarded as the ineffective level. When the PWM signal is at a high level, the LED lamp emits light, and when the PWM signal is at a low level, the LED lamp does not emit light.
[0045] Figure 4 FIG. 2 shows a sampling waveform diagram of the PWM signal effective level detection circuit 202 in the PWM signal period Tpwm and a waveform diagram of the clock signal CLK. Figure 4As shown in FIG. 1 , when the PWM signal changes from an invalid level to an effective level at the rising edge, the PWM signal effective level detection circuit 202 starts counting the clock signal CLK, and when the PWM signal changes from an effective level to an invalid level at the falling edge, the counting of the clock signal CLK ends and latches the counting result N. At this time, it can be determined that in one PWM signal cycle Tpwm, the duration of the effective level is N*T CLK , where T CLK is the period of the clock signal CLK. Furthermore, the control logic circuit 204 can determine the duty cycle of the PWM signal to be N*T CLK / Tpwm.
[0046] Thus, in the first time period (when the LED brightness segment control circuit starts to work), the programmable PWM dimming circuit 205 generates a periodic first PWM signal PWM1 according to the first duty cycle, and provides the first PWM signal PWM1 to the PWM signal effective level detection circuit 202 and the driving circuit 206. The driving circuit 206 drives the semiconductor switch 207 according to the first PWM signal PWM1. The semiconductor switch 207 is turned on when the first PWM signal PWM1 is at an effective level, and the LED lamp emits light. It is turned off when the first PWM signal PWM1 is at an invalid level, and the LED lamp does not emit light. At this time, the PWM signal effective level detection circuit 202 detects the first duty cycle. At the rising edge when the first PWM signal PWM1 changes from an invalid level to an effective level, the PWM signal effective level detection circuit 202 starts counting the clock signal CLK. At the falling edge when the PWM signal PWM1 changes from an effective level to an invalid level, the counting of the clock signal CLK ends, and a first counting result N1 is obtained, and the first counting result N1 is sent to the control logic circuit 204. In a second time period T2 after the first time period T1, the control logic circuit 204 controls the programmable PWM dimming circuit to reduce the duty cycle of the PWM signal according to the first counting result.
[0047] In one embodiment of the present disclosure, before the second time period T2 begins, the control logic circuit 204 sends a first integer smaller than the first counting result to the programmable PWM dimming circuit 205, and the programmable PWM dimming circuit 205 generates a second PWM signal PWM2 according to the received first integer, and sends the second PWM signal PWM2 to the PWM signal effective level detection circuit 202 and the drive circuit 206, wherein the duration of the effective level of the second PWM signal PWM2 is the sum of the first integer and T CLKThe product of the effective level and the ineffective level of the second PWM signal PWM2, the period of the second PWM signal PWM2 is Tpwm. The PWM signal effective level detection circuit 202 detects the duty cycle of the second PWM signal PWM2 to obtain a second counting result N2, and the driving circuit 206 controls the semiconductor switch 207 to be turned on and off according to the effective level and the ineffective level of the second PWM signal PWM2, so that the LED lamp 208 emits light at the first brightness during the effective level period and does not emit light during the ineffective level period.
[0048] In one embodiment of the present disclosure, the control logic circuit 204 may send a first integer I1 smaller than the first counting result N2 to the programmable PWM dimming circuit 205 in a first time period, and the programmable PWM dimming circuit 205 caches the first integer I1, and at the end of the first time period T1, the control logic circuit 204 sends an enable signal to the programmable PWM dimming circuit 205, and the programmable PWM dimming circuit 205 generates a second PWM signal PWM2 with a second duty cycle according to the first integer I1 in a second time period T2, wherein the period of the second PWM signal PWM2 is Tpwm, and the effective level time of the second PWM signal PWM2 is I1*T CLK , and sends the second PWM signal PWM2 to the PWM signal effective level detection circuit 202 and the driving circuit 206, the driving circuit 206 drives the semiconductor switch 207 according to the second PWM signal PWM2, the PWM signal effective level detection circuit 202 detects the duty cycle of the second PWM signal PWM2, obtains a second counting result N2 and sends it to the control logic circuit 204, the control logic circuit 204 sends a second integer I2 which is smaller than the second counting result N2 to the programmable PWM dimming circuit 205, the programmable PWM dimming circuit 205 caches the second integer I2, at the end of the second time period T2, the control logic circuit 204 sends an enable signal to the programmable PWM dimming circuit 205, the programmable PWM dimming circuit 205 generates a third PWM signal PWM3 with a third duty cycle according to the second integer I2 in the next time period, wherein the period of the third PWM signal PWM3 is Tpwm, and the effective level time of the third PWM signal PWM3 is I2*T CLK The above process is repeated until the LED light emits light at a fixed brightness or is turned off.
[0049] In another embodiment of the present disclosure, the control logic circuit 204 receives the first counting result N1 sent by the PWM signal effective level detection circuit 202, obtains a first integer I1 smaller than the first counting result N1 according to the first counting result N1 and caches the first integer I1, and sends the first integer I1 to the programmable PWM dimming circuit 205 at the end of the first time period T1, and simultaneously sends an enable signal to the programmable PWM dimming circuit 205, so that the programmable PWM dimming circuit 205 generates a second PWM signal PWM2 with an effective level duration and a second duty cycle according to the first integer I1 at the beginning of the second time period T2, wherein the period of the second PWM signal PWM2 is Tpwm, and the effective level time of the second PWM signal PWM2 is I1*T CLK , and sends the second PWM signal PWM2 to the PWM signal effective level detection circuit 202 and the driving circuit 206, the driving circuit 206 drives the semiconductor switch 207 according to the second PWM signal PWM2, the PWM signal effective level detection circuit 202 detects the duty cycle of the second PWM signal PWM2, obtains a second counting result N2 and sends it to the control logic circuit 204, the control logic circuit 204 obtains a second integer I2 smaller than the second counting result N2 according to the second counting result N2 and caches the second integer I2, and sends the second integer I2 to the programmable PWM dimming circuit 205 at the end of the second time period T2 and sends an enable signal to the programmable PWM dimming circuit 205 at the same time, the programmable PWM dimming circuit 205 generates a third PWM signal PWM3 with a third duty cycle according to the second integer I2 in the next time period, wherein the period of the third PWM signal PWM3 is Tpwm, and the effective level time of the third PWM signal PWM3 is I2*T CLK The above process is repeated until the LED light emits light at a fixed brightness or is turned off.
[0050] In another embodiment of the present disclosure, the PWM signal effective level detection circuit 202 detects the duty cycle of the first PWM signal PWM1 only in the first time period T1 to obtain a first counting result N1. In the nth time period (n is 2, 3, ...) after the first time period T1, the control logic circuit 204 sends the value (N1-(n-1)*step) to the programmable PWM dimming circuit 205, and the programmable PWM dimming circuit 205 generates an nth PWM signal PWMn with an nth duty cycle based on the value (N1-(n-1)*step), the period of the nth PWM signal PWMn is Tpwm, and the effective level time of the nth PWM signal PWMn is (N1-(n-1)*step)*TCLK And so on, until the LED light emits light at a fixed brightness or is turned off when (N1-(n-1)*step) is less than or equal to zero.
[0051] Figure 5 FIG. 2 shows a LED brightness segment control circuit according to another embodiment of the present disclosure. Figure 5 As shown, the LED brightness segment control circuit includes a programmable pin 501, an oscillator 503, a programmable PWM dimming circuit 505, a PWM signal effective level detection circuit 502, a control logic circuit 504, a step dimming circuit 509, and a gating circuit 510.
[0052] The programmable pin 501 is configured to set the first duty cycle of the effective level of the PWM signal through its connection relationship. The first duty cycle is the duty cycle of the effective level of the first PWM signal generated by the LED brightness segment control circuit in the first time period (i.e. when the LED brightness segment control circuit just starts to work).
[0053] In the first time period (when the LED brightness segment control circuit starts to work), the programmable PWM dimming circuit 505 generates a periodic first PWM signal PWM1 according to the first duty cycle, and provides the first PWM signal PWM1 to the PWM signal effective level detection circuit 202 and the gating circuit 510. The oscillator 503 is configured to provide a period of T to the PWM signal effective level detection circuit 202, the control logic circuit 504, the programmable PWM dimming circuit 505 and the step dimming circuit 509. CLK The gate circuit 510 transmits the first PWM signal PWM1 to the drive circuit 506 under the control of the control logic circuit 504. The drive circuit 506 controls the semiconductor switch 507 to be turned on and off according to the effective level and the ineffective level of the first PWM signal PWM1, so that the LED lamp 508 emits light at a first brightness during the effective level period and does not emit light during the ineffective level period. The PWM signal effective level detection circuit 502 detects the first duty cycle, and starts counting the clock signal CLK at the rising edge when the first PWM signal PWM1 changes from the ineffective level to the effective level, and ends counting the clock signal CLK at the falling edge when the PWM signal PWM1 changes from the effective level to the ineffective level, and obtains a first counting result N1, and sends the first counting result N1 to the control logic circuit 504.
[0054] In the stage dimming working state, that is, in the second time period, the third time period, etc. after the first time period, the control logic circuit 504 controls the step dimming circuit 509 to output the nth PWM signal PWMn, where n corresponds to the nth time period, and the effective level duration of the nth PWM signal PWMn is (N1-(n-1)*step)*T CLK , step represents the step length of each time period reduced relative to the previous time period. At the same time, the control logic circuit 504 controls the gating circuit 510 to send the nth PWM signal PWMn to the driving circuit 506, and the driving circuit 506 controls the semiconductor switch 507 to be turned on and off according to the effective level and the ineffective level of the nth PWM signal PWMn, so that the LED lamp 508 emits light during the effective level period and does not emit light during the ineffective level period, until the LED lamp 508 emits light at a fixed brightness or turns off (that is, N1-(n-1)*step is less than or equal to zero).
[0055] By detecting the duty cycle of the PWM signal and controlling the duty cycle of the PWM signal in different time periods, it is possible to provide lighting conditions more reasonably according to the flow of people and extend the lighting time when the LED lamp is powered by a battery. At the same time, the LED brightness segmentation control circuit according to the embodiment of the present disclosure has a simple structure and low cost.
[0056] At least one embodiment of the present disclosure also provides a method for controlling LED brightness in segments.
[0057] Figure 6 FIG. 1 is a flow chart showing a method for controlling LED brightness in segments according to an embodiment of the present disclosure. Figure 6 As shown, the LED brightness segmented control method includes: S1, setting the LED light brightness through a programmable pin; S2, step-by-step reducing the LED light brightness; and S3, the LED light emits light at a fixed brightness or turns off the LED light.
[0058] The implementation process of the LED brightness segment control method can refer to the above description of the LED brightness segment control circuit, which will not be repeated here.
[0059] Figure 7 FIG. 4 is a flow chart showing a method for controlling LED brightness in segments according to another embodiment of the present disclosure. Figure 7 As shown, the LED brightness segmented control method includes: S0, driving the LED lamp with a PWM signal with a duty cycle of 1; S1, setting the LED lamp brightness through a programmable pin; S2, step-by-step reducing the LED lamp brightness; and S3, the LED lamp emits light at a fixed brightness or turns off the LED lamp.
[0060] In S0, when the LED lamp is driven by a PWM signal with a duty cycle of 1, the LED lamp is driven by a PWM signal containing only valid levels, so that the LED lamp will emit light at maximum brightness. Afterwards, in S1, the brightness of the LED lamp is set through the programmable pin. For the implementation of S2 and S3, reference can be made to the description of the LED brightness segmented control circuit above, which will not be repeated here.
[0061] In S1 of the LED brightness segmentation control method according to the embodiment of the present disclosure, the external programmable pin sets the LED light brightness, which can be adjusted in the theoretical range of 0% to 100%. The user can adjust the LED light brightness according to the actual application environment and needs, and the lighting time can be maximized. The duration of the LED light brightness set by the duty cycle set by the programmable pin can be set by software or by hardware. In S2 of the LED brightness segmentation control method according to the embodiment of the present disclosure, considering that there are fewer pedestrians in the second half of the night and the natural light is strengthened near dawn, the LED light brightness is stepped down, and the lighting time can be extended when the battery is powered. In S3 of the LED brightness segmentation control method according to the embodiment of the present disclosure, if the battery power can support the LED light to emit light at a certain fixed brightness until dawn, the LED light emits light at this brightness until dawn, and if the battery power is not enough to support the LED light to emit light until dawn, the LED light is turned off. In this way, in the second half of the night when there are fewer pedestrians, the LED light is operated in power saving mode to ensure that the LED light provides lighting all night.
[0062] The above-described embodiments are only preferred embodiments of the present invention, and the embodiments are not intended to limit the patent protection scope of the present invention. Therefore, any equivalent structural changes made using the description and drawings of the present invention should also be included in the protection scope of the present invention.
Claims
1. A PWM dimming LED brightness sampling circuit, characterized in that: include: An oscillator, a programmable PWM dimming circuit, a control logic circuit and an effective level detection circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit, the control logic circuit and the effective level detection circuit, the programmable PWM dimming circuit is configured to generate a PWM signal, the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit, and the control logic circuit controls the programmable PWM dimming circuit to adjust the effective duty cycle of the generated PWM signal according to the detection result of the effective level detection circuit; the initial effective duty cycle of the programmable PWM dimming circuit is received from an external setting; wherein, when the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit, the effective level detection circuit is configured to start counting the clock signal when the PWM signal changes from an invalid level to an effective level in one cycle of the PWM signal, and the effective level detection circuit ends counting when the PWM signal changes from an effective level to an invalid level to obtain a counting result, wherein the duty cycle of the effective level of the PWM signal is N1*T CLK / Tpwm, N1 represents the counting result, TCLK represents the period of the clock signal, and Tpwm represents the period of the PWM signal.
2. The PWM dimming LED brightness sampling circuit according to claim 1, characterized in that: The initial effective duty cycle of the programmable PWM dimming circuit is set by the connection mode received from the programmable pin.
3. An LED brightness segment control circuit, comprising: A programmable PWM dimming circuit, a PWM signal effective level detection circuit, an oscillator and a control logic circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit, the PWM signal effective level detection circuit and the control logic circuit, the programmable PWM dimming circuit is configured to generate a first PWM signal according to the connection mode of the programmable pin within a first time period, the PWM signal effective level detection circuit is configured to detect a first duty cycle of the effective level of the first PWM signal, obtain a first counting result, and send the first counting result to the control logic circuit, the control logic circuit, according to the first counting result, for multiple consecutive times after the first time period The programmable PWM dimming circuit is controlled to gradually reduce the effective duty cycle of the generated PWM signal within a time period; the initial effective duty cycle of the programmable PWM dimming circuit is received from an external setting; wherein, when the effective level detection circuit is configured to detect the duty cycle of the effective level of the PWM signal output by the programmable PWM dimming circuit, the effective level detection circuit is configured to start counting the clock signal when the PWM signal changes from an invalid level to an effective level in one cycle of the PWM signal, and the effective level detection circuit ends counting when the PWM signal changes from an effective level to an invalid level to obtain a counting result, wherein the duty cycle of the effective level of the PWM signal is N1*T CLK / Tpwm, N1 represents the counting result, TCLK represents the period of the clock signal, and Tpwm represents the period of the PWM signal.
4. The LED brightness segment control circuit according to claim 3, characterized in that: The control logic circuit controls the programmable PWM dimming circuit to gradually reduce the effective duty cycle of the generated PWM signal in a plurality of consecutive time periods after the first time period according to the first counting result, including: In the nth time period, the nth counting result of the PWM signal effective level detection circuit is obtained, and the nth integer smaller than the nth counting result is sent to the programmable PWM dimming circuit, so that the programmable PWM dimming circuit generates the n+1th PWM signal with the n+1th effective duty cycle according to the nth integer in the n+1th time period until the n+1th effective duty cycle is less than or equal to the first threshold.
5. The LED brightness segment control circuit according to claim 3, characterized in that: The control logic circuit controls the programmable PWM dimming circuit to gradually lower the generated PWM signal in a plurality of consecutive time periods after the first time period according to the first counting result, including: The control logic circuit sends the first counting result to the programmable PWM dimming circuit. In each time period after the first time period, the programmable PWM dimming circuit outputs a PWM signal corresponding to each time period. The effective level duration of the PWM signal corresponding to each time period is expressed as (N1-(n-1)*step)*TCLK, until the effective duty cycle corresponding to (N1-(n-1)*step)*TCLK is less than or equal to the first threshold, where n corresponds to the nth time period, and step represents the step size of each time period reduced relative to the previous time period.
6. The LED brightness segment control circuit according to claim 5, characterized in that: The first threshold is a preset value greater than zero or zero.
7. The LED brightness segment control circuit according to claim 3, characterized in that: The initial effective duty cycle of the programmable PWM dimming circuit is set by the connection mode received from the programmable pin.
8. An LED brightness segment control circuit, characterized in that: include: A programmable PWM dimming circuit, a PWM signal effective level detection circuit, an oscillator, a control logic circuit, a step dimming circuit and a gating circuit, wherein the oscillator is configured to provide a clock signal to the programmable PWM dimming circuit, the PWM signal effective level detection circuit and the control logic circuit, the programmable PWM dimming circuit is connected to the PWM signal effective level detection circuit and the gating circuit, the PWM signal effective level detection circuit is connected to the control logic circuit, the control logic circuit is connected to the step dimming circuit and the gating circuit, the step dimming circuit is connected to the gating circuit, and the initial effective duty cycle of the programmable PWM dimming circuit is received from an external setting; wherein: The programmable PWM dimming circuit is configured to generate a first PWM signal in a first time period, the PWM signal effective level detection circuit is configured to detect a first duty cycle of an effective level of the first PWM signal, obtain a first counting result N1 and send the first counting result N1 to the control logic circuit, in each time period after the first time period, the control logic circuit is configured to control the step dimming circuit to output a PWM signal corresponding to each time period, and the effective level duration of the PWM signal corresponding to each time period is expressed as (N1-(n-1)*step)*TCLK, where n corresponds to the nth time period, and step represents the step length of each time period reduced relative to the previous time period. At the same time, the control logic circuit controls the gating circuit to output a PWM signal corresponding to each time period; the control logic circuit controls the gating circuit to output the first PWM signal generated by the programmable PWM dimming circuit, and in each time period after the first time period, the control logic circuit controls the gating circuit to output the PWM signal generated by the step dimming circuit corresponding to each time period.
9. The LED brightness segment control circuit according to claim 8, characterized in that: The initial effective duty cycle of the programmable PWM dimming circuit is set by the connection mode received from the programmable pin.
10. A LED brightness segmentation control method, characterized in that: include: Set the LED light brightness through the programmable pin; The LED lamp brightness is gradually reduced by the LED brightness segment control circuit according to any one of claims 3 to 9; and The LED light emits at a fixed brightness or the LED light is turned off.
11. The LED brightness segmentation control method according to claim 10, characterized in that: Before setting the brightness of the LED lamp through the programmable pin, the method further includes: driving the LED lamp with a PWM signal having a duty cycle of 1.
