0% found this document useful (0 votes)
30 views13 pages

Automatic Fan Controller with Arduino

The document describes the design and implementation of an automatic fan controller that adjusts fan speed based on ambient temperature using an Arduino microcontroller, a DHT11 temperature sensor, and a MOSFET for power regulation. It highlights the benefits of energy conservation, improved cooling efficiency, and smart automation in various applications. The project demonstrates effective temperature-based automation, ensuring comfort while minimizing energy use, and is adaptable for different environments.

Uploaded by

doggychan18
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views13 pages

Automatic Fan Controller with Arduino

The document describes the design and implementation of an automatic fan controller that adjusts fan speed based on ambient temperature using an Arduino microcontroller, a DHT11 temperature sensor, and a MOSFET for power regulation. It highlights the benefits of energy conservation, improved cooling efficiency, and smart automation in various applications. The project demonstrates effective temperature-based automation, ensuring comfort while minimizing energy use, and is adaptable for different environments.

Uploaded by

doggychan18
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

TITLE NAME

Chapter 1
INTRODUCTION
An automatic fan controller is a temperature-based system that adjusts the speed of a DC
fan according to the ambient temperature. It helps conserve energy and improve cooling
efficiency. The system is built using a microcontroller (Arduino), a temperature sensor
(DHT11 or DHT22), and a MOSFET to regulate power to the fan using PWM (Pulse
Width Modulation).
As the temperature increases, the microcontroller increases the duty cycle of the PWM
signal, causing the fan to spin faster. Conversely, at lower temperatures, the fan operates
at reduced speed or may remain off. This makes the system suitable for applications
where efficient temperature regulation is essential, such as in rooms, enclosures, or
devices sensitive to heat.
Uses of Automatic Fan Controller:
[Link]-Based Speed Control:
Adjusts the fan speed automatically according to room temperature, offering optimal
comfort without manual effort.
[Link] Cooling:
Operates the fan only when needed, reducing electricity consumption and improving
overall cooling performance
[Link] Automation:
Uses sensor data to control fan speed through a microcontroller, making the system self-
regulating and convenient
[Link] Safety:
Helps prevent overheating in enclosed systems by boosting airflow when temperature
rises.
[Link] Optimization:
Saves power in battery-operated devices by running the fan only as required, extending
battery life.

Department of Electronics & Communication Engineering, PACE 1


TITLE NAME

Chapter 2
HARDWARE & SOFTWARE REQUIREMENTS
2.1 Hardware Components:
(a) Arduino UNO

Fig. 2.1 Arduino Uno board


Arduino / Genuine Uno is a microcontroller board based on ATmega328P(datasheet).It
has 14 digital input/output pins(of which 6 are used as PWM outputs),6 analog inputs, a
16 MHz quartz crystal a USB connection, a power jack, an ICSP header and a reset
button. It contains everything needed to support the microcontroller; simply connect it to
a computer with a USB cable or power it with a AC-to-DC adapter or battery to get
started .You can tinker with your UNO without worrying too much about doing
something wrong, worst case scenario you can replace the chip for a few dollars and start
over again.

(b) DHT11 Sensor

Department of Electronics & Communication Engineering, PACE 2


TITLE NAME

Fig. 2.2 DHT11 Sensor

The DHT11 or DHT22 is a digital sensor that measures both temperature and humidity.
In this project, it primarily functions as the temperature sensor, feeding real-time data to
the Arduino. The sensor provides a digital signal that the Arduino can interpret without
needing analog-to-digital conversion. It is known for its ease of use and decent accuracy.

(c) DC Fan

Fig. 2.3 Dc Fan

The DC fan is responsible for airflow and cooling. The Arduino varies its speed using
PWM signals, which are transmitted through a MOSFET. Fans used can be 5V or 12V
based on the power supply. As the temperature increases, the PWM signal increases,
causing the fan to spin faster, thereby enhancing cooling efficiency.

Department of Electronics & Communication Engineering, PACE 3


TITLE NAME

(d) Jumper wires

Fig. 2.4 Jumper wires


A Jumper wires are essential components in electronics and prototyping. These wires,
typically made of insulated metal, come in various lengths, colors, and connectors.

(e) 9V Battery

Fig. 2.5 9V Battery


The battery powers the entire circuit. A 5V battery can be used directly, while a 9V
battery requires a voltage regulator. It enables portable operation and makes the system
independent of external power sources.

(f) Resistor (220Ω)

Department of Electronics & Communication Engineering, PACE 4


TITLE NAME

Fig. 2.6 Resistor (220Ω)


220Ω resistor is connected between the Arduino and the MOSFET gate to limit the
current. This ensures that the MOSFET is protected from sudden surges and operates
smoothly. It also helps avoid damaging the Arduino pin by controlling the amount of gate
charge

(g) Voltage Regulators LM7805

Fig. 2.7 Voltage Regulator LM7805

If a 9V battery is used as the power source, a voltage regulator is required to step the

voltage down to 5V. This is necessary to safely power the Arduino and the sensor, which
operate at 5V. Without regulation, excess voltage could damage sensitive components

(h) MOSFET CS540

Department of Electronics & Communication Engineering, PACE 5


TITLE NAME

Fig. 2.8 Mosfet CS540

MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) like the IRF540N acts as


a switching device. It receives PWM signals from the Arduino to regulate power delivery
to the fan. The MOSFET helps in amplifying or switching electronic signals efficiently,
and it operates well under fast switching conditions, making it ideal for PWM control.

2.2 Software Requirements:


