0% found this document useful (0 votes)
31 views7 pages

31-37 Automatic Fan Design Based On Microcontroller With Combination of DHT11 Sensor and Motion Sensor

The document discusses the design of an automatic fan system using an Arduino Nano microcontroller, DHT11 temperature and humidity sensor, and a PIR motion sensor. The fan operates based on temperature readings (turning on at 30°C) and detects human presence, enhancing energy efficiency and extending the fan's lifespan. Testing showed the system's effectiveness with an accuracy of 87% for the motion sensor and 85% for the DHT11 sensor.

Uploaded by

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

31-37 Automatic Fan Design Based On Microcontroller With Combination of DHT11 Sensor and Motion Sensor

The document discusses the design of an automatic fan system using an Arduino Nano microcontroller, DHT11 temperature and humidity sensor, and a PIR motion sensor. The fan operates based on temperature readings (turning on at 30°C) and detects human presence, enhancing energy efficiency and extending the fan's lifespan. Testing showed the system's effectiveness with an accuracy of 87% for the motion sensor and 85% for the DHT11 sensor.

Uploaded by

rio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Microcontroller

Automatic Fan Design Based on Microcontroller with Combination of DHT11


Sensor and Motion Sensor
Intan Dwi Rahayu *, Mhd Basri
Department of Information Technology, Faculty of Computer Science and Information Technology, Universitas Muhammadiyah Sumatera Utara,
Medan, 20238, North Sumatra, Indonesia

ARTICLE INFORMATION A B S T R A C T

The development of a more sophisticated fan is a necessity. One way to improve fan
Received: August 12, 2024
performance is to add temperature and humidity sensors, so that the fan can rotate
Revised: August 18, 2024
automatically according to the desired temperature and humidity. By using the
Available Online: August 21, 2024
Arduino Nano microcontroller, DHT11 sensor and Motion PIR sensor, the fan can
be controlled automatically and can rotate at a speed set according to the temperature
KEYWORDS and humidity measured by the DHT11 sensor, and can detect whether there are
people inside by using the Motion PIR sensor. That way, the fan can work more
Microcontroller effectively and efficiently in maintaining coolness and air quality in the room. In
Arduino Nano addition, the use of microcontrollers, DHT11 sensors, and PIR motion sensors also
makes it easier for users to manage fans and maintain temperature and humidity in
Arduino IDE
the room more easily. Therefore, by utilizing the DHT11 sensor and PIR sensor and
Motion Sensor
controlled by the Arduino Nano microcontroller. The test results obtained are the fan
DHT11 Sensor will turn on in a temperature condition of 30oc or there are people in the room and
the fan will turn off if it does not meet these conditions. With a system like this it
CORRESPONDENCE (*) will extend the life of the fan and make it practical in turning on and off the fan.

Phone: +62 823-8343-4446


E-mail: [email protected]

INTRODUCTION

Indonesia has a tropical climate, where Indonesia has two seasons, namely the rainy season and the dry season. If the
conditions are summer, then the weather around becomes hot, besides global warming is another factor that affects the
weather to be uncertain [1,2,3]. With that, many people are looking for solutions to cool the temperature by using Air
Conditioner (AC), fans and soaking, or also taking a shower. Temperature can greatly affect activity and concentration in
learning. Doing activities with hot room temperatures can reduce the body's physical abilities, concentration, fatigue and
sometimes cause changes in mood, namely emotions [4,5,6].

Fans are the most widely owned electronic devices by Indonesian people because they are affordable and have benefits
that are very much needed in Indonesia's tropical climate. However, people often forget to turn off fans when they are not
in use, which results in excessive and wasted electricity usage. And often similar things happen, resulting in easy damage
to the fan, which makes the fan's lifespan short [7,8,9].

Therefore, the use of a more sophisticated fan becomes a necessity, one way to improve fan performance is to add a
temperature and humidity sensor, so that the fan can rotate automatically according to the desired temperature and
humidity needs and also by adding a sensor that can measure infrared rays emitted by objects such as humans [10,11,12].
By using the Arduino Nano microcontroller, DHT11 sensor and motion sensor, the fan can be controlled automatically

https://doi.org/10.56211/hanif.v2i1.27 Attribution-ShareAlike 4.0 International Some rights reserved


INTAN DWI RAHAYU / HANIF JOURNAL OF INFORMATION SYSTEMS- VOL. 2 NO. 1 (2024) AUGUST EDITION ISSN 3025-2342 (ONLINE)

and can rotate at a speed that is set according to the temperature and humidity measured by the DHT11 sensor, and can
detect movement measured by infrared rays emitted by objects such as humans [13,14].

That way the fan can work more effectively and efficiently in maintaining the coolness and quality of indoor air. In
addition, the use of a microcontroller, DHT11 sensor, and Motion sensor also makes it easier for users to control the fan
and maintain the temperature and humidity in the room more easily. Therefore, by utilizing the DHT11 sensor and Pir
Motion Sensor and controlled by the Arduino Nano Microcontroller. Based on the description above, this design carries
out "Automatic Fan Design Based on Microcontroller with a Combination of DHT11 and Motion Sensor".

Temperature and humidity are two measurement objects that are often found in data acquisition systems. There are many
sensor devices that function to measure these two objects and accuracy is one of the parameters that can be used to select
them. DHT11 and DHT22 are DHT series sensors from Aosong Electronics that can measure temperature and humidity
simultaneously with digital output. Information about accuracy is available in the data sheets of both. However, this
information does not describe the actual conditions when operated at a particular location or platform. The purpose of
this study is to compare the accuracy of DHT11 and DHT22 in measuring temperature and humidity when operated
indoors and outdoors, using the ATMEL AVR and Arduino platforms.

METHOD

Microcontroller
A microcontroller is a chip in the form of an IC (integrated circuit) that can receive input signals, process them, and
provide output signals according to the program loaded into it. It is designed to perform certain tasks or operations.
Basically, a microcontroller IC consists of one or more processor cores (CPU), memory (RAM and ROM), and
programmable input and output devices. In its application, Micro Controller, called Microcontroller in English, is used in
products or equipment that are automatically controlled such as car engine control systems, medical equipment, remote
controls, machines, electrical equipment, toys, and equipment that uses other embedded systems [3,4,5].

Temperature Sensor
A temperature sensor is a measure of the heat or coldness of an object. A more precise definition is a measure of the speed
of motion of particles in an object or the average kinetic measure of particles in an object. To measure temperature in
everyday life, people tend to use their sense of touch. However, in today's modern world, measuring temperature can be
done easily, namely by using a sensor. One of the temperature sensors that is often used is the DHT11 [15,16,17].

DHT11
The advantages of this sensor module compared to other sensor modules are in terms of the quality of reading sensing
data which is more responsive and has speed in reading temperature and humidity objects, and the data read is not easily
interfered with. The DHT11 sensor generally has a calibration feature for temperature and humidity reading values that
are quite accurate. The storage of the calibration data is in the OTP program memory which is also called the calibration
coefficient. This sensor has 4 pin legs, and there is also a DHT11 sensor with a PCB breakout which only has 3 legs
[10,11,12].

Figure 1. DHT11 Sensor

32 Intan Dwi Rahayu https://doi.org/10.56211/hanif.v2i1.27


INTAN DWI RAHAYU / HANIF JOURNAL OF INFORMATION SYSTEMS- VOL. 2 NO. 1 (2024) AUGUST EDITION ISSN 3025-2342 (ONLINE)

ICLM35
To detect temperature, a temperature sensor LM 35 is used which can be calibrated directly. The LM 35 functions as:

Figure 2. LM 35 Basic Temperature Sensor

The LM35 sensor has 3 pins, each of which, if seen from the front, has a function, namely pin 1 functions as a source of
working voltage from the LM35 sensor, pin 2 or the middle is used as an output voltage or Vout and pin 3 functions as
ground. Vout on the LM35 sensor has an output voltage that is linearly scaled to the measured temperature, which is
10mV per 10C. So, if Vout = 530mV, then the measured temperature is 530C [1,2,3].

Pir Sensor
(Lukman et al., 2018) The PIR (Passive Infra Red) sensor module is a sensor that functions as a motion detector that
works by detecting differences or changes in current and previous temperatures. Motion sensors using a PIR module are
very simple and easy to apply because the PIR module only requires a DC 5V input voltage which is effective enough to
detect movement up to a distance of 5 meters. When it does not detect movement, the module output is LOW [7,8,9].

Figure 3. PIR Sensor

