RGB LED lamp brightness control method and device, equipment and storage medium

By detecting the voltage of RGB LED lamps in real time and calculating the current and brightness intensity of each color LED lamp, and dynamically adjusting the PWM duty cycle, the problem of unbalanced brightness of RGB LED lamps in constant light is solved, achieving brightness balance and user experience improvement.

CN119922782APending Publication Date: 2025-05-02SHENZHEN GEEKVAPE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510038661.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the prior art, the brightness of RGB LED lamps is uneven when the normal state is on, which affects the user experience, especially in scenarios where accurate color performance or high consistency is required.

Method used

By detecting the voltage of RGB LED lamps in real time, calculate the current and brightness intensity of each color LED lamp, and dynamically adjust the PWM duty cycle according to the reference brightness intensity to achieve a balance of the brightness of LED lamps in red, green and blue.

Benefits of technology

It achieves the balance of brightness of RGB LED lights, improves visual effects and user experience, and has strong dynamic adaptability and energy-saving performance, and is suitable for a variety of RGB LED light application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922782A_ABST
    Figure CN119922782A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of LED control of electronic cigarettes, and discloses an RGB LED lamp brightness control method, device and equipment and a storage medium, and the brightness control method comprises the steps: obtaining the current voltage of an RGB LED lamp, and calculating the current flowing through the LED lamp of each color according to the current voltage; acquiring the brightness intensity of the LED lamp in each color according to the current flowing through the LED lamp in each color, and acquiring the reference brightness intensity according to the brightness intensity of the LED lamp in each color; and calculating the PWM duty ratio of the LED lamp in each color according to the reference light intensity, and driving the LED lamp in each color to work. According to the technical scheme, the voltage of the RGB LED lamp is detected in real time, the current and the brightness intensity of the LED lamp in each color are calculated, and the PWM duty ratio is dynamically adjusted in combination with the reference brightness intensity, so that the brightness balance of the LED lamps in three colors of red, green and blue is realized, and the problem that the brightness of the LED lamps in different colors is inconsistent is solved.
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 control of electronic cigarettes, and in particular to a method, device, equipment and storage medium for controlling the brightness of an RGB LED lamp. Background Art

[0002] In modern smart home appliances and consumer electronics, RGB LEDs (red, green, and blue light-emitting diodes) are widely used for display and lighting effects to enhance user experience. However, in the prior art, the LEDs of many appliances are directly switched on and off through GPIO pins. At this time, the luminous flux (brightness) of LEDs of different colors under the same current conditions varies, because LEDs of different wavelengths have different photoelectric conversion efficiencies. Specifically, the brightness of red LEDs, green LEDs, and blue LEDs is affected by the current passing through them, but even at the same current, their brightness varies significantly. Due to this difference, the brightness of LEDs of different colors is uneven in the normally on state, which may affect the user experience, especially in scenarios that require precise color representation or high consistency.

[0003] Therefore, how to achieve a balance in the brightness of RGB LEDs in the constant-on state and overcome the technical problem of different luminous fluxes of LEDs of different colors has become a major challenge in the existing technology. This difference not only increases the complexity of hardware design, but also causes troubles to the user's visual experience and has an adverse effect on the overall performance of the product. Summary of the invention

[0004] The embodiments of the present invention provide a RGB LED lamp brightness control method, device, equipment and storage medium to solve the above technical problems.

[0005] A first aspect of an embodiment of the present invention provides a method for controlling brightness of an RGB LED lamp, comprising:

[0006] Obtaining the current voltage of the RGB LED lamp, and calculating the current flowing through each color LED lamp according to the current voltage;

[0007] Obtaining the light intensity of each color LED lamp according to the current flowing through each color LED lamp, and obtaining a reference light intensity according to the light intensity of each color LED lamp;

[0008] The PWM duty cycle of each color LED lamp is calculated according to the reference light intensity, and each color LED lamp is driven to operate.

[0009] Optionally, obtaining the current voltage of the RGB LED lamp includes:

[0010] The RGB LED lamp is interrupted and triggered, and the current voltage of the RGB LED lamp is detected by the analog-to-digital conversion module.

[0011] Optionally, each color LED lamp is connected in series with a current limiting resistor, and the current value flowing through each color LED lamp is calculated according to the current voltage, including:

