Designing with PIR motion detectors: part 1

Imagine waking up in the middle of the night to find that all of your motion-sensitive lights have suddenly turned on. Now you’re stuck wondering whether there is a stranger in your home or if Fluffy the dog simply triggered the lights while on a quest for a midnight snack. This is just one example of why false trigger avoidance is necessary in motion-detector designs.

Motion detectors are becoming ubiquitous in applications ranging from building security systems to lighting and automatic door control. When your lights false trigger, it’s simply a nuisance. When your security system goes off accidentally or a heavy door refuses to open, it becomes a much larger problem.

In the past, advanced motion-detector designs with false-trigger avoidance have relied on the use of two passive infrared (PIR) sensors and a microwave sensor. This implementation does the job, but can be very expensive and extremely power-hungry, thus preventing any possibility of going wireless.

TI’s Advanced Motion Detector Using PIR Sensors Reference Design For False Trigger Avoidance demonstrates another option. This implementation uses two PIR sensors, each with different Fresnel lenses, to detect various types of motion and decrease blind spots. One lens with a middle beam detects tall moving bodies, such as a walking human. The second lens has a lower beam that detects smaller moving bodies, such as a pet. Figure 1 shows the field of view.


Figure 1: Dual PIR sensor coverage area

Using two PIR sensors only solves part of the problem, however. The PIR sensors can still be “tricked” by a human rolling on the floor (who might be a burglar). The sensor would register someone in the lower beam as a pet and ignore them, which is not the desired result. Time-frequency domain analysis counteracts this issue. The frequency spectrum of a human walking, a pet moving and a human rolling on the floor will vary in time, typically between 0 to 5Hz. By applying a wavelet transform of each PIR sensor signal – which provides time-frequency information – it’s now possible to detect the difference between each type of movement, and to have a signature for different kinds of motion.

In Figure 2, you can see the result of the wavelet transform in a scalogram view. The figure shows human motion, pet motion and a human rolling on the floor. The shape of the spectrum in the time-frequency domain varies depending on the type of motion.


Figure 2: Continuous wavelet transform of two PIR sensor signals for walking human (a), walking pet (b), and human rolling on the floor (c)

The same wavelet transform can detect other types of motion including a falling human, a fire and external changes in sunlight levels, as well as being able to differentiate between a human adult and a human child.

By eliminating the microwave sensor, the advanced motion detector now uses lower power. This opens the door to customizable deployment, even in wireless applications. The Advanced Motion Detector Using PIR Sensors Reference Design For False Trigger Avoidance works with different microcontrollers (MCUs) and digital signal processors (DSPs) depending on the level of data processing required. My team used the MSP432P4015 LaunchPad™ development kit when testing the design.

Using two PIR sensors and a wavelet transform based on low-cost electronics has many applications and can solve many customer problems. These motion detectors will be able to adapt to different environments and detect more than just human motion. In the second installment of this series, I will discuss occupancy and indoor localization through the use of multiple PIR sensors.

Additional resources: