Difference between revisions of "Passive Infrared Sensor"
(→Equipment) |
(→Preparation) |
||
Line 47: | Line 47: | ||
===Preparation=== | ===Preparation=== | ||
*Setup 1:Connect the PIR and the Hub D6. | *Setup 1:Connect the PIR and the Hub D6. | ||
− | [[file:mCookie- | + | [[file:mCookie-PIR-sensor.JPG|600px|center]] |
*Setup 2:Stack the CoreUSB, Hub and PIR together and connect them to the computer with a USB cable. | *Setup 2:Stack the CoreUSB, Hub and PIR together and connect them to the computer with a USB cable. | ||
[[file:mCookie-Sound-pc.JPG|600px|center]] | [[file:mCookie-Sound-pc.JPG|600px|center]] |
Latest revision as of 04:28, 9 November 2015
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 |