[0012] The voltage difference is calculated according to the current voltage and the rated voltage of each color LED, and the current value flowing through each color LED lamp is calculated according to the voltage difference and the resistance value of the current limiting resistor connected to each color LED.

[0013] Optionally, obtaining the brightness intensity of each color LED lamp according to the current flowing through each color LED lamp includes:

[0014] Substitute the current flowing through each color LED lamp into the functional relationship between the luminous flux and current of each color LED lamp to calculate the luminous intensity of each color LED lamp.

[0015] Optionally, the functional relationship between the luminous flux and the current of each color LED lamp is a mathematical model established based on the photoelectric characteristic curve of each color LED lamp.

[0016] Optionally, obtaining a reference light intensity according to the light intensity of each color LED lamp includes:

[0017] Sort the brightness intensities of LED lights of each color, and obtain the minimum brightness intensity as the reference brightness intensity.

[0018] Optionally, the RGB LED light includes a red LED light, a blue LED light and a green LED light;

[0019] The step of obtaining a reference light intensity according to the light intensity of each color LED lamp comprises:

[0020] Determine whether the light intensity of the red LED light is less than that of the blue LED light and the green LED light;

[0021] When the judgment result is yes, the light intensity of the red LED light is set as a reference light intensity;

[0022] When the judgment result is no, then judging whether the light intensity of the blue LED light is less than the light intensity of the green LED light;

[0023] When the judgment result is yes, the light intensity of the blue LED light is set as a reference light intensity;

[0024] When the judgment result is no, the light intensity of the green LED lamp is set as the reference light intensity.

[0025] A second aspect of an embodiment of the present invention provides an RGB LED lamp brightness control device, wherein the RGB LED lamp brightness control device comprises:

[0026] A current acquisition module, used to acquire the current voltage of the RGB LED lamp, and calculate the current flowing through each color LED lamp according to the current voltage;

[0027] A reference light intensity acquisition module, used to acquire the light intensity of each color LED lamp according to the current flowing through each color LED lamp, and acquire the reference light intensity according to the light intensity of each color LED lamp;

[0028] The control module is used to calculate the PWM duty cycle of each color LED lamp according to the reference light intensity, and drive each color LED lamp to work.

[0029] A third aspect of an embodiment of the present invention provides an electronic cigarette device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.

[0030] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0031] The technical effect of the embodiment of the present invention is: by real-time detection of the voltage of the RGB LED lamp, calculation of the current and light intensity of each color LED lamp, and dynamic adjustment of the PWM duty cycle in combination with the reference light intensity, the brightness balance of the red, green and blue LED lamps is achieved, the problem of inconsistent brightness of LED lamps of different colors is effectively solved, the visual effect and user experience are improved, and at the same time, it has strong dynamic adaptability and energy-saving performance, and is suitable for various application scenarios of RGB LED lamps. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0033] Figure 1 This is a flow chart of a method for controlling the brightness of an RGB LED lamp provided in Embodiment 1 of the present invention;

[0034] Figure 2is a circuit diagram of an RGB LED lamp in a RGB LED lamp brightness control method provided in Embodiment 1 of the present invention;

[0035] Figure 3 is a curve relationship diagram of the current and the light intensity of the red light LED in the RGB LED lamp in the RGB LED lamp brightness control method provided in the first embodiment of the present invention;

[0036] Figure 4 is a curve relationship diagram of the current and light intensity of the green LED in the RGB LED lamp in the RGB LED lamp brightness control method provided in the first embodiment of the present invention;

[0037] Figure 5 is a curve relationship diagram of the current and the light intensity of the blue light LED in the RGB LED lamp in the RGB LED lamp brightness control method provided in the first embodiment of the present invention;

[0038] Figure 6 is a specific flow chart of step S30 in a RGB LED lamp brightness control method provided in Embodiment 1 of the present invention;

[0039] Figure 7 This is a structural schematic diagram of an RGB LED lamp brightness control device provided by Embodiment 2 of the present invention;

[0040] Figure 8 It is a structural schematic diagram of an electronic cigarette device in one embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] It should be understood that the present invention can be implemented in different forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, providing these embodiments will make the disclosure thorough and complete and fully convey the scope of the present invention to those skilled in the art. In the accompanying drawings, the sizes and relative sizes of layers and regions may be exaggerated for clarity. The same reference numerals throughout represent the same elements.

