Arduino UNO Light-Activated Alarm with KY-018 LDR and Loudspeaker
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a KY-018 LDR Photo Resistor, and a Loudspeaker. The Arduino UNO serves as the central control unit, interfacing with the LDR to detect light levels and driving the Loudspeaker to produce sound.
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
KY-018 LDR Photo Resistor
- Description: A light-dependent resistor used to detect light levels.
- Pins: Signal, VCC, Ground
Loudspeaker
- Description: A device that converts electrical signals into sound.
- Pins: pin1, pin2
Comment
- Description: Placeholder for comments in the circuit design.
- Pins: None
Wiring Details
Arduino UNO
- 5V: Connected to VCC of KY-018 LDR Photo Resistor
- GND: Connected to Ground of KY-018 LDR Photo Resistor and pin1 of Loudspeaker
- D11: Connected to pin2 of Loudspeaker
- D0: Connected to Signal of KY-018 LDR Photo Resistor
KY-018 LDR Photo Resistor
- VCC: Connected to 5V of Arduino UNO
- Ground: Connected to GND of Arduino UNO
- Signal: Connected to D0 of Arduino UNO
Loudspeaker
- pin1: Connected to GND of Arduino UNO
- pin2: Connected to D11 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:
}
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.