Shopping Bag

0 item(s) in cart/ total: $0    view cart
Grove - PIR Motion Sensor

Grove - PIR Motion Sensor

review
0
0
5
Your Price: $8.90
Out of Stock
Part Number:DEV-0019
This is a simple to use PIR motion sensor with Grove compatible interface. Simply connect it to Stem shield and program it, when anyone moves in its detecting range, the sensor outputs HIGH on its SIG pin.  
 
The detecting range and response speed can be adjusted by 2 potentiometers soldered on its circuit board, The response speed is from 0.3s - 25s, and max 6 meters of detecting range. 
Note: Potentiometers are not included. 
 
Specifications
  • Grove compatible interface
  • Voltage range: 3V–5V
  • 2.0cm x 4.0cm twig module
  • Detecting angle: 120 degree
  • Detecting distance: max 6m  (3m by default)
  • Adjustable detecting distance and holding time
Application Ideas
  • Motion sensor
  • Thief-guarding System
  • Switch
  • Industrial automation
For all Grove users (especially beginners), we provide you guidance PDF documents. Please download and read through Preface - Getting Started and Introduction to Grove before your using of the product.

From Seeedstudio Wiki

Introduction

This is a simple to use PIR motion sensor with Grove compatible interface. This sensor allows you to sense motion, usually human movement in its range. Simply connect it to Grove - Base shield and program it, when anyone moves in its detecting range, the sensor will output HIGH on its SIG pin.

Specification

Operating Voltage: 5V
Operating Current(VCC = 3V): 100uA
Operating Current(VCC = 5V): 150uA
Measuring Range: 3m by default (support 0.1 - 6m)
Holding Time: 1 - 25s
Working Wave Length: 7 - 14um
Detecting Angle: 120 degree

Usage

The following sketch demonstrates a simple application of sensing montion. When someone moves in its detecting range, it will output High through its SIG pin and the LED will light. Otherwise, it will output LOW. Then you can use it to detect the motion of people.

PIR Motion test.jpg

 
/*******************************************************************************/
/*macro definitions of PIR motion sensor pin and LED pin*/
#define PIR_MOTION_SENSOR 2//Use pin 2 to receive the signal from the module 
#define LED	4//the Grove - LED is connected to D4 of Arduino

void setup()
{
	pinsInit();
}

void loop() 
{
	if(isPeopleDetected())//if it detects the moving people?
		turnOnLED();
	else
		turnOffLED();
}
void pinsInit()
{
	pinMode(PIR_MOTION_SENSOR, INPUT);
	pinMode(LED,OUTPUT);
}
void turnOnLED()
{
	digitalWrite(LED,HIGH);
}
void turnOffLED()
{
	digitalWrite(LED,LOW);
}
/***************************************************************/
/*Function: Detect whether anyone moves in it's detecting range*/
/*Return:-boolean, ture is someone detected.*/
boolean isPeopleDetected()
{
	int sensorValue = digitalRead(PIR_MOTION_SENSOR);
	if(sensorValue == HIGH)//if the sensor value is HIGH?
	{
		return true;//yes,return ture
	}
	else
	{
		return false;//no,return false
	}
}

Note: The detecting distance and holding time can be adjusted by adding two extra potentiometers on board. For the details please refer to the V1.2 Eagle below. The module can also be set as retriggerable or un- retriggerable by changing the jumper hat.

Resources

Related Items

Recently Viewed Items