Arduino Motion Sensor Alarm

Published

Introduction: Arduino Motion Sensor Alarm

This project will be utilizing an Ultrasonic Sensor to detect movement and activate an alarm which consists of a triggered buzzer and flashing LED's.

Hardware you will need:

1. Arduino Uno

2. Breadboard

3. HC-SR04 Ultrasonic sensor

4. Led's

5. Active buzzer

6. Wires/Connectors

7. Resistors

Step 1: Step 1: Connect Ultrasonic Sensor

The Ultrasonic sensor will be inserted directly into the breadboard. It is wired to the arduino in the following order.

1.VCC to Arduino 5V

2. Trig to Arduino Digital 9

3. Echo to Arduino Digital 10

4. GND to Arduino GND

Step 2: Step 2: Connect LED's

You will need:

-4 Led's

-4 220 Ohm resistors

-Wires

4 Led's will be inserted into the breadboard (2 blue, 2 red). Connect a resistor to the long leg of each LED. The short legs of each LED will be wired to GND. Wire the resistors to the arduino as followed.

1. First red Led to Arduino Digital 8

2. Second red Led to Arduino Digital 13

3. First blue Led to Arduino Digital 7

4. Second blue Led to Arduino Digital 12

Step 3: Step 3: Add a Buzzer

Insert an active buzzer into the breadboard. Wire the buzzer short leg (-) to GND. Wire the buzzer long leg (+) to Arduino Digital 11.

Step 4: Step 4: Motion Sensor Alarm - Code

Attached is the code for the Arduino Motion Sensor Alarm.

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Planter Challenge

      Planter Challenge
    • Casting Contest

      Casting Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments

    That's a neat setup, do you have any photos of the finished project?