Brightness control method, chip and system of LED lamp

By converting HSV data into RGB data and generating pulse width modulation signals to control the switching time ratio of LED lights, it solves the problems of low dimming efficiency and short life of traditional LED lights, achieving higher brightness control accuracy and low power consumption. .

CN113766695BActive Publication Date: 2024-09-13BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110981221.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-25
Publication Date
2024-09-13
Estimated Expiration
2041-08-25

AI Technical Summary

Technical Problem

The dimming method of traditional LED lights is inefficient and difficult to meet the demand for high dimming accuracy. Long-term operation reduces the life of the LED lights and increases power consumption.

Method used

HSV data is converted into RGB data, and a pulse width modulation signal is generated based on the RGB data. The brightness is adjusted by controlling the switching time ratio of the LED light, and the brightness range is expanded to improve control accuracy.

Benefits of technology

It improves the service life of LED lights, reduces power consumption, and increases brightness control range and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113766695B
    Figure CN113766695B
Patent Text Reader

Abstract

The present invention discloses a method, chip and system for controlling the brightness of an LED lamp, the method comprising: converting input HSV data into first RGB data having a first brightness range; converting the first RGB data into second RGB data having a second brightness range; generating a pulse width modulation signal based on the second RGB data; and controlling the brightness of the LED lamp based on the pulse width modulation signal, wherein the second brightness range is greater than the first brightness range. The present invention can increase the service life of the LED lamp, has low power consumption, and can also increase the brightness control range of the LED lamp and improve control accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of LED dimming control, and in particular to a brightness control method, chip and system for an LED lamp. Background Art

[0002] In daily life, we can see various lighting equipments using LED (Light Emitting Diode) as light source, such as fluorescent lamps, street lamps, table lamps, art lamps, etc., as well as display screens using LED as backlight source. LED is widely used because of its small size, low power consumption, long service life, high brightness, low heat, environmental protection, strong and durable characteristics.

[0003] Most traditional dimming methods for LED lamps use analog signal adjustment methods, for example, by controlling the current flowing through the LED lamp, the brightness of the LED lamp can be adjusted. However, this method has low adjustment accuracy and extremely low efficiency, and it is difficult to meet the increasing number of occasions that require high dimming accuracy. In addition, since this control method keeps the LED lamp in working state, the life of the LED lamp is reduced, and problems such as power consumption and heat dissipation will also arise.

[0004] Therefore, it is necessary to provide an improved technical solution to overcome the above technical problems existing in the prior art. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a brightness control method, chip and system for LED lamps, which can increase the service life of LED lamps, reduce power consumption, increase the brightness control range of LED lamps, and improve control accuracy.

[0006] According to a first aspect of the present disclosure, a method for controlling the brightness of an LED lamp is provided, comprising: converting input HSV data into first RGB data having a first brightness range; converting the first RGB data into second RGB data having a second brightness range; generating a pulse width modulation signal based on the second RGB data; and controlling the brightness of the LED lamp based on the pulse width modulation signal, wherein the second brightness range is greater than the first brightness range.

[0007] Optionally, converting the input HSV data into first RGB data having a first brightness range includes: determining basic RGB data within the first brightness range according to a hue interval in which a hue value in the HSV data is located; and correcting the basic RGB data according to a saturation value in the HSV data to obtain the first RGB data.

[0008] Optionally, converting the first RGB data into second RGB data having a second brightness range includes: performing an initial conversion on the first RGB data to expand the range of color values ​​of the first RGB data to a third brightness range; determining a value range of brightness values ​​in the HSV data in a lookup table corresponding to the third brightness range; obtaining brightness data of the LED lamp based on the value range of brightness values; obtaining third RGB data having a third brightness range based on the brightness data of the LED lamp and the first RGB data after initial conversion; and converting the third RGB data to obtain the second RGB data having a second brightness range.

[0009] Optionally, converting the first RGB data into second RGB data having a second brightness range includes: performing an initial conversion on the first RGB data to expand the range of color values ​​of the first RGB data to the second brightness range; determining a value range of brightness values ​​in the HSV data in a lookup table corresponding to the second brightness range; obtaining brightness data of the LED lamp based on the value range of brightness values; and obtaining the second RGB data having a second brightness range based on the brightness data of the LED lamp and the first RGB data after the initial conversion.

[0010] Optionally, generating a pulse width modulation signal based on the second RGB data includes: obtaining a duty cycle of the pulse width modulation signal based on the second RGB data, and obtaining a high level time and a low level time of each cycle of the pulse width modulation signal based on the duty cycle; and generating the pulse width modulation signal based on the high level time, the low level time and the frequency corresponding to the second brightness range.

[0011] Optionally, controlling the brightness of the LED lamp based on the pulse width modulation signal includes: setting a channel selection parameter, wherein the channel selection parameter is used to select a control channel for transmitting the pulse width modulation signal; based on the channel selection parameter, transmitting the generated pulse width modulation signal to the LED lamp via the selected control channel simultaneously or in a time-sharing manner to control the brightness of light-emitting units of various colors in the LED lamp, wherein the LED lamp includes at least one of a red light-emitting unit, a blue light-emitting unit, a green light-emitting unit and a white light-emitting unit.

[0012] According to a second aspect of the present disclosure, a brightness control chip for an LED lamp is provided, comprising: a data conversion module, used to convert input HSV data into first RGB data having a first brightness range; a brightness range expansion module, used to convert the first RGB data into second RGB data having a second brightness range; a pulse width modulation signal generation module, used to generate a pulse width modulation signal according to the second RGB data, the pulse width modulation signal being used to control the brightness of the LED lamp, wherein the second brightness range is greater than the first brightness range.

[0013] Optionally, the data conversion module includes: a hue value conversion unit, used to determine basic RGB data within the first brightness range according to a hue interval in which the hue value in the HSV data is located; and a saturation value conversion unit, used to correct the basic RGB data according to the saturation value in the HSV data to obtain the first RGB data.

[0014] Optionally, the brightness range extension module includes: a first calculation unit, used to perform initial conversion on the first RGB data to expand the range of color values ​​of the first RGB data to a third brightness range; a second calculation unit, used to calculate and obtain the brightness data of the LED lamp according to a lookup table corresponding to the third brightness range; a third calculation unit, used to calculate and obtain third RGB data with a third brightness range based on the brightness data of the LED lamp and the first RGB data after initial conversion; and a fourth calculation unit, used to convert the third RGB data to obtain the second RGB data with a second brightness range.

[0015] Optionally, the brightness range extension module includes: a first calculation unit, used to perform initial conversion on the first RGB data to expand the range of color values ​​of the first RGB data to the second brightness range; a second calculation unit, used to calculate the brightness data of the LED lamp according to a lookup table corresponding to the second brightness range; and a third calculation unit, used to calculate the second RGB data having a second brightness range according to the brightness data of the LED lamp and the first RGB data after initial conversion.

[0016] Optionally, the pulse width modulation signal generating module includes: a fifth calculation unit, used to calculate the high level time and low level time of each cycle of the pulse width modulation signal according to the second RGB data; a pulse width modulation signal generating unit, used to generate the pulse width modulation signal according to the high level time, the low level time and the frequency corresponding to the second brightness range.

[0017] According to a third aspect of the present disclosure, a brightness control system of an LED lamp is provided, comprising: a brightness control chip of the LED lamp as described above, the brightness control chip comprising a plurality of pulse width modulation signal output pins; an LED lamp connected between the plurality of pulse width modulation signal output pins and a reference ground, wherein a channel selection parameter is provided in the brightness control chip, and the brightness control chip transmits the generated pulse width modulation signal to the LED lamp via the plurality of pulse width modulation signal output pins simultaneously or in a time-sharing manner according to the channel selection parameter, so as to control the brightness values ​​of light-emitting units of various colors in the LED lamp; the LED lamp comprises at least one of a red light-emitting unit, a blue light-emitting unit, a green light-emitting unit and a white light-emitting unit.

[0018] The technical solution of the present invention can prolong the service life of LED lamps and reduce power consumption, and at the same time, can also increase the brightness control range of LED lamps and achieve higher adjustment accuracy.

[0019] It should be noted that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram showing a flow chart of a brightness control method of an LED lamp provided according to an embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram showing the structure of a brightness control system for an LED lamp provided according to an embodiment of the present disclosure is shown;

[0022] Figure 3 A schematic diagram showing the structure of a brightness control chip for an LED lamp provided according to an embodiment of the present disclosure is shown;

[0023] Figure 4 A schematic diagram showing the structure of a data conversion module provided according to an embodiment of the present disclosure is shown;

[0024] Figure 5a A schematic diagram showing the structure of a brightness range extension module provided according to a first embodiment of the present disclosure is shown;

[0025] Figure 5b A schematic diagram showing the structure of a brightness range extension module provided according to a second embodiment of the present disclosure is shown;

[0026] Figure 6 A schematic structural diagram of a pulse width modulation signal generating module provided according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0027] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.

[0028] In view of the problems existing in the prior art, an embodiment of the present invention discloses a dimming method of an LED lamp based on a pulse width modulation signal (PWM), in which the PWM signal directly controls the on-off time ratio of the LED lamp, and the on-off time ratio of the LED lamp is divided into several levels, thereby controlling the LED lamp to display a corresponding number of grayscales. In this process, since the LED lamp is in an on-off working mode, the service life of the LED lamp is increased and the power consumption is reduced. At the same time, in the dimming process, the brightness range of the LED lamp is also expanded, the brightness control range of the LED lamp is increased, and the control accuracy is higher.

[0029] refer to Figure 1 The LED lamp brightness control method provided by the embodiment of the present invention includes executing steps S01 to S04.

[0030] In step S01 , input HSV data is converted into first RGB data having a first brightness range.

