Difference between revisions of "Sensor-PIR"

From Microduino Wiki
Jump to: navigation, search
(Features)
Line 22: Line 22:
 
*With high precision and sensitivity.  
 
*With high precision and sensitivity.  
 
*Low power consumption, long service life and good stability.   
 
*Low power consumption, long service life and good stability.   
*Large-scale operation voltage 
 
 
*Digital signals
 
*Digital signals
*Small size and easy to install.  
+
*Small size and easy to install.
+
 
 
==Specification==
 
==Specification==
 
*Electrical specification
 
*Electrical specification

Revision as of 08:43, 10 November 2016

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

  • 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