Circuit Documentation
Summary of the Circuit
This circuit is designed to interface an LDR (Light Dependent Resistor) module with an Arduino UNO microcontroller. The LDR module's digital output (DO) is connected to one of the Arduino's analog inputs (A0) to allow for light intensity measurement. Additionally, the circuit includes a red LED with a series resistor that can be controlled by the Arduino through one of its digital pins (D13). The LED and the LDR module are powered by the Arduino's 5V supply, and all components share a common ground.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins Used: 5V, GND, A0, D13.
LDR Module 3 pin
- Description: A light sensor module with a digital output.
- Pins Used: VCC, GND, DO.
Resistor
- Description: A passive two-terminal electrical component that implements electrical resistance as a circuit element.
- Value: 220 Ohms.
LED: Two Pin (red)
- Description: A red light-emitting diode.
- Pins Used: cathode, anode.
Wiring Details
Arduino UNO
- 5V connected to LDR Module VCC.
- GND connected to LDR Module GND and LED cathode.
- A0 connected to LDR Module DO.
- D13 connected to one end of the Resistor (pin2).
LDR Module 3 pin
- VCC connected to Arduino UNO 5V.
- GND connected to Arduino UNO GND.
- DO connected to Arduino UNO A0.
Resistor
- pin1 connected to LED anode.
- pin2 connected to Arduino UNO D13.
LED: Two Pin (red)
- anode connected to one end of the Resistor (pin1).
- cathode 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:
}
Note: The provided code is a template and does not include specific functionality. It needs to be completed with the logic for reading the LDR module's output and controlling the LED.
This documentation provides an overview of the circuit's components, their connections, and the initial code template for the Arduino UNO. Further development of the code is required to achieve the desired functionality.
