Circuit Documentation
Summary
This circuit is designed to detect motion using an HC-SR501 PIR motion sensor and respond by lighting up an LED. The Arduino UNO microcontroller is used to process the sensor input and control the LED. A resistor is used to limit the current flowing through the LED.
Component List
HC-SR501 PIR Motion Sensor
- Description: A passive infrared sensor used to detect motion.
- Pins: Output, Ground, Power Supply
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
LED: Two Pin (Red)
- Description: A red light-emitting diode.
- Pins: Cathode, Anode
Resistor
- Description: A resistor with a resistance of 1000 Ohms.
- Pins: Pin1, Pin2
- Properties:
- Resistance: 1000 Ohms
Wiring Details
HC-SR501 PIR Motion Sensor
- Power Supply pin is connected to 5V on the Arduino UNO.
- Ground pin is connected to GND on the Arduino UNO and the cathode of the LED.
- Output pin is connected to D2 on the Arduino UNO.
Arduino UNO
- 5V is connected to the Power Supply pin of the HC-SR501 PIR motion sensor.
- GND is connected to the Ground pin of the HC-SR501 PIR motion sensor and the cathode of the LED.
- D2 is connected to the Output pin of the HC-SR501 PIR motion sensor.
- D3 is connected to Pin2 of the resistor.
LED: Two Pin (Red)
- Cathode is connected to GND on the Arduino UNO and the Ground pin of the HC-SR501 PIR motion sensor.
- Anode is connected to Pin1 of the resistor.
Resistor
- Pin1 is connected to the Anode of the LED.
- Pin2 is connected to D3 on the Arduino UNO.
Code Documentation
Arduino UNO Code
File Name: sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
File Name: documentation.txt
This code initializes the Arduino UNO but does not contain any specific logic for the motion sensor or LED. You can add your custom logic in the setup() and loop() functions to handle the motion detection and LED control.