(a)Arduino IDE software
The Arduino IDE is an open-source software, which is used to write and upload code to
the Arduino boards. The IDE application is suitable for different operating systems such
as Windows, Mac OS X, and Linux. It supports the programming languages C and C++.
Here, IDE stands for Integrated

Development Environment. The program or code written in the Arduino IDE is often
called as sketching. We need to connect the Genuino and Arduino board with the IDE to
upload the sketch written in the Arduino IDE software. The sketch is saved with the
extension ‘. ino’

Department of Electronics & Communication Engineering, PACE 6


TITLE NAME

Fig. 2.7 Arduino software tool

Department of Electronics & Communication Engineering, PACE 7


TITLE NAME

Chapter 3

METHODOLOGY

3.1 Hardware Description:

Fig. 3.2 Circuit diagram

The DHT11 sensor continuously reads the ambient temperature and sends the data to the
Arduino Uno. The Arduino processes this data and generates a PWM signal, which is
then transmitted to the gate of the MOSFET through a 220Ω resistor. The MOSFET
regulates the power supplied to the DC fan based on the duty cycle of the PWM signal,
effectively controlling its speed. As temperature increases, the PWM duty cycle increases,
resulting in a faster fan rotation. If the temperature drops below a predefined threshold,
the fan slows down or stops to conserve energy.

Department of Electronics & Communication Engineering, PACE 8


TITLE NAME

3.2 Software Description:

The code for the project Smart Guide Cane using Arduino is given below

// // Define pin connections

#define FAN_PIN 9 // MOSFET Gate connected to PWM pin 9

#define TEMP_SENSOR_PIN 2 // DHT11 sensor data pin connected to pin 2

// Include necessary libraries

#include <DHT.h>

// DHT sensor settings

#define DHT_TYPE DHT11 // You can change to DHT22 if you're using that sensor

DHT dht(TEMP_SENSOR_PIN, DHT_TYPE);

void setup() {

[Link](9600); // Start serial monitor for debugging

[Link](); // Initialize DHT sensor

pinMode(FAN_PIN, OUTPUT); // Set fan pin as output

void loop() {

// Read temperature from sensor

float temperature = [Link]();

// If the reading fails, skip the loop

if (isnan(temperature)) {

[Link]("Failed to read temperature");

return;

Department of Electronics & Communication Engineering, PACE 9


TITLE NAME

// Display the temperature on the serial monitor for debugging

[Link]("Temperature: ");

[Link](temperature);

// Map temperature to fan speed (PWM duty cycle)

// Example:

// - Below 25°C → Fan at 0% speed

// - 25°C to 30°C → Fan at 50% speed

// - Above 30°C → Fan at 100% speed

int fanSpeed = map(temperature, 25, 30, 0, 255); // 0% to 100% speed (PWM range:

0-255)

if (fanSpeed < 0) fanSpeed = 0; // Ensure fan speed doesn't go below 0

if (fanSpeed > 255) fanSpeed = 255; // Ensure fan speed doesn't go above 255

analogWrite(FAN_PIN, fanSpeed); // Adjust fan speed based on temperature

// Wait for a moment before reading again

delay(2000); // Wait for 2 seconds

Department of Electronics & Communication Engineering, PACE 10


TITLE NAME

Chapter 4
RESULTS & DISCUSSIONS

5.1 Working Model of the Project:

After connecting the components and uploading the code into the Arduino Uno, the
system begins monitoring the ambient temperature using the DHT sensor. As the
temperature changes, the Arduino reads the sensor data and processes it in real time. If
the temperature is below 25°C, the fan remains off to conserve energy. As the
temperature rises between 25°C and 30°C, the fan speed increases proportionally using

the PWM signal. Above 30°C, the fan operates at full speed to maximize [Link]
testing, the system responded quickly and consistently to changes in temperature. The
Department of Electronics & Communication Engineering, PACE 11
TITLE NAME

PWM signal generated by the Arduino provided smooth and gradual changes in fan
speed, avoiding sudden jumps. This contributed to reduced noise levels and extended
hardware life. The setup effectively demonstrated how temperature-based automation can
improve energy efficiency and comfort in small environments. The circuit was found to
be stable, and the temperature-to-speed mapping functioned as expected. This validates

the functionality and reliability of the design in real-world scenarios.

Chapter 5
CONCLUSION
In conclusion, the automatic fan controller project successfully demonstrates the
integration of basic electronic components to achieve smart temperature-based
automation. By utilizing a DHT sensor for temperature sensing, a MOSFET for
switching, and the Arduino Uno for control logic, the system effectively regulates fan
speed using PWM. This not only provides a comfortable environment by adjusting
airflow automatically but also conserves energy by avoiding unnecessary fan operation.
The project is scalable and can be adapted for various environments, such as server
rooms, greenhouses, or home appliances. Its low cost, simplicity, and reliability make it
an ideal solution for energy-efficient climate control in both educational and practical
applications.

Department of Electronics & Communication Engineering, PACE 12


TITLE NAME

REFERENCES
[1] [Link]: “A high performance rectifier for electrical power generation from
marine currents.” IEEE conf SPEEDAM 2008 International Symposium, June
2008, Ischia, Italy.
[2] [Link],[Link]: “A high efficiency power factor corrector for single
phase bridge diode rectifier”. IEEE conf. “PESC 04”, June 2004, Aachen,
Germany.
[3] P. Pejovic': "Two three-phase high power factor rectifiers that apply the third
harmonic current injection and passive resistance emulation". IEEE Trans. on
industrial electronics, vol. 47, n. 2, Apr. 2000.
[4] [Link]

Department of Electronics & Communication Engineering, PACE 13

You might also like