Advertisement
automatic bathroom light circuit

Automatic Bathroom Light Switch

Here is a simple and low cost automatic bathroom light circuit. The light automatically turns on when the bathroom door is opened, and remains lit in the occupied state. When the door is opened again the lamp turns off after a very short delay. This automatic circuit saves energy and greatly assists your visitors, especially at night. The “single-chip” circuit, built around the popular decade counter CD4017 (IC1), is very compact, and can be powered from any 5VDC/500mA mobile phone travel charger/similar smps adaptor. After construction, try to enclose the whole circuit in a suitable plastic case for total convenience. Next, arrange the door switch (S1) such that when the door is closed it should be in closed state.

Schematic of the Automatic Bathroom Light Control Circuit

automatic bathroom light circuit

Circuit Tested at TechNode on 12 March 2014

How does the automatic toiled light works?

The heart of this circuit is CD4017 (IC1), CMOS counter with decoded output. On each pulse received on its clock input, this IC drives high the next output. Output 0 (pin 3) of IC1 drives a green “Toilet Free” indicator (LED1), and output 1 (pin 2) of IC1 drives the 1W light source (LED2) through a driver transistor (T1). Note that T1 (2N2222) is here wired as an emitter-follower to avoid the use of a base resistor.

Initially when the circuit is powered, IC1 is resetted by the RC network R1-C1 and as a result LED1 lights up. When the door is opened for the first time, switch S1 is opened and as a result IC1 is clocked by the clock pulse generator R2-C2. Now LED1 goes off and LED2 lights up. IC1 stays in this condition to provide the interior lighting, even if the door is closed. However, when the bathroom door is opened again IC1 is clocked again, and this resets the chip by the signal from Output 2 (pin 4) of IC1 through D1 (1N4148). When IC1 activates its Output 2 and reset itself, LED1 lights up again!

switch states

Component Selection

Regarding components selection, nothing is really critical. But try to use a good quality “normally-opened” (N/O) switch as S1. The 3.6V/1W White LED (LED2) current is limited by resistor R3. It may become necessary to adjust this value to get the best from your circuit.

  • IC1: CD4017
  • T1: 2N2222
  • D1: 1N4148
  • LED1: 5mm Green
  • LED2: 3.6V/1W White
  • R1: 10K ¼ w
  • R2: 100K ¼ w
  • R3: 2.2Ω ¼ w (see text)
  • R4: 1K ¼ w
  • C1,C2 : 10µF/16V
  • C3: 100nF
  • S1: N/O Push Switch (see text)
  • J1: DC Socket – PCB mountable

Lab Note

Clock pulse

Clock pulse (DSO probed at Pin 14 of IC1)

Since the clock generator for IC1 is realized using a tricky RC network, erratic switching may be occurred. Although the bumps are rare, you can defeat this by adding a manual reset switch (again one N/O push switch) between +5V and pin 15 of IC1.

37 Comments

Join the conversation!

Error! Please fill all fields.
  • amit ojha

    Sir i wanted to know the use of D1 diode .?
    Can you please mail me the details am making this project.
    LE: I got that don’t mind.

  • ADITI

    Thank you soo much sir for this article .It helped us a lottt for making our project for open house

  • kalrav gadhavi

    It really works.. yet we are amateur we got this. Thank you for it.

  • Erick

    I found this project so interesting sir,I would wish to modify it and come up with my project but from your idea.Can it be possible for me to get the whole theory part of this project since I think it will be of great help to me as I try coming up with my project??

  • HIMANSHU DHARWAL

    sir as we know 4017 is a decade counter so by giving clock input by switch as shown in circuit can more functionality like device exhaust fan be added to the circuit to get on/off .

  • vincent

    Hallo, this project is indeed very interesting..Mr T,K .Hareendran, am a 3rd year engineering student and got interested in working on this project, please would u mind please if u help me with your theory to make some comparison with mine? thanks in advance.

  • jairaj shetty

    well the person who designed this circuit does not have any idea about bathroom occupied indicator lights. this circuit will waste time, make things embarassing, and is actually fit to be flushed down that bathroom commode. I described a common situation where someone just peeps in and goes away after closing the door. the stupid circuit will indicate bathroom “occupied”. it needs additional switch connected to the internal latch to “actually” indicate someone is inside. you dont even need that IC and circuit. a simple switch operated through the internal bathroom latch and connected to an LED and a simple 3V power source…I would suggest this idiot shouldnt post crap here.

  • Vishesh

    Sir,
    I really found this circuit to be a great one.
    I am doing my enginnering and have completed my second year. I am just planning to implement this circuit. I wanted to know what the “DOOR SWITCH” exactly is? How does it function? Also, How do i provide the DC 5V input if i want to use this circuit for daily basis.
    Thank You

  • Ali

    can you tell me what exactly is the role of that external battery whih is connected through the jack?

  • ali

    That capacitor part near the jack is also somewhat weird.

    • Adnan

      Sir? can we remove the DC socket and the capacitor (C3)? will it still work? like constant 5V DC supply. like trainer?

      attached herewith is the circuit diagram.

    • C.Mitra

      There is nothing weird about the capacitor part. It is a supply decoupling filter basically to shunt the higher frequencies. Normally the DC sockets have three pins:-
      1) The inner pin is the +ve connection
      2) The outer sleeve is the -ve connection
      4) The third connection is used for disconnecting the positive supply coming from an internal battery, in case it is present. When you plug in the DC plug into the jack, it disconnects the internal battery and allows the external supply to reach the circuit. You should only use the inner pin and outer sleeve. Hope that helps.

Looking for the latest from TI?