Arduino Technology
John Park in the Maker Shed: PIR Arduino motion alarm

Want to learn how to hook up a passive infrared (PIR) sensor to your Arduino? Check out this video I put together doing just that. These sensors are very nice to work with either by themselves (along with a transistor or relay) or on a microcontroller. You get about a 20 ft. range for detecting motion from humans, animals, other things that emit a decent amount of infrared radiation. WILL NOT DETECT THE UNDEAD.

This is the same alarm setup I used to prank my kids on April Fools’ Day.

In the Maker Shed:

The PIR Sensor detects motion up to 20 feet away by using a Fresnel lens and infrared-sensitive element to detect changing patterns of passive infrared emitted by objects in its vicinity. Inexpensive and easy to use, it’s ideal for alarm systems, motion-activated lighting, holiday props, and robotics applications.

Features

  • Simple 3-pin connection
  • Single bit output
  • Small size – easy to conceal ( 0.96 x 1.0 x 1.27 in.)
  • Arduino Compatible

MKPX6-2.jpg

PIR Sensor

20 thoughts on “John Park in the Maker Shed: PIR Arduino motion alarm

  1. Im not sure if a zombie IRL would emit heat or not. I would suspect they do as in every movie they are in some state of decay which, as we all know carbon decay emits heat. Perhaps a vampire would be a better PIR sensor sneak.

    Also, what a great video. Any chance John Park will do a weekend project? Even one? Please?

    1. Pete,
      I want to see you put this theory to the test (our futures may depend on it) so the Maker Shed is going to send you a PIR sensor free of charge if you are willing to move an appropriately large hunk of decaying matter in front of it and see if it triggers. Game? If so, email me your details.
      -John

  2. John & All,

    Here’s a project I recently implemented using just such a PIR sensor and an LED array to turn the lights on in the bathroom for 5 minutes when you enter. (The light goes back to ‘dim’, not off, so you wont get trapped in the dark).

    http://blog.unixbigot.id.au/2009/11/simple-presence-sensing-led-lighting.html

    My implementation uses an ATTiny45, but it’ll compile for the Arduino chip just fine with a few tweaks. I’ll port it to Arduino’s Processing language if anyone’s interested.

      1. My pleasure (& thanks for your kind words).

        One more protip for IR sensing installations—zombies may not emit IR, but cats do :)

        The sensor light I installed on the ceiling of my bedroom ensuite turned out to be a bad idea…moving the sensor to the wall fixed it.

    1. Great, let us know how it goes. I got that shirt at the Kid Robot store in Santa Monica, and it’s one of my favorites!

  3. Hellow everyone!
    I have a PIR and a arduino and i just wish to learn how i put this together to turn on some LED’s when I move around.
    Thank You!
    and ps (sorry for my english):)

Comments are closed.

Tagged

John Edgar Park likes to make things and tell people about it. He builds project for Adafruit Industries. You can find him at jpixl.net and twitter/IG @johnedgarpark

View more articles by John Edgar Park