Arduino UNO-Based Light-Activated Servo Control with Push Switch and Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller, a Servo motor, a Light Dependent Resistor (LDR) module, a push switch, and a 9V battery. The Arduino UNO serves as the central controller, interfacing with the Servo motor, LDR module, and push switch. The 9V battery powers the entire circuit.
Component List
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
Servo
- Description: A motor that can be controlled to move to a specific position.
- Pins: gnd, vcc, pulse
Module LDR
- Description: A light-dependent resistor module used to detect light intensity.
- Pins: VCC, GND, DO, AO
2Pin Push Switch
- Description: A simple push-button switch.
- Pins: Input +, Output +
9V Battery
- Description: A battery providing 9V power supply.
- Pins: -, +
Wiring Details
Arduino UNO
- 5V: Connected to VCC of Module LDR, vcc of Servo, and Input + of 2Pin Push Switch.
- GND: Connected to GND of Servo, GND of Module LDR, and - of 9V Battery.
- Vin: Connected to + of 9V Battery.
- D9: Connected to pulse of Servo.
- D8: Connected to DO of Module LDR.
- D2: Connected to Output + of 2Pin Push Switch.
Servo
- vcc: Connected to 5V of Arduino UNO.
- gnd: Connected to GND of Arduino UNO.
- pulse: Connected to D9 of Arduino UNO.
Module LDR
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- DO: Connected to D8 of Arduino UNO.
2Pin Push Switch
- Input +: Connected to 5V of Arduino UNO.
- Output +: Connected to D2 of Arduino UNO.
9V Battery
- -: Connected to GND of Arduino UNO.
- +: Connected to Vin of Arduino UNO.
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 Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the Arduino UNO microcontroller.