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.

There are three wires on the motion sensor:Black- HotWhite- GroundRed- 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: GroundGreen: 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.

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.

If you cut open one end of an extension cord you will see three wires:Black- Hot (power)White: GroundGreen: 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.

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.

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.