[0043] It should be understood that when an element or layer is referred to as being "on, adjacent to, connected to or coupled to other elements or layers, it may be directly on, adjacent to, connected to or coupled to other elements or layers, or there may be intervening elements or layers. In contrast, when an element is referred to as being "directly on, directly adjacent to, directly connected to or directly coupled to other elements or layers, there may be no intervening elements or layers. It should be understood that, although the terms first, second, third, etc. may be used to describe various elements, components, regions, layers and / or parts, these elements, components, regions, layers and / or parts should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or part from another element, component, region, layer or part. Therefore, without departing from the teachings of the present invention, the first element, component, region, layer or part discussed below may be represented as a second element, component, region, layer or part.

[0044] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present invention. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0045] In order to fully understand the present invention, detailed structures and steps will be presented in the following description to illustrate the technical solutions proposed by the present invention. The preferred embodiments of the present invention are described in detail below, but in addition to these detailed descriptions, the present invention may also have other implementations.

[0046] Embodiment 1

[0047] This embodiment provides a method for controlling the brightness of an RGB LED lamp. Figure 1 As shown, the RGB LED light brightness control method includes:

[0048] Step S10: Obtain the current voltage of the RGB LED lamp, and calculate the current flowing through each color LED lamp according to the current voltage.

[0049] Among them, the current voltage of the RGB LED lamp can be obtained as the current working voltage of the RGB LED lamp. For example, the RGB LED lamp is triggered by an interrupt, and the current voltage of the RGB LED lamp is detected by the analog-to-digital conversion module. Interrupt is a software event processing method of the single-chip microcomputer, which is used to respond to special external or internal events. Interrupts can be triggered by external signals (such as button presses, sensor signals) or timers to start or activate the operation of the RGB LED lamp module and enter the working state. For example, the GPIO pin may output a high level to drive the RGB LED circuit to start running. The ADC module (Analog-to-Digital Converter) is a functional module in the single-chip microcomputer, which is used to convert analog signals (such as voltage) into digital signals for subsequent processing. In this technical solution, the ADC module is used to measure the power supply voltage and detect the current voltage value of the RGB LED lamp. The power supply voltage of the RGB LED lamp may change due to power supply fluctuations or other circuit factors. The power supply voltage is sampled in real time through the ADC module to obtain an accurate current voltage value. These voltage data will serve as key inputs for subsequent calculations of LED current and brightness adjustment. The meaning of calculating the current flowing through each color LED lamp according to the current voltage is to use the current supply voltage value of the RGB LED lamp circuit, combined with the characteristics of each color LED lamp and circuit design parameters, to calculate the actual working current of the red LED, green LED and blue LED lamps.

[0050] Step S20: Obtain the light intensity of each color LED lamp according to the current flowing through each color LED lamp, and obtain the reference light intensity according to the light intensity of each color LED lamp.

[0051] Among them, the light intensity is also called luminous flux, which is the amount of visible light emitted by the LED lamp and is a direct expression of the brightness of the LED lamp. The light intensity of each color of LED lamp has a certain relationship with the current flowing through it. This relationship is determined by the photoelectric characteristics of the LED lamp and is usually given in the form of a curve or formula in the technical specification. For example: when the current is small, the light intensity is low; as the current increases, the light intensity gradually becomes stronger, but it does not increase linearly, and may tend to saturation after a certain current range. According to the current values ​​of the red, green, and blue LED lamps calculated previously, these currents are substituted into the photoelectric characteristic formula of the LED lamp or the corresponding curve is found to obtain the light intensity value of each color LED lamp. The light intensity of LED lamps of different colors may vary greatly at the same current. For example, a red LED lamp may be brighter than a blue LED lamp. This difference will cause users to see inconsistent brightness when actually using it. In order to solve the problem of uneven brightness, it is necessary to find a unified reference light intensity so that the brightness of all colors of LED lamps can be adjusted based on this reference value. From the brightness intensity values ​​of the red, green and blue LED lights, the minimum brightness intensity is selected as the reference brightness intensity, because only by reducing the brightness of the other two colors to the same as the minimum brightness can the overall brightness balance be achieved.

[0052] Step S30: Calculate the PWM duty cycle of each color LED lamp according to the reference light intensity, and drive the LED lamp to work.

