Hacking a PIR Motion Sensor for Use As a Triggering Device.





Introduction: Hacking a PIR Motion Sensor for Use As a Triggering Device.

This hack will allow you to create a motion sensing electrical switch

You can use this to trigger electrical devices from solenoids to motors to cameras.

Step 1: What You Will Need

Along with basic soldering skills...

You will need a PIR motion sensor mine is from a defunct home alarm.
A small relay, preferably 12V DC coil type.
A transistor NPN type I used a 2N3904
A diode for inductive suppression I used a 1N4001
Stranded wire, Discarded network cable will work in a pinch
12V DC power supply ( Check the requirements of the sensor)

Step 2: Test the Sensor

If this is a used or surplus device you should check the operation before using.

Remove the top cover and examine your sensor.

My sensor uses a 12 V DC supply for operation. The power terminals of the device should show the proper voltage and connection. I used this power requirement to select a relay that was also triggered with 12 V DC.

Connect power, wait for the light to go off then test for motion activation using your hand. The light should go on, stay on for a short time, then off again once the motion stops.

This model worked but the relay connection next to the power connection would not activate so a second method will be needed.

Step 3: Prep the Wire and Solder

Disconnect power and disassemble the device.

Since the relay terminals would not work I chose to use the LED as the relay trigger point.

Since I was going to use this to trigger a remote device, I needed to have 5 feet of stranded wire.

Cut and bare the individual wires in the bundle. You should also tin them at this time using a soldering iron.

Drill a hole for the wire in the back panel of the motion sensor if there is not one.

Feed the wire through the hole in the back and connect to the power terminals and relay trigger points.

If you are connecting to the LED then carefully solder one wire to each leg of the LED.

Wire Colours:

Red and Brown to 12VDC+
Black and Green to 12VDC-
Blue to LED Anode
White to LED Cathode

Step 4: External Relay

Since there is not much room in the sensor case I chose to connect a relay at the opposite end of the wires.

My relay needed 12 V to trigger and since there was only a fraction of that for driving the LED I used a 2N3904 in TO-92 form since I had several of them in my parts bin.
Using standard transistor wiring, Connect the LED power wire to the Transistor Base (B)
The 12V power is connected to the one relay coil contact and diode Cathode,
The other relay coil contact is connected to The transistor Collector (C) and the diode Anode 
The Transistor Emitter (E) is connected to ground.

The other relay coil terminal is connected to the 12V ground of the circuit.

Attach your power source and test for operation. You should hear the relay trip when the LED is active. Seal and protect all bare wiring with electrical tape or Hot Glue to protect against shorting.

Now when the sensor is tripped the LED activates and the relay is activated. Now you can attach your favorite electrical device to the NO and GND contacts of the relay for activation.

One of mine is currently attached to a water valve solenoid from an old washing machine which is attached to a garden hose and is used to scare a skunk out of my back yard…

I have built another that triggers a Zombie Hand Halloween prop in another instructable.

Wiring colours:

Red 12VDC+
Black Power supply Ground
Blue transistor base
Brown relay coil and diode Cathode
Other relay coil to Transistor Collector and Diode Anode
Green Transistor emitter

Relay contacts NO is switch + for device
Relay Ground is switch -
And Relay NC was left open

One final note:

I am starting to find that no matter what you do there is always someone that has done it before you. I found this clip after I completed the build, Enjoy, I know that I did…


Step 5: Onward

This is an example of what I have used this for recently...

Check out https://www.instructables.com/id/Zombie-Graveyard/



    • Science of Cooking

      Science of Cooking
    • Trash to Treasure

      Trash to Treasure
    • Paper Contest 2018

      Paper Contest 2018

    We have a be nice policy.
    Please be positive and constructive.




    Could someone please help me understand where the white wire that comes off the Led cathode is supposed to be connected to

    I cannot figure it out

    If I recall correctly I had to use the LED to circuit as a relay trigger since the on board one would not work. The white wire was connected to the external relay coil See step 4.

    I have an extremely similar if not the same PIR sensor as you do, i found that the RELAY terminals (mine are white and green) have continuity until the sensor is tripped that would be why the resistor is connected to the furthest terminal to remove the feed back that others have posted about when using an outside relay. makes sense to me. just thought i would let you know my findings maybe save you a little bit of work on your next one.

    do you know how to get the onboard relay to actually work? I have same sensor but can't figure it out

    I used the LED to power the relay just as shown, and it works great. But now my LED doesn't light when the relay is working. If I disconnect the relay/transitor circuit the LED works as normally should. It seems like the transistor is robbing the power the LED needs to light up. Any ideas to solve this?

    I am wondering about those outdoor motion activated lights. There are the 120v wiring but I am hoping that inside the motion device has a seperate board for ac to dc to the motion board. I just had an idea if I can convert the 120v outdoor light to a 24DC and connect it to a solar panel grid I might setup.

    ah ok nevermind. My idea can be done but the motion detectors are cheaply designed and mostly glued together. So might as well get a DC motion sensor unless you got like 100s of extra AC motion detectors, or just a couple extra, haha

    How would it work with a wireless motion sensor ?

    I am trying to re-use some wireless motion sensors from my previous Wireless Home Alarm system

    Hmm, I wonder how those motion sensors from defunct outdoor spotlights would work?