Difference between revisions of "Sensor-PIR"

From Microduino Wiki
Jump to: navigation, search
m (Fengfeng moved page Microduino-PIR to Sensor-PIR)
(No difference)

Revision as of 05:22, 22 July 2016

Language: English  • 中文
Microduino-PIR

Microduino-PIR is a pyroelectric infrared sensor that can detect infrared rays sent from moving human body or animals. It can output switch signals and be used in various occasions that need to detect moving human body.

Features

  • Adopt digital integrated pyroelectric infrared probe AM412.
  • With high precision and sensitivity.
  • Low power consumption, long service life and good stability.
  • Large-scale operation voltage
  • Digital signals
  • Small size and easy to install.

Specification

  • Electrical specification
    • Input voltage: 3.3-5V(6V to the maximum)
    • Working current: 15uA
    • Working temperature: -20~85℃
    • Output voltage: 5V(high level), 0V(low level)
  • Tech parameters
    • Output delay time(high level): 2.3-3s
    • Sensing angle: 100°
    • Sensing distance: 7m
  • Size
    • Size of the board: 20mm*10mm
    • 1.27mm-pitch 4Pin interface.
  • Way of connection
    • Pin description: GND, VCC, signal and NC.
MCookie-Passive Infrared-sensor.JPG

Document


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
Passive Infrared.jpg

Preparation

  • Setup 1:Connect the PIR to the D6 of the Hub.
MCookie-Passive Infrared-sensor.JPG
  • Setup 2:Assemble the CoreUSB, Hub and the PIR together, then connect them to the computer.
MCookie-pir-pc.JPG

Experiment: Detect If there is person moving

  • Open Arduino IDE and copy the following codes 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 in (Tools)→(Serial Port)under Arduino IDE.
Upload.JPG
  • Compile and then download the program.
  • After the download, you can open the serial monitor. The displayed notice reflects the status detected by the current sensor.
MCookie-pir-res.JPG
  • Result

When the PIR is detecting the moving persons, it'll output high level in the output pin, which is 5V. And when it detected the PIR signal gone, it'll output low level(0V) after 2.3-3s delay. Therefore, we can according to that to establish a moving person detection project according to that.

Program Debugging

  • "#define sensorPin 6" defines sensor interface.
  • Use "" digitalRead(sensorPin); to read sensor change and to judge if there is moving human body.

Application

  • Intrusion alarm
  • Non-contact infrared automatic switch


Project

Purchase

History

Image

  • Front
File:Microduino-Passive Infrared-F.JPG
Microduino-Passive Infrared Front
  • Back
File:Microduino-Passive Infrared-b.JPG
Microduino-Passive Infrared Back