Method for controlling brightness of light source, driving device and computer program product
By obtaining the corresponding relationship between the light source and the driving circuit, the target current and the target driving parameters are calculated, and the problem of insufficient light source control accuracy in the existing technology has been solved, and the high -precision light source brightness control is achieved.
Patent Information
- Application Number
- CN202411618864.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art is difficult to accurately control the brightness of multiple light sources in scenarios where the emission brightness accuracy is required, especially when there is a difference between the actual parameters of the light source and the theoretical parameters.
By obtaining the light power-current corresponding relationship relationship and the driving current-driving parameter corresponding to the driving circuit, the target current and target driver parameters are calculated to accurately control the brightness of the light source.
The high accuracy control of the brightness of the light source is achieved, and the error caused by the differences between the actual parameters and the theoretical parameters will be reduced, and the light source will reach the expected brightness.
Smart Images

Figure CN119383788A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of light source driving technology, and in particular to a method for controlling the brightness of a light source, a driving device and a computer program product. Background Art
[0002] In some mechanical and electrical fields that require multiple light sources for illumination, such as multiple light sources in the same device, the output brightness of each light source is usually required to be adjustable, and the output brightness of multiple light sources needs to be controlled to be consistent, or the output brightness of the light source needs to be controlled to reach the required brightness to meet lighting needs.
[0003] In the current technical solutions, generally, multiple light sources in the same device are of the same type, so each light source is usually driven based on the same driving parameters, for example, based on the same duty cycle in a pulse width modulation driving mode, so that each light source is driven based on the same driving current, thereby achieving consistent output brightness. When controlling the output brightness of the light source, the driving parameters are linearly adjusted to linearly adjust the output brightness.
[0004] However, although multiple light sources are of the same type, the actual parameters of each light source are not completely consistent. Therefore, in scenarios where the accuracy of the emitted brightness is required to be high, driving each light source with the same driving current cannot meet the requirement of consistent emitted brightness. Moreover, linear adjustment of the driving parameters to linearly adjust the emitted brightness also cannot meet the accuracy requirement of controlling the emitted brightness in scenarios where the accuracy of the emitted brightness is required to be high. In this regard, a new technical solution needs to be proposed. Summary of the invention
[0005] The main technical problem solved by this application is how to accurately control the brightness of the light source.
[0006] According to a first aspect, an embodiment provides a method for controlling the brightness of a light source, comprising:
[0007] Obtain the target optical power that the light source needs to achieve;
[0008] Obtaining a corresponding relationship between the optical power and the current of the light source; wherein the corresponding relationship between the optical power and the current is used to characterize the mapping relationship between each driving current output to the light source and each optical power achieved by the light source when the light source is driven;
[0009] According to the optical power-current correspondence relationship, a target current corresponding to the target optical power is obtained from the target optical power;
[0010] Acquiring a driving current-driving parameter correspondence relationship of a driving circuit; wherein the driving current-driving parameter correspondence relationship is used to characterize a mapping relationship between a driving current output by the driving circuit and a driving parameter configured by the driving circuit;
[0011] According to the driving current-driving parameter correspondence relationship, a target driving parameter corresponding to the target current is obtained from the target current, so as to control the driving circuit to drive the light source based on the target driving parameter.
[0012] In some embodiments, obtaining the target current corresponding to the target optical power from the target optical power according to the optical power-current correspondence relationship includes:
[0013] Performing polynomial fitting based on each driving current output to the light source and each optical power achieved by the light source to obtain a functional relationship between the driving current and the optical power, and obtaining the target current from the target optical power based on the functional relationship;
[0014] or,
[0015] If the optical power-current correspondence includes the target optical power, searching for a target current corresponding to the target optical power based on the optical power-current correspondence;
[0016] or,
[0017] If the optical power-current correspondence does not include the target optical power, then obtaining the first optical power and the second optical power in the optical power-current correspondence, as well as the first current corresponding to the first optical power and the second current corresponding to the second optical power; wherein the first optical power is less than the target optical power, and the second optical power is greater than the target optical power;
[0018] A first relationship between the target optical power and the first optical power and the second optical power is acquired, and the target current is obtained from the first current and the second current based on the first relationship, so that the target current and the first current and the second current satisfy the first relationship.
[0019] In some embodiments, acquiring a first relationship between the target optical power and the first optical power and the second optical power, and obtaining the target current from the first current and the second current based on the first relationship, includes:
[0020] Obtain a first ratio of the difference between the first optical power and the second optical power to the difference between the first optical power and the target optical power, and obtain the target current from the first current and the second current based on the first ratio, so that the difference between the first current and the second current and the difference between the first current and the target current satisfy the first ratio; wherein the first optical power and the second optical power are adjacent to the target optical power, respectively.
[0021] In some embodiments, obtaining the target optical power that the light source needs to achieve includes:
[0022] Determine the maximum brightness corresponding to the light source based on the maximum optical power that the light source can achieve;
[0023] The target brightness that the light source needs to achieve is obtained, and the target optical power is obtained from the maximum optical power based on the ratio of the target brightness to the maximum brightness, so that the ratio of the target optical power to the maximum optical power is the same as the ratio of the target brightness to the maximum brightness.
[0024] In some embodiments, the driving circuit includes a power supply, a pulse width modulation module and a digital potentiometer;
[0025] The power supply is used to output a driving current;
[0026] The pulse width modulation module is used to receive a pulse width modulation control signal and control the duty cycle of the power supply based on the pulse width modulation control signal;
[0027] The digital potentiometer is connected in series with the power supply, and the digital potentiometer is used to receive a resistance control signal and adjust its own resistance based on the resistance control signal to adjust the driving current output by the power supply;
[0028] The driving parameters include a duty cycle of the pulse width modulation control signal and a resistance value corresponding to a resistance control signal.
[0029] In some embodiments, the driving current-driving parameter correspondence relationship includes a driving current-driving parameter first correspondence relationship and a driving current-driving parameter second correspondence relationship;
[0030] The first corresponding relationship between the driving current and the driving parameter is used to characterize the mapping relationship between each driving current output by the driving circuit and the resistance corresponding to each resistance control signal under the control of the pulse width modulation control signal having the first duty cycle;
[0031] The second corresponding relationship between the driving current and the driving parameter is used to characterize the mapping relationship between each driving current output by the driving circuit and the resistance corresponding to each resistance control signal under the control of the pulse width modulation control signal as the second duty cycle; wherein the first duty cycle is smaller than the second duty cycle.
[0032] In some embodiments, obtaining the target driving parameter corresponding to the target current from the target current according to the driving current-driving parameter correspondence relationship includes:
[0033] If the target current is not included in the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter, a third current closest to the target current in the first corresponding relationship between the driving current and the driving parameter and a first resistance value corresponding to the third current are obtained; and according to the second corresponding relationship between the driving current and the driving parameter, a fourth current corresponding to the first resistance value is obtained from the first resistance value;
[0034] Acquire a second relationship between the target current and the third current and the fourth current, and obtain a third duty cycle from the first duty cycle and the second duty cycle based on the second relationship, so that the third duty cycle satisfies the second relationship with the first duty cycle and the second duty cycle;
[0035] The third duty cycle and the first resistance value are used as the target driving parameters;
[0036] or,
[0037] If the target current is not included in the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter, a fifth current closest to the target current in the second corresponding relationship between the driving current and the driving parameter and a second resistance value corresponding to the fifth current are obtained; and according to the second corresponding relationship between the driving current and the driving parameter, a sixth current corresponding to the second resistance value is obtained from the second resistance value;
[0038] Acquire a third relationship between the target current and the fifth current and the sixth current, and obtain a fourth duty cycle from the first duty cycle and the second duty cycle based on the third relationship, so that the fourth duty cycle satisfies the third relationship with the first duty cycle and the second duty cycle;
[0039] and using the fourth duty cycle and the second resistance as the target driving parameters;
[0040] or,
[0041] If the first corresponding relationship between the driving current and the driving parameter includes the target current, searching for a third resistance value corresponding to the resistance control signal corresponding to the target current based on the first corresponding relationship between the driving current and the driving parameter, and using the first duty cycle and the third resistance value as the target driving parameter;
[0042] or,
[0043] If the second corresponding relationship between driving current and driving parameter includes the target current, the fourth resistance corresponding to the resistance control signal corresponding to the target current is searched based on the second corresponding relationship between driving current and driving parameter, and the second duty cycle and the fourth resistance are used as the target driving parameter.
[0044] In some embodiments, the step of acquiring a second relationship between the target current and the third current and the fourth current, and obtaining a third duty cycle from the first duty cycle and the second duty cycle based on the second relationship, comprises:
[0045] acquiring a second ratio of a difference between the third current and the fourth current to a difference between the third current and the target current, and obtaining the third duty cycle from the first duty cycle and the second duty cycle based on the second ratio, so that a difference between the first duty cycle and the second duty cycle and a difference between the first duty cycle and the third duty cycle satisfy the second ratio;
[0046] or,
[0047] The acquiring a third relationship between the target current and the fifth current and the sixth current, and obtaining a fourth duty cycle from the first duty cycle and the second duty cycle based on the third relationship, comprises:
[0048] Obtain a third ratio of the difference between the fifth current and the sixth current to the difference between the fifth current and the target current, and obtain the fourth duty cycle from the first duty cycle and the second duty cycle based on the third ratio, so that the difference between the first duty cycle and the second duty cycle and the difference between the first duty cycle and the fourth duty cycle satisfy the third ratio.
[0049] In some embodiments, the third current is a current value greater than and closest to the target current in the first correspondence between the driving current and the driving parameter; or, the third current is a current value less than and closest to the target current in the first correspondence between the driving current and the driving parameter; or, the fifth current is a current value greater than and closest to the target current in the second correspondence between the driving current and the driving parameter; or, the fifth current is a current value less than and closest to the target current in the second correspondence between the driving current and the driving parameter.
[0050] In some embodiments, the first duty cycle is a minimum duty cycle corresponding to the pulse width modulation control signal; and / or the second duty cycle is a maximum duty cycle corresponding to the pulse width modulation control signal.
[0051] According to the second aspect, an embodiment provides a method for controlling the brightness of a light source, comprising:
[0052] Obtain the target optical power that the light source needs to achieve;
[0053] Obtaining a corresponding relationship between the optical power and the current of the light source; wherein the corresponding relationship between the optical power and the current is used to characterize a mapping relationship between the driving current output to the light source and the optical power achieved by the light source;
[0054] According to the optical power-current correspondence relationship, a target current corresponding to the target optical power is obtained from the target optical power;
[0055] Acquiring a driving current-driving parameter correspondence relationship of the driving circuit; wherein the driving current-driving parameter correspondence relationship is used to characterize a mapping relationship between each driving current outputted by the driving circuit and each driving parameter configured by the driving circuit when the driving circuit outputs the driving current;
[0056] According to the driving current-driving parameter correspondence relationship, a target driving parameter corresponding to the target current is obtained from the target current, so as to control the driving circuit to drive the light source based on the target driving parameter.
[0057] According to the third aspect, an embodiment provides a light source driving device, including:
[0058] A driving circuit, used to output a corresponding driving current based on the configured driving parameters, so as to drive the light source;
[0059] A processor is used to implement the method described in the first aspect or the second aspect when executing a program.
[0060] According to the fourth aspect, an embodiment provides a computer program product, including a computer program and / or instructions, characterized in that when the computer program and / or instructions are executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0061] According to the method, driving device and computer program product for controlling the brightness of the light source in the above-mentioned embodiments, when obtaining the driving current of the light source, since the optical power-current correspondence of the light source represents the mapping relationship between each driving current output to the light source and each optical power achieved by the light source when the light source is driven, when obtaining the driving current based on the optical power-current correspondence of the light source, it is possible to reduce the difference caused by the actual parameters and theoretical parameters of the light source, thereby obtaining a relatively accurate driving current, and then obtaining relatively accurate driving parameters based on the relatively accurate driving current from the driving current-driving parameter correspondence, thereby improving the control accuracy of the brightness of the light source when driving the light source. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a structural schematic diagram of a light source driving device according to an embodiment;
[0063] Figure 2 is a schematic structural diagram of a driving circuit according to an embodiment;
[0064] Figure 3 A schematic diagram of a fitting curve according to an embodiment of the present invention;
[0065] Figure 4 The figure is a flow chart of a method for controlling the brightness of a light source according to an embodiment. DETAILED DESCRIPTION
[0066] The present application is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments use associated similar element numbers. In the following embodiments, many detailed descriptions are intended to enable the present application to be better understood. However, those skilled in the art can easily recognize that some of the features can be omitted in different situations, or can be replaced by other elements, materials, and methods. In some cases, some operations related to the present application are not shown or described in the specification, in order to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and the related operations can be fully understood according to the description in the specification and the general technical knowledge in the art.
[0067] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0068] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0069] In the current technical solution, although the manufacturing process of each light source of the same type is the same, there will be certain differences. In the scenario where the requirements for the accuracy of the emitted brightness are not high, it can be considered that when each light source is driven separately based on the same driving parameters, the emitted brightness is consistent. However, in the scenario where the requirements for the accuracy of the emitted brightness are high, the requirement for consistent emitted brightness cannot be met. Similarly, this difference will also make the actual parameters of the light source inconsistent with its theoretical parameters. In the scenario where the requirements for the accuracy of the emitted brightness are not high, it can be considered that the driving parameters and the emitted brightness of the light source are linear, so the driving parameters can be linearly adjusted to linearly adjust the emitted brightness. However, in the scenario where the requirements for the accuracy of the emitted brightness are high, the accuracy requirements for controlling the emitted brightness cannot be met based on linear adjustment.
[0070] In some embodiments of the present application, the relationship between the optical power and the driving current of the light source is calibrated to obtain the optical power-current correspondence of the light source, and the optical power-current correspondence of the light source represents the mapping relationship between each driving current output to the light source and each optical power achieved by the light source when the light source is driven. When controlling the brightness of the light source, the target optical power that the light source needs to achieve is obtained, and based on the optical power-current correspondence, the target current corresponding to the target optical power is obtained from the target optical power, and then based on the driving current-driving parameter correspondence of the driving circuit, the target driving parameter corresponding to the target current is obtained from the target current, and finally the driving circuit is controlled to drive the light source based on the target driving parameter. Since the optical power-current correspondence is the mapping relationship between each driving current and each optical power when the light source is actually driven, the target current corresponding to the target optical power can be accurately obtained based on the optical power-current correspondence, and then the target driving parameter corresponding to the target current is obtained based on the target current, and the light source is driven, so that the optical power of the light source can be more accurately controlled, so that the light source reaches the expected brightness, and the accuracy of controlling the brightness of the light source is improved.
[0071] Some embodiments provide a light source driving device for driving a light source to emit light and accurately driving the light source to achieve a desired brightness. Figure 1 The light source driving device includes a driving circuit 10 and a processor 20, which are described in detail below.
[0072] The driving circuit 10 is used to output a corresponding driving current based on the configured driving parameters to drive the light source. In some embodiments, the driving circuit 10 includes a power supply and a pulse width modulation module.
[0073] The power supply is used to supply power to the light source driving device and to output a driving current for driving the light source. For example, a constant current power supply may be used to precisely control the brightness of the light source.
[0074] The pulse width modulation module is used to receive a pulse width modulation control signal and control the duty cycle of the power supply based on the pulse width modulation control signal. In some embodiments, the pulse width modulation control signal may be a PWM (Pulse Width Modulation) signal, and the duty cycle of the PWM signal may be used to control the power supply to output at a corresponding duty cycle, thereby adjusting the drive current output by the power supply.
[0075] In some embodiments, the drive circuit 10 may further include a digital potentiometer, which is connected in series with the power supply, and the digital potentiometer is used to receive a resistance control signal, and adjust its own resistance based on the resistance control signal to adjust the drive current output by the power supply. In some embodiments, the digital potentiometer can be directly connected in series with the power supply, or it can be connected in parallel with a protective resistor and then connected in series with the power supply, and the protective resistor can prevent abnormal output of the power supply when the digital potentiometer is abnormal. When the resistance of the digital potentiometer changes, the drive current changes accordingly due to the change in the resistance of the power supply in series.
[0076] For some examples, please refer to Figure 2 , which is a schematic diagram of a driving circuit 10, wherein a power supply (BT1) is connected in series with a digital potentiometer (RP) to drive a light source (LED), so controlling the resistance change of the digital potentiometer can control the change of the driving current output by the power supply, and a pulse width modulation module (PWM) is used to control the output duty cycle of the power supply, for example, the power supply outputs when the PWM signal is at a high level and cuts off the output when the PWM signal is at a low level, so controlling the output duty cycle of the power supply can also control the driving current output by the power supply.
[0077] In this embodiment, the driving circuit 10 includes a pulse width modulation module and a digital potentiometer, wherein the digital potentiometer can make a rough adjustment to the driving current output by the power supply based on the change of its own resistance value, that is, an adjustment with relatively low precision, while the pulse width modulation module can control the output duty cycle of the power supply, so that the driving current output by the power supply can be finely adjusted, that is, an adjustment with relatively high precision. Therefore, by making rough and fine adjustments based on the pulse width modulation module and the digital potentiometer, the control range and control precision of the driving current output by the power supply can be improved.
[0078] The processor 20 is used to control the driving circuit 10 and output a pulse width modulation control signal and a resistance control signal to the driving circuit 10 as driving parameters of the driving circuit 10, so that the driving circuit 10 outputs a corresponding driving current based on the driving parameters and drives the light source to emit light.
[0079] In some embodiments, the light source driving device may further include a memory, and the memory is used to store various data.
[0080] The above is some description of the light source driving device. The following is a specific description of the process of the light source driving device accurately controlling the brightness of the light source.
[0081] Before controlling the brightness of the light source, since there are differences between the actual parameters of the driven light source and the theoretical parameters, the light source needs to be calibrated, which is explained below.
[0082] In some embodiments, when calibrating the light source, a constant current adjustable current power supply can be selected to directly drive the light source, wherein the light source can be an LED, and then the driving current output to the light source can be detected based on an ammeter, and the optical power achieved by the light source can be detected based on an integrating sphere optical power meter. Specifically, the total optical power value corresponding to the light source can be recorded under different driving currents, and a mapping relationship can be formed. Finally, the various driving currents output to the light source and the various optical powers achieved by the light source are summarized and recorded to form an optical power-current correspondence relationship of the light source. At this time, the optical power and the driving current are discrete mapping relationships, for example, a mapping table can be formed for recording.
[0083] In some embodiments, when recording the mapping relationship between driving current and light power, the driving currents in the current that the light source can withstand can be evenly distributed from small to large, or they can be densely distributed in the smaller current part, the middle current part or the larger current part of the current that the light source can withstand, and the other parts of the current are relatively sparsely distributed according to actual conditions.
[0084] In some embodiments, during the process of calibrating the light source, it is also necessary to determine the maximum optical power that the light source can achieve, so as to determine the maximum brightness that the light source can achieve. For example, the maximum optical power that the light source can achieve corresponds to the maximum brightness of the light source.
[0085] Since the driving current output by the driving circuit 10 is also related to its own individual differences, there is also a difference between the theoretical driving current output and the actual driving current output of the driving circuit 10. Therefore, it is necessary to calibrate the driving circuit 10 to drive the light source, which is explained below.
[0086] In some embodiments, when calibrating the driving circuit 10, when the driving circuit 10 outputs the driving current, the driving current output by the driving circuit 10 can be detected based on an ammeter, and the driving parameters configured by the driving circuit 10 can be obtained, and then the driving current corresponding to the driving parameters can be recorded to form a mapping relationship.
[0087] In some embodiments, when the driving parameter includes a duty cycle corresponding to a pulse width modulation control signal, since the pulse width modulation control signal adjusts the driving current based on the duty cycle, the pulse width modulation control signal can be considered to be linearly modulated. In this case, the driving current corresponding to at least two pulse width modulation control signals under different duty cycles can be recorded, and then linear fitting can be performed to obtain a driving current-driving parameter correspondence of the driving circuit 10, for example, the correspondence is a linear function between the driving current and the duty cycle. In some embodiments, the at least two recorded pulse width modulation control signals include a maximum duty cycle and a minimum duty cycle, respectively.
[0088] In some embodiments, when the driving parameters include the duty cycle corresponding to the pulse width modulation control signal and the resistance value corresponding to the resistance value control signal, since the pulse width modulation control signal is linearly modulated, the driving current corresponding to the resistance value corresponding to each resistance value control signal under the pulse width modulation control signal with at least two different duty cycles can be recorded. For example, when the pulse width modulation control signal is controlled by the first duty cycle, the driving circuit 10 outputs different resistance value control signals so that the resistance value D of the digital potentiometer is p From minimum to maximum, the corresponding driving currents are recorded respectively, and a first corresponding relationship between driving current and driving parameter is obtained. And the driving circuit 10 records the resistance value D under the control of the pulse width modulation control signal with the second duty cycle. p The driving current corresponding to the minimum to the maximum is obtained, and the second corresponding relationship between the driving current and the driving parameter is obtained, so as to characterize the mapping relationship between each driving current and each driving parameter based on the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter. At this time, under a certain duty cycle, the driving current and the resistance value D p There is a discrete mapping relationship between them, for example, a mapping table can be formed to record, and in the determined resistance value D p In some embodiments, the first duty cycle is smaller than the second duty cycle, for example, the first duty cycle and the second duty cycle may correspond to a maximum duty cycle and a minimum duty cycle, respectively.
[0089] In the above embodiment, when the driving parameter includes a duty cycle and a resistance value, the mapping relationship between the driving parameter and the driving current is characterized based on at least a first corresponding relationship between the driving current and the driving parameter and a second corresponding relationship between the driving current and the driving parameter, each of which can characterize the driving current and the resistance value D. p A discrete mapping relationship between them can also characterize the linear relationship between the driving current and the duty cycle, thereby better characterizing the corresponding relationship between the driving parameters, the duty cycle and the resistance value.
[0090] In some embodiments, when the driving parameter includes a resistance value corresponding to the resistance control signal, when the driving circuit 10 outputs the driving current, the resistance value D corresponding to the resistance control signal is recorded. p The corresponding driving current from the minimum to the maximum is used to obtain the driving current-driving parameter correspondence of the driving circuit 10. At this time, the driving current and the resistance D p There is a discrete mapping relationship between them.
[0091] In some embodiments, the driving current of the driving circuit 10 to drive the light source can be expressed as the following formula:
[0092] I=K×W pwm +Δ drive +Δ led +δ Dp ;
[0093] Where I represents the driving current of the light source, W pwm is the duty cycle corresponding to the pulse width modulation control signal, K represents the coefficient, which is a constant, Δ drive represents the individual difference of the driving circuit 10, which is a constant value, Δ led Represents the individual difference of light sources, which is a constant value, δ Dp Indicates the resistance value D corresponding to the resistance control signal p .
[0094] In some embodiments, when individual differences of light sources are not considered, when calibrating the driving circuit 10, it is not necessary to bind the driving circuit 10 to the light source for calibration, and the pulse width modulation control signal and the resistance control signal of the driving circuit 10 can be directly calibrated. In some embodiments, when individual differences of light sources are considered, when calibrating the driving circuit 10, the driving circuit 10 can be bound to the light source for calibration, that is, when the driving circuit 10 drives the light source, the pulse width modulation control signal and the resistance control signal are calibrated.
[0095] In the above embodiment, since there are certain differences between the theoretical parameters and the actual parameters of the light source and the driving circuit 10, after calibrating the light source and the driving circuit 10, the actual light power-current correspondence of the light source and the actual driving current-driving parameter correspondence of the driving circuit 10 can be obtained, thereby avoiding errors caused by obtaining the driving current and driving parameters based on theoretical parameters.
[0096] The above is an explanation of the calibration process of the light source and the driving circuit 10 . The following is a detailed explanation of the process of controlling the brightness of the light source based on the calibration result.
[0097] The processor 20 obtains the target optical power that the light source needs to achieve.
[0098] In some embodiments, after determining the maximum brightness corresponding to the light source based on the maximum optical power that the light source can achieve, the user is allowed to set the light source based on the brightness, for example, setting the maximum brightness to L max , and the light source driver sets the brightness configuration value of the interface to N max ,When the user sets the brightness configuration value at the interface to n, the current target brightness L is obtained user =L max ×n / N max , then based on the target brightness L user With maximum brightness L max The ratio of the maximum optical power P max Get the target optical power L user , so that the ratio of the target light power to the maximum light power is the same as the ratio of the target brightness to the maximum brightness, that is, L user =P max ×L user / L max .
[0099] In some embodiments, the brightness configuration value may be continuous, and the user may set the desired brightness configuration value at will. The brightness configuration value may also be discrete, for example, a number of evenly distributed brightness configuration values may be configured, and the user may only discretely select the configured brightness configuration value. In this case, if the configured brightness configuration values are small, the driving parameters corresponding to each brightness configuration value may be mapped and stored, and when the user sets one of the brightness configuration values, the corresponding driving parameters may be directly searched and set.
[0100] The processor 20 obtains a corresponding relationship between the optical power and the current of the light source, and obtains a target current corresponding to the target optical power from the target optical power according to the corresponding relationship between the optical power and the current.
[0101] In some embodiments, since the optical power-current correspondence is a discrete mapping relationship between optical power and driving current, a fitting can be performed based on each driving current output to the light source and each optical power achieved by the light source to obtain a continuous mapping relationship between optical power and driving current. For example, a fitting can be performed based on a polynomial to obtain a functional relationship between driving current and optical power, and then the target current can be obtained from the target optical power based on the functional relationship. For example, Figure 3 As shown, each driving current is fitted with each optical power achieved by the light source to obtain a fitting curve, the horizontal axis of the fitting curve is the driving current (IF), and the vertical axis is the optical power, and then the target current is obtained from the target optical power based on the fitting curve.
[0102] In some embodiments, the target optical power may be first searched based on the optical power-current correspondence relationship. If the optical power-current correspondence relationship includes the target optical power, the target current corresponding to the target optical power may be directly searched based on the optical power-current correspondence relationship.
[0103] In some embodiments, if the optical power-current correspondence does not include the target optical power, the target current can be obtained based on linear interpolation. In some embodiments, the first optical power and the second optical power in the optical power-current correspondence are obtained, as well as the first current corresponding to the first optical power and the second current corresponding to the second optical power. Among them, the first optical power is less than the target optical power, and the second optical power is greater than the target optical power. Then, the first relationship between the target optical power and the first optical power and the second optical power is obtained, and the target current is obtained from the first current and the second current based on the first relationship, so that the target current satisfies the first current and the second current. In some embodiments, the first optical power and the second optical power are adjacent to the target optical power, respectively, and then the first ratio of the difference between the first optical power and the second optical power to the difference between the first optical power and the target optical power is obtained, and the target current is obtained from the first current and the second current based on the first ratio, so that the difference between the first current and the second current and the difference between the first current and the target current satisfy the first ratio, that is:
[0104]
[0105] Among them, I user Indicates the target current, I d Represents the first current, I u represents the second current, P(I d ) represents the first optical power, P(I u ) represents the second optical power, P user Indicates the target optical power.
[0106] In this embodiment, when the target optical power is not included in the optical power-current correspondence, linear interpolation is performed based on two optical powers adjacent to the target optical power, and a relatively accurate target current is obtained based on the first current and the second current.
[0107] The processor 20 obtains the target driving parameter corresponding to the target current from the target current according to the driving current-driving parameter correspondence relationship.
[0108] In some embodiments, if the target current is included in the first corresponding relationship between the driving current and the driving parameter, the third resistance corresponding to the resistance control signal corresponding to the target current is searched based on the first corresponding relationship between the driving current and the driving parameter, and the first duty cycle and the third resistance are used as the target driving parameter. In some embodiments, if the target current is included in the second corresponding relationship between the driving current and the driving parameter, the fourth resistance corresponding to the resistance control signal corresponding to the target current is searched based on the second corresponding relationship between the driving current and the driving parameter, and the second duty cycle and the fourth resistance are used as the target driving parameter.
[0109] In some embodiments, if the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter both include the target current, the second duty cycle and the fourth resistance value are used as the target driving parameters. Since the first duty cycle is smaller than the second duty cycle, the fourth resistance value is smaller than the third resistance value under the same driving current, and the digital potentiometer generates less heat under the fourth resistance value, the second duty cycle and the fourth resistance value are preferably used as the target driving parameters.
[0110] In some embodiments, if the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter do not include the target current, the third current closest to the target current in the first corresponding relationship between the driving current and the driving parameter and the first resistance corresponding to the third current are obtained, and according to the second corresponding relationship between the driving current and the driving parameter, the fourth current corresponding to the first resistance is obtained from the first resistance, and then the corresponding duty cycle is obtained by linear interpolation. For example, the second relationship between the target current and the third current and the fourth current is obtained, and the third duty cycle is obtained from the first duty cycle and the second duty cycle based on the second relationship, so that the third duty cycle satisfies the second relationship with the first duty cycle and the second duty cycle.
[0111] In the above embodiment, since the driving parameters include a duty cycle and a resistance value, and include a first corresponding relationship between a driving current and a driving parameter and a second corresponding relationship between a driving current and a driving parameter, the closest current and the corresponding resistance value are first determined based on the target current according to the first corresponding relationship between a driving current and a driving parameter, that is, the discretely distributed resistance value is first determined, and then the determined resistance value is linearly interpolated according to the first corresponding relationship between a driving current and a driving parameter and the second corresponding relationship between a driving current and a driving parameter to obtain the duty cycle corresponding to the determined resistance value, that is, the linearly distributed duty cycle is then determined, thereby obtaining the duty cycle and the resistance value respectively, and making the combination of the duty cycle and the resistance value relatively accurately meet the target current.
[0112] In some embodiments, a second ratio of the difference between the third current and the fourth current to the difference between the third current and the target current is obtained, and a third duty cycle is obtained from the first duty cycle and the second duty cycle based on the second ratio, so that the difference between the first duty cycle and the second duty cycle and the difference between the first duty cycle and the third duty cycle satisfy the second ratio, that is:
[0113]
[0114] Among them, D user Denotes the third duty cycle, D min represents the first duty cycle (eg, the minimum duty cycle), D max represents the second duty cycle (eg, the maximum duty cycle), Dp user Indicates the first resistance, I min (Dp user ) represents the third current, I max (Dp user ) represents the fourth current.
[0115] Then the third duty cycle and the first resistance value are used as target driving parameters.
[0116] In some embodiments, the third current is a current value that is greater than and closest to the target current in the first corresponding relationship between the driving current and the driving parameter, or is a current value that is less than and closest to the target current.
[0117] In some embodiments, the resistance value can also be first determined based on the second corresponding relationship between the driving current and the driving parameter, that is, a fifth current closest to the target current in the second corresponding relationship between the driving current and the driving parameter, and a second resistance value corresponding to the fifth current are obtained; according to the second corresponding relationship between the driving current and the driving parameter, a sixth current corresponding to the second resistance value is obtained from the second resistance value; a third relationship between the target current and the fifth current and the sixth current is obtained, and a fourth duty cycle is obtained from the first duty cycle and the second duty cycle based on the third relationship, so that the fourth duty cycle satisfies the third relationship with the first duty cycle and the second duty cycle; a third ratio of the difference between the fifth current and the sixth current to the difference between the fifth current and the target current is obtained, and a fourth duty cycle is obtained from the first duty cycle and the second duty cycle based on the third ratio, so that the difference between the first duty cycle and the second duty cycle and the difference between the first duty cycle and the fourth duty cycle satisfy the third ratio.
[0118] The fourth duty cycle and the second resistance value are used as target driving parameters.
[0119] In some embodiments, the fifth current is a current value that is greater than and closest to the target current in the second corresponding relationship between the driving current and the driving parameter, or is a current value that is less than and closest to the target current.
[0120] In some embodiments, since the first duty cycle is smaller than the second duty cycle, under the same driving current, the second resistance is preferentially determined based on the second corresponding relationship between driving current and driving parameter, and the fourth duty cycle and the second resistance are preferentially used as target driving parameters.
[0121] The above are some descriptions of how the light source driving device obtains driving parameters.
[0122] In some embodiments, a single light source can be driven based on the light source driving device of the above embodiment to accurately control the brightness of the single light source. In some embodiments, multiple light sources can also be driven separately based on multiple light source driving devices of the above embodiment to make the brightness of multiple light sources consistent, for example, the target light power required to be achieved by each light source is set to be consistent, and then the driving current and driving parameters corresponding to the target light power are obtained based on the light source driving device corresponding to each light source.
[0123] In some embodiments, when controlling the brightness of a light source, factors affecting its accuracy include the difference between the actual parameters of the light source and the theoretical parameters, and the difference between the actual parameters of the driving circuit 10 and the theoretical parameters. Therefore, the control accuracy of the brightness of the light source can be improved by reducing at least one of them.
[0124] In some embodiments, only the difference between the actual parameters of the light source and the theoretical parameters can be reduced, thereby improving the control accuracy of the brightness of the light source. For example, the light source can obtain the calibrated optical power-current correspondence based on the above embodiment. The driving circuit 10 can be set based on its theoretical parameters, for example, the driving current-driving parameter correspondence is obtained based on the theoretical parameters.
[0125] In some embodiments, only the difference between the actual parameters and the theoretical parameters of the driving circuit 10 can be reduced, thereby improving the control accuracy of the brightness of the light source. For example, the light source can obtain the optical power-current correspondence based on the theoretical parameters. The driving circuit 10 can obtain the driving current-driving parameter correspondence after calibration in the above embodiment.
[0126] In some embodiments, when the calibrated optical power-current correspondence and driving current-driving parameter correspondence of the above embodiments are respectively obtained, the control accuracy of the brightness of the light source can be better improved.
[0127] Some embodiments provide a method for controlling the brightness of a light source, which can be applied to the above-mentioned light source driving device. Figure 4 , the method comprises the following steps:
[0128] Step 100: Obtain the target optical power that the light source needs to achieve.
[0129] Step 110: Obtain the optical power-current correspondence relationship of the light source, and obtain a target current corresponding to the target optical power from the target optical power.
[0130] Step 120: Acquire a driving current-driving parameter correspondence relationship of the driving circuit, and obtain a target driving parameter corresponding to the target current from the target current.
[0131] In some embodiments, the optical power-current correspondence relationship is used to characterize the mapping relationship between each driving current output to the light source and each optical power achieved by the light source when the light source is driven.
[0132] In some embodiments, the driving current-driving parameter correspondence relationship is used to characterize the mapping relationship between each driving current outputted by the driving circuit and each driving parameter configured by the driving circuit when the driving circuit outputs the driving current.
[0133] Some embodiments provide a computer program product, including a computer program and / or instructions, wherein the computer program and / or instructions implement the above-mentioned method for controlling the brightness of a light source when executed by a processor.
[0134] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0135] The above specific examples are used to illustrate the present application, which is only used to help understand the present application and is not intended to limit the present application. For technicians in the technical field to which the present application belongs, they can also make some simple deductions, deformations or substitutions based on the ideas of the present application.
Claims
1. A method for controlling the brightness of a light source, characterized in that: include: Obtain the target optical power that the light source needs to achieve; Obtaining a corresponding relationship between the optical power and the current of the light source; wherein the corresponding relationship between the optical power and the current is used to characterize the mapping relationship between each driving current output to the light source and each optical power achieved by the light source when the light source is driven; According to the optical power-current correspondence relationship, a target current corresponding to the target optical power is obtained from the target optical power; Acquiring a driving current-driving parameter correspondence relationship of a driving circuit; wherein the driving current-driving parameter correspondence relationship is used to characterize a mapping relationship between a driving current output by the driving circuit and a driving parameter configured by the driving circuit; According to the driving current-driving parameter correspondence relationship, a target driving parameter corresponding to the target current is obtained from the target current, so as to control the driving circuit to drive the light source based on the target driving parameter.
2. The method for controlling the brightness of a light source according to claim 1, characterized in that: The step of obtaining a target current corresponding to the target optical power from the target optical power according to the optical power-current correspondence relationship includes: Performing polynomial fitting based on each driving current output to the light source and each optical power achieved by the light source to obtain a functional relationship between the driving current and the optical power, and obtaining the target current from the target optical power based on the functional relationship; or, If the optical power-current correspondence includes the target optical power, searching for a target current corresponding to the target optical power based on the optical power-current correspondence; or, If the optical power-current correspondence does not include the target optical power, then obtaining the first optical power and the second optical power in the optical power-current correspondence, as well as the first current corresponding to the first optical power and the second current corresponding to the second optical power; wherein the first optical power is less than the target optical power, and the second optical power is greater than the target optical power; A first relationship between the target optical power and the first optical power and the second optical power is acquired, and the target current is obtained from the first current and the second current based on the first relationship, so that the target current and the first current and the second current satisfy the first relationship.
3. The method for controlling the brightness of a light source as claimed in claim 2, characterized in that: The acquiring a first relationship between the target optical power and the first optical power and the second optical power, and obtaining the target current from the first current and the second current based on the first relationship, comprises: Obtain a first ratio of the difference between the first optical power and the second optical power to the difference between the first optical power and the target optical power, and obtain the target current from the first current and the second current based on the first ratio, so that the difference between the first current and the second current and the difference between the first current and the target current satisfy the first ratio; wherein the first optical power and the second optical power are adjacent to the target optical power, respectively.
4. The method for controlling the brightness of a light source according to claim 1, wherein: Obtain the target optical power that the light source needs to achieve, including: Determine the maximum brightness corresponding to the light source based on the maximum optical power that the light source can achieve; The target brightness that the light source needs to achieve is obtained, and the target optical power is obtained from the maximum optical power based on the ratio of the target brightness to the maximum brightness, so that the ratio of the target optical power to the maximum optical power is the same as the ratio of the target brightness to the maximum brightness.
5. The method for controlling the brightness of a light source according to claim 1, wherein: The driving circuit includes a power supply, a pulse width modulation module and a digital potentiometer; The power supply is used to output a driving current; The pulse width modulation module is used to receive a pulse width modulation control signal and control the duty cycle of the power supply based on the pulse width modulation control signal; The digital potentiometer is connected in series with the power supply, and the digital potentiometer is used to receive a resistance control signal and adjust its own resistance based on the resistance control signal to adjust the driving current output by the power supply; The driving parameters include a duty cycle of the pulse width modulation control signal and a resistance value corresponding to a resistance control signal.
6. The method for controlling the brightness of a light source according to claim 5, characterized in that: The driving current-driving parameter correspondence relationship includes a driving current-driving parameter first correspondence relationship and a driving current-driving parameter second correspondence relationship; The first corresponding relationship between the driving current and the driving parameter is used to characterize the mapping relationship between each driving current output by the driving circuit and the resistance corresponding to each resistance control signal under the control of the pulse width modulation control signal having the first duty cycle; The second corresponding relationship between the driving current and the driving parameter is used to characterize the mapping relationship between each driving current output by the driving circuit and the resistance corresponding to each resistance control signal under the control of the pulse width modulation control signal as the second duty cycle; wherein the first duty cycle is smaller than the second duty cycle.
7. The method for controlling the brightness of a light source according to claim 6, wherein: The step of obtaining a target driving parameter corresponding to the target current from the target current according to the driving current-driving parameter correspondence relationship includes: If the target current is not included in the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter, a third current closest to the target current in the first corresponding relationship between the driving current and the driving parameter and a first resistance value corresponding to the third current are obtained; and according to the second corresponding relationship between the driving current and the driving parameter, a fourth current corresponding to the first resistance value is obtained from the first resistance value; Acquire a second relationship between the target current and the third current and the fourth current, and obtain a third duty cycle from the first duty cycle and the second duty cycle based on the second relationship, so that the third duty cycle satisfies the second relationship with the first duty cycle and the second duty cycle; The third duty cycle and the first resistance value are used as the target driving parameters; or, If the target current is not included in the first corresponding relationship between the driving current and the driving parameter and the second corresponding relationship between the driving current and the driving parameter, a fifth current closest to the target current in the second corresponding relationship between the driving current and the driving parameter and a second resistance value corresponding to the fifth current are obtained; and according to the second corresponding relationship between the driving current and the driving parameter, a sixth current corresponding to the second resistance value is obtained from the second resistance value; Acquire a third relationship between the target current and the fifth current and the sixth current, and obtain a fourth duty cycle from the first duty cycle and the second duty cycle based on the third relationship, so that the fourth duty cycle satisfies the third relationship with the first duty cycle and the second duty cycle; and using the fourth duty cycle and the second resistance as the target driving parameters; or, If the first corresponding relationship between the driving current and the driving parameter includes the target current, searching for a third resistance value corresponding to the resistance control signal corresponding to the target current based on the first corresponding relationship between the driving current and the driving parameter, and using the first duty cycle and the third resistance value as the target driving parameter; or, If the second corresponding relationship between driving current and driving parameter includes the target current, the fourth resistance corresponding to the resistance control signal corresponding to the target current is searched based on the second corresponding relationship between driving current and driving parameter, and the second duty cycle and the fourth resistance are used as the target driving parameter.
8. The method for controlling the brightness of a light source as claimed in claim 7, characterized in that: The acquiring a second relationship between the target current and the third current and the fourth current, and obtaining a third duty cycle from the first duty cycle and the second duty cycle based on the second relationship, comprises: acquiring a second ratio of a difference between the third current and the fourth current to a difference between the third current and the target current, and obtaining the third duty cycle from the first duty cycle and the second duty cycle based on the second ratio, so that a difference between the first duty cycle and the second duty cycle and a difference between the first duty cycle and the third duty cycle satisfy the second ratio; or, The acquiring a third relationship between the target current and the fifth current and the sixth current, and obtaining a fourth duty cycle from the first duty cycle and the second duty cycle based on the third relationship, comprises: Obtain a third ratio of the difference between the fifth current and the sixth current to the difference between the fifth current and the target current, and obtain the fourth duty cycle from the first duty cycle and the second duty cycle based on the third ratio, so that the difference between the first duty cycle and the second duty cycle and the difference between the first duty cycle and the fourth duty cycle satisfy the third ratio.
9. The method for controlling the brightness of a light source according to claim 7, characterized in that: The third current is a current value greater than and closest to the target current in the first corresponding relationship between the drive current and the drive parameter; or, the third current is a current value less than and closest to the target current in the first corresponding relationship between the drive current and the drive parameter; Alternatively, the fifth current is a current value greater than and closest to the target current in the second corresponding relationship between the driving current and the driving parameter; Alternatively, the fifth current is a current value that is smaller than and closest to the target current in the second corresponding relationship between the driving current and the driving parameter.
10. The method for controlling the brightness of a light source according to claim 6, wherein: The first duty cycle is a minimum duty cycle corresponding to the pulse width modulation control signal; and / or the second duty cycle is a maximum duty cycle corresponding to the pulse width modulation control signal.
11. A method for controlling the brightness of a light source, characterized in that: include: Obtain the target optical power that the light source needs to achieve; Obtaining a corresponding relationship between the optical power and the current of the light source; wherein the corresponding relationship between the optical power and the current is used to characterize a mapping relationship between the driving current output to the light source and the optical power achieved by the light source; According to the optical power-current correspondence relationship, a target current corresponding to the target optical power is obtained from the target optical power; Acquiring a driving current-driving parameter correspondence relationship of the driving circuit; wherein the driving current-driving parameter correspondence relationship is used to characterize a mapping relationship between each driving current outputted by the driving circuit and each driving parameter configured by the driving circuit when the driving circuit outputs the driving current; According to the driving current-driving parameter correspondence relationship, a target driving parameter corresponding to the target current is obtained from the target current, so as to control the driving circuit to drive the light source based on the target driving parameter.
12. A light source driving device, characterized in that: include: A driving circuit, used to output a corresponding driving current based on the configured driving parameters, so as to drive the light source; A processor, configured to implement the method according to any one of claims 1 to 11 when executing a program.
13. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.