Constant-voltage PWM (Pulse Width Modulation) dimming system and method for improving brightness change of light source
By adopting a constant voltage PWM dimming system in the LED light source, using real-time feedback adjustment of temperature and current data, the problem of large brightness changes when the ambient temperature changes is solved, and dynamic balance of brightness and improved image acquisition accuracy are achieved.
Patent Information
- Application Number
- CN202411947116.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-03-04
AI Technical Summary
The brightness of existing LED light sources changes greatly when the ambient temperature changes, resulting in the inconsistent brightness of the light sources in industrial detection scenarios that reduce the accuracy of image analysis.
The constant voltage PWM dimming system is adopted to collect the temperature and current data of the light source in real time, and use the current mapping module, the current compensation module, the duty cycle mapping module and the duty cycle adjustment module to establish a feedback adjustment mechanism to achieve dynamic balance of the brightness of the light source within the interval.
The brightness change correction of LED light sources at different ambient temperatures is achieved, with the brightness change less than 5% lux, improving the accuracy and consistency of image acquisition.
Smart Images

Figure CN119562404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of light source control, and in particular to a constant voltage PWM dimming system and method for improving light source brightness variation. Background Art
[0002] With the development of science and technology, light emitting diode (LED) light sources are widely used in the field of industrial detection due to their small size, long life and high efficiency.
[0003] In the prior art, the common brightness control method is to use pulse width modulation (PWM) technology to adjust the light brightness. This control method can be further divided into PWM constant current control and PWM constant voltage control. Among them, PWM constant current control is mainly implemented through power management chips. The advantage is that the brightness of the LED light source changes little with the ambient temperature, but the disadvantage is that the delay of brightness switching is large. PWM constant voltage control is implemented through MOS tubes / transistors; the advantage of constant voltage control is that the brightness switching speed is fast, but the brightness of the light source changes greatly with the ambient temperature; such as Figure 2 As shown in the figure, taking the PWM square wave signal with a duty cycle of 30% to control the light source as an example, an illuminometer is used to collect the real-time brightness value of the LED light source. When the ambient temperature of the LED light source rises from 5°C to 50°C, the actual brightness value of the LED light source differs by more than 40% lux. The resulting problems are: in the batch workpiece inspection scenario, since the temperature change at the inspection site is uncontrollable, if the temperature difference is large during the inspection process, the brightness difference of the light source will also be large. When different workpieces are inspected, due to the inconsistent brightness of the light source, the brightness difference of the collected workpiece images will also be large, thereby reducing the accuracy of subsequent image analysis.
[0004] In the field of industrial inspection, there are often high requirements for the inspection cycle, which requires a fast response speed for the light source brightness switching; at the same time, in order to meet the consistency of the inspection process, it is also required that the brightness change of the light source during the image acquisition process should not be too different. For this reason, an LED light source control method with fast response speed and small brightness change is urgently needed. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a constant voltage PWM dimming system for improving the brightness change of light sources. Based on the constant voltage control method, the system collects the temperature and current data of the light source in real time, and establishes a feedback adjustment mechanism through the current mapping module, the current compensation module, the duty cycle mapping module and the duty cycle adjustment module, so that the brightness of the light source can achieve dynamic balance within the interval and avoid obvious changes in the brightness value. This solution is fast, convenient and accurate, and is suitable for precise dimming control of various types of LED light sources.
[0006] The technical solution is as follows:
[0007] A constant voltage PWM dimming system for improving light source brightness variation, comprising a controller, a constant voltage power supply and a driver, wherein the constant voltage power supply supplies power to an LED light source, and the driver is connected to the LED light source;
[0008] A temperature sensor is installed on or around the LED light source to detect the temperature of the LED light source in real time; the LED light source is also connected to a current acquisition device to detect the current passing through the LED light source; the current acquisition device and the temperature sensor are both electrically connected to the controller;
[0009] The controller includes a temperature acquisition module, a current mapping module, a current compensation module, a duty cycle mapping module, a duty cycle adjustment module and a PWM wave generation module which are connected in sequence, and also includes a current acquisition module connected to the current compensation module; wherein the temperature acquisition module is electrically connected to a temperature sensor, and is used to control the temperature sensor to acquire real-time temperature data of the LED light source;
[0010] Obtain a linear mapping function between current and duty cycle at a specific temperature, and record this specific temperature as the basic temperature; obtain a linear mapping function between temperature and current under the premise of maintaining a certain duty cycle to output a PWM control signal, and record this duty cycle as the basic duty cycle; obtain basic current data corresponding to the basic temperature based on the linear mapping function between temperature and current; set the duty cycle as the basic duty cycle;
[0011] The PWM wave generation module outputs a PWM control signal based on a set duty cycle to control the driver to turn on and off, and then control the LED light source to light up; the current acquisition module is used to control the current acquisition device to collect measured current data multiple times at a preset time interval and transmit it to the current compensation module;
[0012] At the same time, the temperature acquisition module is used to control the temperature sensor to synchronously acquire real-time temperature data at the same time interval, and then transmit it to the current mapping module;
[0013] The current mapping module is used to receive real-time temperature data, and calculate theoretical current data corresponding to the real-time temperature data according to a pre-acquired linear mapping function of temperature and current, and then transmit the calculated theoretical current data to the current compensation module;
[0014] The function of the current compensation module is: through the formula:
[0015] Acquire compensation current data and transmit it to the duty cycle mapping module;
[0016] The function of the duty cycle mapping module is to obtain the duty cycle data corresponding to the compensation current data by using the linear mapping function of the current and the duty cycle, record it as the theoretical duty cycle, and transmit it to the duty cycle adjustment module;
[0017] The function of the duty cycle adjustment module is to compare the received theoretical duty cycle with the duty cycle set by the current PWM wave generation module, and reset the duty cycle of the PWM wave generation module based on the comparison result. The PWM wave generation module outputs a PWM control signal according to the newly set duty cycle to control the LED light source to light up.
[0018] Furthermore, the linear mapping function of temperature and current is obtained by the following process:
[0019] According to the basic duty cycle, a PWM control signal is output to control the on and off of the driving device; the ambient temperature of the LED light source is adjusted, and the real-time current data at different temperatures are collected. Based on the corresponding relationship between the temperature data and the real-time current data, a linear mapping function of temperature and current is fitted.
[0020] Preferably, the linear mapping function of temperature and current is obtained by the following process:
[0021] Output PWM control signal according to the basic duty cycle to control the driver to turn on and off, and then control the LED light source to light up;
[0022] The ambient temperature of the LED light source is changed multiple times, and the timing starts each time the ambient temperature is changed. After a preset time interval, the temperature data and current data are collected in real time.
[0023] Using multiple sets of temperature data and current data, a linear equation y=ax+b is fitted, where x represents temperature and y represents current;
[0024] The straight line equation y=ax+b is saved as a linear mapping function.
[0025] Further, the linear mapping function of the current and the duty cycle is obtained by the following steps:
[0026] At the base temperature, the real-time current data of the LED light source when it is lit at different duty cycles is obtained, and based on the corresponding relationship between the real-time current data and the duty cycle data, a linear mapping function of the current and the duty cycle is fitted.
[0027] Preferably, the linear mapping function of the current and the duty cycle is obtained by the following steps:
[0028] At the base temperature, the duty cycle of the PWM control signal is adjusted multiple times, and each time the duty cycle is adjusted, the PWM control signal is output with the adjusted duty cycle, the LED light source is lit, and the real-time current data of the LED light source is obtained;
[0029] Using multiple sets of duty cycle data and real-time current data, a linear equation y'=cx'+d is fitted, where x' represents the real-time current and y' represents the duty cycle;
[0030] The straight line equation y'=cx'+d is saved as a linear mapping function of current and duty cycle.
[0031] Further, the received theoretical duty cycle is compared with the duty cycle set by the current PWM wave generation module, and according to the comparison result, the method of resetting the duty cycle of the PWM wave generation module is as follows:
[0032] If the duty cycle set by the current PWM wave generation module is less than the theoretical duty cycle data, the current duty cycle is increased by a preset step length G, and a PWM control signal is output based on the increased duty cycle;
[0033] Otherwise, the current duty cycle is reduced by a preset step size G, and a PWM control signal is output based on the reduced duty cycle.
[0034] Preferably, the preset step length G is 0.2% to 0.5%.
[0035] Preferably, the controller is a single chip microcomputer or a microcontroller;
[0036] The driving device is a MOS tube or a transistor;
[0037] The current acquisition device is a power management chip, a current detection chip or a Hall current sensor.
[0038] The present invention also relates to a method for performing PWM dimming using the above-mentioned constant voltage PWM dimming system, comprising the following steps:
[0039] Step 1: Obtain a linear mapping function between current and duty cycle at a specific temperature, and record this specific temperature as the basic temperature; obtain a linear mapping function between temperature and current under the premise of maintaining a certain duty cycle to output a PWM control signal, and record this duty cycle as the basic duty cycle; obtain basic current data corresponding to the basic temperature based on the linear mapping function between temperature and current; set the duty cycle as the basic duty cycle;
[0040] Step 2: The PWM wave generation module outputs a PWM control signal based on the set duty cycle to control the driver to turn on and off, and then control the LED light source to light up;
[0041] Step 3: The current acquisition module controls the current acquisition device to collect real-time current data multiple times and transmit the data to the current compensation module;
[0042] At the same time, the temperature acquisition module controls the temperature sensor to synchronously acquire real-time temperature data, and then transmits the acquired real-time temperature data to the current mapping module;
[0043] Record the collection time;
[0044] Step 4: The current mapping module receives the real-time temperature data and calculates the theoretical current data corresponding to the real-time temperature data according to the linear mapping function of temperature and current, and then transmits it to the current compensation module;
[0045] Step 4: Current compensation module uses the formula:
[0046] Acquire compensation current data and transmit it to the duty cycle mapping module;
[0047] Step 5: The duty cycle mapping module uses a linear mapping function between current and duty cycle to obtain duty cycle data corresponding to the compensation current data, records it as a theoretical duty cycle, and transmits it to the duty cycle adjustment module;
[0048] Step 6: The duty cycle adjustment module compares the received theoretical duty cycle with the duty cycle set by the current PWM wave generation module, and resets the duty cycle of the PWM wave generation module based on the result;
[0049] Step 7: The PWM wave generation module outputs a PWM control signal according to the adjusted duty cycle to turn the drive device on and off, thereby controlling the LED light source to light up;
[0050] Step 8: Determine the interval between the current time and the latest recorded collection time. If the interval is equal to the preset time interval, perform steps 3 to 7 again until the LED light source is turned off.
[0051] This solution is based on the understanding that the ambient temperature affects the real-time current size of the LED light source, and the current affects the brightness of the LED light source.
[0052] Through the linear mapping function of temperature and current 、 The linear mapping function of current and duty cycle calculates the theoretical current through real-time temperature, and calculates the compensation coefficient (ratio k) through the theoretical current. The current is compensated by multiplying the measured real-time current value by the compensation coefficient (ratio k). The theoretical duty cycle data is then obtained based on the compensated current value, and the PWM output duty cycle is adjusted to realize the correction of the brightness change of the LED light source under different ambient temperatures.
[0053] After correction by this scheme, if Figure 3 As shown in the figure, the light source is controlled by a PWM square wave signal with a duty cycle of 30%, and the real-time brightness value of the LED light source is collected by an illuminance meter. When the ambient temperature of the LED light source rises from 5°C to 50°C, the actual brightness value of the LED light source differs by less than 5% lux. This solves the problem of large brightness differences of LED light sources at different ambient temperatures and reduced measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is the structural block diagram of the constant voltage PWM dimming system;
[0055] Figure 2 It is a curve diagram of the brightness change of a light source in the constant voltage PWM dimming mode in the prior art;
[0056] Figure 3 It is a curve diagram of light source brightness variation in constant voltage PWM dimming mode in a specific implementation manner;
[0057] Figure 4 It is a line graph representation of the corresponding relationship between 10 groups of current and temperature in a specific implementation manner;
[0058] Figure 5 A line graph showing the corresponding relationship between 9 groups of currents and duty cycles in a specific implementation manner;
[0059] Figure 6 A schematic diagram of the connection relationship of components of a constant voltage PWM dimming system in a specific implementation manner;
[0060] Figure 7 It is a schematic diagram of the device connection relationship when a battery management chip is used in a specific implementation manner. DETAILED DESCRIPTION
[0061] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0062] A constant voltage PWM dimming system to improve the brightness variation of light sources, such as Figure 6 As shown, it includes a controller, a constant voltage power supply and a driver device, the constant voltage power supply supplies power to the LED light source, and the driver device is connected to the LED light source; when in use, the controller is used to output a PWM control signal, control the on and off of the driver device, and then light up the LED light source;
[0063] A temperature sensor is installed on or around the LED light source to detect the temperature of the LED light source in real time; the LED light source is also connected to a current acquisition device to detect the current passing through the LED light source; the current acquisition device and the temperature sensor are both electrically connected to the controller;
[0064] like Figure 1As shown, the controller includes a temperature acquisition module, a current mapping module, a current compensation module, a duty cycle mapping module, a duty cycle adjustment module and a PWM wave generation module connected in sequence, and also includes a current acquisition module connected to the current compensation module; wherein the temperature acquisition module is electrically connected to the temperature sensor, and is used to control the temperature sensor to collect real-time temperature data of the LED light source;
[0065] Obtain a linear mapping function between current and duty cycle at a specific temperature, and record this specific temperature as the basic temperature; obtain a linear mapping function between temperature and current under the premise of outputting a PWM control signal at a certain duty cycle, and record this duty cycle as the basic duty cycle; obtain basic current data corresponding to the basic temperature based on the linear mapping function between temperature and current;
[0066] For example, if the basic temperature is set to room temperature 25°C, the current data obtained by substituting 25°C into the linear mapping function of temperature and current is recorded as the basic current data.
[0067] The basic temperature is set to 20°C, and the current data obtained by substituting 20°C into the linear mapping function of temperature and current is recorded as the basic current data.
[0068] Set the duty cycle to the base duty cycle;
[0069] The PWM wave generation module outputs a PWM control signal based on the set duty cycle to control the driver to turn on and off, and then control the LED light source to light up;
[0070] The current acquisition module is used to control the current acquisition device to collect real-time current data multiple times according to a preset time interval △t and transmit the data to the current compensation module;
[0071] At the same time, the temperature acquisition module controls the temperature sensor to synchronously collect real-time temperature data at the same time interval △t, and then transmits the collected real-time temperature data to the current mapping module;
[0072] Specifically, the preset time interval △t is usually set to 0.01s to 0.1s; it can be set independently according to actual usage. For example, if the camera shooting frequency is 60HZ, △t can be set to 1 / 60 seconds;
[0073] The current mapping module is used to receive the real-time temperature data, and calculate the theoretical current data corresponding to the real-time temperature data according to the pre-acquired linear mapping function of temperature and current, and then transmit the calculated theoretical current data to the current compensation module;
[0074] The current compensation module function is: through the formula:
[0075] Acquire compensation current data and transmit it to the duty cycle mapping module;
[0076] The function of the duty cycle mapping module is: using the linear mapping function of current and duty cycle, to solve the duty cycle data corresponding to the compensation current data, record it as the theoretical duty cycle, and transmit the theoretical duty cycle to the duty cycle adjustment module;
[0077] The function of the duty cycle adjustment module is to compare the received theoretical duty cycle with the duty cycle set by the current PWM wave generation module, and reset the duty cycle of the PWM wave generation module (increase / decrease the current duty cycle) based on the comparison result. The PWM wave generation module outputs a PWM control signal based on the newly set duty cycle to control the LED light source to light up.
[0078] In specific implementation, the linear mapping function of temperature and current is obtained in advance through the following process:
[0079] According to the basic duty cycle, a PWM control signal is output to drive the device on and off to control the lighting of the LED light source. The ambient temperature of the LED light source is adjusted, and real-time current data at different temperatures are collected. Based on the corresponding relationship between the temperature data and the real-time current data, a linear mapping function of temperature and current is fitted.
[0080] In more detail, the steps for obtaining the linear mapping function of temperature and current are as follows:
[0081] Output PWM control signal according to the basic duty cycle to control the driver to turn on and off, and then control the LED light source to light up;
[0082] The ambient temperature of the LED light source is changed multiple times, and the timing starts each time the ambient temperature is changed. After the preset time t, the temperature data and current data are collected in real time respectively;
[0083] Using multiple sets of temperature data and current data, a linear equation y=ax+b is fitted, where x represents temperature and y represents real-time current;
[0084] The straight line equation y=ax+b is saved as a linear mapping function.
[0085] Exemplary steps are:
[0086] Step 1: The PWM wave generation module outputs a PWM control signal with a 50% duty cycle and a frequency of 250kHz to light up the LED light source;
[0087] Step 2: Adjust the ambient temperature of the LED light source to -5°C;
[0088] Step 3: After a preset time t=30 minutes, the current acquisition module controls the power management chip to collect real-time current data of the LED light source;
[0089] Step 4: Increase the ambient temperature of the LED light source by 5°C, and execute step 3 after each increase;
[0090] A total of 10 sets of current and temperature corresponding data were collected (as shown in Table 1). For a more intuitive display, Figure 4 As shown, the corresponding relationship between the data is represented by a line graph;
[0091] The linear equation of current and temperature y==-0.00183x+0.336655 was obtained by least square fitting, where x represents temperature in °C and y represents current in A.
[0092] Table 1: Correspondence table of 10 sets of current and temperature data
[0093] Temperature(℃) -5 0 5 10 15 20 25 30 35 40 Current (A) 0.206 0.248 0.277 0.308 0.312 0.318 0.323 0.336 0.351 0.362
[0094] It should be noted that: in this embodiment, the basic duty cycle is set to 50% in step 1. The value of the basic duty cycle is not limited during specific implementation, and the basic duty cycle can be set according to actual control requirements.
[0095] The initial temperature in step 2 is -5°C. The value of the initial temperature is not limited during specific implementation. For example, it can start from 0°C or 20°C. Similarly, the preset time t in step 3 and the temperature adjustment step in step 4 can be set independently according to actual needs. This scheme provides an exemplary explanation without any special restrictions on specific values.
[0096] In specific implementation, the linear mapping function of current and duty cycle is obtained in advance through the following process:
[0097] At the base temperature, the real-time current data of the LED light source when it is lit at different duty cycles is obtained, and based on the corresponding relationship between the real-time current data and the duty cycle data, a linear mapping function of the current and the duty cycle is fitted.
[0098] More specifically, the steps for obtaining the linear mapping function of current and duty cycle are as follows:
[0099] At the base temperature, the duty cycle of the PWM control signal is adjusted multiple times, and each time the duty cycle is adjusted, the PWM control signal is output with the adjusted duty cycle, the LED light source is lit, and the real-time current data of the LED light source is obtained;
[0100] Using multiple sets of duty cycle data and real-time current data, a linear equation y'=cx'+d is fitted, where x' represents the real-time current and y' represents the duty cycle;
[0101] The straight line equation y'=cx'+d is saved as a linear mapping function of current and duty cycle.
[0102] The exemplary steps are as follows:
[0103] Step S1: setting the ambient temperature of the light source as a basic temperature (in this embodiment, the basic temperature is set to room temperature 25°);
[0104] Step S2: The PWM wave generation module outputs a 10% duty cycle 250kHz frequency PWM control signal to light up the LED light source;
[0105] Step S3: The current acquisition module controls the power management chip to collect real-time current data of the LED light source;
[0106] Step S4: the PWM wave generation module increases the duty cycle by a gradient of 10%, adjusts the duty cycle of the PWM control signal multiple times, outputs the PWM control signal with the adjusted duty cycle each time the duty cycle is adjusted, lights up the LED light source and executes step S3;
[0107] Step S5: Collect 9 sets of current and duty cycle corresponding data (as shown in Table 2). For a more intuitive display, Figure 5 As shown, the corresponding relationship between the data is represented by a line graph;
[0108] The linear equation of current and duty cycle y'=43.7x'+28.47 is obtained by fitting using the least square method, where x' represents the real-time current data in A, and y' represents the duty cycle data.
[0109] Table 2: Correspondence table of 9 groups of duty cycle and current data
[0110] Duty Cycle 10% 20% 30% 40% 50% 60% 70% 80% 90% Current (A) 0.021 0.074 0.142 0.226 0.323 0.436 0.587 0.789 1.184
[0111] It should be noted that: in this embodiment, the initial duty cycle is set to 10%, and the value of the initial duty cycle is not limited in specific implementation, for example, it can be set to start from 15%, 30%, etc.; similarly, in this embodiment, the adjustment step of the duty cycle is set to 10%, and the value of the duty cycle adjustment step is not limited in specific implementation, for example, it can be set to 5%, 20%, etc.
[0112] Specifically, the received theoretical duty cycle is compared with the duty cycle set by the current PWM wave generation module, and the method of resetting the duty cycle of the PWM wave generation module according to the comparison result is as follows:
[0113] If the duty cycle set by the current PWM wave generation module is less than the theoretical duty cycle data, the current duty cycle is increased by a preset step length G, and a PWM control signal is output based on the increased duty cycle;
[0114] Otherwise, the current duty cycle is reduced by a preset step size G, and a PWM control signal is output based on the reduced duty cycle.
[0115] The preset step length G is 0.2% to 0.5%, which can ensure that the brightness change of the light source does not affect the image acquisition quality.
[0116] When this solution is implemented, the controller can be a single-chip microcomputer or a microcontroller;
[0117] The driver device can be a MOS tube or a transistor;
[0118] The current acquisition device can be a power management chip (which can be used as a power supply and a current acquisition device at the same time), a current detection chip or a Hall current sensor. This solution does not limit the specific selection of the device, as long as it can achieve the corresponding function. Figure 7 An exemplary circuit design was carried out, in which a power management chip was selected as both a power source and a current acquisition device, responsible for the conversion, distribution, detection and other power management of electrical energy in the electronic equipment system; a MOS tube was used as a driving device, and when in use, the base of the MOS tube was connected to a controller.
[0119] Correspondingly, the present invention further discloses a method for performing PWM dimming using the above-mentioned constant voltage PWM dimming system, comprising the following steps:
[0120] Step 1: Obtain a linear mapping function between current and duty cycle at a specific temperature, and record this specific temperature as the basic temperature; obtain a linear mapping function between temperature and current under the premise of maintaining a certain duty cycle to output a PWM control signal, and record this duty cycle as the basic duty cycle; obtain basic current data corresponding to the basic temperature based on the linear mapping function between temperature and current; set the duty cycle as the basic duty cycle;
[0121] Step 2: The PWM wave generation module outputs a PWM control signal based on the set duty cycle to control the driver to turn on and off, and then control the LED light source to light up;
[0122] Step 3: The current acquisition module controls the current acquisition device to collect real-time current data multiple times and transmit the data to the current compensation module;
[0123] At the same time, the temperature acquisition module controls the temperature sensor to synchronously collect real-time temperature data, and then transmits the collected real-time temperature data to the current mapping module;
[0124] Record the collection time;
[0125] Step 4: The current mapping module receives the real-time temperature data and calculates the theoretical current data corresponding to the real-time temperature data according to the linear mapping function of temperature and current, and then transmits it to the current compensation module;
[0126] Step 4: Current compensation module uses the formula:
[0127] Acquire compensation current data and transmit it to the duty cycle mapping module;
[0128] Step 5: The duty cycle mapping module uses a linear mapping function between current and duty cycle to obtain duty cycle data corresponding to the compensation current data, records it as a theoretical duty cycle, and transmits it to the duty cycle adjustment module;
[0129] Step 6: The duty cycle adjustment module compares the received theoretical duty cycle with the duty cycle set by the current PWM wave generation module, and resets the duty cycle of the PWM wave generation module based on the result;
[0130] Step 7: The PWM wave generation module outputs a PWM control signal according to the adjusted duty cycle to turn the drive device on and off, thereby controlling the LED light source to light up;
[0131] Step 8: Determine the interval between the current time and the latest recorded collection time. If the interval is equal to the preset time interval, perform steps 3 to 7 again until the LED light source is turned off.
[0132] The foregoing description of the specific exemplary embodiments of the present invention is presented for the purpose of illustration and description. The foregoing description is not intended to be exhaustive, nor is it intended to limit the present invention to the precise form disclosed, and it is apparent that many changes and variations are possible in light of the above teachings. The exemplary embodiments are selected and described to explain the specific principles of the present invention and its practical application, so that other technicians in the field can realize and utilize the various exemplary embodiments of the present invention and its different selected forms and modified forms. The scope of the present invention is intended to be limited by the appended claims and their equivalents.
Claims
1. A constant voltage PWM dimming system for improving the brightness change of a light source, comprising a controller, a constant voltage power supply and a driver, wherein the constant voltage power supply supplies power to an LED light source, and the driver is connected to the LED light source; Features: A temperature sensor is installed on or around the LED light source to detect the temperature of the LED light source in real time; the LED light source is also connected to a current acquisition device to detect the current passing through the LED light source; the current acquisition device and the temperature sensor are both electrically connected to the controller; The controller includes a temperature acquisition module, a current mapping module, a current compensation module, a duty cycle mapping module, a duty cycle adjustment module and a PWM wave generation module which are connected in sequence, and also includes a current acquisition module connected to the current compensation module; wherein the temperature acquisition module is electrically connected to a temperature sensor, and is used to control the temperature sensor to acquire real-time temperature data of the LED light source; Obtain a linear mapping function between current and duty cycle at a specific temperature, and record this specific temperature as the basic temperature; obtain a linear mapping function between temperature and current under the premise of maintaining a certain duty cycle to output a PWM control signal, and record this duty cycle as the basic duty cycle; obtain basic current data corresponding to the basic temperature based on the linear mapping function between temperature and current; set the duty cycle as the basic duty cycle; The PWM wave generation module outputs a PWM control signal based on a set duty cycle to control the driver to turn on and off, and then control the LED light source to light up; the current acquisition module is used to control the current acquisition device to collect measured current data multiple times at a preset time interval and transmit it to the current compensation module; At the same time, the temperature acquisition module is used to control the temperature sensor to synchronously acquire real-time temperature data at the same time interval, and then transmit it to the current mapping module; The current mapping module is used to receive real-time temperature data, and calculate theoretical current data corresponding to the real-time temperature data according to a pre-acquired linear mapping function of temperature and current, and then transmit the calculated theoretical current data to the current compensation module; The function of the current compensation module is: through the formula: Acquire compensation current data and transmit it to the duty cycle mapping module; The function of the duty cycle mapping module is to obtain the duty cycle data corresponding to the compensation current data by using the linear mapping function of the current and the duty cycle, record it as the theoretical duty cycle, and transmit it to the duty cycle adjustment module; The function of the duty cycle adjustment module is to compare the received theoretical duty cycle with the duty cycle set by the current PWM wave generation module, and reset the duty cycle of the PWM wave generation module based on the comparison result. The PWM wave generation module outputs a PWM control signal according to the newly set duty cycle to control the LED light source to light up.
2. The constant voltage PWM dimming system according to claim 1, wherein: The linear mapping function of temperature and current is obtained by the following process: According to the basic duty cycle, a PWM control signal is output to control the on and off of the driving device; the ambient temperature of the LED light source is adjusted, and the real-time current data at different temperatures are collected. Based on the corresponding relationship between the temperature data and the real-time current data, a linear mapping function of temperature and current is fitted.
3. The constant voltage PWM dimming system according to claim 1, wherein: The linear mapping function of temperature and current is obtained by the following process: Output PWM control signal according to the basic duty cycle to control the driver to turn on and off, and then control the LED light source to light up; The ambient temperature of the LED light source is changed multiple times, and the timing starts each time the ambient temperature is changed. After a preset time interval, the temperature data and current data are collected in real time. Using multiple sets of temperature data and current data, a linear equation y=ax+b is fitted, where x represents temperature and y represents current; The straight line equation y=ax+b is saved as a linear mapping function.
4. The constant voltage PWM dimming system according to claim 1, wherein: The linear mapping function of the current and the duty cycle is obtained by the following steps: At the base temperature, the real-time current data of the LED light source when it is lit at different duty cycles is obtained, and based on the corresponding relationship between the real-time current data and the duty cycle data, a linear mapping function of the current and the duty cycle is fitted.
5. The constant voltage PWM dimming system as claimed in claim 1, characterized in that: The linear mapping function of the current and the duty cycle is obtained by the following steps: At the base temperature, the duty cycle of the PWM control signal is adjusted multiple times, and each time the duty cycle is adjusted, the PWM control signal is output with the adjusted duty cycle, the LED light source is lit, and the real-time current data of the LED light source is obtained; Using multiple sets of duty cycle data and real-time current data, a linear equation y'=cx'+d is fitted, where x' represents the real-time current and y' represents the duty cycle; The straight line equation y'=cx'+d is saved as a linear mapping function of current and duty cycle.
6. The constant voltage PWM dimming system as claimed in claim 1, characterized in that: The received theoretical duty cycle is compared with the duty cycle set by the current PWM wave generation module. According to the comparison result, the method of resetting the duty cycle of the PWM wave generation module is as follows: If the duty cycle set by the current PWM wave generation module is less than the theoretical duty cycle data, the current duty cycle is increased by a preset step length G, and a PWM control signal is output based on the increased duty cycle; Otherwise, the current duty cycle is reduced by a preset step size G, and a PWM control signal is output based on the reduced duty cycle.
7. The constant voltage PWM dimming system as claimed in claim 6, characterized in that: The preset step length G is 0.2% to 0.5%.
8. The constant voltage PWM dimming system as claimed in claim 1, characterized in that: The controller is a single chip microcomputer or a microcontroller; The driving device is a MOS tube or a transistor; The current acquisition device is a power management chip, a current detection chip or a Hall current sensor.
9. A method for performing PWM dimming using the constant voltage PWM dimming system as claimed in claim 1, characterized in that: The following steps are involved: Step 1: Obtain a linear mapping function between current and duty cycle at a specific temperature, and record this specific temperature as the base temperature; Under the premise of maintaining a certain duty cycle to output the PWM control signal, obtain the linear mapping function of temperature and current, and record this duty cycle as the basic duty cycle; based on the linear mapping function of temperature and current, obtain the basic current data corresponding to the basic temperature; Set the duty cycle to the basic duty cycle; Step 2: The PWM wave generation module outputs a PWM control signal based on the set duty cycle to control the driver to turn on and off, and then control the LED light source to light up; Step 3: The current acquisition module controls the current acquisition device to collect real-time current data multiple times and transmit the data to the current compensation module; At the same time, the temperature acquisition module controls the temperature sensor to synchronously acquire real-time temperature data, and then transmits the acquired real-time temperature data to the current mapping module; Record the collection time; Step 4: The current mapping module receives the real-time temperature data and calculates the theoretical current data corresponding to the real-time temperature data according to the linear mapping function of temperature and current, and then transmits it to the current compensation module; Step 4: Current compensation module uses the formula: Acquire compensation current data and transmit it to the duty cycle mapping module; Step 5: The duty cycle mapping module uses a linear mapping function between current and duty cycle to obtain duty cycle data corresponding to the compensation current data, records it as a theoretical duty cycle, and transmits it to the duty cycle adjustment module; Step 6: The duty cycle adjustment module compares the received theoretical duty cycle with the duty cycle set by the current PWM wave generation module, and resets the duty cycle of the PWM wave generation module based on the result; Step 7: The PWM wave generation module outputs a PWM control signal according to the adjusted duty cycle to turn the drive device on and off, thereby controlling the LED light source to light up; Step 8: Determine the interval between the current time and the latest recorded collection time. If the interval is equal to the preset time interval, perform steps 3 to 7 again until the LED light source is turned off.
Citation Information
Cited By
Automatic light intensity adjusting and shielding system and method for vehicle lamp test
CN119997313A
A light intensity automatic adjusting shielding system and method for vehicle lamp testing
CN119997313B
Lamplight adjusting method, device and equipment based on human visual characteristics and medium
CN122340657A