A kind of light autocontrol method of light-operated bulb lamp
Technical field
The present invention relates to technical field of LED illumination, refer in particular to the light autocontrol method of a kind of light-operated bulb lamp.
Background technology
Smart Home is with house for platform, utilize comprehensive wiring technology, the network communications technology, automatic control technology by integrated for facility relevant for life staying idle at home, build the management system of efficient housing facilities and family's schedule affairs, promote house security, convenience, comfortableness, artistry, and realize the living environment of environmental protection and energy saving.Wherein, light-operated lamp is possible not only to build good luminous environment, it is also possible to save the energy.Light-operated lamp is that the intensity by ambient carrys out control circuit break-make, to realize the open and close of light source, is widely used in controlling various occasion, has simple and practical feature.Energy saving type LED lamp of the prior art itself does not have illuminance detection function, light controlling device is connected outside needing, it is closed and opens and is required for manual operation, particularly in public arena adopts LED, although there is certain energy-saving effect, but its operation can be wasted substantial amounts of human and material resources, control mode is simple and falls behind, and operator because of the inaccuracy of time grasp, can cause shifting to an earlier date or late of the times such as open and close, wastes electric energy and the life to people is made troubles.
Summary of the invention
The present invention is directed to problem of the prior art and the light autocontrol method of a kind of light-operated bulb lamp is provided, it is not necessary to Artificial Control, himself directly can turn off or on according to the illumination of local environment.
In order to solve above-mentioned technical problem, the present invention adopts the following technical scheme that
A kind of light autocontrol method of light-operated bulb lamp, described light-operated bulb lamp is built-in with illumination detecting element and MCU single-chip microcomputer, and light autocontrol method comprises the following steps:
Step 1, light-operated bulb lamp when closed, detect the brightness value AD in illumination place, place by described illumination detecting element;
Step 2, MCU single-chip microcomputer obtain brightness value AD, and union analyzes the difference between the adjacent brightness value AD of N continuous;
Step 3, MCU single-chip microcomputer compare difference and conversion threshold values, control light and open and close.
Further, MCU single-chip microcomputer is set with and controls conversion threshold values X and the conversion threshold values Y that light opens and closes, and conversion threshold values Y is more than conversion threshold values X;When N continuous difference is respectively less than conversion threshold values X, described light-operated bulb lamp switches on power and brightens, and when N continuous difference is all higher than conversion threshold values Y, described light-operated bulb lamp deenergization is turned off the light.
Preferably, described illumination detecting element is light sensitive diode.
Further, before described light sensitive diode proceeds by detection brightness value AD, the interference that described light-operated bulb lamp closedown output a period of time avoids self to emit beam.
Wherein, in step 3, described MCU single-chip microcomputer is built-in with delay counter, when meeting switch condition, will start conversion after the time delay several seconds.
Beneficial effects of the present invention:
The light autocontrol method of a kind of light-operated bulb lamp provided by the present invention, automatically the brightness value AD in illumination place, place is detected by described illumination detecting element, MCU single-chip microcomputer obtains the brightness value AD that automatically will record, and union analyzes the N continuous difference between previous brightness value AD and later brightness value AD;MCU single-chip microcomputer compares difference and conversion threshold values, controls light and opens and closes.By the method invented, described light-operated bulb lamp directly can turn off or on according to the illumination of local environment himself, it is not necessary to Artificial Control, and control accuracy is high, and energy-saving effect becomes apparent from.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the light autocontrol method of a kind of light-operated bulb lamp of the present invention.
Detailed description of the invention
For the ease of the understanding of those skilled in the art, below in conjunction with embodiment, the present invention is further illustrated with accompanying drawing, and the content that embodiment is mentioned not is limitation of the invention.Below in conjunction with accompanying drawing, the present invention is described in detail.
The light autocontrol method of a kind of light-operated bulb lamp provided by the present invention, described light-operated bulb lamp is built-in with illumination detecting element and MCU single-chip microcomputer, in the present invention the illumination detecting element and MCU single-chip microcomputer for controlling light be to be mounted directly to light fixture, without peripheral hardware special lamp holder, easy to install, it is simple to the popularization of energy-saving lamp.The light autocontrol method of the present invention comprises the following steps:
Step 1, light-operated bulb lamp when closed, detect the brightness value AD in illumination place, place by described illumination detecting element;Preferably, described illumination detecting element is light sensitive diode, concrete, and before described light sensitive diode proceeds by detection brightness value AD, the interference that described light-operated bulb lamp closedown output a period of time avoids self to emit beam, the shut-in time is between 500ns to 10ms.Owing to the response time of light is generally higher than 10ms by human eye, and the conducting of LED, shut-in time are 400ns, response time based on human eye is much slower than the conducting of LED, shut-in time, therefore LED is when being constantly frequently turned on and off rapidly, but the imperceptible flicker of human eye, it is seen that LED is always held at light yellow.Described light sensitive diode utilizes the response time of this human eye to carry out detection brightness value AD, directly can carry out in the inside of light-operated bulb lamp detecting brightness value AD, it is to avoid the interference of self light, and not affect the detection of ambient light illumination to external world.
Step 2, MCU single-chip microcomputer obtain brightness value AD, and union analyzes the difference between the adjacent brightness value AD of N continuous.
Step 3, MCU single-chip microcomputer compare difference and conversion threshold values, control light and open and close;MCU single-chip microcomputer is set with and controls conversion threshold values X and the conversion threshold values Y that light opens and closes, and conversion threshold values Y is more than conversion threshold values X;When N continuous difference is respectively less than conversion threshold values X, described light-operated bulb lamp switches on power and brightens, and when N continuous difference is all higher than changing threshold values Y, described light-operated bulb lamp deenergization is turned off the light, and then achieves light and automatically control.
Described light-operated bulb lamp is converted in process at night by day, and the difference that light sensitive diode detects is respectively less than conversion threshold values X, and the brightness of light-operated bulb lamp is by low bright gradually to highlighted;Change the process on daytime from night, the difference that described light sensitive diode detects be all higher than conversion threshold values Y, the brightness of light-operated bulb lamp by high brightness gradually to extinguishing.In step 3, described MCU single-chip microcomputer is built-in with delay counter, when meeting switch condition, by starting conversion after the time delay several seconds, is effectively prevented from having suddenly high light to enter.By the method step invented, light-operated bulb lamp can directly being turned off or on himself according to the illumination of local environment, it is not necessary to Artificial Control, control accuracy is high, and its energy-saving effect is clearly.
The above, it it is only present pre-ferred embodiments, not the present invention is done any pro forma restriction, any those skilled in the art, without departing within the scope of technical solution of the present invention, when the technology contents utilizing the disclosure above makes a little change or is modified to the Equivalent embodiments of equivalent variations, in every case it is without departing from technical solution of the present invention content, refer to, according to the technology of the present invention, any simple modification, equivalent variations and modification that above example is made, belong in the scope of technical solution of the present invention.