Instructables

Hacking a PIR motion sensor for use as a triggering device.

Featured

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.

 
Remove these adsRemove these ads by Signing Up

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.

luisfocosta14 days 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

Hmm, I wonder how those motion sensors from defunct outdoor spotlights would work?
Heh, they work *really well* - I once had a cat problem, with them tearing into our rubbish bags at night in our back garden. As the floodlight PIRs use mains current to drive the lamps, I just hooked one up to a washing machine solenoid valve, through to a hosepipe with a jet nozzle.

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.
That's awesome! haha, I love the things people create :)
If you have a motion light you could always just screw one of these into it.
exactly the same way. they have an internal relay that triggers the lights.
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.
aldente462 years ago
I thought most PIR sensors like the one illustrated had relays in them already as their normal Alarm Output, all of the PIR's in my house do. Why not just use those contacts. If you need a higher current rating, use the existing low current contacts to switch on a larger relay to control your load and avoid the circuit hacking.
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 (author)  aldente462 years ago
As I mentioned in the second step the relay on the one that I had not operational. That is why I went the extra steps and attached the external relay.
Random_Canadian (author) 2 years ago
Special thanks to all that pointed out my circuit error. While I never had any problems with my configuration, I have updated the last step with a correct configuration
DrJase2 years ago
You might want to put a diode across the relay coil terminals to protect the transistor from the back EMF generated by the coil when it de-energises. But great instructable with so many possibilites....
DrJase is correct about diode. some relays do have one built in (also some transistors but not small ones like 2N2904).

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
Kewl.. I just noticed I had an error in my post. I meant to type"I wonder how well those.." (etc)
I am a former alarm tech. This PIR will work outside but, it is not weatherized and the electronics will suffer corrosion from moisture. The circuits on the board will also have limited performance when outside temps get to 32F or lower. The wide angle of sensing may cause false activations which is easily corrected by masking the PIR lense on the inside with black electrical tape to narrow the field of detection. Otherwise, I use one with a wireless trigger to function as a driveway alert to activate my door bell. No more unexpected visitors at the door.
haha, love that idea! (visitor alerts)
You bet! Until you put in one of these (visitor alerts) there is nothing like being involved with someone and needing to run to the door in your shorts! LOL
wh_hsn2 years ago
You better add a revers biased diode parallel to the relay coil to prevent damaging the transistor from the kickback voltage during on/off cycles.
wh_hsn wh_hsn2 years ago
Sorry I didn't update the page before commenting - same as DrJase :S
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!