PIR (Passive Infrared) sensors are used to detect motion, specifically things that emit heat radiation like humans and pets. They're commonly seen in the corners of rooms as part of an alarm system.
This is a mini PIR sensor, the tiny lil' bro of our standard PIR sensor. This smaller version is handy for prototyping as the pins pop straight into a breadboard, and the compact format also makes it better for embedding in your own projects and enclosures. Downsides? Slightly lesser range and takes a little longer to trigger.
These sensors pick up targets around the 5m range and are super easy and flexible to use - you can power it from 3-12V DC as it has an onboard regulator. Digital signal output is 3.3V high/low, with the signal going high for 2 seconds when motion is detected.
Pin connections for your microcontroller are simple. Always power down your microcontroller before wiring up, and triple check your connections as you may damage the sensor if wired incorrectly:
- Pin #1 to GND (Pin 1 has the 'U' next to it, see the example here for orientation)
- Pin #2 to output signal
- Pin #3 to 3-12V
The lens is focused to 2-5 meters away with a 100-degree spread. More motion sensors available here!
- Adafruit PIR tutorial
- Our own Mini PIR Raspberry Pi Pico tutorial (from our Maker Advent Calendar)