smart light using light sensor(ldr)

 Introudction

 

Before going through this project, Please read about LM 393 through this  link. 

This project is an automatic light control system that turns a bulb on when it gets dark and off when it's bright. It uses an LM393 comparator to compare light levels detected by an LDR (Light Dependent Resistor). A potentiometer adjusts the sensitivity, allowing you to set the desired darkness level for the light to turn on.

When the LDR senses low light (high resistance), the LM393 triggers a relay, switching on the bulb. In bright conditions (low LDR resistance), the circuit turns the bulb off. This simple and efficient system is perfect for automating streetlights, garden lights, or indoor lighting to save energy.

 

What to know what is LM 393. Go to this link .

 

Materials Required for Automatic Light Control Project 🛠️💡

Here’s what you’ll need to build your LM393-based automatic light sensor:

  • LM393 Comparator IC 🧩 – The brain of the circuit that compares LDR and potentiometer voltages.
  • LDR (Light Dependent Resistor) 🌞➡️🌚 – Detects light levels (resistance changes with brightness).
  • 10KΩ Potentiometer 🔧 – Adjusts the light sensitivity threshold.
  • Resistors (e.g., 10KΩ, 1KΩ) ⚡ – For voltage divider and pull-up/down configurations.
  • Relay Module (5V, Active LOW) 🔄 – Switches the bulb ON/OFF based on the LM393 output.
  • Breadboard & Jumper Wires 🏗️ – For easy prototyping and connections.
  • 5V Power Supply (or 9V Battery with regulator) 🔋 – Powers the circuit.
  • Bulb (LED or AC bulb with holder) 💡 – The light you want to control.

  1.  

     

    Working Principle of Automatic Light Control Using LM393 🤖💡

    This project works by comparing light levels (using an LDR) with a reference voltage (set by a potentiometer). The LM393 comparator decides when to turn the light ON or OFF based on this comparison.


    🔧 Step-by-Step Working:

    1️⃣ Light Sensing (LDR Voltage Divider)

    The LDR (Light Dependent Resistor) changes its resistance based on light:

    Bright Light ☀️ → Low Resistance → Lower Voltage at inverting input (-).

    Darkness 🌙 → High Resistance → Higher Voltage at inverting input (-).

    A fixed resistor forms a voltage divider with the LDR, converting its resistance into a measurable voltage.

     

    2️⃣ Reference Voltage (Potentiometer Adjustment)

    The potentiometer sets a threshold voltage at the non-inverting input (+).
    By turning the knob, you decide at what light level the bulb should turn on.

     

    3️⃣ LM393 Comparator Decision

    The LM393 compares the LDR voltage (inverting - input) with the potentiometer voltage (non-inverting + input).

    If LDR Voltage > Potentiometer Voltage (Dark)Output = LOW (0V) → Relay activates → Bulb TURNS ON.

    If LDR Voltage < Potentiometer Voltage (Bright)Output = HIGH (Vcc) → Relay deactivates → Bulb TURNS OFF.

     

    4️⃣ Relay Switching (Active LOW Control)

    The relay is Active LOW, meaning:

    LOW (0V) Output → Relay ON → Bulb lights up.

    HIGH (5V) Output → Relay OFF → Bulb turns off.

 

 

Post a Comment

0 Comments