Motion detection is valuable in many battery powered building automation applications, from basic security sensors to fully interactive camera systems. These systems rely on accurate, low power motion detection to maximize battery life by keeping powerful processors and wireless radios shut down when not needed. This design provides a low power, high-performance, and very cost competitive motion detection solution using an analog passive infrared (PIR) motion sensor and the MSP430FR2355. The MSP430FR2355 has integrated Smart-Analog Combos (SACs) that include operational amplifiers (OpAmps) and digital to analog convertors (DACs). The SACs can provide the PIR sensor’s entire signal chain, integrated inside the MSP430. The SACs are software configurable, allowing the signal chain to be easily adjusted for higher sensitivity and range, digital feedback loops, and optimized for low power performance. This application report addresses ultra low power, high performance PIR design theory and test results using the MSP430FR2355.
MSP430™ is a trademark of Texas Instruments.
All trademarks are the property of their respective owners.
There are several different types of sensors that can be used to detect basic motion, but the most common solution for the last decade has probably been using PIR sensors. PIR sensors are based on Wien’s displacement law, which states that black-body radiation curve for different temperature will peak at different wavelengths that are inversely proportional to the temperature. Basically, if you monitor the infrared spectrum, objects of different temperature will radiate different levels of energy. Figure 1-1 shows what you see in images taken with infrared camera.
PIR motion detectors are passive sensors that used to detect general motion of people or animals. Instead of all the pixels seen in the IR images above, the PIR motion detectors typically generally only have only two sensing elements, as seen in Figure 1-2. These two sensing elements will be physically offset from each other, giving each of them slightly different fields of view (FOV). Each sensor will respond to general changes in temperature in its FOV. Only two sensors may sound limiting, but analyzing the combined signal from both sensor elements can provide a decent amount of information to be captured.
As a person moves across both fields of view, the sensor will output a wave form from the sensing elements as the person passes from one sensor elements FOV through the next one. This waveform can be seen in Figure 1-3. As seen in Figure 1-3(a), The direction of this signal can tell us the direction of motion. In Figure 1-3(b). The amplitude of the signal can indicate the distance of the object or possibly the size of the individual/animal. Finally, in 3C, the speed of motion will also affect the speed of the waveform seen. In a given hallway, a walking person will have a different signature than a running person. An adult will have a different signature than that of a child or pet.
There are usually two main specifications that are chosen when designing a motion detector for a specific application, maximum range and minimum motion speed. Generally, PIR motion detectors try to detect up to 10-12 meters and the motion frequency range is usually .7 Hz to 30 Hz. The exact performance needed for the application will affect how sensitive the system will need to be, from signal conditioning but also in software thresholding. The further away you want to monitor, the smaller the amplitude of the signals and the lower the signal to noise ratio. Typical signal levels at the output of a PIR sensor are in the micro-volt range for motion of distant objects, so it is necessary to amplify and filter the signal. The lower the minimum speed, the harder it will be to slowly slip past the monitor but the system will be more susceptible it to false triggers from environmental variation.
False detections are very undesirable, especially in battery powered applications. Typically the PIR Motion detection is monitoring while an application is in a low power mode. False detections will wake the rest of the system or trigger false alarms. This risk vs the sensitivity stated above must be weighed when designing a system. Traditionally a PIR’s signal chain was designed with a specific use case in mind and designed with a fixed gain and bandwith in hardware, which means it had a fixed detection distance and speed. Fortunately, using the MSP430FR2355 with integrated SACs, the signal chain can actually be configured via software offering much greater flexibility without changing anything in hardware.
Finally, there are both analog and digital PIR sensors on the market. The digital sensors have the signal chain and detection algorithms integrated in them. They are easier to integrate into applications, but usually come with a significant added cost that makes them unsuitable for low cost applications. This document focuses on analog PIR sensors as they reduce overall system cost and can easily be integrated with the built-in SAC signal chain.
Figure 1-4 illustrates the traditional PIR motion detector signal chain. The signal from the PIR sensor is fed through a series of gain band-pass filters, that usually include DC blocking caps, and then fed to a set of comparators for low and high side waveform detection, acting as a window comparator.
As mentioned in the introduction, this signal chain is fixed and limited. For the band-pass filters, the gain and cutoff frequencies are configured specifically for a particular detection range and motion speed. Typical cutoff frequencies are around .7 – 30Hz and overall signal gain may be as high as 1000x.
Another downside of this signal chain we found during our investigation, is that these DC filter caps actually end up being very large noise sources for the signal chain. Ceramic surface mount capacitors are usually made of barium titanate, which has a piezoelectric effect, meaning any noise or vibration actually generates small noise signals on the caps. Tantalum capacitors at such low frequencies can also introduce noise onto the signal. Coupling this noise with up to 1000x gain in the signal chain can return a very poor signal to noise ratio. In Figure 1-5, the signal from a PIR sensor was fed into the above signal chain and a capacitor free signal chain using the MSP430FR23355 in parallel. It is much easier to see the motion signal with the capacitor free circuit.
The biggest benefit of the MSP430FR2355 is that this entire signal chain is integrated into the MCU and is software configurable. The MSP430FR2355 includes four smart analog combos (SACs). Each of these SACs include an general purpose op-amp with configurable gain from 1-32x and a 12-bit reference DAC. Figure 1-7 illustrates the simplified interface to the PIR sensor leveraging the full signal chain inside the MSP430FR2355. The SACs can be chained together inside the chip, connected directly to the internal ADC, and can be shutdown for lowest possible sleep currents.
Software is a powerful piece of the MSP430 PIR Motion Detector. As mentioned, the software controls the analog signal chain and feedback loops. The signal is also being sampled via the ADC, which allows digital filter techniques to be applied to the detection and feedback loops. This application note includes source code for the PIR motion detection demo. This demo software is intended to accelerate the development of a PIR solution using MSP430FR235x MCU, but this software is only a part of a complete system and is intended to be used only as a reference.