KEMET Electronics Pyroelectric Infrared (IR) Sensors are innovative devices that allow you to detect the presence of a person even when the sensor is hidden from view. This capability works well, for example, when you want to transform an otherwise static poster into an animated one. Recently, KEMET took on this project to demonstrate how you can easily add presence detection capabilities to an object. For the sake of simplicity, the designers used an LED, an Arduino microcontroller board, and the KEMET SS-430 Pyroelectric IR Sensor.
The project began at the KEMET Application Intelligence Center (KAIC), located in KEMET tower. Designers working in the KAIC wanted to highlight a message within a poster in an engaging, creative way. They had their new SS-430 sensor laying around, so they decided to add it to the back of one of their informative posters made of foam core board material.
In this project, the designers attached the SS-430 Pyroelectric IR Sensor to the back of the poster and added a microcontroller (Arduino) to read the sensor and drive an LED. This setup allowed them to detect when someone placed their hand in front of the poster and then light up the switch. The setup works well as a switch. But, to understand how this circuit works, let us explain how the KEMET infrared sensor works.
KEMET’s Pyroelectric Infrared (IR) Sensors use the pyroelectric effect of ceramic by absorbing infrared rays emitted from the human body. The KEMET Pyroelectric IR Sensors are different from your grandpa’s infrared sensor, where you need a dedicated emitter IR LED illuminating an area. When an object comes into the proximity of the sensor, the IR bounces back to detect the object. The KEMET SS-430 IR Pyroelectric Sensor detects the presence of a person differently by identifying a base IR signature of the environment. When this signature changes, it generates a signal as illustrated in Figure 1.
Figure 1: Oscilloscope image of output waveform during presence detection. (Source: KEMET Electronics)
Note: When the hand approaches the embedded sensor, the signal from the sensor is two square waves of 200 milliseconds each. When the IR presence is removed from the viewing area, then a second set of square waves can be detected.
Based on the capabilities of the sensor, the designers used the following connections:
Figure 2 shows an illustration of these connections.
Figure 2: Fritzing diagram of the pyroelectric IR sensor demonstration circuit. (Source: KEMET Electronics)
Table 1 provides the Arduino code used in this project.
Table 1: Arduino Code for the KEMET SS-430 Pyroelectric IR Sensor Project.
int Pyro = A1;
unsigned long PyroRead = 0;
unsigned long IR_threshold = 198000;
// Note: SS-430 has two pulses of 200msec per detection.
// IR_threshold is in microsec (usec), therefore 198msec threshold
int LED = 7;
int Detected = LOW;
int IR_sensed = 0;
void setup() {
pinMode (7, OUTPUT); //LED Connected to Pin 7
pinMode (A1,INPUT); // IR Sensor connected to A1
}
void loop() {
while ((IR_sensed < 2)){ //Break after 2 good triggers
PyroRead = pulseIn(A1, HIGH); //Measure trigger point
if(PyroRead > IR_threshold){ //Make sure trigger is over 198msec)
IR_sensed++; //Mark as a good trigger
if (Detected == HIGH){ // Turn LED OFF if it was previous ON
Detected = LOW;
digitalWrite(7, LOW);
else {
Detected = HIGH; // Turn LED ON if it was previous OFF
digitalWrite(7, HIGH);
PyroRead = 0; // Reset readings
IR_sensed = 0;
delay(1000); // Accept triggers after a second
As soon as the program starts, it will scan the A1 pin, looking to measure a pulse. Users can expect two pulses of 200 milliseconds each when a person has been detected. Then, the users measure the pulse and determine if it is an OK pulse by counting for two pulses per triggering event. Once a trigger has been found, the LED is turned ON or OFF based on its prior status. Then, the program waits for one second before a second trigger can be processed.
As shown in this project, you can easily incorporate a KEMET Pyroelectric Infrared Sensor into a product to add presence detection capabilities. Working with KEMET’s Infrared Sensor is easy and works well when embedded into a device. You can place discrete sensors that complement the industrial design of a product by having a window or filter.
KEMET helps customers build tomorrow with electronic component solutions that exceed the highest quality, delivery, and service standards. With over 100-years of technological innovation, KEMET helps makes the world a better, safer, and more connected place to live. Discover KEMET's product lines,products, videos, and other support at Mouser.com/KEMET.
YAGEO Group makes the future possible with electrical innovations and solutions that power the world forward. With one of the broadest selections of component technologies from some of the industry’s most recognized brands, YAGEO Group components are designed to meet the diverse requirements of customers and a full range of end-market segments.