[0031] Since the use of HSV (Hue, Saturation, Value) data to represent colors is closer to the human eye's definition of color, and based on the intuitiveness and ease of operation of LED light control, users often use HSV (Hue, Saturation, Value) data to control the dimming and color adjustment of LED lights. Among them, HSV data is the data used to represent different colors in the HSV color model, and the HSV color model is a color space created by ARSmith in 1978 based on the intuitive characteristics of color, also known as the Hexcone Model. In the HSV color model, each HSV data consists of three parameters, that is, HSV data includes H value (hue value, ranging from 0° to 360°), S value (saturation value, ranging from 0% to 100%) and V value (brightness value, ranging from 0% to 100%). Compared with RGB (Red, Blue, Green) data, in which three values ​​determine a color, HSV data only requires one value to determine a color. However, since RGB data has the characteristics of being simple, efficient and easy to implement in hardware processing, the input HSV data first needs to be converted into corresponding RGB data to facilitate processing by related hardware circuits. In this embodiment, the input HSV data is converted into first RGB data with a first brightness range to facilitate subsequent expansion of the brightness range.

[0032] In this embodiment, the conversion process of step S01 specifically includes: determining basic RGB data according to the hue interval of the hue value in the HSV data within the first brightness range; and correcting the basic RGB data according to the saturation value in the HSV data to obtain first RGB data.

[0033] When determining the basic RGB data according to the hue interval of the H value in the HSV data, first divide the range of the H value, i.e., 0° to 360°, into equal intervals to obtain a plurality of small hue intervals. Then, convert the H value in the HSV data according to the interval length of each small hue interval to obtain the basic value of the H value in the corresponding hue interval (referred to as H_TEMP in this article). Then, according to the hue interval of the H value and the basic value H_TEMP, calculate and obtain the basic RGB data under a preset conversion algorithm, wherein each hue interval corresponds to a conversion algorithm, and the conversion algorithms corresponding to each hue interval are different. In this embodiment, by dividing the H value into intervals and then realizing the conversion of the H value to the basic RGB data based on the small range interval, it is helpful to reduce the computational complexity and improve the accuracy and reliability of the conversion result. At the same time, the basic RGB data obtained after the conversion can be used as the intermediate value of a larger brightness range, which is convenient for the subsequent expansion of the brightness range and helps to improve the accuracy of the conversion process.

[0034] For example, taking the first brightness range as 0-255 and the interval length of each small hue interval as 60°, the present embodiment may adopt the following algorithm to determine the basic RGB data according to the hue interval where the H value in the HSV data is located: H_TEMP=(H%60)*255 / 60;

[0035] (1) When 0°≤H<60°, R_TEMP=255; G_TEMP=H_TEMP; B_TEMP=0;

[0036] (2) When 60°≤H<120°, R_TEMP=255-H_TEMP; G_TEMP=255; B_TEMP=0;

[0037] (3) When 120°≤H<180°, R_TEMP=0; G_TEMP=255; B_TEMP=H_TEMP;

[0038] (4) When 180°≤H<240°, R_TEMP=0; G_TEMP=255-H_TEMP; B_TEMP=255;

[0039] (5) When 240°≤H<300°, R_TEMP=H_TEMP; G_TEMP=0; B_TEMP=255;

[0040] (6) When 300°≤H<360°, R_TEMP=255; G_TEMP=0; B_TEMP=255-H_TEMP.

[0041] Among them, H_TEMP is the basic value of H value in the corresponding hue range, R_TEMP is the basic value of R value (red value) in the basic RGB data, G_TEMP is the basic value of G value (green value) in the basic RGB data, and B_TEMP is the basic value of B value (blue value) in the basic RGB data.

[0042] Furthermore, after obtaining the basic RGB data, the basic RGB data is corrected by using the S value in the HSV data, so that when the brightness range of the LED lamp is subsequently expanded, the color of the LED lamp can be guaranteed not to be distorted.

[0043] It is understandable that in other embodiments of the present invention, other interval lengths may be used to divide the range of H values ​​into equal intervals, or unequal interval division may be used to obtain multiple small hue intervals. At the same time, when the H value in the HSV data is converted according to the interval length of each small hue interval, the conversion value corresponding to each small hue interval may be changed according to actual conditions. The present invention is not limited to this.

[0044] Exemplarily, this embodiment may use the following algorithm to correct the basic RGB data according to the S value in the HSV data:

[0045] R=(255-R_TEMP)*(1000-S*1000) / 1000+R_TEMP;

[0046] G=(255-G_TEMP)*(1000-S*1000) / 1000+G_TEMP;

[0047] B=(255-B_TEMP)*(1000-S*1000) / 1000+B_TEMP,

[0048] Wherein, R is the R value in the first RGB data, G is the G value in the first RGB data, and B is the B value in the first RGB data.

[0049] In step S02 , the first RGB data is converted into second RGB data having a second brightness range.

[0050] In the embodiment of the present invention, the second brightness range corresponding to the second RGB data is greater than the first brightness range corresponding to the first RGB data. Thus, after the data conversion in step S02, the brightness range of the LED lamp can be expanded, and the brightness control range of the LED lamp can be increased, so that the LED lamp can be dimmed with higher adjustment accuracy based on the second RGB data.

