Infrared sensors are a staple component of many programming projects. Builders utilize them for everything from remote controls to home security. Understanding how an IR sensor works enables engineers and hobbyists to use them to their full potential.
Types of infrared sensors and their features
Infrared Radiation (IR) refers to wavelengths on the electromagnetic spectrum. These waves are longer than visible red light, making them invisible to humans. Infrared radiation begins at around 700 nanometers and continues up to wavelengths of approximately one millimeter. Fortunately, these invisible objects emit thermal radiation as a heat signature, so we can use thermal detection equipment to observe these wavelengths.
IR sensors come in two basic formats: active and passive. An active sensor can emit infrared radiation as well as receive it, while a passive sensor only receives radiation. Passive IR sensors form the basis of motion-based controllers due to their:
- Simplistic circuitry
- Low power consumption
- Features that can be easily applied across devices
PIR sensor functionality
At their most basic level, passive IR (PIR) sensors operate similarly to dial-display thermometers. In a thermometer, the needle connects to a strip made of two different metals with different expansion rates. The needle moves in accordance with the expansion differential between the two metals.
Similarly, PIR sensors are made up of two side-by-side slots. The slots are made of a crystalline material, and together they form the face of the sensor. Each half allows the electromagnetic radiation to enter onto an IR-sensitive material. Here’s an overview of how passive infrared sensors function:
1. The sensor activates when it detects a differential in the IR radiation perceived between the two different pieces. This construction is especially useful for detecting motion, since anything that moves on the plane containing the two slots (such as a person walking) will necessarily register first on one piece, then both, then the second.
2. The sensor registers these changes. If they are large enough, the sensor activates an output signal to drive whatever response the user has intended. This response can be anything from activating another circuit to outputting temperature data.
3. The sensor may convert the change in IR data to an electrical pulse. The pulse will output an analog signal proportional to the change.
4. Fresnel lenses focus the infrared radiation onto the sensor slots. They either focus directly or use parabolic mirrors that focus the infrared radiation in reflection.
Of course, users must apply IR sensors in appropriate scenarios to be useful. For instance, since these sensors register both changes in their environment and heat signals that break the “expected” temperature, you should install them in environments with stable average temperatures.
If you install an IR sensor with an HVAC system in its field of view, you may not get an adequate reading. Similarly, when installing PIR sensors, be careful to set the threshold for the differential carefully. If not, you may end up activating the sensor needlessly (if it is too sensitive) or failing to activate when you’d like (if it requires too great a differential).
PIR sensor uses
Because of their low power consumption, PIR sensors are a natural fit for motion-sensitive applications. And since they operate on wavelengths outside the visible spectrum of light, these sensors can pick up readings equally well regardless of ambient lighting conditions. This makes them ideal for:
- Security applications, either at home or for business
- Motion-sensitive light switches
- Motion-sensitive thermostats
You can also set up your PIR motion sensors to adjust to gradually changing temperatures, though it will still activate in response to sudden temperature changes. This mode helps the sensors respond accordingly in environments that experience temperature change throughout the day.