Arduino Uno
Arduino Uno is a microcontroller board based on ATmega328 (datasheet). It has 14 input pins from digital output where
6 input pins can be used as PWM output and 6 analog input pins, 16 MHz crystal oscillator, USB connection, power jack,
ICSP header, and reset button. To support the microcontroller to be used, simply connect the Arduino Uno Board to the
computer using a USB cable or power with an AC-to-DC adapter or battery to run it. Each of the 14 digital pins on the
Arduino Uno can be used as input and output, using the pinMode(), digitalwrite(), and digitalRead() functions. These
functions operate at 5 volts, Each pin can provide or receive a maximum current of 40 mA and has a pull-up resistor
(disconnected by default) of 20-50 kOhm [6,7,8].

Figure 4. Arduino Uno

System Circuit Design

https://doi.org/10.56211/hanif.v2i1.27 Intan Dwi Rahayu 33


INTAN DWI RAHAYU / HANIF JOURNAL OF INFORMATION SYSTEMS- VOL. 2 NO. 1 (2024) AUGUST EDITION ISSN 3025-2342 (ONLINE)

Figure 5. Complete Tool Set

The system device starts from the installation of DHT11 which is connected to Arduino Nano which is used for reading
room temperature and humidity and motion sensor pir motion detector. Next, the installation of the relay as a switch to
turn the fan on and off automatically, then the installation of the LCD as a provider of information on what has been read
by DHT11 and the motion sensor will turn on our fan if movement is detected [6,7,8].

RESULTS AND DISCUSSION

In the design of the Microcontroller-Based Automatic Fan with a Combination of DHT11 Sensors and Motion Sensors,
testing is carried out after the circuit is assembled as a whole. This test is carried out to prove that the designed and
manufactured tool can work according to its function.

Trial Steps
In the Microcontroller-Based Automatic Fan Circuit with a Combination of DHT11 Sensors and Motion Sensors, the trial
steps are carried out to determine the results of the hardware and software implementation whether it can run as expected
or otherwise. There are three stages of trials that are carried out, namely trials on temperature and humidity to determine
the level of accuracy, trials on human motion sensors in the room, and trials on system performance, in order to determine
whether the system can work as expected or otherwise, the stages of the trials carried out are, the first is trying to produce
room temperature and humidity as determined, and temperature and humidity data. To produce the desired temperature
and humidity, a soldering iron and a lighter are used to generate hot air, so that the temperature can be adjusted up and
down, and there is an object where the object will activate the motion sensor.

Manipulating temperature and humidity aims to facilitate the process of testing and observing the performance of sensors
from automatic fans based on microcontrollers with a combination of DHT11 sensors and motion sensors.

Sensor Test
The sensor testing phase aims to ensure that the sensor that has been made can be as expected, by observing the output
produced from the DHT11 sensor which can be observed by utilizing the tools available on the Arduino IDE, the
observations that will be made are as shown in Figure 6.

34 Intan Dwi Rahayu https://doi.org/10.56211/hanif.v2i1.27


INTAN DWI RAHAYU / HANIF JOURNAL OF INFORMATION SYSTEMS- VOL. 2 NO. 1 (2024) AUGUST EDITION ISSN 3025-2342 (ONLINE)

Figure 6. Testing On Arduino IDE

From Figure 6 above we can observe the output generated from the DHT11 sensor carried out on the Arduino IDE, where
temperature and humidity are detected, and if the temperature is more than 30'C the fan will turn on automatically. The
observation data used for observation can be seen in Table 1 below.

Table 1. DHT11 temperature sensor observation data


Rule Input
Temperature Humidity
1 15 (cold) 35 (dry)
2 22 (cool) 34 (dry)
3 27 (normal) 34 (dry)
4 34 (warm) 23 (dry)
5 41 (hot) 22 (dry)
6 17 (cold) 41 (normal)
7 27 (cool) 32 (normal)
8 30 (normal) 51 (normal)
9 32 (warm) 57 (normal)
10 41 (hot) 52 (normal)
11 16 (cold) 75 (wet)
12 29 (cool) 72 (wet)
13 26 (normal) 67 (wet)
14 32 (warm) 65 (wet)
15 39 (hot) 76 (wet)

