Qwiic PIR Hookup Guide

Pages
Favorited Favorite 0

Introduction

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.

SparkFun Qwiic PIR - 170uA (EKMC4607112K)

SparkFun Qwiic PIR - 170uA (EKMC4607112K)

SEN-17374
$20.95
1
SparkFun Qwiic PIR - 1uA (EKMB1107112)

SparkFun Qwiic PIR - 1uA (EKMB1107112)

SEN-17375
$30.95

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.

If you would prefer to directly monitor the sensors' digital outputs, check out our standard breakouts of the 170uA PIR and 1uA PIR.

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.

Required Materials

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:

SparkFun RedBoard Qwiic

SparkFun RedBoard Qwiic

DEV-15123
$19.95
9
SparkFun Thing Plus - ESP32 WROOM

SparkFun Thing Plus - ESP32 WROOM

WRL-15663
$20.95
7
SparkFun RedBoard Artemis

SparkFun RedBoard Artemis

DEV-15444
$19.95
8
SparkFun Qwiic Micro - SAMD21 Development Board

SparkFun Qwiic Micro - SAMD21 Development Board

DEV-15423
$20.95
5

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.

NVIDIA Jetson Nano Developer Kit (V3)

NVIDIA Jetson Nano Developer Kit (V3)

DEV-16271
$99.00
11
SparkFun DLI Kit for Jetson Nano

SparkFun DLI Kit for Jetson Nano

KIT-16308
$174.95
5

SparkFun Raspberry Pi 4 Desktop Kit - 4GB

KIT-16386

Raspberry Pi 4 Model B (2 GB)

DEV-15446
4

If your preferred microcontroller or SBC does not have a Qwiic connector, you can add one using one of the following products:

SparkFun Qwiic pHAT v2.0 for Raspberry Pi

SparkFun Qwiic pHAT v2.0 for Raspberry Pi

DEV-15945
$6.95
2
SparkFun Qwiic Shield for Arduino

SparkFun Qwiic Shield for Arduino

DEV-14352
$6.95
6
SparkFun Qwiic Shield for Thing Plus

SparkFun Qwiic Shield for Thing Plus

DEV-16790
$4.25
SparkFun Qwiic Shield for Arduino Nano

SparkFun Qwiic Shield for Arduino Nano

DEV-16789
$4.25

Finally, you'll need at least one Qwiic cable to connect your Qwiic PIR to your microcontroller:

Flexible Qwiic Cable - 500mm

Flexible Qwiic Cable - 500mm

PRT-17257
$1.95
Qwiic Cable - 100mm

Qwiic Cable - 100mm

PRT-14427
$1.50
Flexible Qwiic Cable - 50mm

Flexible Qwiic Cable - 50mm

PRT-17260
$0.95

Qwiic Cable - 200mm

PRT-14428

Suggested Reading

If you aren't familiar with the Qwiic system, we recommend reading here for an overview:

Qwiic Connect System

We would also recommend taking a look at the following tutorials if you aren't familiar with the concepts covered in them:

What is an Arduino?

What is this 'Arduino' thing anyway? This tutorials dives into what an Arduino is and along with Arduino projects and widgets.

I2C

An introduction to I2C, one of the main embedded communications protocols in use today.

Serial Terminal Basics

This tutorial will show you how to communicate with your serial devices using a variety of terminal emulator applications.

Raspberry Pi 4 Kit Hookup Guide

Guide for hooking up your Raspberry Pi 4 Model B basic, desktop, or hardware starter kit together.