[0051] In one embodiment of the present invention, the conversion process of step S02 specifically includes: performing an initial conversion on the first RGB data to expand the range of color values ​​of the first RGB data to a third brightness range; determining the value range of brightness values ​​in the HSV data in a lookup table corresponding to the third brightness range; obtaining the brightness data of the LED lamp according to the value range of brightness values ​​in the HSV data; obtaining third RGB data having a third brightness range according to the brightness data of the LED lamp and the first RGB data after the initial conversion; converting the third RGB data to obtain second RGB data having a second brightness range. In this embodiment, the third brightness range can be greater than the second brightness range or less than the second brightness range. However, the third brightness range is a common brightness range, and the lookup table corresponding to the third brightness range is a lookup table that has been verified to be directly usable. Furthermore, by first converting the first RGB data into the third RGB data, and then converting the third RGB data into the second RGB data, the design difficulty can be reduced and the design cost can be saved.

[0052] In the process of converting the first RGB data into the third RGB data, not only the range of the color value of the first RGB data (RGB data converted based on the H value and S value in the HSV data) is expanded, but also the range of the brightness value of the first RGB data based on the V value in the HSV data is expanded. In this way, it can be ensured that the brightness value and color value of the LED lamp can be improved at the same time, and finally the color and brightness of the LED lamp can be controlled.

[0053] Exemplarily, taking the first brightness range of 0-255 and the third brightness range of 0-4095 as an example, this embodiment may use the following algorithm to implement the initial conversion of the first RGB data:

[0054] R_M = R*4096 / 255;

[0055] G_M = G*4096 / 255;

[0056] B_M = B*4096 / 255,

[0057] Wherein, R_M is the data of the R value in the first RGB data after the initial conversion, G_M is the data of the G value in the first RGB data after the initial conversion, and B_M is the data of the B value in the first RGB data after the initial conversion. It can be understood that, through the above formula, the color brightness range of the LED light can be converted from 256 levels to 4096 levels.

[0058] Exemplarily, this embodiment may adopt the following algorithm to obtain the brightness data of the LED lamp, wherein in this process, this embodiment adopts a static brightness array value to convert the V value in the input HSV data into a value within the third brightness range by means of a lookup table:

[0059]

[0060] MIN_V=table_rank[V*100 / 5];

[0061] MAX_V=(table_rank[V*100 / 5+1]-MIN_V)*(V%5) / 5;

[0062] LED_BRIGHTNESS=MAX_V+MIN_V,

[0063] Among them, table_rank[] is a lookup table corresponding to the third brightness range, MIN_V and MAX_V correspond to the two end values ​​of the value range of V value in HSV data, and LED_BRIGHTNESS is the brightness data of the LED lamp. And, in the above algorithm, when the calculation result of V*100 / 5 is not a positive number, it needs to be rounded down.

[0064] Exemplarily, in this embodiment, the third RGB data may be obtained by using the following algorithm:

[0065] R_CH_M=(LED_BRIGHTNESS*R_M)>>12;

[0066] G_CH_M=(LED_BRIGHTNESS*G_M)>>12;

[0067] B_CH_M=(LED_BRIGHTNESS*B_M)>>12,

[0068] Among them, R_CH_M is the R value in the third RGB data, G_CH_M is the G value in the third RGB data, and B_CH_M is the B value in the third RGB data.

[0069] It should be noted that, ">>" indicates a right shift operation on binary data, the shifted bits are discarded, and the empty bits shifted out on the left are all filled with 0 or a sign bit, wherein a right shift of one bit is equivalent to division by 2, and a right shift of n bits is equivalent to division by 2 to the power of n. In this embodiment, ">>12" indicates that the binary format data is shifted right by 12 bits, which is equivalent to the operation of dividing the calculated data LED_BRIGHTNESS*R_M by 2 to the power of 12.

[0070] Exemplarily, taking the second brightness range of 0-999 as an example, this embodiment may use the following algorithm to convert the third RGB data to obtain the second RGB data corresponding to the second brightness range:

[0071] R_CH = R_CH_M * 1000 / 4096;

[0072] G_CH = G_CH_M * 1000 / 4096;

[0073] B_CH=B_CH_M*1000 / 4096,

[0074] Wherein, R_CH is the R value in the second RGB data, G_CH is the G value in the second RGB data, and B_CH_M is the B value in the second RGB data. It can be understood that, through the above formula, the color brightness range of the LED lamp can be converted from 4096 levels to 1000 levels.

[0075] In another embodiment of the present invention, the conversion process of step S02 specifically includes: performing an initial conversion on the first RGB data to expand the range of color values ​​of the first RGB data to a second brightness range; determining a value range of brightness values ​​in the HSV data in a lookup table corresponding to the second brightness range; obtaining brightness data of the LED lamp according to the value range of brightness values ​​in the HSV data; and obtaining second RGB data according to the brightness data of the LED lamp and the first RGB data after the initial conversion. In this embodiment, by directly converting the first RGB data into the second RGB data, it helps to reduce the amount of data processing and save computing resources.

