Qwiic PIR Hookup Guide
Passive Infrared (PIR) sensors are great for detecting motion in a specific area around the sensor. The SparkFun Qwiic PIR - 170uA (EKMC4607112K) and SparkFun Qwiic PIR - 1uA (EKMB1107112) use two versions of the EKM-series PIR sensors from Panasonic® to offer low profile motion-sensing options over I2C for both battery powered and continuously powered applications.
PIR sensors do not return specific distance data like distance sensors. Instead, the sensors measure IR light coming from objects in their detection area making them perfect for applications such as controlling power to devices like lights, cameras, screens, etc. automatically when motion is detected.
The Qwiic versions of these PIR breakouts feature an ATTiny84 with firmware that handles monitoring the sensor's output signal, debouncing that signal along with a configurable interrupt and translates it all to the I2C interface; making it easy to add a PIR to an existing Qwiic/I2C project.
In this guide we'll cover the hardware present on the Qwiic PIRs, how to connect them to your circuit and we'll finish things up covering both the Arduino Library and Python Package we have written for these sensors along with the examples included in both code packages.
In order to follow along with this tutorial you'll need a few items along with your Qwiic PIR. First, you'll need a microcontroller to communicate with the board. Below are a few options that come Qwiic-enabled out of the box:
We also have a Python package available for the Qwiic PIRs so you can use a single-board computer (SBC) like a Raspberry Pi or Jetson Nano as your controller as well.
If your preferred microcontroller or SBC does not have a Qwiic connector, you can add one using one of the following products:
Finally, you'll need at least one Qwiic cable to connect your Qwiic PIR to your microcontroller:
If you aren't familiar with the Qwiic system, we recommend reading here for an overview:
We would also recommend taking a look at the following tutorials if you aren't familiar with the concepts covered in them: