Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Design and Implementation of Automatic Room Temperature

Controlled Fan using Arduino Uno and LM35 Heat Sensor


Nur Afiqah Junizan, Amirrudin Abdul Razak, Bohendiran Balakrishnan, W.A.F.W. Othman*
School of Electrical & Electronic Engineering, Universiti Sains Malaysia, 14300 Nibong Tebal, Pulau Pinang,
Malaysia

*
Corresponding E-mail: wafw_othman@usm.my

Abstract— Most human feels the inconvenient about changing the fan speed level manually when the
room’s temperature changed. So, the automatic fan system that automatically changes the speed level
according to temperature changes is recommended to be built for solving this problem. Hence, the
objectives for this project are to enable the electric fan to automatically change the speed level according
to temperature changes and develop an automatic fan system that can change the speed level due to the
environment temperature changes. This project presents the designs and the simulation of a DC fan control
system based on room temperature using pulse width modulation technique and temperature sensor
namely LM35 with Arduino Uno Microcontroller. The fan will be used to reduce the temperature of a
room at certain level. To build the fan, we use LM35 heat sensor. The sensor will measure the room
temperature continuously. When the room temperature sensed by the sensor crossed the threshold, value
fan is switched on; the LED will be turn on. The fan will remain on till the temperature reduces below the
threshold value. This general idea is used in this project.

Keywords— Arduino uno; LM35; automated fan; temperature controlled

and by controlling the speed controller, there is no


I. INTRODUCTION chance that the temperature can change the speed
With the advancement of technology, intelligent of fan except changing the speed of fan by
system is introduced every day. Everything is manually. So, it is needed to create an automatic
getting sophisticated day by day. There is an temperature control system the electric fan to
increase demand of technology and smart automatically change the speed level according to
electronic system. Electric fan is one of the most temperature changes and develop an automatic fan
popular electronic devices due to its cost system that can change the speed level due to the
effectiveness and low power consumption environment temperature changes.
advantages. It is one of the most sensible to offer a
comfortable and energy efficient. The fan has been Automatic temperature-controlled fan leverages
long used and still available in the market. the power of Arduino to provide an automation
control system of fan which speed is controlled by
Demand for the accurate temperature control measuring temperature by itself. Using Arduino,
has conquered many of industrial domains. motor, jumper wires, sensors and other hardware
Automatic temperature control is important in the fan measure the surrounding temperature and
order to maintain a comfortable environment. on depending that control the speed of fan
Automation system aims to further the cause of automatically. It is one practical use is to integrate
automation to achieve the goal of simplicity. In a microcontroller in a temperature control system
primitive way of using a fan by button the switch that can be used for automatically controlling a

International Journal of Engineering Creativity and Innovation ( IJECI ) is licensed under a Creative Commons Attribution-
NonCommercial 4.0 International License. Libraries Resource Directory. We are listed under Research Associations category.
International Journal of Engineering Creativity and Innovation, 2019, 1 (2), 8-14
room temperature by controlling the fan’s speed room is high and the light will turn on and
automatically. decrease if the temperature of the room is low and
the light will turn off.
Furthermore, a short introductory video of this
work has been uploaded to the YouTube with the Fig. 1 shows the block diagram of fan speed
link: control system. The Arduino Uno is the heart of
https://www.youtube.com/watch?v=3ZL_LcM6D the system. It accepts inputs from the temperature
dI. sensor, LM35 which employed to sense the
temperature of the surrounding. The output of the
II.RELATED WORKS temperature sensor (analogue signal) is fed to the
In recent years the energy crisis has become input of the ADC, which converts the analogue
main problem which the whole world must temperature value to digital equivalent required by
confront. Home power consumption makes up the the micro-controller. Thus, the output of the ADC
largest part of energy consumption in the world. is directly coupled to the microcontroller whose
This is to be found that the automation is the use main task is to control / regulate the Fan speed via
of control systems and information technologies to the actuators.
reduce the need for human work in the production
of goods and services. Home automation is a Overall of this project is all about controlling
widely used automated system. There is an the fan by sensing the surrounding temperature,
approach to control the electrical and electronic whereby the sensor will detect the temperature and
home appliances according to the attendance of send to the microcontroller. The output from the
persons [1-2]. microcontroller will control the fan speed via
actuators. This work also can turn on the fan
Implementation of the ATmega8L manually with the speed fan desired without using
microcontroller for Speed control of DC motor fed temperature sensor.
by a DC chopper has been investigated. The
chopper is driven by a high frequency PWM The circuit presents the design and control of
signal. Controlling the PWM duty cycle is automatic switching electric fan. The idea is based
equivalent to controlling the motor terminal on the problem occurs in human’s life nowadays
voltage, which in turn adjusts directly the motor by improving the existing technology. The work is
speed [3-4]. The design and simulation of a novel based on microcontroller board design, produced
fan speed control system based on room by several vendors using various microcontrollers.
temperature using Pulse Width Modulation These systems provide sets of digital and analog
Technique. The duty cycle is made to vary input/output (I/O) pins that can interface with
according to the room temperature and the fan various expansion boards and other circuits.
speed is controlled accordingly [5].
The board features a serial communication
III. METHODOLOGY interface or a universal serial bus (USB) on some
In this work, Arduino Uno is used. There are models, for loading program from personal
many works reported to use Arduino computers to program the microcontrollers. The
microcontroller, such as in the field of robotics [6- Arduino project provides an integrated
23], and mini-projects [24~26]. The development environment (IDE) based on both the
microcontroller has been programmed using C and C and C# languages. In this work, it was used to
C# language according to the designed features program the microcontroller on what to do at a
and is loaded to Arduino Uno. Speed control of certain temperature. First, we devised a schematic
the DC motor is using PWM signal which requires diagram (as shows in Fig. 2) that would control a
manipulation the pulses’ width. The system has fan to operate at 3 different speeds. The speed
been designed to configure temperature sensor. would be controlled by the microcontroller by
Temperature sensor senses the temperature of a sending out a +5V signal through a network of
room and it gives the microcontroller signal. The transistors which would result at turning on the fan
speed of fan will increase if the temperature of the at a particular speed.

Available online: http://technical-journals.org/index.php/IJECI/ P a g e |9


International Journal of Engineering Creativity and Innovation, 2019, 1 (2), 8-14

Figure 1: Block diagram of fan speed control system

The system measures the temperature from the 4, 5 and 6 respectively, series with a resistor of
Integrated Circuit (IC) LM35, where it will control each LED. The others toggle switch whereby SW2
the fan according to the setting values in the are connected parallel to pin A1 and SW3
programming. The temperature sensor LM35 is connected parallel with pin A2 to the Arduino Uno.
employed to sense the temperature from
surrounding. It produces voltage of 10mV for 1°C Fig. 3 depicts the flowchart of the overall
rise in temperature. The output of the temperature system. At first, when the fan is turn on manually,
sensor (analogue signal) is fed to the input of the user can choose either low or medium speed of the
ADC, which converts the analogue temperature fan. The fan will rotate at medium speed and the
value to digital equivalent required by the micro- program will turn off all the speed of LED and the
controller. Thus, the output of the ADC is directly medium speed LED will light up if the user
coupled to the microcontroller whose main task is chooses for medium speed. The flow program
to control and regulates the fan speed via the when we choose the low speed will be same just
actuators. like when we choose the medium speed. Just the
differences are that the fans are rotating at low
Fig. 2 shows the schematic diagram of the speed and low speed LED will light up.
proposed system, whereby the battery, toggle
switch; motor DC and NPN transistor is connected When the fan is automatically on, it will detect
in series. Pin 2 (Base) of the NPN transistor is surrounding temperature. The fan will detect either
connected to Pin 2 of Arduino Uno. Pin 2 can be the temperature is higher than 28℃ or lower than
configured to trigger an interrupt on a low value, a 28 ℃ . If the temperature below than 28 ℃ is
rising or falling edge, or a change in value. detected, the fan will stop, and the all the speed
Meanwhile, LM35 is connected to the Arduino LEDs will turn off. Meanwhile, when the
Uno. Pin 3 of LM35 is connected to GDN. Pin 1 temperature is higher than 28℃, the sensor will
of LM35 is connected to pin A0 and pin 2 is compare with at a certain temperature to set the
connected to 5V. Three LED are connected to pin level of fan speed. When the compared

Available online: http://technical-journals.org/index.php/IJECI/ P a g e | 10


International Journal of Engineering Creativity and Innovation, 2019, 1 (2), 8-14

Figure 2: Schematic Diagram of the proposed system