[0076] In the process of converting the first RGB data into the second RGB data, not only the range of the color value of the first RGB data (RGB data converted based on the H value and S value in the HSV data) is expanded, but also the range of the brightness value of the first RGB data is expanded based on the V value in the HSV data. In this way, it can be ensured that the brightness value and color value of the LED lamp can be improved at the same time, and finally the color and brightness of the LED lamp can be controlled.

[0077] In this embodiment, the algorithm for converting the first RGB data directly to the second RGB data can be understood by referring to the algorithm for converting the first RGB data directly to the third RGB data in the previous embodiment of this article, wherein only some numerical values ​​need to be reasonably replaced, and a lookup table corresponding to the second brightness range is used to convert the color brightness range of the LED lamp from 255 levels to 1000 levels, which will not be described in detail here.

[0078] In step S03 , a pulse width modulation signal is generated based on the second RGB data.

[0079] In this embodiment, step S03 further includes: obtaining a duty cycle of the pulse width modulation signal based on the second RGB data, and obtaining a high level time and a low level time of each cycle of the pulse width modulation signal based on the duty cycle; and generating a pulse width modulation signal based on the high level time, the low level time and the frequency corresponding to the second brightness range.

[0080] After obtaining the second RGB data, this embodiment obtains the duty cycle of the PWM signal for controlling the light-emitting units of each color in the LED lamp based on the values ​​of the R value, the G value and the B value in the second RGB data. At the same time, the high and low level times of the corresponding PWM signal are obtained by calculating according to the preset frequency of the PWM signal, and then the hardware circuit of the LED lamp generates the corresponding PWM according to the obtained high and low level times.

[0081] Optionally, the LED lamp includes at least one of a red light emitting unit, a blue light emitting unit, a green light emitting unit and a white light emitting unit. Furthermore, based on the corresponding PWM signal control, the light color and light brightness of the LED lamp can be controlled.

[0082] Exemplarily, this embodiment may use the following algorithm to generate a pulse width modulation signal according to the second RGB data:

[0083] void led_setting(char color, int brightness)............(1)

[0084] static int userpwm_settings(int channel, int freq, int duty)..........(2)

[0085] int ch_pit_reload_value(int pit_base, int num, int value).............(3)

[0086] In function (1), color represents a color parameter, which can be represented by 0-3 (for example, 0 represents a red light-emitting unit, 1 represents a green light-emitting unit, 2 represents a blue light-emitting unit, and 3 represents a white light-emitting unit), and brightness represents a brightness range of 1-1000 or 0-999. This function is used to implement the call of the R_CH data, G_CH data, and B_CH data obtained in step S02, and then based on the color parameter and brightness parameter in the function, implement the initial setting of the control program in the hardware circuit of the LED lamp. Obtain the duty cycle data corresponding to each color value when generating the pwm signal.

[0087] In function (2), channel represents one of the four control channels, which is obtained by mapping the color parameter in function (1) (for example, the red light-emitting unit represented by 0 is mapped to channel0, the green light-emitting unit represented by 1 is mapped to channel1, the blue light-emitting unit represented by 2 is mapped to channel2, and the white light-emitting unit represented by 3 is mapped to channel3). freq represents the frequency of the preset PWM signal, and optionally, the frequency of the PWM signal corresponds to the length of the brightness range of the second RGB data. duty represents the duty cycle of the PWM signal, which is specifically obtained according to the brightness parameter in function (1), for example, directly using the brightness parameter in function (1) or performing corresponding operations on the brightness parameter in function (1) to obtain it.

[0088] Furthermore, function (2) also includes setting variables tick_h and tick_l:

[0089] tick_h=(PWM_BASE_CLK / 1000)*duty / freq;

[0090] tick_l=PWM_BASE_CLK / freq-tick_h,

[0091] Among them, PWM_BASE_CLK represents the basic clock signal of the timer in the hardware circuit of the LED lamp, tick_h represents the high level time of each cycle of the PWM signal, and tick_l represents the low level time of each cycle of the PWM signal.

[0092] In function (3), pit_base represents the base address of the register in the hardware circuit of the LED lamp, num represents the control channel, and value represents the high and low level time parameters of each cycle of the PWM signal. Among them, value = tick_h << 16 | tick_l is defined, that is, the parameters tick_h and tick_l defined above are integrated into one parameter to reduce the number of parameters output to the register and reduce the error rate of the data transmission process.

[0093] It can be understood that when the second RGB data is determined, the PWM signal generated based on the second RGB data is also uniquely determined. When the generated PWM signal is used to control the LED lamp, the ratio of the high level time to the low level time in the PWM signal corresponds to the ratio of the time when the LED lamp is turned on and off. Furthermore, based on the brightness level corresponding to the second RGB data within the second brightness range, the ratio of the high level time to the low level time in the PWM signal can be divided into corresponding levels, which is equivalent to realizing the level division of the ratio of the time when the LED lamp is turned on and off. Among them, the level of the ratio of the time when the LED lamp is turned on and off corresponds to the brightness level of the second RGB data within the second brightness range.

