Hacking a PIR Motion Sensor for Use As a Triggering Device.
Intro: 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
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…
http://www.youtube.com/watch?v=uIbkLjjlMV8
STEP 5: Onward
This is an example of what I have used this for recently...
Check out https://www.instructables.com/id/Zombie-Graveyard/
26 Comments
TotieG 5 years ago
i'm using 220vac pir for my 220vac siren as my burglar alarm, the problem is when i switch on it activate the siren for around 12 seconds on and off without any detection of movement, i want to eliminate that and what is the best solution?
BlakeV4 7 years ago
I cannot figure it out
Random_Canadian 7 years ago
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.
chunk_change 12 years ago
BlakeV4 7 years ago
BobWhtMountains 8 years ago
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?
tcambrón 9 years ago
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.
tcambrón 9 years ago
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
bobihariantomohdbacuk 9 years ago
how does it will work with camera with it
luisfocosta 10 years ago
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
solaralternatives 12 years ago
lickydog 12 years ago
Set up carefully, the PIR was activated by the cats, which opened the water flow for a 10 second jet of icy water at cat height.
The cats got the message after a couple of weeks (and I got wet ankles more than once, forgetting to shut it off when I went out the back.)
As there was an existing floodlight in the garden, I set up a webcam on motion detection recording - the software I used tested the input values and began recording if there was a rapid change in the view. Got a *lot* of daytime cloud change triggered recordings, but (oh yes) about a dozen night-time visitors identified as the lamp came on. Nice to identify the culprits, and no ripped bags.
Note - I housed my unit in an earthed water-tight box, and used an RCD at the socket. Wish I'd known about Instructables way back then.
reverbflange 12 years ago
pfred2 12 years ago
Random_Canadian 12 years ago
aldente46 12 years ago
On a point raised by PFED2 , usually the mains switching light sensors have SCR or Triac electronic switches instead of relays and would be unsuitable for modification as the circuit board would be at lethal mains potential.
Random_Canadian 12 years ago
Random_Canadian 12 years ago
DrJase 12 years ago
panic mode 12 years ago
btw. using transistor in Common Collector configuration means that output voltage will be even lower than what you bring in (you only get current gain). In the video they show transistor in Common Emitter configuration which is optimal.
nice video, made me laugh:
http://www.youtube.com/watch?v=uIbkLjjlMV8