temperature is higher than 32℃, the speed of fan is the heat sensor has a sensitivity range of ± 0.5
will set to high, meanwhile when the compared degree Celsius. It operates at a range of –55
temperature is between 30℃ & 32℃, the speed of degree Celsius to a 150-degree Celsius range.
fan will set to medium and the speed of the fan is
low if the compared temperature is between 28℃ Repeatability is where the system can get the
same reading for the same condition multiple
&30℃. The speed of fan will rotate depends on
times. We have achieved such level in our product.
the temperature that are detected. The LED will
We were able to get constant readings for the same
turn on when the fan are in low, medium or in the
conditions.
high speed. All LEDs will turn off except the LED
that is programmed will light up depending on the
This work is also promoting energy saving.
specific condition.
Normally, for USB fan, it has an average of 2.5W
IV. RESULT
power consumption and a total power usage of
0.02 kWh from 10pm – 6am. Our fan, if used for
Accuracy is one of the major criteria in the same period, can save energy, electricity and
innovating or creating a new product. In our work, money.
the accuracy needed to accomplish a good product
was to be able to measure the temperature as For example, the average temperature in Penang,
accurate as possible. The sensor we have used is Malaysia, from: 10pm – 12am is ± 29°C; 12am –
accurate and the maximum deviation is only ± 0.5 2am is ± 28°C; 2am – 6am is between 24-27°C.
degree Celsius. Therefore, the average power consumption of the
proposed system is: ± 2.3W for 10pm – 12am; ±
Sensitivity is almost closely related to accuracy. 2.1W for 12am – 2am; 0W from 2am – 6am.
Sensitivity is how fast it can react to changes in its Yields, the total power consumption is only
surrounding. In this work, the sensitivity level is 0.0088kWh.
the measurement on how quick the proposed
system reacts to changes in its surrounding The pulse width modulation speed control
temperature. The sensor that we have used which function is a function that externally controls the

Available online: http://technical-journals.org/index.php/IJECI/ P a g e | 11


International Journal of Engineering Creativity and Innovation, 2019, 1 (2), 8-14

Figure 3: Flowchart of the proposed system

rotation speed of the fan by changing the duty temperature. Then, the work implements a closed
cycle of the input pulse signal. loop type control system for automatically
adjusting the temperature closed loop type control
V. DISCUSSION system is more efficient than an open loop system
After designing, assembling and testing the as the output is continuously monitored as
circuit, we concluded that the circuit of the feedback.
proposed temperature-based fan speed controller is
working satisfactorily. The logic used in the There is also the disadvantage for this work that
system is verified and shown in the flowchart form. is micro controller is the heart of the circuit, if
The duty cycle is varied according to room controller is damaged the whole system will be
temperature and speed of the fan is controlled spoiled and speed control is dependent of
accordingly. individual preference.

The advantage of this system is that it is very VI. CONCLUSION


economical and easy to handle by the user; speed We have achieved our entire objective
varies automatically, so that it controls the speed successfully. The program is running without any
without having to move a limb. error. The presented work will detect the
temperature of room by LM35 sensor and control
Next, it is helpful to disabled person, it is very the fan speed. This work has showed a means of
easy to install in offices, and houses etc., and save controlling the temperature of a system. This
energy by slowing down its speed in low system helps to maintain the temperature within a

Available online: http://technical-journals.org/index.php/IJECI/ P a g e | 12


International Journal of Engineering Creativity and Innovation, 2019, 1 (2), 8-14
range. This system is marketable because of its System, Computing and Engineering (pp.
simplicity, low cost, low power consumption and 471-476). IEEE.
small. [7] Rajasekhar, T. M. K., & Sugadev, M. (2018).
Arduino Controlled Special Stair Climbing
Nowadays, these types of circuits can be used in Wheel- chair Bot. International Journal of
large farms and in many places where we can Pure and Applied Mathematics, 118(24).
measure the current temperature and to maintain [8] Koo, Y. C., Elmi, A. B., & Wajdi, W. A. F.
the surrounding temperature according to the (2012). Piston mechanism based rope
user’s decision. We can use in a wide variety of climbing robot. Procedia Engineering, 41,
applications such as poultry farm, industries 547-553.
thermal furnace, boiler medical application and in [9] Faisal, R. H., & Chisty, N. A. (2018). Design
all temperature controlling areas. and Implementation of a Wall Climbing
Robot. International Journal of Computer
ACKNOWLEDGEMENT Applications, 179(13), 1-5.
All authors have disclosed no conflicts of [10] Faizal MIN, Othman WAFW, Syed Hassan
interest, and authors would like to thank the SSNA (2015). "Development of pole-like tree
Universiti Sains Malaysia for supported the work climbing robot", In. Proc. 2015 IEEE
by Research University Grant Scheme (Grant International Conference on Control System,
number: 1001/PELECT/8014113). Computing and Engineering (ICCSCE), IEEE,
pp. 224-229.
REFERENCES [11] Sivakumar, B. G., & Sudhagar, K. (2018). An
[1] Arduino Uno Board with Real-Time independent situating &navigation system for
Application Projects [Online]. Available: stair climbing robotic wheelchair. Mental,
https://www.edgefx.in/arduino-uno-board- 5(5.8), 5-4.
tutorial-and-its-applications/ (last accessed: [12] Singh, D., Das, S. K., Das, E., Agrawal, M.,
2018/12) & Patel, V. (2018). Arduino And Sensors
[2] What is Diode? [Online]. Available: Based Fire Fighting Robot. i-Manager's
http://whatis.techtarget.com/definition/diode Journal on Instrumentation & Control
(last accessed: 2017/12) Engineering, 6(2), 37.
[3] Vaibhav Bhatia, Gavish Bhatia. "Room [13] Vital, J. P., Ferreira, N. F., & Valente, A.
Temperature based Fan Speed Control System (2018, September). Educational Humanoid
using Pulse Width Modulation Technique". Robot Using A Sensoring Fusion Through
International Journal of Computer Arduino. In Memorias de Congresos UTP (pp.
Applications, 81(5) pp.35-40, (ISSN: 0975- 235-242).
8887), (2013). [14] Basyal, L., Kaushal, S., & Singh, G. (2018).
[4] Alex Joy, Athul S. Thoppil, Basil P. Alias, Voice Recognition Robot with Real Time
Lekshmy S. Kurup, Rini Varghese. " Surveillance and Automation. International
Microcontroller Based Room Automation". Journal of Creative Research Thoughts, 6(1),
International Journal of Advanced Research 2320-2882.
in Electrical, Electronics and Instrumentation [15] Ahmad MF, Alhady SSN, Kaharuddin S, et al
Engineering (IJAREEI), 4(S1), pp.46-52, (2015). "Visual based sensor cart follower for
ISSN:2278-8875, (2015). wheelchair by using microcontroller". In.
[5] Snehlata, S. T., & Kompelli, S. (2014). Proc. 2015 IEEE International Conference on
Design and Implementation of DC Motor Control System, Computing and Engineering
Speed Control Based On Pic Microcontroller. (ICCSCE), IEEE, pp. 123-128.
International Journal Of Engineering And [16] Saad, W. H. M., Karim, S. A. A., Azhar, N.,
Computer Science, 3(9), p8075-8079. Manap, Z., Soon, Y. Y., & Ibrahim, M. M.
[6] Lau, S. C., Othman, W. A. F. W., & Bakar, E. (2018). Line Follower Mobile Robot for
A. (2013, November). Development of slider- Surveillance Camera Monitoring System.
crank based pole climbing robot. In 2013 Journal of Telecommunication, Electronic and
IEEE International Conference on Control Computer Engineering (JTEC), 10(2-7), 1-5.

Available online: http://technical-journals.org/index.php/IJECI/ P a g e | 13


International Journal of Engineering Creativity and Innovation, 2019, 1 (2), 8-14
[17] Sani NA, Syed SSNA, Othman WAFW, et al.
(2012). "Cordless Cart Follower for
Wheelchair User", Trends in intelligent
robotics, automation, and manufacturing,
Springer, Berlin, Heidelberg, pp. 252-262.
[18] Hirani, A. (2019). Design of mini CNC using
arduino uno.
[19] Hirani, A. (2018). Design of cost effective
CNC using Arduino Uno.
[20] Ahmed, B. J. S. A. A. (2018). Design and
Analysis Mini CNC Plotter Machine.
[21] Khan, M., Ahmed, M. K., Ulay, N. A. A.,
Sarwar, M., & Islam, N. (2018). Custom CNC
milling machine (Doctoral dissertation,
BRAC University).
[22] Sathyakumar, N., Balaji, K. P., Ganapathi, R.,
& Pandian, S. R. (2018). A Build-Your-Own
Three Axis CNC PCB Milling Machine.
Materials Today: Proceedings, 5(11), 24404-
24413.
[23] Mustapa, M. A., Othman, W. A. F. W., Abu
Bakar, E., & Othman, A. R. (2018).
Development of pole-like tree spiral climbing
robot. In Intelligent Manufacturing &
Mechatronics: Proceedings of Symposium, 29
January 2018, Pekan, Pahang, Malaysia (pp.
285-293). Springer Singapore.
[24] Wong K.K., Abu Samah N.A., Sahimi M.S.,
Othman W.A.F.W. (2019). Development of
Reverse Vending Machine using Recycled
Materials and Arduino Microcontroller.
International Journal of Engineering
Creativity and Innovation, 1(1), 7-16.
[25] Goon L.H., Md Isa A.N.I., Choong C.H.,
Othman W.A.F.W. (2019). Development of
Simple Automatic Floor Polisher Robot using
Arduino. International Journal of Engineering
Creativity and Innovation, 1(1), 17-23.
[26] Fan J.R., Abd Razak M.S., Mohamad
Mohayadin N.A., Othman W.A.F.W. (2019).
Energy Saving - Motion Activated Smart Fan
Design and Implementation. International
Journal of Engineering Creativity and
Innovation, 1(1), 24-32.

Available online: http://technical-journals.org/index.php/IJECI/ P a g e | 14

You might also like