Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, the technical solution provided by the present invention is:
a lighting dimming control method, comprising the steps of:
s1, collecting input voltage of a lamp end, and recording the change condition of the input voltage;
step S2, when the collected input voltage is reduced from a first voltage value to a second voltage value, marking the current moment as a first moment; when the collected input voltage rises from the second voltage value to a third voltage value, marking the current moment as a second moment; when the collected input voltage is reduced to a fourth voltage value from a third voltage value, marking the current moment as a third moment; the absolute value of the first voltage value is greater than the absolute value of a second voltage value, and the absolute value of the second voltage value is greater than the absolute value of a third voltage value;
step S3, determining whether a time difference between the first time and the second time is equal to a preset first time difference and whether a time difference between the second time and the third time is equal to a preset second time difference;
and step S4, if yes, controlling the lamp end to enter a dimming mode.
From the above description, the beneficial effects of the present invention are:
the invention provides a lighting dimming control method, which comprises the steps of collecting input voltage of a lamp end, recording the change condition of the input voltage, marking corresponding time according to the condition that the collected input voltage falls and rises, and controlling whether the lamp end enters a dimming mode by judging whether the time difference between the first time and the second time is equal to a preset first time difference and whether the time difference between the second time and the third time is equal to a preset second time difference, so that the accurate control of the brightness of a direct-current lighting power distribution loop can be realized, the problem of inconsistent brightness caused by inconsistent input voltage of the lamp end due to voltage drop of a bus line can be effectively avoided, the display brightness of the lamp end is improved, and the high-precision dimming is realized.
Further, step S4 is specifically:
if the time difference value between the first moment and the second moment is equal to a preset first time difference value, and the time difference value between the second moment and the third moment is equal to a preset second time difference value;
continuing to acquire the input voltage of the lamp end and recording the change condition of the input voltage;
when the situation that the input voltage rises from a fourth voltage value to a fifth voltage value is collected, recording the current moment and marking the moment as a fourth moment; the absolute value of the fifth voltage value is greater than the absolute value of the fourth voltage value;
obtaining a parameter value of the lamp end needing dimming according to a time difference value between the third moment and the fourth moment and a preset dimming function;
and controlling the lamp end to adjust the light according to the parameter value.
According to the above description, after the lamp end is judged to need dimming, the lamp end is controlled to enter the dimming mode, the input voltage of the lamp end is continuously collected, the change condition of the input voltage is recorded, and the parameter value of the lamp end needing dimming is obtained through the time difference between the third moment and the fourth moment and the preset dimming function, so that the dimming parameter with higher precision can be obtained, the lamp end can be controlled more accurately to dim, the display brightness of the lamp end is improved, and the dimming with higher precision is realized.
Further, the method also comprises the following steps:
marking a time difference value between the third time and the fourth time as a third time difference value;
and if the first time difference value is equal to the second time difference value, setting the dimming function to be one tenth of the difference value between the third time difference value and the first time difference value.
According to the description, the specific dimming parameter value of the lamp end can be accurately obtained through the steps, so that the lamp end can be accurately controlled to dim, the display brightness of the lamp end is improved, and high-precision dimming is realized.
Further, the method also comprises the following steps:
marking a time difference value between the third time and the fourth time as a third time difference value;
and if the first time difference value is larger than the second time difference value and the first time difference value is twice as large as the second time difference value, setting the dimming function to be equal to a third time difference value.
As can be seen from the above description, through the above steps, not only can the specific dimming parameter value of the lamp end be accurately obtained, so that the lamp end can be more accurately controlled to dim, but also the color temperature of the lamp end can be adjusted through the implementation manner of the step.
Further, the first voltage value and the third voltage value have the same voltage value, and the second voltage value is equal to the fourth voltage value.
Further, the voltage difference value between the first voltage value and the second voltage value is greater than or equal to 10V.
As can be seen from the above description, the voltage difference between the first voltage value and the second voltage value is greater than or equal to 10V, so that the problem that the voltage value is reduced but fluctuates only slightly at a certain time can be avoided, and the precision of dimming can be further improved.
Referring to fig. 1, a first embodiment of the present invention is:
referring to fig. 1, a lighting dimming control method includes the following steps:
s1, collecting input voltage of a lamp end, and recording the change condition of the input voltage;
step S2, when the collected input voltage is reduced from a first voltage value to a second voltage value, marking the current moment as a first moment; when the collected input voltage rises from the second voltage value to a third voltage value, marking the current moment as a second moment; when the collected input voltage is reduced to a fourth voltage value from a third voltage value, marking the current moment as a third moment; the absolute value of the first voltage value is greater than the absolute value of a second voltage value, and the absolute value of the second voltage value is greater than the absolute value of a third voltage value;
the first voltage value and the third voltage value are equal in voltage value, and the second voltage value is equal to the fourth voltage value.
The voltage difference value between the first voltage value and the second voltage value is greater than or equal to 10V;
step S3, determining whether a time difference between the first time and the second time is equal to a preset first time difference and whether a time difference between the second time and the third time is equal to a preset second time difference;
and step S4, if yes, controlling the lamp end to enter a dimming mode.
Step S4 specifically includes:
if the time difference value between the first moment and the second moment is equal to a preset first time difference value, and the time difference value between the second moment and the third moment is equal to a preset second time difference value;
continuing to acquire the input voltage of the lamp end and recording the change condition of the input voltage;
when the situation that the input voltage rises from a fourth voltage value to a fifth voltage value is collected, recording the current moment and marking the moment as a fourth moment; the absolute value of the fifth voltage value is greater than the absolute value of the fourth voltage value;
obtaining a parameter value of the lamp end needing dimming according to a time difference value between the third moment and the fourth moment and a preset dimming function;
and controlling the lamp end to adjust the light according to the parameter value.
Further comprising the steps of:
marking a time difference value between the third time and the fourth time as a third time difference value;
and if the first time difference value is equal to the second time difference value, setting the dimming function to be one tenth of the difference value between the third time difference value and the first time difference value.
Referring to fig. 2, the above steps are specifically implemented as follows (V1 represents a first voltage value, V2 represents a second voltage value, V3 represents a third voltage value, V4 represents a fourth voltage value, and V5 represents a fourth voltage value, assuming that the voltage value of the power supply terminal is DC 200V-300V):
firstly, collecting input voltage of a lamp end, and recording the change condition of the input voltage;
when the collected input voltage is decreased from V1 to V2 (assuming that V1 is 280V and V2 is 200V at this time), marking the current time as a first time (denoted by T1); when the collected input voltage rises from V2 to V3 (assuming that V2 is 200V and V3 is 280V at this time), marking the current time as a second time (denoted by T2); when the collected input voltage is decreased from V3 to V4 (assuming that V3 is 280V and V4 is 200V at this time), marking the current time as a third time (denoted by T3);
let the first time difference be 500ms, and the second time difference be 500 ms;
if T2-T1 is 500ms, and T3-T2 is 500ms, controlling the lamp end to enter a dimming mode, and indicating that the lamp end needs to be dimmed;
fourthly, continuously collecting the input voltage of the lamp end, and recording the change condition of the input voltage;
when the input voltage is collected to rise from V4 to V5, recording the current time and marking the current time as a fourth time (represented by T4);
sixthly, assuming that the time difference between the third time and the fourth time is 600ms, namely T4-T3 is 600 ms;
when the first time difference is equal to the second time difference, the corresponding preset dimming function is Y equal to 500+10X, where Y is a dependent variable and X is an independent variable, and represents the corresponding dimming proportion, and 600ms is substituted into Y equal to 500+10X to obtain X equal to 10, that is, it can be known that the luminance to be adjusted at the lamp end is 10%.
The second embodiment of the invention is as follows:
the difference between the second embodiment and the first embodiment is: further comprising the steps of:
marking a time difference value between the third time and the fourth time as a third time difference value;
and if the first time difference value is larger than the second time difference value and the first time difference value is twice as large as the second time difference value, setting the dimming function to be equal to a third time difference value.
Referring to fig. 3, the above steps are specifically implemented as follows (V1 represents a first voltage value, V2 represents a second voltage value, V3 represents a third voltage value, V4 represents a fourth voltage value, and V5 represents a fourth voltage value, assuming that the voltage value of the power supply terminal is DC 200V-300V):
firstly, collecting input voltage of a lamp end, and recording the change condition of the input voltage;
when the collected input voltage is decreased from V1 to V2 (assuming that V1 is 280V and V2 is 200V at this time), marking the current time as a first time (denoted by T1); when the collected input voltage rises from V2 to V3 (assuming that V2 is 200V and V3 is 280V at this time), marking the current time as a second time (denoted by T2); when the collected input voltage is decreased from V3 to V4 (assuming that V3 is 280V and V4 is 200V at this time), marking the current time as a third time (denoted by T3);
let the first time difference be 1000ms and the second time difference be 500 ms;
if T2-T1 is 1000ms, and T3-T2 is 500ms, controlling the lamp end to enter a dimming mode, which indicates that the lamp end needs to be dimmed;
fourthly, continuously collecting the input voltage of the lamp end, and recording the change condition of the input voltage;
when the input voltage is collected to rise from V4 to V5, recording the current time and marking the current time as a fourth time (represented by T4);
sixthly, assuming that the time difference between the third time and the fourth time is 600ms, namely T4-T3 is 600 ms;
when the first time difference value is greater than the second time difference value and the first time difference value is twice as large as the second time difference value, the corresponding preset dimming function is Y-X, wherein Y is a dependent variable and X is an independent variable, and 600ms is substituted into Y-X to obtain X-600;
in this embodiment, a color temperature value corresponding to a lamp end is obtained through an obtained X value, and a preset mapping table is used, where two or more color temperature values and an X value corresponding to each color temperature value are stored in the mapping table, for example, the color temperature value is 3000K, and X is 500 ms; the color temperature value is 4000K, and X is 600 ms; the color temperature value is 5000K, and X is 700 ms; the color temperature value is 6000K, and X is 800 ms; in practical application, the error range of the X value is-50 ms to 50 ms; therefore, when X is 600, the color temperature value corresponding to the lamp end is 4000K.
In summary, according to the lighting dimming control method provided by the present invention, by acquiring the input voltage at the lamp end, recording the change condition of the input voltage, marking the corresponding time according to the decrease and increase condition of the acquired input voltage, and controlling whether the lamp end enters the dimming mode by determining whether the time difference between the first time and the second time is equal to the preset first time difference and whether the time difference between the second time and the third time is equal to the preset second time difference, the brightness of the dc lighting power distribution loop can be accurately controlled, and the problem of inconsistent brightness due to inconsistent input voltage at the lamp end caused by the voltage drop of the bus line can be effectively avoided, so as to improve the display brightness at the lamp end, thereby realizing higher-precision dimming.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.