Motion detection using pyro-electric and passive infrared

28th October 2019
Alex Lynn

In our increasingly connected world, there are a rising number of applications that benefit from the ability to detect people or objects, including building energy management (BEM) systems that control the environment in homes, offices, factories and other buildings.

By Martin Keenan, Technical Director, Avnet Abacus

BEM systems are growing in importance and popularity as energy costs rise and environmental issues come to the fore. Their ability to deliver light and / or heat only when it is needed offers significant efficiencies and cost savings.

There are multiple ways to detect the presence of people or objects, including technologies such as radar or laser. However, people detection normally uses one of two popular technologies, either pyro-electric / passive infrared (PIR) or ultrasonic, mainly due to their small size, low cost, ease of implementation and reliability. Both of these use entirely different principles to each other and have different advantages, meaning that they are selected based upon the needs of each individual application. When considering which technology to adopt, designers should also consider environmental factors such as the presence of dust and smoke, as this will affect the choice of sensor.

The fundamental principle which enables PIR sensors to operate is based on Wien’s Law. This states that each and every object emits heat energy in the form of radiation, provided that its temperature is above absolute zero. Furthermore, Wien’s Law goes on to state that the wavelength of this radiation is inversely proportional to the temperature. As humans are always above absolute zero, they are capable of triggering a PIR sensor.

Figure 1: Block diagram of an IoT connected human sensor using a PIR as the main sensing element

PIR sensors are typically PCB-mount devices constructed in a small metal can that have two slots which expose pyroelectric material to the environment. It is this material that converts the heat radiation to a small electrical signal, indicating the presence of a warm object, such as a human or a pet.

The pyroelectric materials are wired in antiphase such that when the person is detected by the first ‘window’ a positive pulse is generated, and as they then pass in front of the second ‘window’ a negative pulse is generated. Using a simple analogue circuit based upon a pair of operational amplifiers, these pulses can be used to trigger an external device or to provide an input to a microcontroller.

Figure 2: Typical signal processing for a PIR sensor

The detection radius for a bare sensor is often quite narrow and, depending upon the size of the room in which the PIR is placed, this may mean that only a small detection area is available. As a result, a Fresnel type lens made from semi-opaque plastic is often fitted over the sensing element. The arrangement of the elements of the Fresnel lens defines the detection pattern and concentrates heat radiation energy from a wide area onto the small sensing surfaces.

In addition, it is quite common to add an IR filter between the Fresnel lens and the front of the sensor to restrict the wavelengths that are able to hit the pyroelectric elements to those that are of interest. By applying Wien’s Law, we can see that the IR energy from a human body normally has a wavelength of around 10µm.

PIR sensors are a valuable and very popular means of detecting humans, especially as they enter or leave a space, which is why a primary use is in security / alarm systems. However, one limitation is that the person has to be moving to be detected, as PIR sensors only measure changes within the emitted IR within their field of operation. A further issue that should be borne in mind is that PIR technology can be susceptible to RF interference. With the prevalence of technologies such as WiFi and Bluetooth, these false alarms are more common than before. The susceptibility to RF interference for PIR devices varies by manufacturer, with some offering solutions with a high level of RF immunity.

Another method of detecting people is to detect their physical presence, rather than relying on temperature or IR energy. Using the principle of reflected sound waves, ultrasonic devices are able to detect an object in front of them – this could be any sizable object, including humans and inanimate objects.

Ultrasonic detection is performed using a pair of devices, one of which is a transmitter and the other is a receiver. The transmitter emits a burst of sound, which is essentially a mechanical wave as it displaces air, at a frequency that is typically in the range 30kHz to 10MHz. This frequency range is chosen, in part, as it is inaudible to humans.

These sound waves will bounce off the first object they encounter and be reflected back to be picked up by the receiver. In the case of an empty room, the sound waves will bounce off the wall opposite where the sensor is placed – the reception pattern for this forms a ‘baseline’ and any change in this pattern indicates that there is an object (probably a human) present in the room. Ultrasonic sensors are useful in measuring the presence of easy-to-detect objects (including walls) up to 6m away, and humans up to 3m away.

As the speed of sound in air is relatively constant (temperature does have a small effect on it) then by measuring the time that elapses between the pulse of sound being sent and the reflections being received, the distance of the object to the sensor can be calculated. For this reason, these types of system are known as ‘Time of Flight’ (ToF) systems. While this principle is used extensively in ultrasonic measuring devices, such as those used in taking room measurements when selling a home, most building control systems simply want to know that there is a human somewhere in the room and, as a result, the lights should be on.

Figure 3: Ultrasonic sensors can be used for room-level sensing and individual robotic appliances

Again, the circuitry required to take the output from the receiver and produce a signal that indicates the presence of a human is relatively simple with ultrasonic sensors. This can be the input to a BEM system where it can be used to control lights or HVAC, or both.

Generally speaking, ultrasonic sensors are reducing in size and increasing in versatility as technology advances, making them able to be used in more applications.

Although we have considered the use of PIR and ultrasonic sensors as part of larger BEM systems, they are equally applicable in small stand-alone systems. Many, if not most, motion operated lights are controlled by PIR-based motion detectors. It is also possible to replace standard light switches with a PIR sensor, so that the light is switched on as someone enters the room.

Another very popular use for PIR detection is in alarm systems to detect intruders. They are difficult to tamper with, as the intruder will be detected while they are still metres away, long before they can reach the sensor and disable it. In fact, in a connected system, the same PIR sensor could be used to turn the lights on and, when the building is unoccupied, detect intruders.

Ultrasonic sensing can be used to replace tape-based tools for measuring rooms to create plans of homes, offices or other buildings. It is also used to check for cracks in large structures such as buildings or aeroplanes where the sound pulses are reflected by the air-filled crack that is a discontinuity in the material. This allows cracks to be detected long before they become severe enough to be seen by eye.

As basic robots are making an appearance in domestic settings, such as devices to vacuum or clean floors, or larger but similar robots to mow lawns, the ability to detect obstacles is becoming very useful. It is common to use ultrasonic technology for this, as it is both simple and reliable. It is also used on some vehicles to detect obstacles when parking, as well as to facilitate more modern systems such as self-parking or blind spot detection.

While many liquid level detection systems use a probe that is inserted into the liquid, there can be disadvantages to this, especially where flammable or corrosive liquids are concerned. Embedding an ultrasonic sensor in the roof of the tank allows a non-contact measurement of the level of the liquid and, knowing the shape of the tank allows the remaining volume of liquid to be calculated. Adding a communication function would allow remote tanks to communicate with a system that facilitated auto-replenishment once a pre-set threshold level was reached.

While the uses of these two technologies are wide and varied, and it is expected that this will only expand as more device types and applications are added to the IoT, presence and motion detection remain primary uses for PIR and ultrasonic technologies.

On November 6th, Avnet Abacus will be hosting a webinar in conjunction with Murata, which will provide an in-depth analysis of these technologies, addressing the important factors to consider when choosing a motion detention sensor. For more details, and to register, click here.

Featured products

Upcoming Events

View all events
Latest global electronics news