Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Based PIR Motion Detector

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based PIR Motion Detector

Circuit Documentation

Summary of the Circuit

This circuit consists of an Arduino UNO microcontroller board interfaced with a PIR (Passive Infrared) sensor. The PIR sensor is used to detect motion through changes in infrared levels emitted by objects in its field of view. The Arduino UNO is responsible for processing the signal from the PIR sensor and executing programmed responses to motion detection.

Component List

Arduino UNO

PIR Sensor

Wiring Details

Arduino UNO

PIR Sensor

Documented Code

The code for the Arduino UNO is written in Arduino's programming language (based on C/C++) and is used to initialize the microcontroller and define the behavior of the circuit upon detecting motion with the PIR sensor.

void setup() {
  // Initialize digital pin D5 as an input from the PIR sensor
  pinMode(5, INPUT);
}

void loop() {
  // Read the signal from the PIR sensor
  int sensorValue = digitalRead(5);

  // Implement logic based on the sensor value
  // For example, if motion is detected (sensorValue is HIGH), perform an action
  if (sensorValue == HIGH) {
    // Action to be taken when motion is detected
  }
}

Note: The provided code is a template and does not contain specific actions to be taken upon motion detection. The user should implement the desired behavior within the if statement in the loop function.