Simple Motion Sensor Light




About: I am IT professional, living in Bangalore, India. As new gadgets come out everyday, we indulge in spending significant time and money on these gadgets. And our kids are learning from us, they know how to use...

I keep forgetting to switch-off bathroom lights and my wife loves to remind me"you left the lights on again ". So built this simple motion sensor switch that detects that I have done my business and no longer in the room, switches off light. There are many complex circuits out there. I hope I may have simplified them a bit.

And Yes it can be easily bought on Ebay, but I still wanted to do it

Step 1: What Do You Need ?

  1. Universal PCB
  2. PIR Motion Senor ( used with Arduino)
  3. Resister : 1 K Ohms
  4. Old 220V to 6V adaptor ( I used mine from old moto charger)
  5. NPN Transister 2N2222
  6. Connectors
  7. IN7001 diode for low noise
  8. Relay 6V, 5A 220V
  9. Wires
  10. Some kind of Housing

I got my Motion senor from Aliexpress for about a dollar and have used my old Moto mobile charger.

Choose relay to support the load, I wanted to connect 15 Watts CFL ( 600mA, 220V)

CAUTION : There part AC 220V involved. Please seek professional assistance. I am not responsible if some one hurt themselves or hurt others or cause damage of any kind to their homes, following this instructions

Step 2: Circuit and Sensor

The motion senor can take input from 3V to 20 V,. When is senses motion the output pin is set to 3.2V.

Connecting Relay directly to motion sensor is not recommended, So using NPN transistor as switch and 1K resister to prevent current in opposite direction

To avoid spikes / noise, connecting a Diode across Relay.

Step 3: Build It

I have used old charger and tied the AC and DC cables separately. This helps in identifying AC / DC parts of the circuit

I used Connectors for AC input and AC output for easly installation

Connecting Motion sensor needs to be flexible so made a 3 pin connector

Step 4: Assembly

In my first attempt, I used old Laptop charger housing, but was not able to fit in. So had to borrow one of the cold cream boxes, It had excess space. Works good

In future I want fit it is small boxes.....

Step 5: Test It

Simply connect a Bulb socket and AC plug to it and test it

In the video, timer is set to few seconds and can be adjusted



  • Safe and Secure Challenge

    Safe and Secure Challenge
  • Comfort Food Challenge

    Comfort Food Challenge
  • Faux-Real Contest

    Faux-Real Contest

13 Discussions


Question 11 months ago on Step 1

Hi, Diode 1N7001 is not available. Can you suggest alternate diode for this project? Thanks


Reply 1 year ago

depends on where you get components, it costed me about 200rupees


2 years ago

Hi Amit

I am not able to get IN7001, can you let me know replacement for this.



1 reply

2 years ago

Looking for help on my project. See image. Testing before connecting
to high voltage device. Using a 3v relay triiggered by the PIR signal.
As you see wired now, There is no ground wire coming from PIR. The
circuit would not trigger relay with a ground wire to the PIR. When
this does trigger I noticed on the relay that the LED would not go
completely off. So I check to find that when relay turns "off" the PIR
is still sending 2.8 volts to the relay. Not enough to trigger the
relay, but enough to show power through the LED. Obviously something
wrong here where the PIR or Relay are still drawing power. Can you

3 replies

Reply 2 years ago

Thought this drawing might help. Better to see than the wiring image.

Again note... their is no ground coming from PIR. This circuit triggers
relay, but there is a constant 2.6 - 2.8 volts going to relay after the
relay switches off from the allowed time from PIR. This keeps the
light indicator on the relay dimmed. I am guessing there should be 0
voltage with no light. Hope you or somebody else can help. If I connect ground from PIR the circuit will not trigger.

PirRelay Drawing.jpg

Reply 2 years ago

send pic of your relay, previous photo is not clear


2 years ago

This is great thanks, Will I need to modify anything because all my projects are battery operated. I don't do anything with mains voltage... Thanks John :)

3 replies

Reply 2 years ago

also change 2222 based on current rating of your load


Reply 2 years ago

Thank you very much for your answer :)


Reply 2 years ago

thanks, I can suggest using 9v battery as input and instead of relay use led strip