Intruder Detector

1,229

14

3

Introduction: Intruder Detector

First, get the following supplies:

Arduino Board

Breadboard

Servo

Jumper Wires

Red LED

Green LED

2 220 ohm Resistors

Four Pin HC-SR04 Ultrasonic Sensor

Step 1: UltraSonic Sensor

The wiring for the Ultrasonic sensor is as follows:

VCC: Voltage (5V)

GND: Ground

Trig: Arduino Pin 12

Echo: Arduino Pin 13

Step 2: Servo

The Servo wiring is as follows:

Brown Wire: Ground

Red Wire: Voltage (5V)

Yellow Wire: Arduino Pin 9

Step 3: The LEDs

The orange wire (shown in the pic) connects to arduino pin 3, and the green green connects to ground. The wiring is the exact same for the red LED, except that the orange wire is connected to pin 2.

Step 4: The Code

Step 5: Finished Product

This is the finished product! You can set this up anywhere and detect things now!

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    3 Discussions

    0
    JohnShute
    JohnShute

    Question 10 months ago on Step 5

    What is the servo for???

    0
    vass78
    vass78

    3 years ago

    problem with program

    0
    Swansong
    Swansong

    3 years ago

    That's a neat simple setup :)