Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

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


Related

Comments

  1. pete says:

    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. John Park says:

      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. The Unix Bigot says:

    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. John Park says:

      Nice build and an excellent writeup, thanks for sharing it.

      1. The Unix Bigot says:

        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.

  3. BlinkUp says:

    Very good post, will try it out.

    Where did you get your t-shirt, Love It!

    1. John Park says:

      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!

  4. UrsuTvG says:

    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):)

  5. Will Knapp says:

    quick question…how would one use the PIR motion sensor without an arduino and only an LED?

  6. Will Knapp says:

    quick question…how would one do it with out and arduino and only a LED?