Difference between revisions of "Sensor-PIR"

From Microduino Wiki
Jump to: navigation, search
m (Fengfeng moved page Microduino-PIR to Sensor-PIR)
 
(10 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|-
 
|-
 
|
 
|
[[File: Microduino-Passive Infrared.jpg|400px|thumb|right| Microduino-PIR]]
+
[[File: Microduino-Passive Infrared.jpg|400px|thumb|right| Sensor-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.  
+
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==
 +
{{ST_Pinout
 +
|st_name=PIR Sensor
 +
|pin3=Digital Input
 +
}}
  
 
==Features==
 
==Features==
Line 11: Line 20:
 
*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==
 +
*Voltage
 +
**3.3V~5V working voltage
 
*Electrical specification
 
*Electrical specification
**Input voltage: 3.3-5V(6V to the maximum)
 
 
**Working current: 15uA
 
**Working current: 15uA
 
**Working temperature: -20~85℃
 
**Working temperature: -20~85℃
**Output voltage: 5V(high level), 0V(low level)
+
**Output voltage: high level 5V, low level 0V
*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.
 
  
[[file:mCookie-Passive Infrared-sensor.JPG|600px|center]]
+
*Size
 +
**Size of the board: 23.5mm*13mm
 +
**1.27mm-spacing 4Pin interface 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==
 
==Document==
*Schematic:'''[[File: Microduino_Passive Infrared.Zip]]'''
+
*Schematic diagram: '''[[File: Sensor-PIR.Zip]]'''
 
+
*Main chip: '''[[File:HS612 datasheet.pdf ]]'''
  
 
==Development==
 
==Development==
===Equipment===
+
===Program Download===
{|class="wikitable"
+
*Download and unzip the program '''[[File:Sensor-PIR_Test.zip]]'''
|-
 
|Module||Number||Function
 
|-
 
|[[mCookie-CoreUSB]]||1||Core board
 
|-
 
|[[mCookie-Hub]]||1||Sensor pin board
 
|-
 
|[[Microduino-PIR]]||1||Pyroelectric infrared sensor
 
|}
 
  
*Other hardware equipment
+
===Programming===
**One USB cable
+
{{Upload
[[File:Passive Infrared.jpg|600px|center]]
+
|nameA=[[Microduino-Core]], [[Microduino-USBTTL]]
 +
|nameB=[[Microduino-USBTTL]]
 +
|boardName=Microduino/mCookie-Core(328p), Atmega328P@16M,5V
 +
|fileName=Sensor-PIR Test.ino
 +
}}
  
===Preparation===
+
===Hardware Setup===
*Setup 1:Connect the PIR to the D6 of the Hub.
+
*Referring to the following diagram, connect the Sensor-PIR to the digital pin D6 of '''[[Microduino-Sensorhub]]'''.
[[file:mCookie-Passive Infrared-sensor.JPG|600px|center]]
+
<br>
*Setup 2:Assemble the CoreUSB, Hub and the PIR together, then connect them to the computer.
+
[[file:Microduino-sensorhub_Crash.JPG|thumb|400px|left]]
[[file:mCookie-pir-pc.JPG|600px|center]]
+
<br style="clear: left"/>
  
===Experiment: Detect If there is person moving ===
+
===Result===
*Open Arduino IDE and copy the following codes into IDE.
+
*After download, open the serial monitor.  
<source lang="cpp">
+
*The static sensor signal is LOW. After detect the IR emitted by living things within measurement range, it changes into HIGH.
#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);
 
}
 
</source>
 
*Select the right port in (Tools)→(Serial Port)under Arduino IDE.
 
[[file:upload.JPG|600px|center]]
 
*Compile and then download the program. 
 
[[file:upload-pir.JPG|600px|center]]
 
*After the download, you can open the serial monitor. The displayed notice reflects the status detected by the current sensor.
 
[[file:mCookie-pir-res.JPG|600px|center]]
 
*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==
 
==Application==
Line 103: Line 77:
  
  
 
==Purchase==
 
  
 
==History==
 
==History==
  
==Image==
+
==Gallery==
 
+
{| border="0" cellpadding="10" width="100%"
*Front
+
|-
[[file: Microduino-Passive Infrared-F.JPG|thumb|600px|center|Microduino-Passive Infrared Front]]
+
|width="50%" valign="top" align="left"|
*Back
+
[[file: Microduino-Passive Infrared-F1.JPG|thumb|400px|center|Sensor-PIR Front]]
[[file: Microduino-Passive Infrared-b.JPG|thumb|600px|center|Microduino-Passive Infrared Back]]
+
|width="50%" valign="top" align="left"|
 +
[[file: Microduino-Passive Infrared-b1.JPG|thumb|400px|center|Sensor-PIR Back]]
 +
|}
 
|}
 
|}

Latest revision as of 06:57, 4 August 2017

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

PIR Sensor
General Pin Out Sensor / Trinket's Pin Out
PIN1 (GND) GND
PIN2 (VCC) VCC
PIN3 (SIGNAL-A) Digital Input
PIN4 (SIGNAL-B) Not Connected
  • General Pin Out is the standard pin out of a Sensor / Trinket connector.
  • Sensor / Trinket's Pin Out is this specific Sensor / Trinket's wiring in relation to the General Pin Out.
  • SIGNAL-A / SIGNAL-B are signals that could be digital input, digital output, analog input or analog output. Or special signals such as serial communication (SoftwareSerial, IIC (I2C), etc) or other special signals.
  • Not Connected refers to the Pin not being used for this particular Sensor / Trinket.
  • Read more about the hub module.

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 interface 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

Program Download

Programming

  • Follow the Software Getting Started Guide.
  • Select the Board, Processor and Port.
  • Click [File]->[Open], browse to the project program address, and click "Sensor-PIR Test.ino" to open the program.
  • After confirming all these items are correct, click "→" to download the program to the development board.

Hardware Setup

  • Referring to the following diagram, connect the Sensor-PIR to the digital pin D6 of Microduino-Sensorhub.


Microduino-sensorhub Crash.JPG


Result

  • After download, open the serial monitor.
  • The static sensor signal is LOW. After detect the IR emitted by living things within measurement range, it changes into HIGH.

Application

  • Intrusion alarm
  • Non-contact infrared automatic switch


Project

History

Gallery

Retrieved from "https://wiki.microduinoinc.com/index.php?title=Sensor-PIR&oldid=21502"