Introduction: Portable Person Detector

Picture of Portable Person Detector

This PPD will buzz and flash lights when it detects a person! Read on to build this security measure. Construction requires minimal soldering and shop skills, along with moderately-priced electronics components.

Step 1: Acquire Parts

For this project, you'll need:

1 Simply Lemonade Mini Bottle

1 Alligator Anchor box

1 Arduino

1 Buzzer

1 LED

1 220 ohm resistor

1 PIR sensor

1 Mini Breadboard (for prototyping)

1 Tiny Breadboard

1 Power Distribution board

2 Pin headers

1 Soldering Iron

1 Package Rosin-Core Solder

1 Handful of Wires

1 Drill

1 Utility Knife

1 Hot-Glue Gun

5 Hot-Glue Sticks

Step 2: Glue in Parts

Picture of Glue in Parts

Hot-melt glue the 9 volt battery, mini breadboard, Arduino, and power distribution strip into your box.

Step 3: Solder Parts

Picture of Solder Parts

Solder the 220 ohm resistor to the anode of the LED. Then solder the positive lead of the battery to a terminal on the switch, and solder another positive wire onto the other terminal. You may also want to solder the leads of the buzzer onto pin headers (not shown here)

Step 4: Modify Electronics Enclosure

Picture of Modify Electronics Enclosure

Mark and drill holes for the switch and LED. Then, mark where the buzzer will rest and cut that out with a utility knife. Insert the buzzer into its hole.

Step 5: Fabricate Sensor Enclosure

Picture of Fabricate Sensor Enclosure

For the PIR sensor enclosure, we'll be using a Simply Lemonade mini bottle. Cut the bottom off using scissors, then drill a medium-sized hole in the back for wires. Trial-fit your tiny breadboard and PIR sensor inside, then glue the breadboard inside. I then coiled the wires for a nice heavy-duty effect.

Step 6: Wire Electronics

Picture of Wire Electronics

Insert the LED leads into GND on the Arduino and pin 6. Wire up the PIR sensor as shown above. A diode is not necessary, but I used one because I wanted to protect my PIR sensor from any party crashers. Put the +9V and -9V leads from the battery and switch into their respective columns on the power distribution board. Connect a GND on the Arduino to the -9V column and the VIN pin to the +9V Column. I'm sorry for the poor quality of the Fritzing diagram, it was my first.

Step 7: Code Arduino

Picture of Code Arduino

Next, code the Arduino. The code is simple, but here it is!

#define buzzerPin 12

#define pirPin 10

#define ledPin 6

int pirVal = 0;

void setup()

{

pinMode(buzzerPin, OUTPUT);

pinMode(pirPin, INPUT);

pinMode(ledPin, OUTPUT);

}

void loop()

{

pirVal = analogRead(pirPin);

if (pirVal >= 50) {

digitalWrite(buzzerPin, HIGH);

delay(100);

digitalWrite(buzzerPin, LOW);

digitalWrite(ledPin, HIGH);

delay(100);

digitalWrite(ledPin, LOW);

}

else {

digitalWrite(buzzerPin, LOW);

digitalWrite(ledPin, LOW);

}

}

Once you have coded your Arduino, you are ready to go! Just flip the switch to the "on" position, point the Sensor Module at the place you want to secure, and you are done! Thanks for taking a look at my project, and I would appreciate a vote.

Comments

Delete_ (author)2014-10-30

Nice

ibenkos (author)2014-10-28

Nice done! :)

viclab (author)2014-12-30

Brilliant idea. Thumbs.

jkimball (author)2014-10-29

I think with a few small modifications, you could make your alarm run for a much, much longer time.

By following the steps here:

http://playground.arduino.cc/Learning/ArduinoSleep...

You could put the arduino into a low power sleep mode until the sensor detects something, at which point it wakes up and sounds the buzzer. This would let you run off the 9 volt battery for a longer time.

Fission Chips (author)jkimball2014-10-31

Oh! This is a great idea, and I will probably implement it in a later version of this. Thanks for the tip!

Arman5592 (author)2014-10-29

Hi , it better to use analog inputs so low values (0.a little) wouldn't be read digitally high and cause problems .
The led in the picture is wrong , the big metal part is GND and the littler part is positive ..

Fission Chips (author)Arman55922014-10-29

Actually, I stretched them to different lengths on the Fritzing diagram to compensate for space. Also, pin 10 is an analog pin, and I'm changing the code to do analogRead. Thanks for pointing that out!

Arman5592 (author)2014-10-29

You can also connect the buzzer and the led to the same pin - shorter code and it's better : right now , the led turns on , turns off , buzzer on , buzzer off , but that way , both turn on at the same time . Or millis() has to be used . Although making things simpler , just connecting both to one Pin is simpler :D

Fission Chips (author)Arman55922014-10-29

Yeah, I know this can be done, but I wanted a siren-style alarm with alternating things because I think that looks cool. Thanks for the suggestion, though!

peppypickle (author)2014-10-28

Thanks for including your Fritzing diagram and sharing it with us! Next time, we'd love to see the Arduino code, thanks!

Done! I just put up the code. I decided it would only take a second, so there it is!

Awesome! Thanks!

Arman5592 (author)2014-10-28

The code is so simple that you'd not write it here ? XD

Fission Chips (author)Arman55922014-10-28

Don't worry, I was just in a bit of a rush when I made it. It's up now, so you can observe my mad coding skillz!

About This Instructable

1,315views

9favorites

License:

Bio: Lush cheetah boy who wears knee high socks and likes German Chocolate.
More by Fission Chips:Remove a Stripped ScrewMason Jar Chemical Lava LampGolf Ball Catapult
Add instructable to: