Qwiic PIR Hookup Guide

Pages
Contributors: El Duderino, Englandsaurus
Favorited Favorite 0

Troubleshooting

Assembling and testing the Qwiic PIR is fairly straight-forward but in case you run into any issues we've outlined a few tips and tricks for testing the PIR here.

Detection Area/Field of View

The effective detection area of both the EKMC4607112K and EKMB1107112 is dependent on a variety of factors. The specifications for measurement range are based on a target concept (area of ~700×250mm) of a human body moving across two detection zones at a speed of 1m/s. The PIR senses objects best when moving across two detection zones on the horizontal (X) or vertical (Y) axes. The PIR may struggle to detect objects moving away or toward the PIR (along the Z axis) unless they also move along the other two axes.

Also note that background IR radiation can influence the PIR's ability to detect an object. The PIR can detect objects with a larger temperature difference from the background at a larger range. Refer back to the Hardware Overview section for range specifications at different temperature differences.

Take these detection factors into consideration when selecting the mounting position of your Qwiic PIR. Section 4-7 of the sensors' spec sheets (EKMC4607112K and EKMB1107112) show diagrams for optimal sensor placement and object motion for sensing performance.

Qwiic PIR Not Recognized on I2C Bus

The examples included in both the Arduino and Python libraries will freeze if the Qwiic PIR does not acknowledge on the I2C bus. The most common cause of this is a poor or incomplete connection either using the Qwiic connectors or PTH header. Check your Qwiic cables for a secure connection to the Qwiic connectors or for damage. If using the PTH header, double check your solder joints and wires to make sure they are complete and secure.

Another common cause for this error is if the Qwiic PIR is set to an alternate address. The examples assume the PIR uses the default I2C address (0x12) and will freeze if the code is not adjusted to reflect a change in address. For example, if the ADR jumper is set to switch the address to 0x13, the begin(); function in the Arduino Library can be adjusted as follows:

language:c
pir.begin(0x13);

Similarly, the Qwiic PIR object can be created in the Python package at an alternate address using the following code:

language:python
QwiicPIR(0x13)

Finally, Raspberry Pi users encountering this error should check to make sure the I2C bus is enabled. Refer to this section of our Raspberry Pi SPI & I2C tutorial for detailed instructions on enabling the bus.

General Troubleshooting

If you need technical assistance and more information on this or another SparkFun product that is not working as you expected, we recommend heading on over to the SparkFun Technical Assistance page for some initial troubleshooting:

If you don't find what you need there, the SparkFun Forums are a great place to find and ask for help. If this is your first visit, you'll need to create a Forum Account to search product forums and post questions.