Light/Dark Detector Project

    Create an automatic night light that turns on in the dark and off when there's light.

    Required Components

    Order your parts from Amazon or AliExpress and help support us.

    💡 Tip: These are affiliate links to fund the site's free content.

    Components Required

    • LDR (Light Dependent Resistor)
      x1
    • Transistor (BC547)
      x1
    • Potentiometer (10kΩ)
      x1
    • LED (any color)
      x1
    • Resistor (330Ω)
      x1
    • 9V Battery & Connector
      x1

    Instructions (Dark Detector)

    This circuit acts as an automatic night light. The key component is the LDR, whose resistance changes with light intensity. We use this change to control a transistor that acts as a switch for the LED.

    1. Understand the Voltage Divider: The 10kΩ potentiometer and the LDR create an adjustable voltage divider. This allows you to fine-tune the light level at which the circuit activates.
    2. Assemble the Circuit:
      • Connect one outer terminal of the 10kΩ potentiometer to the +9V supply.
      • Connect the other outer terminal of the potentiometer to one lead of the LDR.
      • Connect the other lead of the LDR to Ground (GND).
      • Connect the center terminal (the wiper) of the potentiometer to the base of the BC547 transistor (Q1).
      • Connect the emitter of the transistor to Ground.
      • Connect the collector of the transistor to the 330Ω resistor (R1).
      • Connect the other end of the resistor to the cathode (shorter lead) of the LED.
      • Connect the anode (longer lead) of the LED to the +9V supply.
    3. Calibrate and Test: Power the circuit. By turning the potentiometer's knob, you adjust the voltage sent to the transistor's base. Find a position where the LED turns on when you cover the LDR and turns off when it's exposed to light.

    To build a Light Detector (LED on in light): Simply swap the positions of the LDR and the potentiometer in the circuit.

    Electronic circuit board

    About This Project

    This project is a perfect introduction to sensors and analog electronics. By building it, you'll learn how voltage dividers work and how transistors can be used to amplify a small signal to control a larger load.

    Schematic

    Light/Dark Detector Circuit SchematicA simplified diagram of a dark-activated LED circuit using an LDR and a transistor.+9VGNDVR1 10kΩ LDR Q1 330ΩR1LED

    Cookie Consent

    We use cookies to enhance your experience and analyze site traffic. Your privacy is important to us.