DIY Motion Sensor Light Switch Tutorial

In this post we shall make a simple and a cheap DIY motion sensor light switch. We haven’t made use of any microcontroller or any other complex circuitry. This module can be easily developed by almost everybody.

You would require the following parts to create this DIY motion sensor light switch:

  • A PIR Motion sensor
  • A 7A, 12v relay
  • A NPN transistor (BC 547)
  • Burg sticks
  • 7805 Voltage regulator IC
  • A 12 v, .5 A -DC adapter
  • A 10 K resistor
  • A LED
  • Some connecting wires

Step 1

Most of the DC adapters available in the market are screw less and can be easily opened. Take the inner power supply circuit out of the DC adapter and identify the AC input and DC output pins. Since we have used a 12v adapter for our Motion sensor lights, the DC output would be 0v at -ve and 12v at the +ve terminal.adapter opned dc adapter

Step 2

Use the 12 v output from the power supply to act as an input to the 7805 voltage regulator IC.


You may refer to the image given above for making connections. We get a regulated 5 v supply between the ground and the output pin of 7805. In order to be sure you may check the 5v output using a multi meter.

Step 3

Create a relay driver using the BC 547, NPN transistor.

relay driver

The 10k resistor goes at the base of transistor. Now manually connect the free end of the 10K resistor to 5v supply and listen for a tic-tic sound from the relay, this sound verifies the proper functioning of the circuit.

Step 4

Open the PIR Motion sensor (HC-SR501). This sensor works at 5v. and has three pins – Vcc, Gnd and Out.

PIR Motion Sensor Lights

Power the motion sensor and check its working by attaching a LED between its Out and Gnd pins.

Step 5 – Let’s assemble our DIY Motion Sensor Light Switch

Connect these parts in the following order and your DIY Motion Sensor Light switch is ready to ROCK !!


Note: The PIR sensor may take up to 45 seconds to warm up , so don’t panic if the sensor doesn’t work immediately after turning it on.

Posted By: kiran on 31 July 2015

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>