Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Nano and LDR-Based Smart Light Control with 5V Relay

View and Edit Project In Cirkit DesignerImage of Arduino Nano and LDR-Based Smart Light Control with 5V Relay

Circuit Documentation

Summary

This circuit is designed to control an AC bulb using a Light Dependent Resistor (LDR) and a 5V relay, all managed by an Arduino Nano. The LDR senses the ambient light level and sends the data to the Arduino Nano, which then controls the relay to turn the AC bulb on or off based on the light level. The circuit is powered by a 12V power supply and a 220V AC power source.

Component List

  1. LDR (Light Dependent Resistor)

    • Pins: A0, D0, GND, VCC
    • Description: A sensor that changes its resistance based on the light intensity.
    • Purpose: To sense the ambient light level.
  2. 5V Relay

    • Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
    • Description: An electromechanical switch that can be controlled by a low voltage signal.
    • Purpose: To control the AC bulb based on the signal from the Arduino Nano.
  3. AC Bulb

    • Pins: P, N
    • Description: A standard AC bulb.
    • Purpose: To provide illumination.
  4. Arduino Nano

    • Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
    • Description: A small, complete, and breadboard-friendly microcontroller board.
    • Purpose: To process the data from the LDR and control the relay.
  5. 12V Power Supply

    • Pins: +, -
    • Description: A power supply that provides 12V DC.
    • Purpose: To power the Arduino Nano and other components.
  6. 220V Power Supply

    • Pins: hot wire, neutral wire
    • Description: A standard 220V AC power source.
    • Purpose: To power the AC bulb.

Wiring Details

LDR (Light Dependent Resistor)

5V Relay

AC Bulb

Arduino Nano

12V Power Supply

220V Power Supply

Documented Code

Arduino Nano 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 file is intended to provide documentation for the Arduino Nano code.