Simple Motion Detector

1,421

24

Hello everybody! Today I'm going to show you how to make a really simple motion detector with a PIR sensor.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts

For the motion detector, you will need:

  1. Piezo buzzer (1)
  2. PIR sensor (1)
  3. Arduino Uno (1)
  4. LED (1)
  5. 10k Resistor
  6. Jumpers (several)
  7. Breadboard

Step 2: The Circuit

Let's get right in to the build:

  1. Connect the left-most lead of the PIR sensor to 5v and the right-most pin to ground. Connect the middle pin of said sensor to digital pin 2 of the Arduino.
  2. Now take out your LED. Connect its anode to digital pin 13and its cathode to ground.
  3. Now for the buzzer. Identify the anode and cathode of your buzzer (the anode should be the longer lead and the cathode is the shorter lead). Connect the anode of the buzzer to digital pin 10 and its cathode to ground.

Now for the code!

Step 3: The Code

All you got to of now is upload the code. Now you have working motion detector! You could replace the one LED with Neopixels to create motion-initiated mood lighting patterns. You could also change the tones of the piezo buzzer so that it played a song instead of just screeching. Thanks for reading and, as always, Happy Making!

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Share

    Recommendations

    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    Discussions