[0053] Among them, in order to achieve the brightness consistency of the three-color LED lights, it is necessary to adjust the brightness of other colors based on the reference light intensity. The adjustment method is to calculate the PWM duty cycle of each color LED light based on the reference light intensity. The PWM duty cycle represents the lighting ratio of the LED light. For example, if the light intensity of a certain color is high, its corresponding PWM duty cycle will be set lower to reduce the brightness output. Then, the PWM signal output of the microcontroller is configured according to the calculated duty cycle value, and the signal is sent to the control pins of the red, green, and blue LED lights respectively, so as to adjust the brightness of the three colors of LED lights so that the three colors achieve visual brightness balance. If the brightness of the LED light deviates due to changes in the power supply voltage or other factors, the system can recalculate the PWM duty cycle in real time and adjust the output signal to ensure that the brightness of the three colors is always consistent.

[0054] The technical effect of this embodiment is: by real-time detection of the voltage of the RGB LED lamp, calculation of the current and light intensity of each color LED lamp, and dynamic adjustment of the PWM duty cycle based on the reference light intensity, the brightness of the red, green and blue LED lamps is balanced, and the problem of inconsistent brightness of LED lamps of different colors is effectively solved, thereby improving the visual effect and user experience. At the same time, it has strong dynamic adaptability and energy-saving performance, and is suitable for a variety of RGB LED lamp application scenarios.

[0055] As an implementation method, each color LED lamp is connected in series with a current limiting resistor, and the current value flowing through each color LED lamp is calculated according to the current voltage, including:

[0056] The voltage difference is calculated according to the current voltage and the rated voltage of each color LED, and the current value flowing through each color LED lamp is calculated according to the voltage difference and the resistance value of the current limiting resistor connected to each color LED.

[0057] Among them, by obtaining the current supply voltage and comparing it with the rated voltage (i.e., the drop voltage) of each color LED lamp, the voltage difference is calculated. Then, the current value actually flowing through each color LED lamp is calculated using the voltage difference and the resistance value of the current limiting resistor connected in series to the LED lamp. The current voltage is the supply voltage value measured by the ADC module of the microcontroller or other means (usually the power supply voltage of the RGB LED lamp, such as 3.0V~4.2V). The minimum voltage required for each color LED lamp to conduct normally is also called the forward voltage drop. The red LED lamp is usually about 2.0V, the green LED lamp is about 2.7V, and the blue LED lamp is about 2.8V. The voltage difference refers to the supply voltage minus the rated voltage (drop voltage) of the LED lamp. This difference represents the voltage value flowing through the current limiting resistor, that is, the voltage drop across the current limiting resistor in the LED circuit. For example, if the supply voltage is 3.6V and the rated voltage of the red LED lamp is 2.0V, the voltage difference is 1.6V. The current limiting resistor is a resistor connected in series in the LED lamp circuit, which is used to control the current flowing through the LED lamp in the circuit to prevent excessive current from damaging the LED. The resistance value of the current limiting resistor for each color LED lamp is known (selected according to circuit requirements, such as 100Ω). According to the circuit design, when the voltage difference and the resistance value of the current limiting resistor are known, the current value flowing through the LED lamp can be calculated using Ohm's law.

[0058] As an example, Figure 2As shown, the RGB LED lamp includes a blue light diode LEDB, a green light diode LEDG, and a red light diode LEDR. The anodes of the blue light diode LEDB, the green light diode LEDG, and the red light diode LEDR are connected together and connected to the power supply voltage V+. The cathode of the blue light diode LEDB is connected to one end of the resistor R1, and the other end of the resistor R1 receives the control signal PWM_LED_B. The cathode of the green light diode LEDG is connected to one end of the resistor R2, and the other end of the resistor R2 receives the control signal PWM_LED_G. The cathode of the red light diode LEDR is connected to one end of the resistor R3, and the other end of the resistor R3 receives the control signal PWM_LED_R.

[0059] Assume that in the RGB LED lamp, the power supply voltage is 3.6V, the rated voltages (drop voltages) of the red diode LEDR, the green diode LEDG, and the blue diode LEDB are 2.0V, 2.7V, and 2.8V respectively, and the resistance values ​​of the resistors R1, R2, and R3 are all 100Ω. Based on these data, calculate the current flowing through each color LED lamp. The current process of the red diode LEDR is calculated as follows: voltage difference V0 = 3.6V-2.0V = 1.6V, current IR flowing through the red diode LEDR = 1.6 / 100 = 16mA; the current process of the blue diode LEDB is calculated as follows: voltage difference V0 = 3.6V-2.8V = 0.8V, current IB flowing through the red diode LEDR = 0.8 / 100 = 8mA; the current process of the green diode LEDG is calculated as follows: voltage difference V0 = 3.6V-2.7V = 0.9V, current IG flowing through the green diode LEDG = 0.9 / 100 = 9mA.

[0060] The technical effect of this implementation is that by measuring the current supply voltage and combining the forward voltage drop of each color LED lamp and the resistance value of the current limiting resistor, the actual current flowing through each color LED lamp can be accurately calculated. This method can dynamically adapt to changes in the supply voltage, provide accurate basic data for subsequent light intensity control and brightness balance, ensure the safety and brightness consistency of the LED lamp, and improve system stability and user experience.

[0061] As an implementation mode, obtaining the brightness intensity of each color LED lamp according to the current flowing through each color LED lamp includes:

[0062] Substitute the current flowing through each color LED lamp into the functional relationship between the luminous flux and current of each color LED lamp to calculate the luminous intensity of each color LED lamp.

[0063] Among them, the current values ​​flowing through the red LED lamp, green LED lamp, and blue LED lamp calculated previously are substituted into the functional relationship or characteristic curve between the luminous flux and current of each color LED lamp to calculate the actual brightness of each color LED lamp under the current working conditions. The luminous flux of an LED lamp is directly related to the current flowing through it. As the current increases, the luminous flux of the LED lamp will also increase, but it is usually not a linear relationship, but is determined by the photoelectric characteristics of the LED lamp. When the current is small, the luminous flux increases rapidly; when the current reaches a certain value, the increase in luminous flux will gradually tend to saturation. Each color LED lamp has a specific functional relationship between luminous flux and current, for example: P = f(I); P represents luminous flux, and I represents current. The current value flowing through each color LED lamp is calculated through the previous voltage and current limiting resistor, which are: the current IR of the red LED lamp, the current IG of the green LED lamp, and the current IG of the blue LED lamp. Substitute the current value of each color LED lamp into the functional relationship between its corresponding luminous flux and current, and calculate the light intensity (luminous flux) respectively. The light intensity of the red LED lamp PR = f(IR), the light intensity of the green LED lamp PG = f(IG), and the light intensity of the blue LED lamp PG = f(IG). These values ​​reflect the actual brightness of LED lamps of different colors under the current current, and provide a basis for subsequent brightness balance and PWM adjustment.

[0064] Furthermore, the functional relationship between the luminous flux and the current of each color LED lamp is a mathematical model established based on the photoelectric characteristic curve of each color LED lamp.

[0065] Among them, Figures 3 to 5 As shown in the figure, the photoelectric characteristic curve is a graph describing the relationship between the luminous flux (brightness) and current of an LED lamp, which is usually measured and provided under laboratory conditions. Different color LED lamps (red, green, and blue) have different photoelectric characteristic curves due to different materials and processes. For example, a red LED lamp may have a higher luminous flux at a lower current; a green LED lamp and a blue LED lamp may require a higher current to achieve the same brightness. By fitting the data of the photoelectric characteristic curve, a mathematical model is established to express the curve with a mathematical formula. This allows the luminous flux to be directly calculated by inputting the current in the program without having to look up the curve data each time. Collect the data points of the photoelectric characteristic curve (the corresponding relationship between current and luminous flux); use a fitting method (such as linear regression, polynomial fitting, or exponential fitting) to find a suitable mathematical formula to fit the entire curve with the minimum error. The final formula may be a linear relationship, a quadratic polynomial relationship, or even an exponential or logarithmic form, depending on the characteristics of the LED lamp. The linear model can be: P = kI + b; it is suitable for the case where the luminous flux increases approximately linearly with the current. The nonlinear model can be: P = aI2 +bI+c; applicable to the situation where the luminous flux increases nonlinearly with the current.