[0094] Based on the above description, when the user inputs new HSV data to dim the LED lamp, the input HSV data is converted into second RGB data with a second brightness range, and the high level time, low level time and other parameter data of the PWM signal corresponding to the HSV data are further calculated based on the second RGB data. After the original parameter data stored in the register is updated based on the parameter data, the PWM signal is generated by calling the underlying pit function and outputted to the anode end of the corresponding light-emitting unit in the LED lamp by the corresponding control channel, so that the brightness of the LED lamp can be controlled. In the whole control process, since the PWM signal is used to directly control the on and off time ratio of the LED lamp to realize the brightness adjustment of the LED lamp, compared with the control of the LED lamp based on the current, the embodiment of the present invention can improve the life of the LED lamp, reduce the switching devices required for control, and reduce power consumption. At the same time, the brightness range is expanded in the data conversion process, the brightness control range of the LED lamp is increased, and the control accuracy is further improved.

[0095] In step S04, the brightness of the LED lamp is controlled based on the pulse width modulation signal.

[0096] In this embodiment, step S04 further includes: setting a channel selection parameter, the channel selection parameter is used to select a control channel for transmitting a pulse width modulation signal; based on the channel selection parameter, the generated pulse width modulation signal is transmitted to the LED lamp via the selected control channel simultaneously or in time-sharing to control the brightness of light-emitting units of various colors in the LED lamp.

[0097] Based on the description of step S03, it can be known that a corresponding channel selection parameter, i.e., channel or num, is also provided in the function required to generate the PWM signal. When the PWM signal is generated, the channel selection parameter is used to control the output port of the generated PWM signal, i.e., to select the control channel for transmitting the PWM signal. For example, when the channel selection parameter is expressed as channel0, it means that the corresponding generated PWM signal should be output to the LED lamp via the control channel for controlling the red light-emitting unit in the LED lamp; when the channel selection parameter is expressed as channel1, it means that the corresponding generated PWM signal should be output to the LED lamp via the control channel for controlling the green light-emitting unit in the LED lamp; when the channel selection parameter is expressed as channel2, it means that the corresponding generated PWM signal should be output to the LED lamp via the control channel for controlling the blue light-emitting unit in the LED lamp, and so on.

[0098] Furthermore, when there are light-emitting units of multiple colors in the LED lamp, the PWM signals corresponding to the light-emitting units of multiple colors can be simultaneously output to the LED lamp according to the channel selection signal, so that the uniformity of color adjustment of the LED lamp can be improved. The PWM signals corresponding to the light-emitting units of multiple colors can also be output to the LED lamp in a time-division manner according to the channel selection signal, so that the number of PWM signal generation units (such as timers) required in the hardware circuit of the LED lamp can be reduced, thereby reducing the hardware cost.

[0099] Below, the technical solution of the embodiment of the present invention can be further understood in conjunction with a specific circuit structure.

[0100] refer to Figure 2 The embodiment of the present invention further discloses a brightness control system of an LED lamp, which includes: a brightness control chip of the LED lamp (referred to as the control chip, corresponding to the hardware circuit of the LED lamp in the previous text) 10 and an LED lamp (referred to as the LED lamp) 20 connected to the control chip 10.

[0101] The control chip 10 includes an HSV data input pin and a plurality of PWM signal output pins, each of which is used to output a PWM signal for controlling a light-emitting unit of a color. The plurality of PWM signals include at least one of a PWM_R signal for controlling a red light-emitting unit in the LED lamp 20, a PWM_G signal for controlling a green light-emitting unit in the LED lamp 20, a PWM_B signal for controlling a blue light-emitting unit in the LED lamp 20, and a PWM_W signal for controlling a white light-emitting unit in the LED lamp 20.

[0102] The LED lamp 20 is directly connected between the multiple PWM signal output pins of the control chip 10 and the reference ground, and the LED lamp 20 includes at least one of a red light-emitting unit 21, a green light-emitting unit 22, a blue light-emitting unit 23 and a white light-emitting unit 24. Each light-emitting unit in the LED lamp 20 is also directly connected between the corresponding PWM signal output pin and the reference ground. Further, based on the corresponding PWM signal, the light color and light brightness of the LED lamp 20 can be controlled. In the embodiment of the present invention, since the multiple PWM signals generated by the control chip 10 are directly output to the anode end of the LED lamp 20, the brightness of the LED lamp is adjusted by directly controlling the time ratio of the LED lamp to be turned on and off. Therefore, compared with the existing brightness control method of the LED lamp based on current, the embodiment of the present invention can increase the life of the LED lamp, reduce the switching devices required for control, and reduce power consumption.

[0103] For further reference, Figure 3, the control chip 10 further includes: a data conversion module 11, a brightness range extension module 12 and a pulse width modulation signal generation module 13. Among them, the data conversion module 11 is connected to the HSV data input pin of the control chip 10, and is used to convert the input HSV data into first RGB data with a first brightness range. The brightness range extension module 12 is connected to the data conversion module 11, and is used to convert the first RGB data into second RGB data with a second brightness range. The pulse width modulation signal generation module 13 is connected to the brightness range extension module 12, and is used to generate a pulse width modulation signal (i.e., a PWM signal) with a specific frequency and duty cycle according to the second RGB data, and the pulse width modulation signal is used to control the brightness of the LED lamp.

[0104] It is understandable that, in practical applications, the corresponding functions of the data conversion module 11 and the brightness range extension module 12 can be implemented by a device with data calculation and processing functions such as a processor in the control chip 10. The corresponding function of the pulse width modulation signal generation module 13 can be implemented by a device or device group capable of outputting a pulse width modulation signal such as a register and a timer in the control chip 10.

[0105] refer to Figure 4 The data conversion module 11 further includes: a hue value conversion unit 111 and a saturation value conversion unit 112. The hue value conversion unit 111 is used to determine the basic RGB data according to the hue interval of the hue value in the input HSV data within the first brightness range. The saturation value conversion unit 112 is connected to the hue value conversion unit 111 and is used to correct the basic RGB data according to the saturation value in the HSV data to obtain the first RGB data.

[0106] The brightness range extension module 12 includes a plurality of calculation units. In one embodiment of the present invention, reference Figure 5a The brightness range extension module 12 further includes: a first calculation unit 121, a second calculation unit 122, a third calculation unit 123 and a fourth calculation unit 124. The first calculation unit 121 is used to perform an initial conversion on the first RGB data to expand the range of the color value of the first RGB data to a third brightness range. The second calculation unit 122 is used to calculate and obtain the brightness data of the LED lamp according to the lookup table corresponding to the third brightness range. The third calculation unit 123 is used to calculate and obtain the third RGB data with the third brightness range according to the brightness data of the LED lamp and the first RGB data after the initial conversion. The fourth calculation unit 124 is used to convert the third RGB data to obtain the second RGB data with the second brightness range.

[0107] In another embodiment of the present invention, reference Figure 5bThe brightness range extension module 12 further includes: a first calculation unit 121, a second calculation unit 122 and a third calculation unit 123. The first calculation unit 121 is used to perform an initial conversion on the first RGB data to expand the range of the color value of the first RGB data to the second brightness range. The second calculation unit 122 is used to calculate the brightness data of the LED lamp according to the lookup table corresponding to the second brightness range. The third calculation unit 123 is used to calculate the second RGB data with the second brightness range according to the brightness data of the LED lamp and the first RGB data after the initial conversion.

[0108] refer to Figure 6 The pulse width modulation signal generating module 13 further includes: a fifth calculating unit 131 and a pulse width modulation signal generating unit 132. The fifth calculating unit 131 is used to calculate the high level time and the low level time of each cycle of the pulse width modulation signal according to the second RGB data. The pulse width modulation signal generating unit 132 is used to generate a pulse width modulation signal according to the high level time, the low level time and the frequency corresponding to the second brightness range.

[0109] Furthermore, in an embodiment of the present invention, a channel selection parameter is set in the control chip 10. The control chip 10 transmits the generated pulse width modulation signal to the LED lamp 20 simultaneously or in a time-sharing manner via multiple pulse width modulation signal output pins according to the channel selection parameter to control the brightness value of the light-emitting units of various colors in the LED lamp 20.

[0110] In specific implementation, each module / unit in the brightness control system of the LED lamp can be implemented as an independent entity, or can be arbitrarily combined and implemented as the same or several entities. At the same time, the specific implementation of each module / unit in the brightness control system of the LED lamp described above can refer to the aforementioned embodiment of the brightness control method of the LED lamp, which will not be repeated here.

[0111] It should be noted that the various numerical values ​​and algorithm formulas in this article are only used for exemplary descriptions. In other embodiments of the present invention, other numerical values ​​and / or algorithm formulas can also be sampled to implement this solution. The specific settings should be reasonable based on actual conditions, and the present invention does not limit this.

[0112] In summary, the embodiment of the present invention uses a pulse width modulation signal to control the on and off time ratio of the LED lamp to achieve brightness adjustment of the LED lamp, thereby increasing the life of the LED lamp and reducing power consumption. At the same time, by expanding the brightness range corresponding to the brightness control data of the LED lamp, the brightness control range of the LED lamp is increased, the control accuracy is further improved, and the brightness adjustment of the LED lamp is more detailed.

[0113] Finally, it should be noted that: Obviously, the above embodiments are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection of the present invention.

Claims

1. A method for controlling the brightness of an LED lamp, It is characterized in that include: Convert the input HSV data into first RGB data having a first brightness range; converting the first RGB data into second RGB data having a second brightness range, wherein the second brightness range is greater than the first brightness range; generating a pulse width modulation signal based on the second RGB data; controlling the brightness of the LED lamp based on the pulse width modulation signal, The step of converting the input HSV data into first RGB data having a first brightness range includes: In the first brightness range, basic RGB data is determined according to the hue interval of the hue value in the HSV data; Correct the basic RGB data according to the saturation value in the HSV data to obtain the first RGB data; Converting the first RGB data into second RGB data having a second brightness range includes: extending the range of color values ​​of the first RGB data obtained by converting the hue value and the saturation value in the HSV data to the second brightness range; determining a value range of the brightness value in the HSV data in a lookup table corresponding to the second brightness range; obtaining brightness data of the LED lamp according to the value range of the brightness value in the HSV data; and obtaining the second RGB data according to the brightness data of the LED lamp and the first RGB data after initial conversion.

