Motion Activated Alarm

by yaokel25 in Circuits > Arduino

81 Views, 0 Favorites, 0 Comments

Motion Activated Alarm

IMG_4858.jpeg

I choose this project because I am interested in motion activated lights and how they work. In public spaces, there are sometimes lights that turn on when motion is detected and I wanted to make a smaller version of those types of lights. However, when researching those lights, I thought it would be better suited to create an alarm instead of just a light as that would combine two different outputs with the piezo buzzer and an LED light. I also wanted to explore circuits with arduino more so I chose this project as I had to make a slightly more complex circuit with multiple outputs and an input from a PIR motion sensor.


Supplies

IMG_0690.jpeg
IMG_0660.jpeg
IMG_0645.jpeg
  1. Arduino UNO
  2. Arduino software
  3. Wires
  4. Battery case
  5. Batteries
  6. PIR motion sensor
  7. Piezo Sensor
  8. generic FDM 3D printer
  9. LED
  10. Soldering kit
  11. Perfboard

Designing the Circuit

IMG_4694.jpeg

To start I designed a circuit on Arduino UNO that had the motion sensor as the INPUT pin 2, the LED as the OUTPUT pin 7, and the piezo buzzer as the OUTPUT pin 8. The positive sides of the LED, buzzer, and PIR sensor are wired to the INPUT/OUTPUT pins and the negatives sides are wired to ground.

Write Code

I wrote the code so that when the value of the INPUT pin is HIGH, light the LED and sound the buzzer.

Soldering

I transferred the circuit onto an Arduino micro-controller and soldered it onto a perfboard with the same pins attached as the original circuit.

3-d Printing Prototype Box

IMG_0655.jpeg
IMG_0663.jpeg
IMG_0654.jpeg

I made the prototype box that will hold the alarm. I 3-D printed a 10cm x 10cm and 7cm thick wall with a circular cutout in the center of diameter 14.7cm to hold the PIR sensor. I then printed out a 10cm x 10cm wall of the box with a 6 mm diameter hole in the center for the LED, but then realized that the wires on the LED were too short to put the LED in the middle, and that the hole was too small so I printed out another 10cm x 10cm box wall with the hole more towards the side of the wall with the hole for the motion sensor and with a bigger hole.

Prototype

IMG_0643.jpeg
IMG_0640.jpeg

For my prototype, I taped together the two sides with holes and 4 other sides cut from the board and tested the motion sensor, LED and buzzer system.

3-D Print New Box

IMG_0668.jpeg
IMG_0667.jpeg
IMG_0669.jpeg

I then 3-D printed a 5-sided box (8cm x 8cm) with the same sized cutouts for the LED and motion sensor and 2 bars on the 6th side to prevent the battery from falling out of the box.

Assembly

IMG_4860.jpeg
IMG_4865.jpeg

I then secured the LED, motion sensor, and buzzer system into the new box.