5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10

Arduino UNO R3/MEGA 2560 R3 Project 23: PIR Motion Sensor

Posted by Fiona Su on


Pyroelectric infrared motion sensor can detect infrared signals from a moving person or moving animal, and output switching signals. It can be applied to a variety of occasions to detect the movement of human body. Conventional pyroelectric infrared sensors require body pyroelectric infrared detector, professional chip, complex peripheral circuit, so its size is much more bigger, with complex circuit and lower reliability.
Now we launch this new pyroelectric infrared motion sensor,which is specially designed for Arduino. It uses an integrated digital body pyroelectric infrared sensor, and has smaller size, higher reliability, lower power consumption and simpler peripheral circuit.

Video Tutorial


  • Input Voltage: 3.3 ~ 5V, 6V Maximum
  • Working Current: 15uA
  • Working Temperature: -20 ~ 85 ℃
  • Output Voltage: High 3V, low 0V
  • Output Delay Time (High Level): About 2.3 to 3 Seconds
  • Detection Angle: 100 °
  • Detection Distance: 7 meters
  • Output Indicator LED (When output HIGH, it will be ON)
  • Pin Limit Current: 100mA
  • Size: 30*20mm
  • Weight: 4g


Connection for REV4:



Connection for mega2560:


Sample Code

byte sensorPin = 3;

byte indicator = 13;
void setup()

void loop()
  byte state = digitalRead(sensorPin);
  if(state == 1)Serial.println("Somebody is in this area!");
  else if(state == 0)Serial.println("No one!");

Test Result

If the sensor detects someone moving nearby, D13 indicator on REV4 board will light up, and "Somebody is in this area!" is displayed on the serial monitor of Arudino software.
If no detecting the movement, D13 indicator on REV4 board will be off, and "No one!" is displayed on the serial monitor.

All Tutorial



Leave a comment

Please note, comments must be approved before they are published