Circuit Documentation
Summary
This circuit integrates an Arduino UNO microcontroller with a PIR (Passive Infrared) sensor and a bulb. The PIR sensor is used to detect motion, and upon detection, it can trigger the bulb to turn on. The Arduino UNO serves as the central processing unit, controlling the power to the bulb based on the signal from the PIR sensor.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Purpose: Acts as the central control unit for the circuit, processing input from the PIR sensor and controlling the bulb.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13.
PIR Sensor
- Description: A sensor that detects motion by measuring changes in the infrared levels emitted by surrounding objects.
- Purpose: Senses motion to trigger the bulb to turn on.
- Pins: VDD, SIG, GND.
Bulb
- Description: An electric light source.
- Purpose: Provides illumination when powered.
- Pins: GND, power.
Wiring Details
Arduino UNO
- 5V connected to PIR sensor VDD.
- GND connected to PIR sensor GND and bulb GND.
- D3 connected to PIR sensor SIG.
- D2 connected to bulb power.
PIR Sensor
- VDD connected to Arduino UNO 5V.
- SIG connected to Arduino UNO D3.
- GND connected to Arduino UNO GND.
Bulb
- Power connected to Arduino UNO D2.
- GND connected to Arduino UNO GND.
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 provided code is a template and does not contain any functional logic. It needs to be populated with the setup and loop functions to control the bulb based on the PIR sensor's signal.
- The
setup()function should initialize the pin modes, and theloop()function should contain the logic to read the PIR sensor's output and control the bulb accordingly. - The
D2pin on the Arduino UNO should be set as an output to control the bulb, and theD3pin should be set as an input to read the signal from the PIR sensor.
