You are on page 1of 2

This is a circuit of automatic bathroom light which can be used to automate the working of a bathroom light.

It is designed for a bathroom fitted with an automa tic door-closer, where the manual verification of light status is difficult. The circuit also indicates whether the bathroom is occupied or not. The circuit use s only two ICs and can be operated from a 5V supply. As it does not use any mec hanical contacts it gives a reliable performance. One infrared LED (D1) and one infrared detector diode (D2) form the sensor part of the circuit. Both the infrared LED and the detector diode are fitted on the frame of the door with a small separation between them as shown in Fig. 1. The radiation from IR LED is blocked by a small opaque strip (fitted on the door) when the door is closed. Detector diode D2 has a resistance in the range of meg -ohms when it is not activated by IR rays. When the door is opened, the strip mo ves along with it. Radiation from the IR LED turns on the IR detector diode an d the voltage across it drops to a low level. Comparator LM358 IC2(a) compares the voltage across the photo detector against a reference potential set by preset VR1. The preset is so adjusted as to provid e an optimum threshold voltage so that output of IC2(a) is high when the door i s closed and low when the door is open. Capacitor C1 is connected at the output to filter out unwanted transitions in output voltage generated at the time of o pening or closing of the door. Thus, at point A, a low-to-high going voltage tra nsition is available for every closing of the door after opening it. (See wavefo rm A in Fig.2.) The second comparator IC2(b) does the reverse of IC2(a), as the input terminals are reversed. At point B, a low level is available when the door is closed and it switches to a high level when the door is opened. (See wave form B in Fig. 2.) Thus, a low to-high going voltage transition is available at point B for ev ery opening of the door, from the closed position. Capacitor C2 is connected at the output to filter out unwanted transitions in the output voltage generated a t the time of closing or opening of the door.

IC 7474, a rising-edge-sensitive dual-D flip-flop, is used in the circuit to me morise the occupancy status of the bathroom. IC1(a) memorises the state of the door and acts as an occupancy indicator while IC2(b) is used to control the rela y to turn on and turn off the bathroom light. Q output pin 8 of IC1(b) is t ied to D input pin 2 of IC1(a) whereas Q output pin 5 of IC1(a) is tied to D input pin 12 of IC1(b). At the time of switching on power for the first time, the resistor-capacitor com bination R3-C3 clears the two flip-flops. As a result Q outputs of both IC1(a) and IC1(b) are low, and the low level at the output of IC1(b) activates a rela y to turn on the bathroom light. This operation is independent of the door statu s (open/closed). The occupancy indicator red LED (D3) is off at this point of time, indicating t hat the room is vacant. When a person enters the bathroom, the door is opened an d closed, which provides clock signals for IC1(b) (first) and IC1(a). The low l evel at point C (pin 5) is clocked in by IC1(b), at the time of opening the do or, keeping the light status unchanged. The high level point D (pin 8) is clock ed in by IC1(a), turning on the occupancy indicator LED (D3) on at the time of closing of the door. (See waveform C in Fig. 2.) When the person exits the bat hroom, the door is opened again. The output of IC1(b) switches to high level, tu rning off

the bathroom light. (See waveform D in Fig. 2.) The closing of the door by the door-closer produces a low-to-high transition at the clock input (pin 3) of IC1 (a). This clocks in the low level at Q output of IC1(b) point D to Q output of IC1(a) point C, thereby turning off the occupancy indicator.

You might also like