Difference between revisions of "Passive Infrared Sensor"

From Microduino Wiki
Jump to: navigation, search
(Preparation)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
|-
 
|-
 
|
 
|
==Objective==
+
==Outline==
 
+
Infrared 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.
This tutorial shows you the way to use Micorduino pyroelecctric infrared radial sensor.
+
<br />
 
+
Traditional pyroelectric infrared sensors need to be used to realize the thermal release infrared probe, the special chip and the complex peripheral circuit. Its size is slightly larger, the circuit is complex and the reliability is lower. The infrared pyroelectric sensor adopts the digital integration of human pyroelectric infrared probe with small size, high reliability, low power consumption, simple peripheral circuit and so on.
==Equipment==
+
===Infrared Probe Overview===
*'''[[Microduino-CoreUSB]]'''
+
The sensor uses the digital integration with the human pyroelectric infrared detector AM412 integrated.
*'''[[Microduino-PIR]]'''
+
<br />
*'''[[Microduino-Sensorhub]]'''
+
Am412 is a pyroelectric infrared probe with intelligent digital control circuit and body sensitive detection integrated in an electromagnetic shield.
*'''[[Microduino-BUZZER]]'''
+
The movement of the human body signal can be induced by the human body detection sensitive element and be coupled into a digital intelligent integrated circuit chip through a very high impedance differential input circuit. There will be a delayed high level output when the PIR signal exceeds a selected digital threshold. All the signal processing is done on one chip.
 
+
<br />
 +
==Specification==
 +
*Electrical specification
 +
**Input Voltage: 3.3~5V (MAX6V)
 +
**Currency: 15uA
 +
**Temperature: 20~85℃
 +
**Output Voltage: High level 5V/ Low level 0V
 +
*Tech Parameters
 +
**Output Delay Time(high level): Around 2.3s -3s
 +
**Sensing Angle: 100°
 +
**Sensing Distance: 7m
 +
*Size
 +
**Board Size:20mm*10mm
 +
**1.27mm-pitch 4PIN interface;
 +
*Connection Method
 +
**Pin Description: GND, VCC, signal and NC.
  
 +
==Development==
 +
===Equipment===
 +
{|class="wikitable"
 +
|-
 +
|Module||Number||Function
 +
|-
 +
|[[mCookie-CoreUSB]]||1||Core board
 +
|-
 +
|[[mCookie-Hub]]||1||Sensor pin board
 +
|-
 +
|[[Microduino-PIR]]||1|| Pyroelectric Infrared sensor
 +
|}
  
 
*Other Hardware Equipment  
 
*Other Hardware Equipment  
**1x USB cable
+
**One USB cable  
 
+
[[File:Tem-Hum.jpg|600px|center]]
==Program==
 
 
 
[[https://github.com/Microduino/Microduino_Tutorials/tree/master/mCookie_sensor/MicroduinoPIR MicroduinoPIR]]
 
 
 
==Debugging==
 
 
 
Step 1:
 
Plug the passive infrared sensor into D10 of [[Microduino-Sensorhub]] and [[Microduino-BUZZER]] to D5.
 
 
 
[[File:MicroduinoPersonIR.png|600px|center|thumb]]
 
 
 
 
 
Step 2:
 
Connect USB to your PC, download the code and program it to [[Microduino-CoreUSB]]. 
 
[[File:MicroduinoPersonIR1.png|600px|center|thumb]]
 
 
 
 
 
Step 3:
 
When the sensor detects infrared activity (IE. humans or animals), the buzzer will sound.
 
[[File:MicroduinoPersonIR2.png|600px|center|thumb]]
 
  
 +
===Preparation===
 +
*Setup 1:Connect the PIR and the Hub D6.
 +
[[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.
 +
[[file:mCookie-Sound-pc.JPG|600px|center]]
  
Step 4:  
+
===Experiment: Detect Human Movement===
The buzzer turns off when there is no detection.  
+
*Open Arduino IDE and copy the following code into IDE.  
[[File:MicroduinoPersonIR3.png|600px|center|thumb]]
+
<source lang="cpp">
 +
#define  sensorPin  6
  
 +
int state;
  
==Result==
+
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);
 +
}
 +
</source>
 +
* Select the right port from (Tools)→(Serial Port) in Arduino ID after compiling and then download program.
  
You can use Microduino passive infrared sensor as an activity detection system.
+
[[file:upload.JPG|500px|center]]
 +
* Open the serial monitor after download. The displayed note reflects current detection status.
 +
[[file:mCookie-pir-res.JPG|500px|center]]
 +
*Result
 +
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===
 +
*“#define  sensorPin  6”: Define sensor interface
 +
*Use“digitalRead(sensorPin);”to read sensor change and therefore, to judge if there is human movement.
  
 +
==Application==
 +
*Intrusion alarm 
 +
*Non-contact infrared automatic switch
 
==Video==
 
==Video==
  
 
|}
 
|}

Latest revision as of 04:28, 9 November 2015

Outline

Infrared 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.
Traditional pyroelectric infrared sensors need to be used to realize the thermal release infrared probe, the special chip and the complex peripheral circuit. Its size is slightly larger, the circuit is complex and the reliability is lower. The infrared pyroelectric sensor adopts the digital integration of human pyroelectric infrared probe with small size, high reliability, low power consumption, simple peripheral circuit and so on.

Infrared Probe Overview

The sensor uses the digital integration with the human pyroelectric infrared detector AM412 integrated.
Am412 is a pyroelectric infrared probe with intelligent digital control circuit and body sensitive detection integrated in an electromagnetic shield. The movement of the human body signal can be induced by the human body detection sensitive element and be coupled into a digital intelligent integrated circuit chip through a very high impedance differential input circuit. There will be a delayed high level output when the PIR signal exceeds a selected digital threshold. All the signal processing is done on one chip.

Specification

  • Electrical specification
    • Input Voltage: 3.3~5V (MAX6V)
    • Currency: 15uA
    • Temperature: 20~85℃
    • Output Voltage: High level 5V/ Low level 0V
  • Tech Parameters
    • Output Delay Time(high level): Around 2.3s -3s
    • Sensing Angle: 100°
    • Sensing Distance: 7m
  • Size
    • Board Size:20mm*10mm
    • 1.27mm-pitch 4PIN interface;
  • Connection Method
    • Pin Description: GND, VCC, signal and NC.

Development

Equipment

Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-PIR 1 Pyroelectric Infrared sensor
  • Other Hardware Equipment
    • One USB cable
Tem-Hum.jpg

Preparation

  • Setup 1:Connect the PIR and the Hub D6.
MCookie-PIR-sensor.JPG
  • Setup 2:Stack the CoreUSB, Hub and PIR together and connect them to the computer with a USB cable.
MCookie-Sound-pc.JPG

Experiment: Detect Human Movement

  • Open Arduino IDE and copy the following code into IDE.
#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);
}
  • Select the right port from (Tools)→(Serial Port) in Arduino ID after compiling and then download program.
Upload.JPG
  • Open the serial monitor after download. The displayed note reflects current detection status.
MCookie-pir-res.JPG
  • Result

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

  • “#define sensorPin 6”: Define sensor interface
  • Use“digitalRead(sensorPin);”to read sensor change and therefore, to judge if there is human movement.

Application

  • Intrusion alarm
  • Non-contact infrared automatic switch

Video