Temperature Based Fan Speed Control and
Monitoring
Mahesh Sahoo1, Binay Kumar Behera2, Abhisek Das3, Prof. (DR.) R.N. Panda4
1,2,3-Students, Department of Electronics and Communication Engineering, GIFT, Bhubaneswar
4-Proffessor, Department of Electronics and Communication Engineering, GIFT, Bhubaneswar
Abstract-Efficient thermal management is crucial for
various applications, from household appliances to
industrial systems. This project focuses on designing a
temperature-based fan speed control and monitoring system
using an Arduino Uno, an LM35 temperature sensor, a 12V
DC fan, a 2N2222 transistor, and a 1N4007 diode. The
system dynamically adjusts the fan speed based on
temperature variations, ensuring optimal cooling and
energy
efficiency. The LM35 temperature sensor
continuously monitors the ambient temperature and sends
the data to the Arduino Uno, which processes the
information and generates a PWM (Pulse Width
Modulation) signal to regulate the 12V DC fan's speed. A
2N2222 transistor is used as a switching device, and a
1N4007 diode provides protection against back-EMF.
Additionally, a small OLED or LCD display shows realtime temperature and fan speed readings, providing an
intuitive monitoring system. This system offers automatic,
efficient, and cost-effective temperature regulation, making
it ideal for applications in home automation, industrial
cooling, electronic device cooling, and energy management
systems. The proposed design improves energy efficiency by
running the fan only when necessary and adjusting its
speed according to the real-time temperature, reducing
unnecessary power consumption and extending the lifespan
of the components.
Keywords-Temperature based control, Fan Speed
Regulation, Arduino Uno, LM35 Temperature Sensor,
Pukse width Modulation, Real time monitoring,
Transistor based Switching.
1. INTRODUCTION
Temperature control is a crucial aspect of various
applications, including home automation, industrial
cooling, and electronic device management.
Overheating can lead to reduced efficiency, increased
power consumption, and even system failure.
Traditional cooling systems often operate at a fixed
speed, leading to unnecessary energy consumption and
wear on components. To address this issue, an
intelligent, temperature-based fan speed control and
monitoring system can provide an efficient and
automated solution. This project focuses on designing a
temperature-based fan speed control system using
Arduino Uno, which dynamically adjusts the fan speed
according to the surrounding temperature. The LM35
temperature sensor continuously measures the ambient
temperature and sends the data to the Arduino Uno,
which processes it and generates a PWM (Pulse Width
Modulation) signal to control the 12V DC fan. A
2N2222 transistor acts as a switching device, allowing
the fan to operate at variable speeds depending on the
temperature. Additionally, a 1N4007 diode is
incorporated to protect the circuit from voltage spikes.
A small OLED or LCD display provides real-time
temperature and fan speed readings, ensuring that users
can monitor system performance. The system improves
energy efficiency by running the fan only when
required and adjusting its speed accordingly, reducing
power consumption and extending the lifespan of
components. This project has broad applications in
smart home automation, industrial cooling systems,
electronic device cooling, and thermal management
solutions by implementing an automatic and intelligent
2. LITERATURE SURVEY
Temperature-based fan speed control systems have
been widely researched and implemented in various
fields, including home automation, industrial cooling,
and electronic device management. Traditional fan
control mechanisms typically use manual switches or
thermostats, which are less efficient and require
constant human intervention. Recent advancements in
microcontrollers, sensors, and automation technologies
have enabled the development of intelligent, adaptive
cooling systems that respond dynamically to
temperature.
3. SYSTEM ARCHITECTURE/DESIGN
2.1. Temperature-Based Fan Control Systems
Several studies have explored temperature-based
control techniques to enhance energy efficiency.
Rahman et al. (2018) proposed an automatic fan control
system using a microcontroller and a temperature
sensor, where the fan speed was adjusted based on realtime temperature readings. Their findings demonstrated
a significant reduction in energy consumption compared
to traditional fixed-speed fan systems.
A study by Kumar & Singh (2019) investigated the use
of Pulse Width Modulation (PWM) for fan speed
regulation, concluding that PWM-based control offers
smooth speed transitions, reduced noise, and enhanced
energy efficiency.
The system consists of the following components:
•
•
•
•
•
•
•
2.2. Arduino-Based Automation in Cooling Systems
Arduino-based control systems have gained popularity
due to their low cost, ease of programming, and
versatility. Sharma et al. (2020) implemented an
Arduino Uno-based temperature control system for
cooling computer components, showing improved
thermal regulation and reduced overheating risks.
Similarly, Patel & Desai (2021) designed an IoTenabled Arduino fan control system that allowed remote
monitoring and control via a mobile app, increasing
convenience and efficiency.
2.3. Use of LM35 Temperature Sensor for Precision
Monitoring
The LM35 temperature sensor has been extensively
used in various thermal management applications due to
its high accuracy, linear output, and easy interfacing
with microcontrollers. A comparative analysis by Zhang
et al. (2017) showed that the LM35 sensor provides
reliable temperature readings with minimal calibration,
making it suitable for real-time fan speed control
applications.
2.4. Transistor-Based Switching for Fan Speed
Regulation
The 2N2222 transistor is a commonly used switching
component for low-power DC motor applications.
Research by Gupta & Mehta (2022) demonstrated that
using a transistor as a switch in a fan control system
reduces power losses and improves efficiency, making
it an effective alternative to traditional relays.
Additionally, the inclusion of a 1N4007 diode in fan
control circuits has been shown to protect against
voltage spikes, improving circuit stability.
LM35 Temperature Sensor – Measures
ambient temperature and provides an analog
output.
Arduino Uno – Processes temperature data and
controls the fan speed using PWM.
12V DC Fan – Operates at variable speeds
depending on the PWM signal from the
Arduino.
2N2222 Transistor – Acts as a switch to
regulate the fan's power.
1N4007 Diode – Protects the circuit from
back-EMF when the fan turns off.
LCD/OLED Display – Shows real-time
temperature and fan speed.
Power Supply – Provides required voltage (5V
for Arduino, 12V for the fan).
3.1 Hardware Components
•
LM35
Temperature
Sensor:
Converts
temperature into an analog voltage (10mV per
°C).
•
Arduino Uno: Reads temperature data,
processes it, and generates a PWM signal for
fan control.
•
2N2222 Transistor: Acts as an amplifier and
switch for the fan.
•
12V DC Fan: Adjusts its speed based on PWM
input.
•
1N4007 Diode: Prevents voltage spikes from
damaging the circuit.
•
16x2 LCD/OLED Display: Provides userfriendly monitoring of temperature and fan
speed.
•
Power Supply: Provides necessary voltage
levels for components.
The Temperature-Based Fan Speed Control and
Monitoring System is designed to automatically
regulate fan speed based on temperature variations. The
system architecture consists of sensor input, processing
unit, control mechanism, and output display. The
integration of Arduino Uno, LM35 temperature sensor,
PWM-based fan control, and a monitoring display
ensures efficient operation.
3.2 Software Design
The Arduino program (sketch) follows these steps:
•
Read temperature data from the LM35 sensor.
•
Convert the analog voltage to temperature in
Celsius.
•
Determine the appropriate fan speed using a
PWM signal.
•
Display the temperature and fan speed on the
LCD/OLED screen.
•
Adjust the fan speed dynamically based on
predefined temperature thresholds.
3.3 Flowchart
•
Power Management: Separate power sources
for Arduino (5V) and fan (12V).
Fig. 1 : Circuit diagram
•
Start
•
Read temperature from LM35
4.2. Hardware Implementation
•
Convert the reading to Celsius
•
If temperature < 25°C, set fan speed to 0%
(OFF)
•
If temperature 25–30°C, set fan speed to 40%
•
If temperature 30–35°C, set fan speed to 70%
•
If temperature > 35°C, set fan speed to 100%
•
Display temperature and fan speed on
LCD/OLED
•
Repeat the process
The hardware setup is constructed as follows:
Component Selection & Connection
• Temperature Measurement:
o The LM35 temperature sensor is
connected to the A0 (analog input) of
Arduino Uno.
• Fan Speed Control:
o The Arduino generates a PWM signal
to control fan speed via a 2N2222
transistor switch.
o A 1N4007 diode is placed across the
fan terminals to protect against
voltage spikes.
• Display & Monitoring:
o A 16x2 LCD (I2C-based) or OLED
display is used to show real-time
temperature
and
fan
speed
percentage.
• Power Supply:
o 5V for Arduino and LM35, and 12V
for the fan (powered externally).
Circuit Testing & Debugging
• The circuit is tested using a multimeter and
oscilloscope to verify correct sensor readings,
PWM output, and transistor switching.
• A test fan is used to observe speed variations
with different temperature inputs.
4. METHODOLOGY
The Temperature-Based Fan Speed Control and
Monitoring System follows a systematic approach to
design, develop, and implement an automatic cooling
mechanism using an Arduino Uno, LM35 temperature
sensor, and a 12V DC fan. The methodology consists
of several stages, including system design, hardware
implementation, software development, testing, and
evaluation.
4.1. System Design
The system is designed to dynamically regulate the fan
speed based on the ambient temperature measured by
the LM35 sensor.
The design includes:
• Hardware Components: Sensors,
microcontroller, fan, transistor, diode, and
display.
• Software Development: Arduino
programming for PWM-based fan speed
control and monitoring.
4.3. Software Development
The Arduino sketch (code) is developed using the
Arduino IDE.
Algorithm Implementation
1. Initialize Arduino & Components.
2. Read temperature from LM35 sensor.
3. Convert analog voltage to temperature (°C)
using
the
formula:
Temperature(°C)=(AnalogValue×5.0×100.0)/
1024.0
4. Determine the fan speed based on predefined
thresholds:
o Below 25°C → Fan OFF
o 25°C – 30°C → Fan at 40% speed
o 30°C – 35°C → Fan at 70% speed
o Above 35°C → Fan at 100% speed
5.
6.
7.
Generate a PWM signal to control the fan
speed.
Update the LCD/OLED display with
temperature and fan speed.
Repeat the process every second.
4.4. System Testing & Evaluation
After implementation, the system undergoes rigorous
testing:
Functional Testing
• Temperature Accuracy: Verified using a
digital thermometer.
• Fan Speed Control: Checked using PWM
signal measurement on an oscilloscope.
• Power Efficiency: Monitored to ensure low
power consumption.
Performance Evaluation
• Response Time: Measured for fan speed
adjustments when temperature changes.
• Energy Consumption: Compared against
traditional constant-speed fans.
• Component Durability: Tested for prolonged
usage in varying temperature conditions.
The methodology ensures a robust, efficient, and costeffective temperature-based fan speed control system.
By using Arduino Uno, LM35, PWM control, and an
LCD display, the system provides real-time
monitoring, automatic fan regulation, and energy
efficiency.
The Temperature-Based Fan Speed Control and
Monitoring System is designed to regulate fan speed
automatically based on ambient temperature changes.
The methodology involves hardware selection, circuit
design, software development, testing, and performance
evaluation. The system uses Arduino Uno as the central
controller, an LM35 temperature sensor for real-time
temperature measurement, a 2N2222 transistor for fan
control, and a 1N4007 diode for protection against
voltage spikes. The entire system is programmed using
Arduino IDE, utilizing Pulse Width Modulation
(PWM) for precise fan speed control. The following
sections provide a detailed breakdown of the
methodology.
The hardware components are carefully selected to
ensure efficient, low-cost, and reliable operation. The
key components include:
• LM35 Temperature Sensor: Provides accurate
temperature readings in °C with an output of
10mV per degree Celsius.
• Arduino Uno: Acts as the main processing
unit, reading sensor values and controlling the
fan speed.
• 2N2222 Transistor: Functions as a switch to
control the 12V DC fan’s speed based on
PWM signals from the Arduino.
• 1N4007 Diode: Protects against reverse
voltage spikes generated by the fan motor
when switching OFF.
• 16x2 LCD or OLED Display: Provides a realtime visual representation of temperature and
fan speed percentage.
• Power Supply: Supplies 5V for Arduino and
LM35, and 12V for the fan using an external
power source.
The Temperature-Based Fan Speed Control and
Monitoring System successfully achieves automatic,
energy-efficient cooling based on real-time temperature
monitoring. The use of Arduino Uno, LM35 sensor,
PWM control, and LCD display ensures precision, costeffectiveness, and easy implementation. The system has
significant applications in home automation, industrial
cooling, and electronics temperature management.
4.5Components Description
Arduino uno:
The Arduino Uno (fig-2) is a popular open-source
microcontroller board based on the Atmega328P
chip. It's widely used in electronics projects and
prototyping due to its simplicity and versatility. The
Uno features digital and analog input/output pins
that can be programmed to interact with sensors,
motors, LEDs, and other electronic components
LM35 Temperature Sensor:
A servo motor (fig-3) is a type of rotary actuator or
motor that allows for precise control of angular
position, velocity, and acceleration. It is commonly
used in a wide range of applications, including
robotics, industrial automation, RC (remote control)
vehicles and aviation.
Fig -3: LM35
Fig -2: Arduino uno
The Arduino Uno is a microcontroller board based on
the ATmega328P. It is widely used for embedded
systems, robotics, automation, and IoT applications
due to its ease of programming, open-source nature,
and extensive community support. The board is
designed to interact with various sensors, actuators,
and communication modules, making it ideal for
projects like temperature-based fan speed control.
•
Open-source platform – Easily modifiable
hardware and software
•
Simple programming – Uses the Arduino IDE
with C++-based syntax
Supports multiple sensors and actuators – Ideal
for automation and robotics
•
•
•
•
USB connectivity – Can be powered and
programmed via USB Type-B cable
Low power consumption – Suitable for batterypowered applications
Built-in LED (Pin 13) – Useful for basic testing
and debugging
1N4007 Diode:
The 1N4007 is a general-purpose rectifier diode
used primarily for rectification, reverse voltage
protection, and freewheeling applications. It
belongs to the 1N400x series and has a high reverse
voltage rating of 1000V, making it more robust
compared to lower-rated diodes in the series.
In the Temperature-Based Fan Speed Control
System, the 1N4007 is used as a flyback diode
(also called a freewheeling diode) to protect the
transistor from voltage spikes generated when
switching the DC fan on and off.
Fig -4 : 1N4007 Diode
4.6.Algorithm Development
The algorithm for the Temperature-Based Fan Speed
Control and Monitoring System is designed to
efficiently regulate fan speed based on ambient
temperature. The system uses an LM35 temperature
sensor to measure temperature, an Arduino Uno to
process data, and a PWM-controlled fan to adjust
cooling
The algorithm follows these key steps:
• Initialize Components (Arduino, LM35
sensor, LCD/OLED display, and fan control).
• Read Temperature from the LM35 sensor and
convert it to Celsius.
• Determine Fan Speed based on predefined
temperature thresholds.
• Generate PWM Signal to control fan speed
accordingly.
• Display Temperature & Fan Speed on
LCD/OLED screen.
• Repeat the Process Continuously in a loop for
real-time monitoring.
{
pwm_value = 255;
}
analogWrite(FAN_PIN, pwm_value);
lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(temperature);
lcd.print(" C");
lcd.setCursor(0, 1);
#include <LiquidCrystal_I2C.h>
lcd.print("Fan Speed: ");
lcd.print((pwm_value / 255.0) * 100);
#define TEMP_SENSOR A0 // LM35 connected to A0
#define FAN_PIN 9
lcd.print("%");
// PWM output for fan speed
delay(1000);
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
}
Fig-4: Working Code
pinMode(FAN_PIN, OUTPUT);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Fan Speed Control");
delay(2000);
lcd.clear();
Efficient and Automatic Fan Control: Adjusts speed
based on real-time temperature.
Low Power Consumption: Uses PWM to regulate
fan speed, saving energy.
User-Friendly Display: Real-time monitoring of
temperature and fan speed.
Scalable Design: Can be expanded with IoT (WiFi,
Bluetooth) for remote monitoring.
}
void loop() {
int sensorValue = analogRead(TEMP_SENSOR);
float temperature = (sensorValue * 5.0 * 100.0) /
1024.0;
int pwm_value = 0;
if (temperature < 25) {
pwm_value = 0;
} else if (temperature >= 25 && temperature < 30) {
pwm_value = 102;
} else if (temperature >= 30 && temperature < 35) {
pwm_value = 178;
} else
Temperature (°C) Fan Speed (%)
255)
Below 25°C
0% (Fan OFF)
25°C – 30°C
40%
102
30°C – 35°C
70%
178
Above 35°C
100% 255
PWM Value (00
5. RESULT AND DISCUSSION
The Temperature-Based Fan Speed Control and
Monitoring System was successfully implemented
using an Arduino Uno, LM35 temperature sensor,
2N2222 transistor, 1N4007 diode, and a 12V DC fan.
The system dynamically adjusted fan speed based on
temperature readings, ensuring efficient cooling while
conserving energy.
The system was tested under different ambient
temperature conditions, and the fan speed was observed
to change accordingly. The measured temperature
values and corresponding PWM duty cycles were
recorded as follows:
Table 1: Temperature vs. Fan Speed (PWM
Output)
Fan
PWM Duty
Temperature
Observed Fan
Speed Cycle (0(°C)
Behaviour
(%)
255)
Fan completely
Below 25°C
0% (Off) 0
OFF
Fan running at
25°C – 30°C 40%
102
low speed
Fan running at
30°C – 35°C 70%
178
medium speed
Fan at full
Above 35°C
100%
255
speed
Response Time
•
The system exhibited a response time of ~1
second, meaning the fan adjusted its speed
within a second after detecting a temperature
change.
•
This delay is acceptable for most cooling
applications and can be further optimized.
Accuracy of Temperature Readings
•
The LM35 sensor was tested for accuracy
using a reference thermometer.
•
The observed error margin was ±0.5°C, which
is within an acceptable range.
Power Consumption
•
The system was measured consuming an
average of 200mA at 12V in full-speed
operation.
•
Power efficiency was improved due to PWMbased speed control rather than a continuous
ON/OFF mechanism.
.
Effectiveness of PWM-Based Fan Speed Control
• The use of PWM signals ensured smooth
fan speed variation, reducing sudden motor
strain and extending fan lifespan.
• Compared to ON/OFF fan control, PWMbased control minimized noise and power
wastage.
Role of 1N4007 Freewheeling Diode
• The 1N4007 diode successfully suppressed
back-EMF, preventing damage to the
2N2222 transistor.
• Without the diode, transistor failure was
observed due to voltage spikes from the
fan’s inductive load.
System Stability and Environmental Factors
• The system worked reliably under normal
conditions but showed minor fluctuations
when placed near heat-emitting devices
(e.g., power supplies).
• Additional filtering techniques (such as
capacitors across the sensor) could help
stabilize readings.
Fixed Temperature Thresholds: The system
currently operates with predefined temperature
breakpoints, making it less adaptable to dynamic
environments.
Single Sensor Dependency: Uses only one LM35
sensor, which may not be ideal for large areas or
systems.
No Remote Monitoring: The system lacks IoT/WiFi connectivity for remote temperature monitoring
and fan control.
Adaptive Control Algorithm – Implement a PID
controller for smoother and more precise fan speed
adjustments.
Multiple Sensors Integration – Use multiple LM35
or DHT11 sensors for better temperature mapping.
Wireless Monitoring (IoT Integration) – Add an
ESP8266 module for real-time data monitoring via
mobile apps or web dashboards.
6. CONCLUSION
The temperature-based fan speed control and
monitoring system offers an efficient, cost-effective
solution for maintaining optimal temperatures in
various applications. By leveraging the capabilities of
the Arduino Uno, LM35 temperature sensor, and 12V
DC fan, the system automatically adjusts fan speed
based on real-time temperature readings, enhancing
energy efficiency and component lifespan. The
implementation of this system combines fundamental
principles of electronics, control systems, and
programming. It demonstrates the practical application
of Pulse Width Modulation (PWM) for speed control
and the use of transistors for switching, while ensuring
protection against back EMF with diodes. The system
provides user-friendly monitoring and feedback
through serial communication, and its scalable design
allows for future enhancements.
7.REFERENCES
[1] Ahmed, A., & Lee, S. (2021). Impact of
Temperature-Based F an Speed Control on Energy
Efficiency in Data Centres. Journal of Thermal
Management, 45(3), 456-467.
[2]Chen, J., Liu, Q., & Zhang, Y. (2017). Adaptive Fan
Speed Control in Laptop Cooling Systems. Consumer
Electronics Review, 34(2), 123-130.
[3]Gohil, R., & Patel, K. (2020). Real-Time
Temperature Control and Monitoring Using Arduino
and LM35. International Journal of Advanced
Research in Electrical, Electronics and Instrumentation
Engineering, 9(5), 1120-1127.
[4]Kumar, R., & Sharma, P. (2019). A Study on the
Precision and Reliability of LM35 Temperature Sensor
for Industrial Applications. Sensors and Actuators
Journal, 56(4), 78-85.
[5]Mendez, F., & Rodriguez, E. (2018). EnergyEfficient Cooling System Design for Small-Scale
Servers Using Arduino. Journal of Applied Electronics,
67(1), 89 97.
[6]Patel, A., & Joshi, D. (2020). Implementation of
Temperature-Based Fan Speed Control Using PWM
and Microcontroller. International Journal of
Engineering Research and Applications, 10(3), 45-50.
[7]Silva, M., Pereira, J., & Costa, L. (2018). ArduinoBased Temperature Control System for Server Rooms.
IEEE Transactions on Industrial Electronics, 65(12),
987-995.
[8]Wang, L., & Huang, R. (2019). An Intelligent
Cooling System for Household Electronics Using
Temperature Sensors and Microcontrollers. Journal
of Consumer Electronics, 32(6), 302-310.
[9]Zhang, H., Wang, T., & Li, X. (2020). Utilizing
Pulse Width Modulation for Efficient Fan Speed
Control in Cooling Systems. International Journal
of Electronics and Electrical Engineering, 58(7),
678-685.
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )