Step #1: Gather your parts.PrevNext
This project requires just a few parts, and because you\'re using a solderless breadboard and pre-cut jumper wires, you won\'t need any tools at all — except your computer and USB cable to connect the Arduino.
Step #2: Wire the Arduino to the breadboard.PrevNext
- Connect digital input/output (I/O) pin 2 on the Arduino to row 1 on the breadboard.
- Connect the 5V pin on the Arduino to row 2 on the breadboard, and connect a nearby ground (Gnd) pin to row 3.
Step #3: Connect your motion sensor.PrevNext
- Find the Gnd (–), Vcc (+), and Out pins on the PIR sensor.
- Plug the PIR sensor into the breadboard so that its (–) pin connects to the Gnd row, its (+) pin connects to 5V, and its Out pin connects to digital pin 2.
- NOTE: If you have a different sensor than the one shown here, you may need to extend the sensor's pins with a stacking female header, wires, interconnect cables, etc. to fit.
Step #4: Plug in the LED.PrevNext
- Plug the LED's anode (the longer leg) into digital pin 13 on the Arduino.
- Plug the LED's cathode (the shorter leg, and/or the leg on the flattened side of the LED base) into the adjacent ground (Gnd) pin on the Arduino.
Step #5: Connect the piezo buzzer.PrevNext
- Connect the buzzer's red wire to the Arduino's digital pin 10.
- Connect the buzzer's black wire to the Arduino's Gnd pin (there's a spare one on the Power block of pins).
- NOTE: These two wires can be reversed, as the polarity of the buzzer doesn't matter.
Step #6: Program the Arduino.PrevNext
- Launch the Arduino IDE software. You can download it for free here.
- Plug the USB cable into your computer and Arduino.
- Set the board and port settings for your Arduino board, in this case, an Arduino Uno.
- Open the PIR Alarm sketch found at this link: https://raw.github.com/jedgarpark/Make_PIR_Sensor/master/MAKE_PIR_Sensor.pde
(Arduino programs are called sketches.)
- Upload the sketch to the Arduino.
Step #7: Test your alarm.PrevNext
- When you power up your alarm, the PIR sensor will glow an ominous red. Stand very still or leave the room while the alarm calibrates the infrared level reading for the room.
- Now test it by moving: the buzzer will buzz and the LED will light up.
- Be amazed! Your PIR Sensor Arduino Alarm can sense movement up to 20 feet away. No one will be stealing your yo-yo today.
- NOTE: Might not be reliable for detecting the undead.