0% found this document useful (0 votes)
217 views

Automatic Room Temperature Control System Using Arduino UNO R3 and DHT11 Sensor

Uploaded by

Kadek Arisudama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
217 views

Automatic Room Temperature Control System Using Arduino UNO R3 and DHT11 Sensor

Uploaded by

Kadek Arisudama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

2020 17th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP) | 978-1-6654-0505-8/20/$31.

00 ©2020 IEEE | DOI: 10.1109/ICCWAMTIP51612.2020.9317307

AUTOMATIC ROOM TEMPERATURE CONTROL SYSTEM USING


ARDUINO UNO R3 AND DHT11 SENSOR
GURMU M. DEBELE1, XIAO QIAN2
1
Student, 2Lecturer, School of Mechanical and Electrical Engineering, University of Electronic Science and Technology of
China, Chengdu 611731
E-MAIL: mersimoidebele2027@gmail.com, 25133485@qq.com

Abstract: maintained in the proper temperature. Nowadays, keeping


This paper presents designing and implementing an living and working places at a conducive temperature is not
Automatic room temperature control system using the Arduino only crucial to be healthy and productive, but also
and DHT11 sensor. The fan speed control system has also been maintaining the room at average temperature helps to
proposed. Here, the user sets the minimum and the maximum prevent spoiling of foods, medicine, and other goods in the
reference temperature range from the keypad. The DHT11
sensor senses the surrounding room temperature and gives the
room. Commonly, people use the manually controlled
result in degrees Celsius. Both the reference and the measured system, air-condition (AC), to regulate the temperature in
values are displayed on the Liquid Crystal Display (LCD). The their living environment. However, this manually operated
Arduino microcontroller, being the processing unit of the system has notable limitations. The drawback is that if the
system, gets the sensor's measured value and compares it with user forgets to switch on or adjust the AC when the
the set threshold. The results are: when the measured room temperature becomes abnormal, children, disabled persons,
temperature is less than the minimum of the threshold value; and perishable items could be affected. The other problem
then, the microcontroller turns on the heater. If the measured with the mechanical AC system is, sometimes even if the air
room temperature is greater than the maximum threshold value, condition (AC) is still working, it is difficult to maintain the
then the fan triggered on. The speed of the fan will be controlled
by the pulse width modulation (PWM) technique based upon
room temperature. Furthermore, if not appropriately
the temperature difference between the sensor reading and the managed, it may result in unnecessary expense and power
maximum threshold. The larger the temperature difference, the usage. In general, its operations always require the user to
larger the fan's duty cycles, and the faster its speed. Finally, if turn it on and off regardless of the room temperature
the room's measured temperature is between the setpoint range, condition. Therefore, to address these drawbacks, the
all the loads are turned off. That means the room temperature Automatic Room Temperature Control System is proposed.
is maintained normal. An automatic room temperature control system is a self-
automated temperature control system [3] that can control
Keywords: the speed of the fan depending on the current room
Arduino Uno; DHT11(temperature and humidity) sensor; temperature. It comprised of a control unit (MCU),
Keypad; Microcontroller; LCD (Liquid Crystal Display); Pulse temperature sensor (DHT11), heater, fan, and keypad (3x4)
width modulation (PWM).
to monitor the room temperature. According to the value of
the ambient temperature, the microcontroller compares
1. Introduction sensor temperature reading with a set value. Then the
microcontroller makes a decision in accordance. This
With the gradual advancement of technology, system's main advantages are easy to use, less energy usage,
automation has become part of human life. In this regard, economical, more convenient to control temperature, and
modern technologies have brought several innovations that user-friendly.
automatically implement a particular task. Among these
discoveries, microcontroller plays a vital role in the smart 2. Proposed system
system of the electronic world. A microcontroller is a control
system on a single chip that makes possible for the
The proposed system is an automatic self-regulating
automation of the designed system and control process and
system that use the fan speed control system, the heater and
produces precise results [1,2]. Among all places occupied by
the keypad to automatically monitor the room temperature
a human being, a home is the most important and needs to be

978-1-6654-0505-8 /20/$31.00 © 2020 IEEE 428

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 04:42:01 UTC from IEEE Xplore. Restrictions apply.
depending on the current room temperature and the
predefined reference temperatures. Arduino is used for the
central controlling system. The keypad is used to input the
reference temperature ranges. Every time the users need to
change (set) his /her own desired range of temperature, they
use the keypad device to set the ranges of temperature values.
In this case, the user can set his / her own desired reference
temperature anytime. The sensor senses the temperature and
sends it to the Arduino microcontroller. Afterwards, the
microcontroller compares the sensor read value with the
setpoint, then automatically makes a decision. If the
temperature is below the minimum of the reference room
temperature, then the heater automatically turned on to warm Fig.1 Block diagram of the proposed system
up the room until the temperature gets back to the desired The microcontroller measures the temperature from the
value and then turned off [4]. If the room temperature is Digital Integrated Circuit (DIC) DHT11 sensor, which senses
larger than the maximum of the desired room temperature, the humidity and temperature from the surrounding. This
then the microcontroller automatically triggered on the fan sensor can measure a temperature ranges from 0 °C to 50 °C
to cool the room until it returns to the desired value and then and humidity range from 20% to 90% with an accuracy of
turned off [4]. The fan's speed is controlled and changed ±1 °C and ±1% [7]. It works within operating voltages of
based upon the current temperature and the maximum of the 3.5V to 5.5V and operating currents of up to 0.3mA. The
reference temperature [5]. Fig.1 demonstrates the block DHT11 sensor module gives the measured value of the
diagram of the proposed automatic room temperature control temperature in degree Celsius. When a room temperature
system. The Arduino Uno being the heart of this system, increased by one-degree Celsius, the sensor generates a
accessed the inputs signal from the DHT11 sensor's serial voltage of 10mV [8]. Fig.2 demonstrates the schematic
data (output) pin. The analogue-digital converter (ADC) diagram of the proposed system simulated by proteus
converts the accessed information into an equivalent digital software. For the cooling purpose, we connected the battery
value and execute them one by one. Additionally, the and the dc fan, relay switch, an NPN transistor in series and
microcontroller allows the relay switch to control and the base of the NPN transistor connected to a 10 KΩ resistor
monitor the heater and fan's operation. and Pin 6 of Arduino.
In this project, we proposed the fan speed control Meanwhile, Pin 2 of DHT11 connected to Pin 14 of the
system [1,2,4,5,6,8] as well. Pulse width modulation Arduino, while Pin 4 and Pin 1 are connected to GND and
techniques (PWM) is introduced to control the speed of the +5V power, respectively. However, Pin 3 has no connection
fan. In this case, the pulse width modulation (PWM) will (NC). The relay switches are used to control the power
significantly control the power supplied to the fan. The status transmitted to the dc fan and the heater (lamp). The Liquid
of the speed of the fan is divided into zero speed, slow speed, Crystal Display (LCD) was connected to the pin
medium speed, fast speed, and very-fast speed [6]. The relay (13,12,11,10,22,20) of Arduino to display the data feed into
switches keep both the fan and the heaters from damage due the microcontroller and the output information. The value of
to overcurrent. Both the fan and the heater used an external the DHT11 sensor reading is displayed on the LCD screen
power supply of 12V battery while Arduino used a maximum every second. The potentiometer measures the voltage used
input voltage of 5V. by LCD. It has three connected pins, in which Pin1
The signal from the microcontroller passed through a connected to the ground, Pin 2 connected to 5V power, and
network of transistors (BC108 NPN bipolar junction Pin 3 connected to Pin 3 (V_{EE}) of LCD.
transistor). The base is connected to a resistor. Both the
collector and the emitter are connected to diode, relay switch
and ground in series. Fig.1 below shows the block diagram
of the proposed system of this project.

429

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 04:42:01 UTC from IEEE Xplore. Restrictions apply.
Table 1 The components and specification of materials
used.
Name of Components Description
Rectifier diode 1N4001
Resistors 10 KΩ
Relay switch Two relay switches
Arduino Arduino Uno R3
Humidity and Temperature DHT11 sensor
sensor
Transistor BC108
Fan DC fan
Heater heater lamp
Keypad 3x4 Keypad
LCD LM044L (20x4) LCD
Battery 12 volts battery
Potentiometer POT-HG potentiometers

2.3. Software implementation

The code is written in an Arduino IDE and uploaded to


the Arduino board through the USB cable connected to the
computer [9]. In this work, we divided the program into two
flowcharts; flowchart 1 depicts the procedures to control the
Fig.2 Schematic diagram of the proposed system simulated
speed of the fan, and flowchart 2 manifests how the entire
by proteus
system works.
2.1. Fan speed control system
2.3.1. Flowchart 1
The main technique to control the speed of Dc fan is
Depending on the flowchart depicted in Fig.3, the speed
called pulse width modulation (PWM) [4, 9]. The fan's speed
of the fan is controlled, and the condition is executed only
will be controlled and monitored according to the number of
when the temperature difference is greater than zero.
duty cycles and Pulse Width Modulation (PWM). Because
the pulse width modulation and amplitude of the pulse signal Td = Ref. Tempmax − Sensor Temp  ≥ 0°C (1)
have a proportionality, then variable duty cycles are used.
Duty cycle means a particular time that pulse width signal
reached high during its operation. When the surrounding
temperature changes, the fan speed control system uses
various duty cycles from 0 to 100. That means the analogue-
digital converter (ADC) writes various duty cycles to a Pin 6
of Arduino. These are 0%, 25%, 50%, 75%, and 100% duty
cycles. Its corresponding fan speed is zero, slow, medium,
fast, and very fast, according to the measured temperature
[2,6].

2.2. Components used

