Electorials Electronics
Published © GPL3+

Project 004: PIR Motion Sensor Project

An extremely straightforward project involving a digital PIR sensor, which can be utilised for many security and home automation uses.

EasyProtip12 minutes5
Project 004: PIR Motion Sensor Project

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
You could use any other Arduino board as well. The Keyestudio Uno is used in this example.
×1
Grove - PIR Motion Sensor
Seeed Grove - PIR Motion Sensor
Any 3-pin digital PIR motion sensor can work fine.
×1
Jumper wires (generic)
Jumper wires (generic)
3 Male to Female Jumper Wires
×3
LED (generic)
LED (generic)
A LED of any colour.
×1
USB-A to B Cable
USB-A to B Cable
Depends on the Arduino.
×1
PCBWay Custom PCB
PCBWay Custom PCB
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

C bwd9lf3pye

Schematics

S wv0put0dqy

Code

Arduino PIR Motion Sensor Project Code

C/C++
int ledPin = 13;
int pirPin = 9;
int val = 0;
void setup()
{
  pinMode(ledPin, OUTPUT);
  pinMode(pirPin, INPUT);
}
void loop()
{
  val = digitalRead(pirPin);
  digitalWrite(ledPin, val);

if (val ==1)
  digitalWrite(ledPin, LOW);
}

Credits

Electorials Electronics

Electorials Electronics

3 projects • 0 followers

Comments

Add projectSign up / Login