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

Arduino Nano-Based Light and Motion Sensing System

View and Edit Project In Cirkit DesignerImage of Arduino Nano-Based Light and Motion Sensing System

Circuit Documentation

Summary of the Circuit

This circuit is designed to interface a PIR (Passive Infrared) sensor, a photocell (Light Dependent Resistor, LDR), and a red LED with an Arduino Nano microcontroller. The PIR sensor is used to detect motion, the photocell measures light levels, and the LED serves as an indicator. The Arduino Nano controls the behavior of the LED based on the inputs from the PIR sensor and the photocell. A resistor is included in the circuit to form a voltage divider with the photocell for analog light level sensing.

Component List

PIR Sensor

Photocell (LDR)

LED: Two Pin (red)

Arduino Nano

Resistor

Wiring Details

PIR Sensor

Photocell (LDR)

LED: Two Pin (red)

Arduino Nano

Resistor (10kΩ)

Documented Code

The code for the Arduino Nano is structured with a setup() function that runs once at the start and a loop() function that runs continuously.

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

The setup() function is used to initialize the pins as inputs or outputs and to set up any other initial conditions. The loop() function contains the main logic of the program, which will read the sensor inputs, process the data, and control the LED accordingly.

The provided code is a template and does not contain any specific logic. The user is expected to fill in the setup() and loop() functions with the desired behavior for the circuit.