[0066] The technical effect of this embodiment is that by substituting the current values ​​flowing through the red LED lamp, the green LED lamp and the blue LED lamp into the functional relationship between the luminous flux and the current established based on the photoelectric characteristics, the actual light intensity of each color LED lamp can be accurately calculated. This method fully considers the nonlinear relationship between the photoelectric characteristics of different color LED lamps, reflects the actual brightness performance under the current working conditions, provides accurate data support for subsequent brightness balance and PWM duty cycle adjustment, and improves the brightness consistency and user experience of the RGB LED lamp.

[0067] As an implementation mode, obtaining a reference light intensity according to the light intensity of each color LED lamp includes:

[0068] Sort the brightness intensities of LED lights of each color, and obtain the minimum brightness intensity as the reference brightness intensity.

[0069] Among them, the brightness of the red LED, green LED, and blue LED depends on the current flowing through them. Even if the current is the same, the brightness of LED lights of different colors may be significantly different due to different materials and photoelectric properties. According to the brightness of the red, green, and blue LED lights calculated previously, their values ​​are arranged in order from large to small or from small to large. From the sorting results, the minimum brightness intensity is taken, and the brightness of the minimum value is selected as the reference brightness intensity, which represents the brightness of the darkest color in the system. The brightness of other colors needs to be adjusted to be consistent with this reference later. The reference brightness intensity is used as the target value for brightness adjustment to avoid inconsistent brightness of the three RGB colors due to too bright or too dark colors. Subsequently, by adjusting the PWM duty cycle, the color with higher brightness intensity is reduced to the level of the reference brightness intensity to achieve brightness balance. By sorting the brightness intensity of the red, green, and blue LED lights, quickly finding the value with the minimum brightness intensity and using it as the reference brightness intensity, it can provide a unified goal for subsequent brightness balance and control, ensuring that the RGB LED lights achieve brightness consistency in visual effects.

[0070] As an implementation method, the RGB LED light includes a red LED light, a blue LED light, and a green LED light;

[0071] Obtain a reference light intensity based on the light intensity of each color LED light, including:

[0072] Step S301: Determine whether the light intensity of the red LED light is less than that of the blue LED light and the green LED light.

[0073] Step S302: When the judgment result is yes, the light intensity of the red LED light is set as the reference light intensity.

[0074] Step S303: When the judgment result is no, it is judged whether the light intensity of the blue LED light is less than the light intensity of the green LED light.

[0075] Step S304: When the judgment result is yes, the light intensity of the blue LED light is set as the reference light intensity.

[0076] Step S305: When the judgment result is no, the light intensity of the green LED light is set as the reference light intensity.

[0077] Among them, the brightness intensity of the red LED lamp is compared with the brightness intensity of the blue LED lamp and the brightness intensity of the green LED lamp. If the brightness intensity of the red LED lamp is less than the brightness intensity of the blue and green LED lamps, then the brightness intensity of the red LED lamp is set as the reference brightness intensity, which means that the brightness of the red LED lamp will be used as a reference standard for adjusting the brightness of other color LED lamps, and the LED lamps of other colors will adjust their PWM duty cycle according to the brightness of the red LED lamp to ensure the brightness balance of the three colors of LED lamps. If the brightness intensity of the red LED lamp is not the minimum value, it is necessary to determine whether the brightness intensity of the blue LED lamp is less than the brightness intensity of the green LED lamp to find the minimum brightness intensity. If the brightness intensity of the blue LED lamp is less than the brightness intensity of the green LED lamp, then the brightness intensity of the blue LED lamp is set as the reference brightness intensity, which means that the brightness of the blue LED lamp will be used as a reference standard for adjusting the brightness of other color LED lamps. The LED lamps of other colors will adjust their PWM duty cycle according to the brightness of the blue LED lamp to ensure the consistency of brightness. If the light intensity of the blue LED lamp is not less than that of the green LED lamp, the light intensity of the green LED lamp will be set as the benchmark light intensity, which means that the brightness of the green LED lamp will be used as a reference standard for adjusting the brightness of other color LED lamps. Other color LED lamps will adjust their PWM duty cycle according to the brightness of the green LED lamp, thereby achieving a balance in light intensity.

[0078] The technical effect of this embodiment is that: according to the light intensity of the red, blue and green LED lights, it is determined which color of LED light is the darkest, and its light intensity is used as the reference light intensity. Then, the brightness of the LED lights of other colors will be adjusted according to the reference light intensity to ensure the brightness of the RGB LED lights is balanced, avoid the phenomenon of too bright or too dark, and improve the user experience.

