Creators
Earth Bondhon Author
Earth Bondhon
CalculatorToolsProjectExpert
Reviewers
Małgorzata Koperska, MD Steven Wooding
Last updated: November 21, 2025

Automatic Day Night Light ON and OFF Switch | Smart Lighting Circuit

🇺🇸
English
Default
🇪🇸
Español
Spanish
🇫🇷
Français
French
🇩🇪
Deutsch
German

*Please note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Automatic Day Night Light Switch

Build an automatic day-night light switch that turns lights ON at night and OFF during the day. Learn the circuit diagram, components, working principle, assembly steps, and applications for smart lighting.

Introduction to Automatic Day-Night Light Circuits

Automatic day-night circuits use light-sensing components to detect ambient brightness and operate lamps without manual intervention. The core element is an LDR, which changes its resistance with light intensity. When light falls below a threshold, the circuit switches ON the lamp, and when the light intensity increases, it switches OFF.

clap activated 12V bulb circuit:

A Temperature Sensor Fan Controller Circuit is used to activate or deactivate a fan with regard to ambient temperature automatically. Widely used sensors include LM35 (analog, 10mV/o C), NTC thermistor (resistance depends on temperature), or DS18B20 (digital 1-wire). A comparator (LM358/LM393) is used to compare the sensor output to a user-configured threshold, or a microcontroller (Arduino/ATTiny) is used to add additional functionality (hysteresis, PWM speed control, display). A logic-level MOSFET (IRLZ44/IRLZ34N) is normally used to control DC fans silently, or a relay/SSR to control AC fans. Add hysteresis (positive feedback) or software debouncing to prevent high-frequency on/off cycling. Include filtering, an inductive load flyback diode, and adequate heat-sinking on the MOSFET. The application of this circuit can be PC cooling, cabinet ventilation, greenhouse fans, and small HVAC control. It is cheap, can be operated at low voltage, and with the right components, it can be increased to handle heavier loads.

⚡ Work & Installation (Input → Output):

  • Input (Power & Sensor): Power: 12V (common for DC fans) and a regulated 5V for sensor/logic (if required). Sensor: LM35 (analog), NTC thermistor (voltage divider), or DS18B20 (digital).
  • Sensing Stage: LM35 → 10mV/°C analog voltage. NTC → forms part of voltage divider → analog voltage proportional to temp. DS18B20 → digital temperature over 1-wire.
  • Decision Stage (Comparator / MCU):: Comparator option: LM358/LM393 compares sensor voltage to reference (set by pot). Add hysteresis via a feedback resistor to prevent chatter. MCU option: Arduino/ATTiny reads sensor (ADC or 1-wire), applies hysteresis, controls PWM or digital output; allows adjustable setpoint, multi-stage fan speeds, and display.
  • Drive Stage: Comparator/MCU output drives a transistor/MOSFET driver (use gate resistor ~100Ω). Use logic-level N-MOSFET (IRLZ44, IRLZ34N, IRLZ44N, or AOZ series) for direct DC fan switching. Include a flyback diode for inductive fans if using relays; for MOSFET switching a freewheeling diode isn't required for DC fans but an RC/snubber across motor may help. For AC fans, drive a relay or SSR with an opto-isolated driver.
  • Output (Fan): Fan positive to +12V, fan negative to MOSFET drain; MOSFET source to ground. Optionally use PWM for speed control (MCU or 555 PWM) with appropriate LC filtering for noise-sensitive fans.
  • Installation: Mount sensor where it senses ambient (not direct fan airflow unless desired). Place MOSFET on heatsink; ensure common ground between logic and power. Add LED indicators for power/fan ON and a pot for setpoint (or buttons/display with MCU).

Testing & Final Adjustments:

  • Initial checks: Verify wiring, sensor polarity, regulator outputs (5V) and MOSFET pinout. Use a multimeter to confirm voltages without the fan connected.
  • Sensor calibration: For LM35/NTC, measure sensor voltage vs known temperatures (ice water 0°C, body 37°C) to confirm scaling. For DS18B20, compare reading to a thermometer.
  • Threshold tuning: With comparator setup, slowly adjust pot and observe switching point; confirm hysteresis prevents chatter. With MCU, set hysteresis (e.g., ON at 28°C, OFF at 26°C).
  • Load test: Connect fan and simulate temperature (hot air / heat gun at a distance) — watch for clean ON/OFF or smooth PWM speed change. Monitor MOSFET temp; add heatsink or active cooling if hot.
  • Safety: Ensure fuses on power input, and transient suppression (MOV or TVS) if long cable runs exist. Run extended test cycles to ensure no false triggers. Finalize by fastening the sensor and enclosing the electronics in a ventilated box.
  • :

Frequently Asked Questions - Automatic Day Night Light Switch:

What is an automatic day-night light switch?

A circuit that turns lights ON at night and OFF during the day automatically.

Which component senses light?

Light Dependent Resistor (LDR) senses ambient light.

Can it control AC lamps?

Yes, using a relay rated for the AC load.

Is it energy efficient?

Yes, it prevents lights from operating during daylight.

Can it be used outdoors?

Yes, with proper insulation and enclosure.

How do I adjust sensitivity?

By changing the series resistor in the LDR voltage divider.

What power supply is required?

DC supply for circuit and AC supply via relay for lamp.

Is it safe for beginners?

Yes, if AC loads are properly handled and insulated.

Can it work with LEDs?

Yes, low voltage LEDs can be directly controlled or via transistor.

Does it require manual operation?

No, it operates automatically based on ambient light.

Comments

Please login to comment.

Earth Bondhon

Earth Bondhon

Calculator Tools Project

Md. Jony Islam is a highly skilled professional with expertise in electronics, electrical, mechanical, and civil engineering, as well as finance. Specializing intransformer service and maintenance for 33/11kV substations, he ensures reliable and efficient electrical systems. His mechanical engineering skills drive innovative designs, while his financial acumen supports effective project budgeting. With a strong foundation in civil engineering, he contributes to robust infrastructure development. Md. Jony Islam's multidisciplinary approach ensures efficiency, quality, and reliability across all projects.