This device is a home automation lighting solution based on the presence of a person inside the room. When a person enters or leaves the room, the circuit automatically turns the lights of a room ON and OFF respectively. It also has a memory element which eliminates undesired switching of the lights in the event of more than one person entering or leaving the room.
The circuit uses two Light Dependent Resistors (LDR) which are placed on different locations and separated by a considerable distance (say one meter) to independently sense a person entering and leaving the room. The outputs of the LDRs are applied to two counters; the first counter will count as +1, +2, +3 and so on when persons enter the room, on the other hand, the second counter will count as -1, -2, -3 and so on when persons leave the room. The type of counters used are Johnson Decade Counter ICs, part number 74HC4017BQ. The outputs of the LDRs are also coupled to LEDs which emit green and red lights when a person enters or leaves the room. The next stage is comprised of two logic ICs which combine the output of the two timers and determine if there is any person left in the room. The logic ICs are in a single package of the 74ABT08D Quad 2-input AND gate. The output of the gates are then fed to a NPN Bipolar Junction Transistor (BJT) which regulates the current to the relay which will energize the lights. The relay closes or opens depending on the current from the transistor.
For more detail: Home Automation Lighting Control