2. The method for controlling the brightness of an LED lamp according to claim 1, It is characterized in that Converting the first RGB data into second RGB data having a second brightness range includes: Performing an initial conversion on the first RGB data to expand a range of color values ​​of the first RGB data to a third brightness range; Determining a value range of brightness values ​​in the HSV data in a lookup table corresponding to the third brightness range; Obtaining brightness data of the LED lamp according to the value range of the brightness value; Obtaining third RGB data having a third brightness range according to the brightness data of the LED lamp and the first RGB data after initial conversion; The third RGB data is converted to obtain the second RGB data having a second brightness range.

3. The method for controlling the brightness of an LED lamp according to claim 1, It is characterized in that Generating a pulse width modulation signal based on the second RGB data includes: Obtaining a duty cycle of the pulse width modulation signal based on the second RGB data, and obtaining a high level time and a low level time of each cycle of the pulse width modulation signal based on the duty cycle; The pulse width modulation signal is generated based on the high level time, the low level time, and a frequency corresponding to the second brightness range.

4. The method for controlling the brightness of an LED lamp according to claim 3, It is characterized in that Controlling the brightness of the LED lamp based on the pulse width modulation signal includes: Setting a channel selection parameter, wherein the channel selection parameter is used to select a control channel for transmitting the pulse width modulation signal; Based on the channel selection parameter, the generated pulse width modulation signal is transmitted to the LED lamp via the selected control channel simultaneously or in time division to control the brightness of light-emitting units of various colors in the LED lamp.

5. A brightness control chip for an LED lamp, used to implement the brightness control method for an LED lamp as claimed in any one of claims 1 to 4, It is characterized in that The brightness control chip of the LED lamp includes: A data conversion module, used for converting the input HSV data into first RGB data having a first brightness range; a brightness range extension module, configured to convert the first RGB data into second RGB data having a second brightness range, comprising extending a color value of the first RGB data obtained by conversion based on a hue value and a saturation value in the HSV data to the second brightness range, and extending a brightness value of the first RGB data to the second brightness range based on a brightness value in the HSV data; A pulse width modulation signal generating module is used to generate a pulse width modulation signal according to the second RGB data, wherein the pulse width modulation signal is used to control the brightness of the LED lamp. Wherein, the second brightness range is greater than the first brightness range; The data conversion module comprises: A hue value conversion unit, configured to determine basic RGB data according to a hue interval of a hue value in the HSV data within the first brightness range; The saturation value conversion unit is used to correct the basic RGB data according to the saturation value in the HSV data to obtain the first RGB data.

6. The brightness control chip of the LED lamp according to claim 5, It is characterized in that The brightness range extension module comprises: a first calculation unit, configured to perform an initial conversion on the first RGB data to expand a range of color values ​​of the first RGB data to a third brightness range; A second calculation unit, configured to calculate and obtain brightness data of the LED lamp according to a lookup table corresponding to the third brightness range; A third calculation unit, configured to calculate and obtain third RGB data having a third brightness range according to the brightness data of the LED lamp and the first RGB data after initial conversion; The fourth calculation unit is used to convert the third RGB data to obtain the second RGB data with a second brightness range.

7. The brightness control chip of the LED lamp according to claim 5, It is characterized in that The brightness range extension module comprises: a first calculation unit, configured to perform an initial conversion on the first RGB data to expand a range of color values ​​of the first RGB data to the second brightness range; A second calculation unit, configured to obtain brightness data of the LED lamp by calculation according to a lookup table corresponding to the second brightness range; The third calculation unit is used to calculate and obtain the second RGB data having a second brightness range according to the brightness data of the LED lamp and the first RGB data after initial conversion.

8. The brightness control chip of the LED lamp according to any one of claims 6-7, It is characterized in that The pulse width modulation signal generating module comprises: A fifth calculation unit, configured to calculate the high level time and the low level time of each cycle of the pulse width modulation signal according to the second RGB data; A pulse width modulation signal generating unit is used to generate the pulse width modulation signal according to the high level time, the low level time and the frequency corresponding to the second brightness range.

9. A brightness control system for LED lamps, It is characterized in that include: The brightness control chip of an LED lamp according to any one of claims 5 to 8, wherein the brightness control chip comprises a plurality of pulse width modulation signal output pins; The LED lamp is connected between the plurality of pulse width modulation signal output pins and a reference ground, Among them, the brightness control chip is provided with a channel selection parameter, and the brightness control chip transmits the generated pulse width modulation signal to the LED lamp via the multiple pulse width modulation signal output pins simultaneously or in time-sharing manner according to the channel selection parameter, so as to control the brightness value of the light-emitting units of various colors in the LED lamp.