[0079] Furthermore, the RGB LED lamp brightness control method also includes: obtaining the current voltage and temperature of the RGB LED lamp, and calculating the current of each color LED lamp according to the voltage and temperature; obtaining the light intensity according to the current and temperature compensation model; and calculating the reference light intensity and the PWM duty cycle of each color LED lamp according to the corrected light intensity.

[0080] The light intensity L of the LED is usually a nonlinear function of the current I flowing through the LED, which can be expressed by an experimentally determined formula or a lookup table. For example:

[0081] L=k×I n ; where k is a constant and n is an exponent (usually greater than 1).

[0082] As the temperature rises, the luminous efficiency of the LED will decrease, which is manifested as: the forward voltage of the LED decreases, causing the actual current to deviate from the target current. The light intensity at the same current decreases, and the color may drift. The temperature compensation model corrects the calculation of current to light intensity by establishing the relationship between temperature and light intensity changes. For example:

[0083] L T =L0(1-ɑ×△T);

[0084] Among them, L T is the light intensity after considering the influence of temperature; L0 is the light intensity without considering the influence of temperature; ɑ is the sensitivity coefficient of temperature to light intensity; △T is the temperature change value.

[0085] By testing the current-brightness relationship of LEDs at different temperatures, a mathematical model or table data can be established. The brightness of the LED at different currents and temperatures can be recorded, and the actual value can be obtained by interpolation. A function can be used to represent the relationship between brightness intensity and current and temperature, for example:

[0086] L = f (I, T) = k × I n (1-ɑ×△T).

[0087] The working process is to obtain real-time data, measure the current flowing through each color LED, obtain the operating temperature of the LED through the temperature sensor, calculate the light intensity in combination with the model, use the current value to calculate the initial light intensity through the current-light intensity relationship, use the temperature compensation model to correct the light intensity, and obtain the final light intensity. The corrected light intensity is used for subsequent steps (such as baseline light intensity calculation or PWM duty cycle adjustment).

[0088] Furthermore, the RGB LED lamp brightness control method also includes: in the initial calibration stage, measuring the brightness curve of each color LED lamp and establishing a calibration data table; during operation, combining the calibration model and the real-time current to calculate the light intensity of each color LED lamp; according to the calibrated light intensity, dynamically adjusting the PWM duty cycle to ensure accurate color output.

[0089] Among them, the brightness characteristics of each color LED lamp (red, green, blue) are measured, and the relationship model between current and light intensity (brightness curve) is established for real-time calculation and control in the subsequent operation stage. For each color LED lamp, use a photometer to measure its light intensity (unit: cd) at different current values ​​within a certain range (such as 1mA to maximum operating current). Record the corresponding relationship between the current and brightness of each color LED lamp to generate a brightness curve. Based on the measurement results, build a lookup table model to store the current and the corresponding light intensity. Use mathematical formulas to fit the current-brightness relationship, for example:

[0090] L=k×I n ;

[0091] Where L is the brightness, I is the current, and n is the fitting parameter.

[0092] The calibration data table or fitting formula is stored in the system for real-time call at runtime. Using the initially calibrated model, the brightness intensity of each color LED lamp is calculated based on the real-time current, and the PWM duty cycle is dynamically adjusted to ensure the accuracy and consistency of the color output. At runtime, the current value flowing through each color LED lamp is detected, and the real-time brightness intensity is calculated by looking up the table or using the calibration formula. According to the requirements (such as white light balance or other color output requirements), the reference brightness intensity is calculated (for example, based on the RGB ratio calculation).

[0093] Embodiment 2

[0094] This embodiment 2 provides a RGB LED lamp brightness control device, such as Figure 7 As shown, including:

[0095] A current acquisition module, used to acquire the current voltage of the RGB LED lamp, and calculate the current flowing through each color LED lamp according to the current voltage;

[0096] A reference light intensity acquisition module, used to acquire the light intensity of each color LED lamp according to the current flowing through each color LED lamp, and acquire the reference light intensity according to the light intensity of each color LED lamp;

[0097] The control module is used to calculate the PWM duty cycle of each color LED lamp according to the reference light intensity, and drive each color LED lamp to work.

[0098] The present application also provides an electronic cigarette device, such as Figure 8 As shown, the electronic cigarette device 2 includes: at least one processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on at least one processor 20. When the processor 20 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, or when the processor 20 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0099] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in a memory and executed by a processor to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the computer program in the electronic cigarette device.

[0100] Those skilled in the art will understand that Figure 8 It is only an example of an electronic cigarette device and does not constitute a limitation of the electronic cigarette device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic cigarette device may also include input and output devices, network access devices, buses, etc.

[0101] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0102] The memory may be an internal storage unit of the electronic cigarette device, such as a hard disk or memory of the electronic cigarette device. The memory may also be an external storage device of the electronic cigarette device, such as a plug-in hard disk equipped on the electronic cigarette device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Furthermore, the memory may also include both an internal storage unit of the electronic cigarette device and an external storage device.

[0103] An embodiment of the present application further provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0104] The embodiment of the present application provides a computer program product. When the computer program product is run on an electronic cigarette device, the steps in the above-mentioned method embodiments can be implemented when the mobile terminal executes the computer program product.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0106] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0107] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0108] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0109] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0110] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for controlling the brightness of an RGB LED lamp, characterized in that: include: Obtaining the current voltage of the RGB LED lamp, and calculating the current flowing through each color LED lamp according to the current voltage; Obtaining the light intensity of each color LED lamp according to the current flowing through each color LED lamp, and obtaining a reference light intensity according to the light intensity of each color LED lamp; The PWM duty cycle of each color LED lamp is calculated according to the reference light intensity, and each color LED lamp is driven to operate.

2. The RGB LED lamp brightness control method according to claim 1, characterized in that: The obtaining of the current voltage of the RGB LED lamp comprises: The RGB LED lamp is interrupted and triggered, and the current voltage of the RGB LED lamp is detected by the analog-to-digital conversion module.

3. The RGB LED lamp brightness control method according to claim 1, characterized in that: Each color LED lamp is connected in series with a current limiting resistor, and the current value flowing through each color LED lamp is calculated according to the current voltage, including: The voltage difference is calculated according to the current voltage and the rated voltage of each color LED, and the current value flowing through each color LED lamp is calculated according to the voltage difference and the resistance value of the current limiting resistor connected to each color LED.

4. The RGB LED lamp brightness control method according to claim 1, characterized in that: The step of obtaining the light intensity of each color LED lamp according to the current flowing through each color LED lamp comprises: Substitute the current flowing through each color LED lamp into the functional relationship between the luminous flux and current of each color LED lamp to calculate the luminous intensity of each color LED lamp.

5. The RGB LED lamp brightness control method according to claim 4, characterized in that: The functional relationship between the luminous flux and the current of each color LED lamp is a mathematical model established based on the photoelectric characteristic curve of each color LED lamp.

6. The RGB LED lamp brightness control method according to claim 1, characterized in that: The step of obtaining a reference light intensity according to the light intensity of each color LED lamp comprises: Sort the brightness intensities of LED lights of each color, and obtain the minimum brightness intensity as the reference brightness intensity.

7. The RGB LED lamp brightness control method according to claim 1, characterized in that: The RGB LED lamp includes a red LED lamp, a blue LED lamp and a green LED lamp; The step of obtaining a reference light intensity according to the light intensity of each color LED lamp comprises: Determine whether the light intensity of the red LED light is less than that of the blue LED light and the green LED light; When the judgment result is yes, the light intensity of the red LED light is set as a reference light intensity; When the judgment result is no, then judging whether the light intensity of the blue LED light is less than the light intensity of the green LED light; When the judgment result is yes, the light intensity of the blue LED light is set as a reference light intensity; When the judgment result is no, the light intensity of the green LED lamp is set as the reference light intensity.

8. A RGB LED lamp brightness control device, characterized in that: The RGB LED light brightness control includes: A current acquisition module, used to acquire the current voltage of the RGB LED lamp, and calculate the current flowing through each color LED lamp according to the current voltage; A reference light intensity acquisition module, used to acquire the light intensity of each color LED lamp according to the current flowing through each color LED lamp, and acquire the reference light intensity according to the light intensity of each color LED lamp; The control module is used to calculate the PWM duty cycle of each color LED lamp according to the reference light intensity, and drive each color LED lamp to work.

9. An electronic cigarette device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • RGB LED lamp brightness rapid automatic calibration circuit and method

    CN120547718A