Automatic Fan Speed Controller

 

Automatic Fan Speed Controller - Electronic Engineering Guide

 

1. Introduction

The Automatic Fan Speed Controller project automates the control of a fan’s speed based on ambient temperature. It uses a temperature sensor to monitor environmental conditions and adjusts the fan speed accordingly using a microcontroller.

2. Objectives

• To regulate fan speed based on temperature.
• To conserve energy and maintain comfort automatically.
• To provide a cost-effective and efficient thermal management system.

3. Components Required

• Arduino Uno or compatible microcontroller

• LM35 or DHT11 temperature sensor

• DC fan or AC fan with TRIAC control

• MOSFET or Relay (for DC fans)

• LCD Display (optional)

• Resistors, breadboard, jumper wires

• Power supply (battery or adapter)

4. System Overview

The system reads the ambient temperature using a sensor and processes the data via a microcontroller. The output signal adjusts the fan speed using PWM for a DC fan or controls a TRIAC for AC fans. An optional LCD displays real-time temperature and fan speed.

5. Sensor and Microcontroller Integration

The LM35 outputs an analog voltage proportional to temperature. This signal is read by the microcontroller’s analog input. Based on the temperature value, a PWM signal is generated to control the fan’s speed.

6. Circuit Design and Operation

• LM35 Sensor: VCC → 5V, GND → GND, OUT → A0
• Fan Control: PWM output (e.g., D9) → Gate of MOSFET → Fan

As temperature increases, the PWM duty cycle increases, thereby increasing fan speed. If using an AC fan, a TRIAC and optoisolator circuit is needed for isolation and control.

7. Software and Code Explanation

The Arduino reads the analog signal from the temperature sensor and maps it to a PWM signal to control fan speed.

Example Code Snippet:

int tempPin = A0;
int fanPin = 9;

void setup() {
  pinMode(fanPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int tempReading = analogRead(tempPin);
  float voltage = tempReading * (5.0 / 1023.0);
  float temperatureC = voltage * 100;
  int fanSpeed = map(temperatureC, 25, 50, 0, 255);
  fanSpeed = constrain(fanSpeed, 0, 255);
  analogWrite(fanPin, fanSpeed);
  Serial.print("Temp: "); Serial.println(temperatureC);
  delay(1000);
}

8. Applications

• Home and industrial fan automation
• CPU and electronics cooling
• Greenhouse and environmental control systems
• HVAC systems

9. Challenges and Future Enhancements

• Noise from fan motor at low PWM.
• Temperature calibration accuracy.
• Add remote monitoring via IoT.
• Multi-zone temperature control.
• Integration with smartphone apps.

10. Conclusion

The Automatic Fan Speed Controller is a practical and efficient system that enhances thermal management. It automates comfort and saves energy using basic electronic components and microcontroller-based logic.