Circuit Documentation
Summary of the Circuit
This circuit consists of an Arduino UNO microcontroller, a PIR (Passive Infrared) sensor, and a red two-pin LED. The Arduino UNO is used as the central processing unit to control the behavior of the circuit. The PIR sensor detects motion and sends a signal to the Arduino, which then processes the input and controls the LED accordingly. The LED serves as an indicator, lighting up when motion is detected by the PIR sensor.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Purpose: Acts as the central processing unit of the circuit, reading sensor inputs and controlling the LED.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13.
PIR Sensor
- Description: A motion-detecting sensor that outputs a signal when motion is detected.
- Purpose: Detects motion and sends a signal to the Arduino UNO.
- Pins: VDD, SIG, GND.
LED: Two Pin (red)
- Description: A basic red light-emitting diode.
- Purpose: Serves as an indicator that lights up in response to the PIR sensor's signal.
- Pins: cathode, anode.
Wiring Details
Arduino UNO
- 5V connected to PIR sensor VDD.
- GND connected to PIR sensor GND and LED cathode.
- D13 connected to LED anode.
- D2 connected to PIR sensor SIG.
PIR Sensor
- VDD connected to Arduino UNO 5V.
- SIG connected to Arduino UNO D2.
- GND connected to Arduino UNO GND.
LED: Two Pin (red)
- cathode connected to Arduino UNO GND.
- anode connected to Arduino UNO D13.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Notes
- The code provided is a template and does not contain any functional code to control the LED or read the PIR sensor. The user must implement the logic within the
setup()andloop()functions. - The
setup()function is used for initializing settings, such as pin modes. Theloop()function contains the main logic that runs continuously. - To control the LED, the corresponding pin (D13) should be set as an output, and to read the PIR sensor, the pin (D2) should be set as an input.
- The actual behavior, such as turning the LED on when motion is detected, should be coded within the
loop()function.
