ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Automatic light switch with night light function and smooth lighting control. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Microcontrollers The automatic lighting switch (hereinafter referred to as the device) is designed for automated control of lighting in a room. The principle of operation of the device is based on counting the number of people in the room. The maximum number of people that this device can register is 255 people, which is more than enough for practical purposes. The device is controlled by a single push button. The device performs the following functions: - When the first person enters the room, smoothly turns on the light to the set brightness level;
All modes are indicated by a two-color LED:
In dimming mode, the LED lights up in the following combinations: - when switching to the lighting brightness control mode, it flashes once in red, once in green;
To turn off the lighting when there are people in the room (for example, when you go to bed), you need to briefly (no more than 1 s) press and release the button. In this case, the LED will turn red and the device will enter the timer mode. After 10 seconds, the light will turn off smoothly, and the LED will turn green again, indicating the main operating mode of the device. To switch to the night light mode, the button must be held for more than 1 s and released after the LED goes out. If at this moment you continue to hold the button, then after a couple of seconds the device will switch to the mode of adjusting the brightness of the lamp, which will be signaled by two LED flashes (1 red and 1 green), after which the brightness of the lamp will decrease or increase. The button should be released at the moment when the brightness reaches the desired level, after which the LED will again signal with two flashes (1 green and 1 red) and the device will switch to the main operating mode. This device allows you to save not only electricity, but also extends the life of incandescent lamps, due to the fact that the lamps turn on smoothly, and not abruptly, as happens in most of these devices. This device does not cause interference on the network, because as a control element, it uses a field-effect transistor, and not a thyristor. This device is developed on the basis of the ATMega8 microcontroller, which contributed to the low power consumption of the device itself and gives further prospects for upgrading the device by simply changing the program. The device has a galvanic isolation from the network, which increases its safety. Principle of operation of the device The principle of operation of the device is based on the intersection of an incoming or outgoing person with the IR rays of the motion direction sensor. When entering a room, a person first blocks one sensor, then another, and vice versa when leaving. At the same time, the controller counts the number of people entering and leaving the premises. The algorithm of the program takes into account various situations. For example, if a person, entering the room, blocked both sensors, and then, having changed his mind, went back, then the light in the room will not turn on. Those. in order for the controller to consider that one person has entered the room, the condition must be met (numbers correspond to blocked sensors, 0 - the sensor is not blocked): 0-1-12-2-0, and when leaving, 0-2-21-1 -0. This minimizes false positives of the device. The sensors are assembled on the basis of TSOP1736 and are mounted in the door frame at a height of 70-80 cm from the floor at a distance of 3-4 cm from each other. The IR LED is mounted on the opposite side of the box opposite the sensors so that it illuminates both sensors. It is desirable to cover the LED and sensors with darkened glass, "transparent" for IR radiation. With an incandescent lamp power of up to 60 W, the field-effect transistor can not be installed on a radiator, with a higher power it must be installed on a radiator with an area of about 25-30 sq. cm. With known good parts, the device starts working immediately. Trimmer resistor R13 adjust the illumination at which the lighting is turned on. Pin 23 of the microcontroller (DAY_OUT) is used to connect similar devices without a light sensor to it. Those. log 0 is set on this output during the day, and log 1 at night. All questions and suggestions are accepted by e-mail: shemavr [dog] yandex.ru. Enter "Question" in the Subject field. To order a "stitched" microcontroller, send an application to the same mailbox with the subject "order" (controllers are sent so far only within Ukraine). We are looking for enterprises for cooperation (Ukraine). The firmware of the microcontroller is presented with a demo version of the program: download. The demo version imposes some restrictions on the operation of the device, namely:
Fuse programming: the following fuses should be programmed in the MK (reset to zero): BOOTSZ0, BOOTSZ1, CKOPT. Author: Karavansky Alexander; Publication: cxem.net See other articles Section Microcontrollers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Air trap for insects
01.05.2024 The threat of space debris to the Earth's magnetic field
01.05.2024 Solidification of bulk substances
30.04.2024
Other interesting news: ▪ xCORE-Audio sound processors ▪ Artificial retina based on organic chips News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site The most important scientific discoveries. Article selection ▪ article Korolenko Vladimir Galaktionovich. Famous aphorisms ▪ article How the tsetse fly was exterminated on the island of Zanzibar? Detailed answer ▪ article Window decorator. Job description ▪ article Microwave field detector. Encyclopedia of radio electronics and electrical engineering ▪ article Strange funnel. Focus Secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |