Smart Light-Controlled Fan Using LDR and 10393 Comparator

Electronics enthusiasts love experimenting with simple yet practical projects. Today, we’re building a smart light-controlled fan using a light-dependent resistor (LDR) and a 10393 comparator. This project is perfect for beginners who want to understand how a fan can be controlled based on ambient light levels without using any microcontroller or programming.
● No coding or microcontroller is required.
● It demonstrates the working principles of a comparator circuit.
● Can be applied in various scenarios, such as cooling systems for enclosed areas.
● When it is bright, the resistance of the LDR is low, keeping the fan off.
● When it gets dark, the resistance increases, triggering the comparator to switch the fan on.
● It compares the voltage across the LDR and the reference voltage set by the potentiometer.
● When the LDR voltage crosses the threshold, the comparator output changes state.
● The comparator output then drives the transistor, which in turn controls the relay for the fan.
● The transistor acts as a switch and activates the relay.
● The relay allows current to flow to the fan, turning it on.
● When the light increases again, the comparator output reverses, switching the fan off.
● Smart Home Integration: Can be combined with other home automation projects.
● Greenhouses: Helps maintain airflow based on daylight levels.
● Humidity or Temperature Sensors: Add extra functionality for climate control.
● Solar Power: Make it eco-friendly by running it on a small solar panel.
This project not only helps in understanding the working of comparator circuits but also serves as a stepping stone for more advanced automation systems.
Project Overview
This project will automatically turn on a small fan when the surrounding light intensity decreases, such as during the evening or in a dim environment. The LDR detects the change in light, and the 10393 comparator determines whether the fan should be switched on or off.Why This Project?
● It’s a simple, practical automation project.● No coding or microcontroller is required.
● It demonstrates the working principles of a comparator circuit.
● Can be applied in various scenarios, such as cooling systems for enclosed areas.
Components Required
To build this project, you’ll need the following components:- LDR (Light Dependent Resistor) – Detects light intensity.
- 10393 Comparator (LM393 equivalent) – Compares voltage levels and switches the fan on or off.
- Potentiometer (10kΩ) – Adjusts the sensitivity of light detection.
- Transistor (BC547 or similar) – Acts as a switch to control the fan.
- Diode (1N4007) – Prevents reverse voltage damage.
- Resistors (1kΩ, 10kΩ, 100Ω, etc.) – Limits current in the circuit.
- Small 5V DC Fan – The main load of our circuit.
- Relay Module (5V) – Controls the switching of the fan.
- Battery or Power Adapter (5V-12V) – Provides power to the circuit.
- Connecting Wires and PCB or Breadboard – For assembling the circuit.
How It Works
1. Light Detection with LDR
● The LDR is a resistor whose resistance decreases when light intensity increases and vice versa.● When it is bright, the resistance of the LDR is low, keeping the fan off.
● When it gets dark, the resistance increases, triggering the comparator to switch the fan on.
2. Comparator Action (10393 IC)
● The 10393 comparator has two inputs: inverting (-) and non-inverting (+).● It compares the voltage across the LDR and the reference voltage set by the potentiometer.
● When the LDR voltage crosses the threshold, the comparator output changes state.
● The comparator output then drives the transistor, which in turn controls the relay for the fan.
3. Fan Activation
● If the comparator detects low light, it sends a signal to the transistor.● The transistor acts as a switch and activates the relay.
● The relay allows current to flow to the fan, turning it on.
● When the light increases again, the comparator output reverses, switching the fan off.
Step-by-Step Assembly Guide
Step 1: Placing Components on the Breadboard
- Insert the LDR and connect one leg to VCC (positive) and the other to the input pin of the 10393 comparator.
- Attach a 10kΩ potentiometer to create a reference voltage for the comparator.
- Connect the comparator's output pin to the transistor’s base via a 1kΩ resistor.
Step 2: Adding the Relay and Fan
- Connect the transistor’s collector to the relay’s input pin.
- Connect the relay’s output terminals to the fan and power supply.
- Place a diode (1N4007) across the relay coil to protect against voltage spikes.
Step 3: Powering the Circuit
- Connect the positive power rail to VCC (5V-12V, depending on your fan’s voltage requirement).
- Ground all necessary components properly to ensure a stable circuit.
Testing and Adjustments
- Power on the circuit and observe the behavior of the fan.
- Adjust the potentiometer to set the light threshold for fan activation.
- Use a flashlight or cover the LDR with your hand to see if the fan turns on/off correctly.
- If necessary, tweak resistor values to fine-tune the circuit’s responsiveness.
Potential Applications and Enhancements
Applications
● Automatic Cooling System: Can be used in electronic cabinets or small enclosures.● Smart Home Integration: Can be combined with other home automation projects.
● Greenhouses: Helps maintain airflow based on daylight levels.
Enhancements
● Multiple Fans: Extend the circuit to control more than one fan.● Humidity or Temperature Sensors: Add extra functionality for climate control.
● Solar Power: Make it eco-friendly by running it on a small solar panel.
Conclusion
This DIY light-controlled fan project is a simple yet effective way to automate cooling based on ambient light conditions. By using an LDR, 10393 comparator, and a transistor-driven relay, we can create a system that intelligently responds to changes in light.This project not only helps in understanding the working of comparator circuits but also serves as a stepping stone for more advanced automation systems.
Mar 14,2025