Sensor-PIR

From Microduino Wiki
Revision as of 08:49, 10 November 2016 by Fengfeng (talk) (Document)
Jump to: navigation, search
Language: English  • 中文
Sensor-PIR

The product number of Sensor-PIR is: MSDI51

Sensor-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.


Introduction of Pins

Sensor backpin.png
  • Pins of the sensor:
    • PIN1: GND
    • PIN2: VCC
    • General signal pins:
      • PIN3(IO1): digital/analog signal
      • PIN4(IO2): NC(null)
    • Special signal pins:
      • If it is IIC: IO1/IO2 are respectively SDA/SCL.
      • If it is soft serial port: IO1/IO2 are respectively tx/rx.
  • Special to Sensor-PIR sensor pins
    • PIN1: GND
    • PIN2: VCC
    • PIN3(IO1): Digital read
    • PIN4(IO2): NC


Microduino sensor can communicate with core module through the connection with Microduino-Module Sensor Hub.


Features

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

Specification

  • Voltage
    • 3.3V~5V working voltage
  • Electrical specification
    • Working current: 15uA
    • Working temperature: -20~85℃
    • Output voltage: high level 5V, low level 0V
  • Size
    • Size of the board: 23.5mm*13mm
    • 1.27mm-spacing 4Pin itnerface connected to sensorhub
    • The CAD drawing of the sensor: File:Sensor CAD.zip
  • Technical parameters
    • Output delay(high level): about 2.3~3s
    • Induction angle: 100°
    • Induction distance: 7m
  • Connection
    • This sensor can be connected to the following interfaces of core: D2~D13,A0~A7

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