From the results of the trials that have been carried out, the aim is to test the temperature sensor and motion sensor that
have been made on the Automatic Fan Based on Microcontrollers with a Combination of DHT11 Sensors and Motion
Sensors, and data analysis has been carried out, the results obtained Motion sensor is 87% accuracy and DHT11 sensor
that is made is able to work with 85% accuracy, while the problems that occur during the experiment such as lack of
accuracy in running the temperature sensor provided are constraints of the hardware components. The constraints of
regulating or manipulating temperature and humidity to produce the expected temperature and humidity, with the existing
equipment is quite difficult, and has many shortcomings, including the temperature and humidity detected by the DHT11
sensor, tend to be unstable due to changes in temperature and humidity that change very quickly so that the automatic fan
based on the Arduino Uno microcontroller and DHT11 sensor tends to be unstable.

https://doi.org/10.56211/hanif.v2i1.27 Intan Dwi Rahayu 35


INTAN DWI RAHAYU / HANIF JOURNAL OF INFORMATION SYSTEMS- VOL. 2 NO. 1 (2024) AUGUST EDITION ISSN 3025-2342 (ONLINE)

System Testing
This automatic fan system trial was conducted to ensure that the hardware components that have been assembled can run
and work well on the prototype of the microcontroller-based automatic fan with a combination of DHT11 sensors and
Motion sensors and to ensure that the temperature sensor that has been created can work as expected.

The testing method is to observe the temperature and humidity readings from the DHT11 sensor and the motion reader
that will be detected by the motion sensor so that it can be processed by the Arduino and provide a signal to the relay to
turn on the fan according to the temperature and humidity that have been determined. Where the test was carried out in
the boarding room for three days.

Figure 7. Test Tools

This tool is used as evidence that the tool is in accordance with the design that has been made which is shown in figure 7
above. This system uses a 9 V USB type C cable for the voltage supply to the Arduino and a 220 V supply for the voltage
to turn on the fan with a dht11 sensor and motion sensor.

Trial Results
From the results of the trial conducted for 3 days, several data were taken, where from the table it can be seen that the
results are all in accordance, from the results obtained there are several factors that make the performance of the automatic
fan based on a microcontroller with a combination of DHT11 sensors and Motion sensors can work optimally, which
among them are the temperature and humidity factors for 3 days which tend to be stable between temperatures of 27˚C -
33˚C and humidity of 68% - 81% so that the fan moves automatically to the on position.

CONCLUSION

Based on the descriptions that have been explained in the previous chapters, the following conclusions can be drawn: The
fan operates automatically based on temperature and the presence of people, turning on at a temperature of 30°C or if
there are people in the room, and turning off if these conditions are not met. Energy use becomes more efficient, and the
life of the fan can be extended because it only operates when needed. This system makes it easy for users to adjust the
fan without having to do it manually, providing comfort and ease of operation. The result of the combination of the
DHT11 sensor with the motion sensor is that it can measure temperature and humidity simultaneously with digital output.

36 Intan Dwi Rahayu https://doi.org/10.56211/hanif.v2i1.27


INTAN DWI RAHAYU / HANIF JOURNAL OF INFORMATION SYSTEMS- VOL. 2 NO. 1 (2024) AUGUST EDITION ISSN 3025-2342 (ONLINE)

REFERENCES

Book: Two or More Authors


[1] Muharman Lubis Ilham Firman Ashari, Debby Erce Sondakh, Rahmawati Rolly Junius Lontaan, Mustarum
Musaruddin Indah Purnama Sari, Muh. Nadzirin Anshari Nur, Hanalde Andre Muh. Rais, Janner Simarmata.
Internet of Things (IoT) Dan Multimedia : Integrasi dan Aplikasi. (2024). Yayasan Kita Menulis, 182.
[2] Zelvi Gustiana Arif Dwinanto, Indah Purnama Sari, Janner Simarmata Mahdianta Pandia, Supriadi Syam, Semmy
Wellem Taju Fitrah Eka Susilawati, Asmah Akhriana, Rolly Junius Lontaan Fergie Joanda Kaunang. Perkembangan
Teknologi Informatika. (2024). Yayasan Kita Menulis, 158.

Journal Article from the Internet


