Automatic Fan Control Using Temperature Sensor - Electronic Engineering Guide
1. Introduction
This project demonstrates the automatic control of a fan using a temperature sensor and a microcontroller. It is designed to automatically regulate fan speed based on ambient temperature, improving energy efficiency and comfort.
2. Objectives
• Monitor ambient temperature using a sensor.
• Control fan operation based on temperature thresholds.
• Automate fan speed regulation.
• Enhance energy efficiency and reduce manual intervention.
3. Components Required
• Arduino Uno or any microcontroller board
• LM35 or DHT11 Temperature Sensor
• DC Fan
• Transistor (e.g., TIP122 or 2N2222)
• Relay Module (if AC fan is used)
• Diode (1N4007)
• Resistors and Capacitors
• Breadboard and Connecting Wires
• Power Supply (5V or 12V depending on fan)
4. System Overview
The system monitors the ambient temperature and compares it with predefined threshold values. Based on the temperature, the fan is either turned on or its speed is adjusted accordingly using PWM or a relay switch.
5. Working Principle
The LM35 or DHT11 sensor provides real-time temperature readings. The microcontroller processes these values and controls the fan. For DC fans, PWM is used to regulate speed, while AC fans can be turned ON/OFF using a relay.
6. Circuit Diagram and Design
• Temperature sensor output → Analog pin (A0) of Arduino.
• Fan controlled via transistor or relay on digital pin (D9).
• Protection diode across fan to prevent back EMF.
• External power for fan as required.
• Pull-down resistor on transistor base if needed.
7. Sensor Integration and Control Logic
• Read temperature from LM35 sensor (10 mV/°C).
• If temperature < 30°C → Fan OFF.
• If temperature between 30°C and 40°C → Fan at medium speed.
• If temperature > 40°C → Fan at full speed.
• PWM signals control fan speed for DC fans.
8. Microcontroller Programming
• Setup: Initialize analog/digital pins.
• Loop: Continuously read temperature sensor.
• Apply logic to control fan based on thresholds.
• Use analogWrite for PWM on DC fan or digitalWrite for relay.
• Optional: Display temperature and fan state on LCD.
9. Power Supply Design
• Use a regulated 5V supply for Arduino and LM35.
• Fan supply depends on its voltage rating (e.g., 12V).
• Ensure proper ground connection between Arduino and fan power supply.
• Include bypass capacitors to stabilize supply.
10. Applications
• Automatic room temperature regulation
• Industrial cooling systems
• Smart home automation
• Greenhouse ventilation control
11. Limitations and Future Scope
• Basic systems do not offer dynamic speed control with AC
fans.
• Limited range and accuracy with basic sensors like LM35.
• Future upgrades: Wi-Fi/Bluetooth app integration, smartphone control,
humidity monitoring, fan type detection.
12. Conclusion
This project successfully demonstrates a practical application of temperature-based automation using embedded systems. It provides energy efficiency, comfort, and automation with minimal components.