user-img

Dharani Creations

+ Follow

Automatic night light sensor | Day OFF / Night ON

This project demonstrates a simple light-sensitive switch: it turns lights OFF during the day and ON at night. Ideal for street lights, garden illumination, or home automation.

Automatic night light sensor | Day OFF / Night ON
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Hardware Components

  • LDR

    X 1 fenxiang
  • BC547 Transistor

    X 1
  • 12v Relay Module 10a

    X 1
  • Resistors

    X 1
  • Breadboard

    X 1
  • 1N4007

    X 1

Tools, APP Software Used etc.

  • Fritzing

Story

Overview

This project demonstrates a simple light-sensitive switch: it turns lights OFF during the day and ON at night. Ideal for street lights, garden illumination, or home automation.

Materials Required

  • LDR (Light Dependent Resistor / photoresistor)

  • BC547 (or equivalent) NPN transistor

  • Relay module (e.g. 12 V coil, SPDT)

  • Resistors (e.g., 10 kΩ, 330 Ω)

  • Zero PCB board or breadboard

  • Power supply (e.g. 9–12 V DC)

  • Diode (e.g. 1N4007) for back‑EMF protection

  • Optional: manual switch, LED indicator

Circuit Diagram

  • LDR forms half of a voltage divider, paired with a fixed resistor.

  • The voltage divider’s output is fed to the transistor base.

  • When it’s bright (day), the LDR resistance is low → base voltage low → transistor OFFrelay OFFlight OFF.

  • In darkness (night), LDR resistance increases → base voltage rises → transistor switches ON, activating the relay and powering the light.

Step-by-Step Instructions

  1. Construct the voltage divider: LDR + fixed resistor → center node to transistor base through ~1 kΩ resistor.

  2. Use BC547 as a switch: emitter to ground, collector to relay coil.

  3. Relay coil powered from 12 V; diode placed antiparallel across coil.

  4. Connect the relay’s output contacts to drive the external lighting circuit or LED.

  5. Power the circuit with a steady DC supply.

  6. (Optional) Add a manual override switch in series with load or relay.

Calibration & Tips

  • Adjust fixed resistor to set light/dark threshold; can use a potentiometer for tuning Arduino Forum.

  • Add hysteresis or time delay (e.g. via averaging or capacitor) to avoid flickering from passing shadows or clouds.

  • Install LDR away from the controlled light source to prevent feedback switching.

Example Arduino Variant

Some variations use an Arduino to read analog input from LDR and control a relay with code thresholds (e.g., activate when LDR reading drops below ~700)

Applications

  • Street and outdoor lighting control

  • Automated garden lights

  • Emergency lighting systems

  • Home automation for energy saving

Safety Notes

  • When switching AC mains, take proper insulation precautions or use a solid‑state relay.

  • For DC loads, ensure transistor and relay ratings are adequate.

  • Always include a flyback diode across relay coils to protect transistor.

Troubleshooting

 

Issue Solution
Light stays ON in day LDR may be shaded; increase sensitivity threshold or clean sensor
Lights flicker intermittently Introduce time delay or hysteresis in design
Relay chatter/clicking often Check power stability; use proper decoupling and delay
Transistor overheating Ensure base resistor value correct; check transistor ratings
Schematic and Layout
  • Diagram

    2_bb_531794166688720f275076.jpg
    Download(2)
  • Github Project

    https://github.com/DharaniCreations/Automatic-night-light-sensor/tree/main
    View
  • You Tube

    https://youtu.be/j17iE2s1JKE
    View
Topic
View All

Automatic night light sensor | Day OFF / Night ON

This project demonstrates a simple light-sensitive switch: it turns lights OFF during the day and ON at night. Ideal for street lights, garden illumination, or home automation.

69
 
3
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 3 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Country: Shipping Way:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Supported Purchase: Full After-sales Protection