Passive infrared (PIR) sensor tutorial


[ladyada] has a freshly-published and amazingly thorough tutorial on passive infrared (PIR) motion sensors. Most often seen in security floodlights and automatic doors, in creative hands these sensors can be put to other uses—cat flaps, camera triggers and purely artistic applications—as you’ll see in several demo projects and videos. For the curious, the tutorial provides a good amount of background theory on how PIR sensors work, along with the associated fresnel lens optics. And for those who just want to get hacking, most PIR sensors (like the one above) come in a simple-to-interface module containing all the support hardware and providing a simple digital output; the article wraps up with one such example.


  1. Wolf says:

    Not a bad PIR tutorial but This one‘s still my favorite. The manual from the product page is even more detailed, but it’s in pdf form.

  2. macegr says:

    Basically: apply power. If something moves, then the signal will go high. Sometimes you need to use a transistor or analog pin if the high signal isn’t 5V TTL compatible. On another note, I got a bunch of great PIR sensors for $1 each at the Silicon Valley Electronics Flea Market. They run on 12V, and have adjustable sensitivity and timeout. Right now I actually have a PIR sensor watching my office and logging the motion to Pachube:

  3. just/me says:

    Using ready-to-use PIR modules is lame.
    Self made modules are the key to rule the world…

  4. pt says:

    @just/me – where is your self-made module tutorial? i’d love to check that out.

  5. Phil Burgess says:

    @pt: I’m pretty sure just/me was satirizing the rash of Arduino bitterness as of late.

    At least I *hope* that’s what they meant!

  6. pt says:

    @phil – darn, i was hoping to see that tutorial or article!

  7. FIRESTORM_v1 says:

    I picked up a PIR sensor from Radio Shack a while ago. Great little gadget although not as powerful as the security-designed devices.

    Think RadioShack finally figured out that the hackers are their bread and butter. They’ve started carrying sensors from Parallax and can sometimes be cheaper than them at the store.

  8. Phill says:

    How does a passive infrared sensor see?

  9. PIR is good for detecting heat body. I use that sensor in firefighting robot.

  10. strider_mt2k says:

    Keep an eye out for any place re-doing their security systems too.

    Some times they simply “dumpsterize” that stuff and it is yours for the picking.

  11. GJC says:

    For PIR lens arrays:

  12. usmc_1371 says:

    pir sensors have been commonly used by insurgents in Iraq and Afghanistan as initiation devises for roadside bombs.

  13. billymonster says:

    will a radar detector pick ur a pir signiture

  14. jlau says:

    What type and how brite a light do I need to burn the element of a PIR sensor?

  15. Prasad says:

    How lux parameter plays important role when choosing PIR sensor?plz reply…..

  16. Raj says:

    Can we use this sensor or sensor module for detecting fire? or flame?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 97,759 other followers