AUTOMATIC BATHROOM LIGHT BASIC ELECTRONICS PROJECT

This circuit is used to automate the working of a bathroom light. It is designed for a bathroom fitted with an automatic door-closer, where the manual verification of light status is difficult.

The circuit also indicates whether the bathroom is occupied or not. The circuit uses only two ICs and can be operated from a 5V supply. As it does not use any mechanical 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 moves along with it. Radiation from the IR LED turns on the IR detector diode and the voltage across it drops to a low level. C o m p a r a t o r 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 provide an optimum threshold voltage so that output of IC2(a) is high when the door is 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 opening or closing of the door.

Thus, at point A, a low-to-high going voltage transition is available for every closing of the door after opening it. 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.
Thus, a low to- high going voltage transition is available at point B for every 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 at 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 memorise 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 relay to turn on and turn off the bathroom light.

Q output pin 8 of IC1(b) is tied 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 combination 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 relay to turn on the bathroom light. This operation is independent of the door status (open/closed). The occupancy indicator red LED (D3) is off at this point of time, indicating that the room is vacant.

When a person enters the bathroom, the door is opened and closed, which provides clock signals for IC1(b) (first) and IC1(a). The low level at point C (pin 5) is clocked in by IC1(b), at the time of opening
the door, keeping the light status unchanged.

The high level point D (pin 8) is clocked in by IC1(a), turning on the occupancy indicator LED (D3) on at the time of closing of the door. When the person exits the bathroom, the door is opened again.

The output of IC1(b) switches to high level, turning 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.

FOLLOW US

Circuit Diagram - Schematics is
the language of electronics. It provides a concise and comprehensive
diagrammatic description of a circuit. Schematics.com allows users to
connect and share designs and ideas in a like-minded community.