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)

<p>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.</p>
<p>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</p>
<p>how does it will work with camera with it</p>
<p>How would it work with a wireless motion sensor ?</p><p>I am trying to re-use some wireless motion sensors from my previous Wireless Home Alarm system</p>
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.<br><br>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.<br><br>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.)<br><br>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.<br><br>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 <a href="http://www.google.com/products/catalog?hl=en&q=socket+outlet&gs_upl=2558l4523l0l4708l13l13l0l3l3l0l279l1663l2.4.4l10l0&um=1&ie=UTF-8&tbm=shop&cid=3504479015980233976&sa=X&ei=vY-PTp_sFoT10gH89dQ3&ved=0CEYQ8wIwAg">these</a> 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.
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.<br>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.
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.
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
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).<br><br>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.<br><br>nice video, made me laugh:<br><br>http://www.youtube.com/watch?v=uIbkLjjlMV8
Kewl.. I just noticed I had an error in my post. I meant to type&quot;I wonder how <em>well </em>those..&quot; (etc)<br>
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
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.
Sorry I didn't update the page before commenting - same as DrJase :S

About This Instructable


268 favorites


Bio: I reverse engineer, design and build things that interest me. Sometimes I take commissions... feel free to contact me with a legitimate request.
More by Random_Canadian: Bionic Louise Belcher And Firefox for the rest of us! Got it wrong on an Aluminum Melt Multipurpose Floating Shelf with Hidden Compartment
Add instructable to: