Passive Infrared Sensor
ContentsOutlineInfrared pyroelectric sensor can detect the movement of the human or animal body issued by the infrared and output switch signal, which can be applied to projects that need to detect the movement of human body.
Infrared Probe OverviewThe sensor uses the digital integration with the human pyroelectric infrared detector AM412 integrated.
Specification
DevelopmentEquipment
Preparation
Experiment: Detect Human Movement
#define sensorPin 6
int state;
void setup()
{
pinMode(sensorPin, INPUT);
Serial.begin(9600);
}
void loop()
{
state = digitalRead(sensorPin);
if (state == 1)
Serial.println("Somebody is in this area!");
else
Serial.println("No one!");
delay(500);
}
When the infrared pyroelectric sensor detects the movement of the living body in the detection range, the output pin will output high level voltage, which is 5V. when the infrared pyroelectric signal is detected to be gone for 2.3-3s, it will output low level voltage, which is 0V. So we can quickly build a moving human detection project based on this characteristic. Program Debugging
Application
Video |