[3] Adiyoga, A., & Chandra, D. W. (2023). Sistem Kipas Angin Otomatis Dengan Sensor Suhu dan Sensor Ultrasonik
Berbasis Arduino. Jurnal JTIK (Jurnal Teknologi Informasi Dan Komunikasi), 7(1), 114–120.
https://doi.org/10.35870/jtik.v7i1.700
[4] Aqham, A. A. (2020). Perancangan Kipas Angin Otomatis Menggunakan Sensor Suhu Dan Suara Berbasis
Mikrokontroler. Joined Journal (Journal of Informatics Education), 3(1), 38.
https://doi.org/10.31331/joined.v3i1.1211
[5] Ardiyanto, A., Arman, & Supriyadi, E. (2021). Alat Pengukur Suhu Berbasis Arduino Menggunakan Sensor
Inframerah Dan Alarm Pendeteksi Suhu Tubuh Diatas Normal. Sinusoida, 23(1), 11–21.
[6] Sari, I.P., Al-Khowarizmi,A.K., Apdilah, D., Manurung, A.A., & Basri, M. (2023). Perancangan Sistem Pengaturan
Suhu Ruangan Otomatis Berbasis Hardware Mikrokontroler Berbasis AVR. sudo Jurnal Teknik Informatika 2 (3),
131-142
[7] Wardani., S, & Dewantoro., RW. (2024). Internet of Things: Home Security System based on Raspberry Pi and
Telegram Messenger. Indonesian Journal of Applied Technology, Computer and Science 1 (1), 7-13
[8] Sari, I.P., Al-Khowarizmi, A.K., Hariani, P.P., Perdana, A., & Manurung, A.A. (2023). Implementation And Design
of Security System On Motorcycle Vehicles Using Raspberry Pi3-Based GPS Tracker And Facedetection. Sinkron:
jurnal dan penelitian teknik informatika 8 (3), 2003-2007
[9] Arifin, J., Zulita, L. N., & Hermawansyah, H. (2016). Perancangan Murottal Otomatis Menggunakan
Mikrokontroller Arduino Mega 2560. Jurnal Media Infotama, 12(1), 89–98. https://doi.org/10.37676/jmi.v12i1.276
[10] Fachrun Nisa, & Nurul Chafid. (2022). PENERAPAN INTERNET OF THINGS (IoT) PADA SISTEM
MONITORING RUANG SERVER DI PT. MACROSENTRA NIAGA BOGA. Jurnal Satya Informatika, 6(01),
22–37. https://doi.org/10.59134/jsk.v6i01.36
[11] Lubis, M. I., & Manurung, S. A. (2022). Rancang Bangun Pintu Otomatis Dengan Penggunaan Arduino Mega 2560
Berbasis Internet of Things (Iot). Prosiding Konferensi Nasional Social \&…, Lcd, 758–766.
http://ojs.polmed.ac.id/index.php/KONSEP2021/article/view/954
[12] Sari, I.P., Basri, M., Ramadhani, F., & Manurung, A.A. (2023). Penerapan Palang Pintu Otomatis Jarak Jauh
Berbasis RFID di Perumahan. Blend Sains Jurnal Teknik 2 (1), 16-25
[13] Matondang, M.H.A., Asadel, A., Fauzan, D., & Setiawan, A.R. (2024). Smart Helmet for Motorcycle Safety Internet
of Things Based. Tsabit Journal of Computer Science 1 (1), 35-39
[14] Sari, I.P., & Batubara, I.H. (2020). Aplikasi Berbasis Teknologi Raspberry Pi Dalam Manajemen Kehadiran Siswa
Berbasis Pengenalan Wajah. JMP-DMT 1 (4), 6
[15] Sari, I.P., Batubara, I.H., & Basri, M. (2022). Implementasi Internet of Things Berbasis Website dalam Pemesanan
Jasa Rumah Service Teknisi Komputer dan Jaringan Komputer. Blend Sains Jurnal Teknik 1 (2), 157-163
[16] Lukman, M. P., . J., & Rieuwpassa, Y. F. Y. (2018). Sistem Lampu Otomatis Dengan Sensor Gerak, Sensor Suhu
Dan Sensor Suara Berbasis Mikrokontroler. Jurnal RESISTOR (Rekayasa Sistem Komputer), 1(2), 100– 108.
https://doi.org/10.31598/jurnalresistor.v1i2.305
[17] Sanjaya, H., Triyanto, J., Andri, R., Yani, F., Sanjaya, P. P., & Daulay, N. K. (2021). Kipas Angin Otomatis
Menggunakan Sensor Suhu DHT11. Seminar Nasional Sains Dan Teknologi Informasi (SENSASI), 3(1), 187–191.
http://prosiding.seminar-id.com/index.php/sensasi/article/view/580

https://doi.org/10.56211/hanif.v2i1.27 Intan Dwi Rahayu 37

You might also like