Temperature Sensor Fan Controller Circuit
Automatically control a 12V/24V fan using a temperature sensor (LM35 / DS18B20 / NTC). Comparator or MCU drives a MOSFET/relay to switch fan based on set temperature threshold.

DIY sound-activated lamp 12V:
A temperature sensor fan controller provides a sensor (LM35/NTC/DS18B20), which is used to measure temperature, and a comparator or MCU, which is used to switch a MOSFET/relay, turning the fan on and off when the temperature exceeds a set point.
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 - Temperature Sensor Fan Controller Circuit:
Which temperature sensor is best?
LM35 for simple analog, DS18B20 for digital accuracy, NTC for low-cost solutions.
What power is required?
Typically 12V for fan and 5V for sensor/logic; adapt as needed.
Can I use PWM for speed control?
Yes — use MCU or PWM generator; MOSFET must be logic-level and cooled.
How to avoid rapid switching?
Add hysteresis in comparator or software debounce/hysteresis in MCU.
Which MOSFET to use?
Logic-level N-MOSFETs like IRLZ44, IRLZ34N, IRL7833 or similar rated for fan current.
Do I need a heatsink?
Yes for currents >1–2A or if MOSFET dissipates significant heat.
Can it control AC fans?
Yes — use a relay/SSR driven by transistor from comparator/MCU with proper isolation.
How to place the sensor?
Mount where it senses ambient temperature (avoid direct fan airflow unless measuring fan air).
Is the circuit safe for beginners?
Yes if kept at low voltage (12V) and protected with fuse; avoid mains on PCB.
Can I add a display?
Yes — with MCU you can add LCD/OLED to show temp, setpoint, and fan state.
Related Posts

Mixer Grinder Wiring Diagram
Visual diagram for connecting live, neutral, and earth wires in a mixer grinder. Ensures safe operation, proper motor function, and easy troubleshooting.

Voltage Regulator using IRFZ44N Mosfet
Build a high-current voltage regulator using an IRFZ44N MOSFET for a stable and adjustable DC output, suitable for motors, LEDs, and DIY electronics projects.

12V to 5V Converter
Learn how a 5V voltage regulator circuit works, circuit diagram, applications, and how to regulate 12V or higher voltage down to stable 5V DC for electronics.

How Make MOSFET Tester
Test IRFZ44N MOSFETs easily with this simple MOSFET tester circuit. Ideal for hobbyists, students, and DIY electronics projects to check MOSFET functionality.

12v DC Fan Speed Controller
Control DC motor speed using TIP41 transistor. Simple PWM-based circuit allows smooth speed adjustment for small DC motors in robotics and DIY projects.

5V to 1.5V Converter Circuit
Learn how to convert 5V DC to 1.5V using a simple step-down (buck) converter. Perfect for low-power electronics like sensors, LEDs, and microcontroller peripherals.





