Arduino PIR motion alarm

This is a little security alarm that lights a green strobe light for a duration of a few seconds when it detects motion. It uses an arduino mega and a Quest PIR motion sensor.. link to strobe lights

http://www.allelectronics.com/index.php?page=search&search_query=strobe&x=0&y=0

Link to PIR motion sensor

http://www.allelectronics.com/make-a-store/item/IRD-12/PIR-DETECTOR/-/1.html

GEER SORRY PIR SENSOR WAS 11 bucks not 9

code

int ledPin = 13;
int inPin = 32;
int val = 0;

void setup() {
pinMode(ledPin, OUTPUT);
pinMode(inPin, INPUT);
}

void loop() {
val = digitalRead(inPin);
if (val ==LOW) {

digitalWrite(ledPin, LOW);
} else {
digitalWrite(ledPin, HIGH);
delay(9000);
}
}

Pin13 (LEDPIN) goes to your relay and turns on the 12 volt line to the strobe.

InPin 32 can be changes to what ever digital in pin your arduino has. and is the input from the PIR motion sensor from ground.

I plan to add email notifications eventually. Or lol everyone does this but a twitter notification maybe?

any ideas? tlavite@gmail.com

Duration : 0:2:18


Related Reading:

Uncategorized

Be Sociable, Share!

Technorati Tags: arduino, bored, boredom, breadboard, diode, domehouse, electronics, green, infrared, lavite, light, motion, passive, PIR, poorhouse, relay, resistor, Sensor, strobe, strobelight, tlavite, transistor, TYLER, tylerlavite

3 thoughts on “Arduino PIR motion alarm

  1. That’s awesome dude …
    That’s awesome dude! I’m considering doing this to secure a whole house…

  2. Ha ha lol thanks …
    Ha ha lol thanks for watching its pretty cool but so far tonight its getting pretty annoying 😛

Leave a Reply