Digital_Infrared_motion_sensor_(SKU_SEN0018) - jimaobian/DFRobotWiki GitHub Wiki
Introduction
This is a simple to use motion sensor. Power it up and wait 1-2 seconds for the sensor to get a snapshot of the still room. If anything moves after that period, the 'alarm' pin will go low.
Specification
- Type: Digital
- Supply Voltage:3~5V
- Current:50μA
- Working temperature:0℃~+70℃
- Output level(HIGH):4V
- Output level(LOW):0.4V
- Detect angle:110 Degree
- Detect distance:7 meters
- Size:28mm×36mm
- Weight:25g
Application
- Automatic door
- Infrared burglar alarm
- The highway vehicle traffic counter
Pinout
|---------|------------------------------------------------------------------------------|
| **Num** | **Label** |
| 1 | Digital Signal Out |
| 2 | VCC |
| 3 | GND |
| 4 | **Jumper Selection**: Repeatable trigger and unrepeatable trigger selection.
- **H**: Repeatable trigger
- **L**: Unrepeatable trigger |
| 5 | **Potentiometer**: To adjust trigger latency from 0.5s to 50s. | |
Tutorial
Connection Diagram
Sample Code
const int buttonPin = 2;
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop()
{
if (digitalRead(buttonPin) == HIGH)
{
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite(ledPin, LOW);
}
}
Result
When sensors detect people closed, the light will be lighted.
FAQ
'''Q1. '''Some general Arduino Problems/ FAQ/ Tips, very good to know. |
'''A. '''Clike the topic link on DFRobot Forum.
For any question/advice/cool idea to share, please visit DFRobot Forum.
More
: shopping from dfrobot store or dfrobot distributor.
category: Product Manual category: SEN Series category: Sensors category:source category:Diagram