Go Down

Topic: Hacking a 70 ft. motion sensor for security system (Read 2 times) previous topic - next topic

Big Oil

Sep 01, 2010, 08:04 pm Last Edit: Sep 01, 2010, 08:08 pm by Big_Oil Reason: 1
This tutorial will show you how to hack a common security motion sensor to turn an outlet on and off.  You could hook up the arduino to the outlet and have it do things once the outlet is switched on.  This could also be used to make a pretty good scarecrow for a garden.

This project deals with 120 volts which can be deadly, so be careful.  

Ingredients:
Motion sensor ($24 U.S.)
Outlet and outlet box($5 U.S.)
Extension Cord ($5 - $10)

This is the replacement motion sensor, available at a Lowe's hardware store.  

A picture of it online: http://www.lowes.com/pd_247582-85538-SH-5316-BZ_4294857027+4294882837+5003700+5003720_42949370

There are three wires on the motion sensor:
Black- Hot
White- Ground
Red- This one becomes hot once the detector senses motion.  The sensor allows you to set it to come on for 1,5, or 20 minutes.  It sends out 120 v so don't plug it into your arduino's pins.



If you cut open one end of an extension cord you will see three wires:
Black- Hot (power)
White: Ground
Green: Ground

Make sure you don't plug this thing in while you're handling it.
The way it works is you connect the Black extension cord wire to the black sensor wire.  Then, if you want to turn something on with the motion sensor you would connect it between the Red sensor wire and the Ground wires.
I have connected the red and three ground wires to an outlet.  You just stick the wires into the sides of the outlet and screw it tight.  Look at the outlet directions to make sure you put the power and ground on the right sides.  

white sensor wire----   (           )
Green ground wire---   (OUTLET) - Red Hot sensor wire
White ground wire---   (            )



I fed the wires through the blue box first so that everything would be covered.  I also tied a knot in the extension cord so that the cord wouldn't jerk out if it was pulled hard.  

For some reason I wasn't able to get a multimeter reading between the red and ground until I actually connected it to some load like a light.
Supposedly the sensor can react to up to 100 ft away (30 meters), but 70 ft is probably more realistic.  
There is actually a light sensor built into this particular product, so you can set it to only come on at night.  

If you want to scare animals away plug in a blender.  You could plug in a lamp in the living room for home use.  It might be good for some Halloween projects as well.

cr0sh

Quote
If you cut open one end of an extension cord you will see three wires:
Black- Hot (power)
White: Ground
Green: Ground


White is NEUTRAL - it is not the same as ground, even though it may look the same, act the same - it isn't. The white and green wires should -not- be interchanged; bad things could happen in the future if you do...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

bld

Isn't this what it is made to do? We got such sensors here too, and they all do exactly what you hacked yours to do.
captain-slow.dk | non contagious!

cr0sh

Quote
Isn't this what it is made to do? We got such sensors here too, and they all do exactly what you hacked yours to do.


Well - technically, yes; but usually, they are wired in between an outlet box and another light (or lights) on the outside of the house, via romex or other structured electrical wiring...

While this presentation isn't so much a "hack", it does show how to use such a device to switch a plug, into which a standard lamp or other device (like a fan, maybe?) can be plugged into it. This is not how you typically see them used - usually, they are direct wired to the device (like a set of flood lights or such) they are controlling...

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Big Oil

Quote
While this presentation isn't so much a "hack"


hack 2  (hk)
v.
3.  To ride on horseback at an ordinary pace.


bld

Made a little guide on how I fixed my outdoors motion sensor to work with an arduino.

http://bld-live.dk/wordpress/2010/09/04/arduino-outdoor-motion-sensor/
captain-slow.dk | non contagious!

Big Oil

#6
Sep 12, 2010, 12:38 am Last Edit: Sep 12, 2010, 12:38 am by Big_Oil Reason: 1
If you want to sense a specific point from far away rather than a wide area:
The motion sensor normally senses motion in 240 degrees.  You can make the degrees narrower by covering up two sides of the sensor.  It seemed to work best by leaving a one inch space about 30 degrees off from the center led on the sensor.  I tested it out from 30 feet away (9 meters) and it would only activate in a 2 foot area (.6 meters).  It should work as well at farther distances.  
You could mount it on a servo and have it sweep an area.  It's activated by a change in IR light, like from body heat, so you could identify where someone is in a large room and activate this light rather than that light, etc.

Go Up