The proposed system was composed of several circuit


components. Table 1 below shows the name of the
components and its specifications.

Fig.3 The flowchart for fan speed control

430

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 04:42:01 UTC from IEEE Xplore. Restrictions apply.
2.3.2. Flowchart 2

The flowchart in Fig.4 shows how the whole system


works.

Fig.6 a)

Fig.4 The flowchart shows how the entire system works

3. Result and Discussion

The system has been tested by setting up hardware


components and using the Arduino program to execute the
decoded instructions. Fig.6 b)
Fig.6 (a) The user entered the minimum and the
maximum reference temperature 24 and 28 °C, respectively,
(b) the sensor reads the current room temperature 28.3 °C.
Fig.6 (b) sows that the sensor reads the current room
temperature value of 28.30 °C. Here, the measured value of
room temperature is higher than the maximum of the setpoint,
so the fan is turned on, and the heater kept off until the
condition changes.
This system is helpful for disabled persons and infants.
It is applicable in areas such as manufacturing industry,
computer server room, classroom, conference room,
automobile to adjust the temperature automatically. This
system's disadvantage is that it depends on the
Fig.5 The hardware implementation of the proposed model microcontroller, DHT11 sensor, heater, fan, and keypad to
control and monitor the room temperature. If any of them got
Firstly, when turned on the system, then it prompts the damaged, this system is interrupted. So, it is dependent on
user to the input reference temperature, as shown in Fig.6. individual preferences. For this system to function correctly,
Then the user has set the minimum, and maximum reference we should make sure that the fundamental components are
temperature ranges as in Fig.6 (a). connected correctly and work properly.

4. Conclusions

In this paper, an automatic room temperature control


system using Arduino and DHT11 sensor has been designed
and constructed. The system used an Arduino
microcontroller, keypad and DHT11 sensor to control and

431

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 04:42:01 UTC from IEEE Xplore. Restrictions apply.
monitor both the heater and the fan simultaneously. The DC https://components101.com/dht11-temperature-sensor,
fan is on when the room temperature is higher than the (Accessed November 4, 2020)
reference temperature, and its speed is controlled based upon [8] Zairi Ismael Rizmam, Design an Automatic
the room temperature. When the room temperature is lower Temperature Control System for Smart Electric Fan
than the minimum of the reference temperature, then the Using PIC, International Journal of Science and
heater lamp is turned on while the DC fan triggered off. Research (IJSR), Volume 2, Issue 9, September 2013.
When the room temperature is within the reference range, all [9] Biswajit Das, August 20, 2019, Temperature Based Fan
the loads are automatically off. The main advantages of this Speed Control and Monitoring Using Arduino,
system are for its low cost, ease of installation, simplicity, https://www.electronicsforu.com/electronics-
low power consumption, small size, and user-friendly. This projects/fan-speed-control-monitoring-arduino
project efficiently optimizes energy consumption in a room [10] AL Amoo, Design, and Implementation of a Room
while keeping the room at a comfortable temperature. Temperature Control System: Microcontroller- Based,
IEEE,2014.
Acknowledgements

We want to thank the University of Electronic Science


and Technology of China, School of Mechanical and
Electrical Engineering, Engineering Practicing Center for
providing resources for implementing this project. Special
thanks to Mrs Xiao Qian for giving all the support and
guidance to complete this project.

References

[1] Dilruba Yamin, Automatic Room Temperature


Controlled Fan Speed Controller Using PT100,
International Journal of Scientific and Engineering
Research, Volume 6, Issue 8, August 2015.
[2] M. Kumaran, I. Vikram, S. Kishore Kumar, R. Rajesh
Kumar, S. Lokesh, Design of An Automatic Fan Speed
Controlling System Using Arduino UNO. International
Journal of Intellectual Advancements and Research in
Engineering Computations, Volume-6 Issue-2, 2018
[2039-2042].
[3] Joseph Chuma, Design and Simulation of an Automatic
Room Heater Control System, Botswana International
University of Science and Technology, 2018.
[4] Siddika, S. F. Nasrin, Design, and Arduino-based
Automatic Fan Control System Using PIR Sensor and
LM35 Sensor. GSJ: Volume 6, Issue 8, August 2018.
[5] M. M. San, C. K. Win & K. Z. Mon, Design and
Simulation of Fan Speed Control using Arduino UNO
and LM35DZ, International Journal of Engineering
Research and Advanced Technology (IJERAT), (E-
ISSN: 2454-6135) Volume.6, Issue 6 June -2020.
[6] Suraj Kaushik, Automatic Fan Speed Control using
Temperature and Humidity Sensor and Arduino,
International Journal of Advance Research Ideas and
Innovations in Technology Volume 2, Issue 8, 2018.
[7] Components101, January 5, 2018, DHT11 –
Temperature and Humidity sensor, Available:

432

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 04:42:01 UTC from IEEE Xplore. Restrictions apply.

You might also like