Summary of the invention
The utility model is at above-mentioned prior art problems, provide a kind of RGB chatoyancy LED lamp automatic prover, the Control Parameter of its automatically setting each RGB chatoyancy LED lamp under different light illumination modes, and the LED lamp is regulated calibration by this Control Parameter, make different RGB chatoyancy LED lamps under identical color lighting pattern, present identical color.
The technical solution of the utility model is achieved in that
The automatic prover of a kind of RGB chatoyancy LED lamp, this prover comprises:
Be used to provide the power supply of electric energy;
Be used to obtain the actual light intensity of LED lamp RGB and convert thereof into the color sensor of frequency with the pulse of light intensity variation;
Be used to set the color of LED lamp RGB and the keyboard that light illumination mode switches;
Be used to preserve the memory of the RGB color settings value under each light illumination mode;
The display screen that is used for the RGB color of display setting and the RGB color that actual measurement obtains;
Be used for the central processor unit that data processing, instruction are carried out, be mounted with the Control Software that is used to obtain regulate accordingly the Control Parameter of RGB color on the central processor unit;
The communication interface that is used for transmission of data signals, communication interface connects the LED lamp controller;
Central processor unit is connected with described power supply, color sensor, keyboard, memory, display screen, communication interface respectively.
In order to regulate more easily to the LED lamp, as preferably, this prover includes two communication interfaces, one of them communication interface connects the LED lamp controller, another communication interface is connected with a host computer, is mounted with the Control Software that is used to obtain regulate accordingly the Control Parameter of RGB color on host computer equally.Store the RGB color settings value under each pattern on the host computer equally, thus also can come operation calibration LED lamp by host computer, more convenient reliable.
As preferably, described host computer is a computer
As preferably, described communication interface is a serial ports.
As preferably, described memory is EEPROM.
As preferably, described display screen is LCD.
Adopted the beneficial effect that the utlity model has of technique scheme to be: this prover is simple in structure, economical and practical, can make amendment and set the color of RGB chatoyancy LED lamp easily by Control Software, make under identical color lighting pattern and present identical color, make RGB chatoyancy LED lamp ex factory pass rate improve greatly, the user can obtain good illumination change effect.
Embodiment
Embodiment of the present utility model is as follows:
Embodiment: the automatic prover of a kind of RGB chatoyancy LED lamp, as shown in Figure 1, this prover comprises power supply 3, color sensor 4, keyboard 2, memory 8, display screen 5, communication interface, central processor unit 1, burning is useful on the Control Software of the Control Parameter that obtains the corresponding RGB of adjusting color on the central processor unit 1, and central processor unit 1 connects power supply 3, color sensor 4, keyboard 2, memory 8, display screen 5 and communication interface respectively; This prover comprises two communication interfaces usually, and communication interface all adopts serial ports, when prover uses separately, only uses a communication interface, and this communication interface connects the LED lamp controller, but the independent operation prover is calibrated; When using two communication interfaces, one of them communication interface connects the LED lamp controller, another communication interface is connected with host computer, on host computer, be mounted with the Control Software that is used to obtain regulate accordingly the Control Parameter of RGB color equally, Control Software stores the RGB color settings value under each pattern, so also can come operation calibration LED lamp by host computer, more intuitively convenient, improved efficient; Usually, host computer adopts computer, can calibrate by the operational computations machine, and is comparatively convenient and swift.
In the present embodiment, this prover includes two communication interfaces, is respectively serial ports 7 and serial ports 6, and display screen 5 adopts LCD, and memory adopts EEPEOM (EEPROM (Electrically Erasable Programmable Read Only Memo)); Wherein, color sensor 4 connects the RGB chatoyancy LED lamp, is used to obtain the actual light intensity of LED lamp RGB and converts thereof into the pulse that frequency changes with light intensity, and pulse is passed to central processor unit 1; Keyboard 2 is used to set the color of LED lamp RGB and the switching of the various light illumination modes of this prover; Memory 8 is used to preserve the RGB color settings value under each light illumination mode; Display screen 5 is used for the RGB color of display setting and the RGB color that actual measurement obtains; Control Software is used for set point and measured value are compared and obtain to regulate accordingly the Control Parameter of RGB color; Serial ports 7 connects host computer, and PC control software can be given central processor unit 1 with the RGB color settings value under each pattern by serial ports 7; Another serial ports 6 connects the LED lamp controller, is used for the Control Parameter of regulating the RGB color is exported to the RGB chatoyancy LED lamp.
The process of using above-mentioned prover to calibrate includes following steps:
(1), from host computer or memory, reads RGB color settings value;
(2), open the LED lamp, and use color sensor 4 to obtain the RGB color actual measured value;
(3), Control Software compares color settings value and actual measured value, according to set point and deviation of measuring value,, use pid control algorithm to calculate by central processor unit 1, obtain to be used to accordingly regulate the Control Parameter of RGB color;
(4), central processor unit 1 is sent to the LED lamp controller with above-mentioned Control Parameter by serial ports 6, is responsible for execution by the LED lamp controller;
(5), repeat above-mentioned steps,, make that finally the RGB set point under every kind of light illumination mode is consistent with actual measured value through constantly adjusting.
Be illustrated in figure 2 as the physical circuit syndeton of color sensor 4, U2 is the conversion chip of light intensity to frequency, be used to obtain the actual light intensity of LED lamp RGB and convert thereof into the pulse that frequency changes with light intensity, U1 is a chip for driving, J1 is a connector, is used to connect central processor unit 1 and color sensor 4; By the signal that is connected S2 pin and S3 pin that central processor unit 1 is sent here, select the rgb filter of U2 chip internal; The gain multiple of the signal controlling output frequency of bringing by central processor unit 1 that is connected S0 pin and S1 pin, and give central processor unit with pulse signal.
Be illustrated in figure 3 as the example that keyboard is realized, when key was not pressed, the signal of exporting to central processor unit was high level by drawing on the corresponding resistor.When key was pressed, corresponding output was dragged down.Central processor unit knows that by scanning that key presses.With KEY_S1 is example, and when key was not pressed, the P0_5 signal of exporting to central processor unit 1 was a high level by drawing acquisition on the R1; When key was pressed, the P0_5 signal of exporting to central processor unit was pulled to ground, and acquisition is a low level signal.
Be illustrated in figure 4 as an example of present embodiment display screen 5 Display Realization, by regulating the control of slide rheostat W1 realization to the LCD backlight illumination, R33 and C24 realize the electrification reset to LCD, and the control line of LCD links to each other with central processor unit 1 with data wire.
Be illustrated in figure 5 as the example that memory is realized, chip U4 is an IIC type eeprom chip, by using pull-up resistor R10 and R11, the iic bus of chip U4 and the iic bus of central processor unit 1 is linked to each other.
As shown in Figure 6, it is the example that serial ports 6 and serial ports 7 are realized, chip U7 is the RS232 interface chip, Transistor-Transistor Logic level partly is that 9,10,11 of chip U7 partly links to each other with central processor unit 1 corresponding serial ports with 12 pin, and the RS232 level partly is that 7,8,13 of chip U7 links to each other with host computer and RGB chatoyancy LED lamp controller with 14 pin.
As shown in Figure 7, be the example that central processor unit 1 is realized, U1 is embedded central processing unit, adopts philips LPC2138 chip, chip U3 is a monitoring chip, can realize the electrification reset to embedded central processing unit U1.Capacitor C 18, capacitor C 19 and crystal oscillator Y1 provide crystal oscillator for U1.
Be illustrated in figure 8 as the flow chart of the automatic prover Control Software of RGB chatoyancy LED lamp main program in the present embodiment, its process is as described below:
Step 801 enters the initial state of system works;
Step 802 is carried out necessary initialization to system;
Step 803 is read R, G under each light illumination mode, the B color is provided with data, promptly reads the color settings value from EEPROM;
Step 804 connects host computer, sees whether host computer has the new data down transmission that is provided with, if having, changes step 805 and handles, and does not have, and goes step 806;
Step 805, R, G, B color that the reception host computer transmits are provided with data, go step 807 after handling;
Step 806, judge to wait for host computer whether data time is set overtime, if, change step 807, if do not have overtimely, jump to step 804;
Step 807, keyboard scan;
Step 808 has judged whether that key presses, if, change step 809, if there is not key to press, changes step 807 and handle;
Step 809, button is handled, and changes step 807 after finishing dealing with.
As shown in Figure 9, be the output signal that central processor unit receives color sensor, adopt the flow chart of capture interrupt handling procedure, detailed process is as described below:
Step 901 reads the value of catching, and the interruption times count value adds 1;
Step 902 judges whether the interruption times count value is 1, if, to change step 904 and handle, words that no are changeed step 903 and are handled;
Step 903 is obtained current value of catching and the difference of the value of catching for the first time, judges difference whether greater than the setting-up time of timer, if, to change step 905 and handle, words that no are changeed step 912 processing;
Step 904 is established the current value of catching and is the value of the catching first time, changes step 912 and handles;
Step 905, according to the number of times of capture interrupt and the current value of catching and for the first time the difference of the value of catching calculate the measured value of RGB color respective frequencies, calculate the error of measured value and set point, refresh the measured value that LCD shows simultaneously, the reset interrupt count value;
Whether step 906 judges error between color measured values and the set point less than certain threshold value, if, to change step 907 and handle, words that no are changeed step 911;
Step 907 judges whether the calibration under all patterns finishes, if, to change step 908 and handle, words that no are changeed step 910;
Step 908, all model calibrations of prompting finish in the LCD demonstration;
Step 909 is closed and is interrupted, and prevents to enter once more capture interrupt, returns main program;
Step 910, pattern adds 1, changes the RGB set point and be the set point under the present mode, promptly changes among Fig. 8 the data that are provided with in the step 803;
Step 911 is carried out the PID computing to the error between measured value and the set point, and the output controlled quentity controlled variable is Control Parameter is given the RGB chatoyancy LED lamp by serial ports a controller;
Step 912, clear interrupt identification returns.
Above-mentioned is an optimum implementation of the present utility model, and all distortion that those of ordinary skill in the art can directly derive or associate from the disclosed content of the utility model all should be thought protection range of the present utility model.