monitoring-temperature-and-humidity-using-arduino-nano-and-module-dht11-sensor-with-real-time-ds3231-data-logger-and-lcd-display-IJERTV9IS120214
monitoring-temperature-and-humidity-using-arduino-nano-and-module-dht11-sensor-with-real-time-ds3231-data-logger-and-lcd-display-IJERTV9IS120214
net/publication/347950991
CITATIONS READS
29 15,584
3 authors:
SEE PROFILE
All content following this page was uploaded by Paul Kamweru on 28 December 2020.
Abstract - Humidity and Temperature are crucial embedded alarming system that alerts the user when the
parameters for the optimal response of biological systems e.g.
desired temperature and humidity limits are exceeded recorded.
each has its own impact on growth and production of quality The study utilized the Arduino, a low-cost, effective readily
crops. There are several techniques of measuring humidity and available open resource. The study was also to display the
temperature. However, there is still a need for continuous values of temperature and relative humidity as well as the time
technological innovation to enable fast, real time and remote at which these values were recorded on the LCD screen. The
monitoring of these parameters. The aim of this study research language needed to program the microcontroller is user
was to fabricate a functional hardware and software system to friendly since it uses a combination of C and C++. Its storage
measure temperature and humidity. The system was designed to is almost space less since together with its components requires
allow multiple communication with user by recording of the data minimal space and can reduce the manpower of farming and
in Real time, storing the acquired data in an SD card, reduce the number of greenhouse attendant and workload [11].
incorporate an alarming system (piezo buzzer) together with an But majority of times such an alerting humidity and
LED indication mechanism. The study utilized an Arduino Nano temperature fluctuation could easily go unnoticed, the user or
board interfaced with a Temperature and Humidity sensor, Real the person in charge is sleeping or in absentia due to some
Time Clock (RTC), LCD, and Micro SD card Module, piezo unavoidable circumstances in case, it is better to log the data in
buzzer and LED, and had the ability to store the data as text file. a storage medium in case of such an event so that he can keep a
A code was generated using the computer with the appropriate track of the data. The purpose of this Arduino microcontroller
Arduino program and sent to the Arduino microcontroller for
for the study were used in programing and running the circuit.
running the circuit. To study the performance characteristics of
The program (code) is generated using the Arduino IDE
the Arduino-based humidity and temperature sensor, two
independent running test were done, one outside the Physics
software and fed into the microcontroller. In interfacing the
laboratories and the second inside a Green House, both at Chuka Arduino Nano in the circuit, it will run it to produce the
University, Kenya. required results.
Keywords - Arduino Nano, Temperature and Humidity sensor, Real II. HARDWARE USED
Time Clock, LCD and micro SD card module
1) Arduino Nano
The Arduino Nano is an open-source microcontroller board
I. INTRODUCTION based on the Microchip ATmega328P microcontroller and
Temperature and humidity are perhaps the most monitored developed by Arduino.cc. [12, 13]. The board is equipped with
environmental variables as the two have shown significant sets of digital and analog input/output (I/O) pins that may be
impact in the almost all aspects, e.g. of optimal plant growth interfaced to various expansion boards (shields) and other
and development [1,2], the quality of food during production circuits. The board has 14 digital I/O pins (six capable of PW
processing and storage [3], efficiency of many temperature and output), 6 analog I/O pins, and is programmable with the
humidity-sensitive equipment [4,5] among many others. The Arduino IDE (Integrated Development Environment), via a
monitoring of temperature and humidity in laboratories, type B USB cable. It can be powered by the USB cable or by
storages, halls, school and hospitals is important with respect to an external 9-volt battery, though it accepts voltages between 7
health and hygiene [6,7,8]. and 20 volts. It is also similar to the Arduino Nano and
Leonardo. A good example of the Arduino Nano
Despite this, temperature and humidity measurement is microcontroller is shown in the Figure 1.
among the most difficult problems in basic metrology. The
difficulty to achieve accuracy due to the fragility and the
requirement standards to maintain the preferred good quality
instruments. Thus much interests have been geared towards the
improvement of existing instrument and come up with more
innovative ones as done recently by the authors [9] and [10].
This study was motivated by the dire need to provide a
system capable of monitoring of temperature and humidity by
one integrated system, having real time data logging, with an
5) SD Card module
The SD card works on 3.3V but if you want to use them
with Arduino for storing data then you will have to use a SD
card module shown in Figure 5. The SD card module we have
used is for the micro SD cards and it uses the FET’s for level
shifting and also a 3.3V regulator which converts the 5V from Fig. 6. Piezo Buzzer
Arduino into the 3.3V for micro SD card. The Arduino SD card
module has a socket for the SD cards on the back side and I The brain part of the building monitoring system, the
have tested memory cards up to 128 GB which works fine. Arduino IDE (integrated development environment), is a
With six pins, VCC and GND for power and the other four pins software development environment or software application for
for SPI communication. The other four pins are as follows Arduino where users can write different kind of computer
MISO (Master in Slave out), MOSI (Master out slave in), SCK programs and test. The user can write codes in IDE in a
(System Clock), and CS (Chip Select). This SD card module language which an Arduino understands, i.e. C, C++. The
uses FET’s for level shifting and also has a voltage regulator program (codes) written in IDE, when uploaded into the
which converts 5V in to 3.3V. The communication between the Arduino microcontroller determines what and how the system
Arduino and the SD card module is done by using the SPI. works. The Arduino IDE comes with a ‘built-in code parser’
that studies the validity of the written codes before sending it to
the Arduino. The compilation and translation work is done in
IDE after checking the validity of codes. After translating the
code, the IDE uploads the program to the Arduino
microcontroller [20]. IDE software includes the set of different
programs that are ready for being tested on the device. Just like
in other programming platform, Arduino IDE can also be
extended with the use of libraries; the IDE installation includes
the installation of number of libraries [20]. The software page
where Arduino codes are written looks like as shown in Figure
7. It has two main functions ‘setup ()’ function and ‘loop ()’
functions. The setup part is where the codes should be written
so that the program runs and the loop part is where the codes
should be written so that the program runs with repetition until
the power off or reset button is pushed. It allows users to
program and edit Arduino to do anything they like to do with
it. Depending upon the feature of different boards, the IDE
enables communication with Arduino board through USB [20].
The following figure shows the screen capture of Arduino IDE.
6) Piezo Buzzers
Piezo buzzers, an example in Figure 6, are a simple device
that can generate basic beeps and tones, they work by using a
piezo crystal, a special material that changes shape when
voltage is applied to it. They have been used in connection with
Thus, there is a need to conduct further experiments in 5V on the Arduino, GND of mini SD card module to digital
environments more similar to real weather conditions. GND on the Arduino.
The project utilized one red LED that was connected to the
IV. RESULTS AND DISCUSSION pin number 9 with jumper wire. The negative terminal
This study sought to first design, data logging of humidity interfaced with the 330 Ohms resisters to the lower channel of
and temperature and raise a light (from an LED) and a sound the breadboard.
alarming (from a sound buzzer). To achieve this, the LCD has 16 terminals which were connected to the
components that include the Arduino Uno, resistors, LED, Arduino as: Pin 14 to Pin 7, Pin 13 to pin 6, Pin 5 to GRD, pin
buzzer, RTC, SD Card module, LCD and Humidity and 4 to pin 2, Pin 6 to pin 3, Pin 11 to pin 4 as shown. The 5V pin
temperature sensor were fixed to the breadboard and connected from the Arduino was connected to the positive line on the
as described in chapter three. Figure 10, shows the connections breadboard. Also, the ground pin from the Arduino was
in progress. A jumper wire was connected from the 5 volts’ connected to the negative part of the breadboard. For the re-set
port from the Vcc port in the microcontroller chip to the of the intensity of the LCD screen, a 10 kΩ potentiometer was
positive channel of the breadboard. Another cable was interfaced to the breadboard with it middle terminal to pin 3.
grounded to the negative terminal of the breadboard from the Potentiometer was connected to the breadboard, the positive
GND port of the chip. terminal to the positive pin and the negative terminal to the
ground pin to the ground pin as shown in Figure 11.
Fig. 11. A powered circuit for motion detector with LED, Buzzer, DHT11
sensor, Arduino microcontroller, RTC and SD Card Module and 9 volt
battery.
Fig. 10. Circuit for arrangement of resistor, LED, RTC and SD Card modules, When the power was connected to the circuit, LCD
buzzer, LCD and DHT11 sensor.
produced a green yellow light and it displayed the details of the
project followed then by the time, date, temperature and
relative humidity values as in Figure 12 (Temperature, 23.6
A piezo buzzer having two terminals, positive terminal was and Relative Humidity as 95.0%).
connected to the pin 8 at the Arduino while the negative part
was interfaced with 330 Ohms resister and connected to the
lower channel of the breadboard. When the power source was
connected as in Figure 10, the piezo buzzer produced a single
tone signal to indicate that power was flowing through it. The
limit set for the Piezo Buzzer was to produce the sound alarm
at the temperature greater than 00C and less than 270C.
computer and the logged data exported to the Microsoft Excel V. SUMMARY, CONCLUSION AND
for Data analysis. The temperature values from the sampled RECOMMENDATION
places were analyzed as corresponding logged data from SD
The research project was successfully carried out. The aim
Card then tabulated in the table 1.
of the research project was to come up with a technique which
will monitor humidity and temperature in real time, record and
TABLE 1. DATA FOR TEMPERATURE AND RELATIVE HUMIDITY AS RECORDED store the data in an SD card while displaying the parameters on
INTO THE SD CARD. the LCD screen, produce a recorded sound alarm by Piezo
Buzzer and also light indication by LED. The outcome was as
Date Time Temperature (°C) Humidity (%) per the expectations of the study in comparison with the results
obtained by Schwartz (2015) [11] and Rajesh Shrestha (2019)
16/10/2020 6:52:37 21.3 95
[21] and following this study, the main objectives were
16/10/2020 7:52:38 21.7 94.6 successfully reached.
16/10/2020 8:52:39 21.3 95
16/10/2020 9:52:40 23.3 93.7 The circuit was successfully connected and the program
was sent to the Arduino microcontroller chip to run the circuit.
16/10/2020 10:52:41 24.3 90 The humidity and temperature sensor was able monitor the
16/10/2020 11:52:42 24.2 91 temperature and humidity, send the parameters to the micro
controller chip for calculation of the relative humidity in real
16/10/2020 12:52:43 25.2 87 time before displaying them on the LCD screen and later to be
16/10/2020 13:52:44 25.9 86.4 stored into the SD Card and the alarm sound from the piezo
buzzer was produced in conjunction with the LED.
16/10/2020 14:52:45 29.3 74.3
16/10/2020 15:52:46 27.6 82.9
Piezo Buzzer was set to produce sound indication in
16/10/2020 16:52:47 24.8 91 response to the parameter extremes. The limit set for the Piezo
Buzzer was to produce the sound alarm at temperature greater
16/10/2020 17:52:48 23 91 20 degrees Celsius. The results were correct since for the
16/10/2020 18:52:49 21.2 96 temperature equal or greater than 25 and the temperature equal
to 30 produced no tone from the piezo buzzer.
analysis purpose. And finally the system can continuously Cloud Computing, Data Science & Engineering (Confluence), IEEE,
monitor the environment parameters, updating the user at every 2009: pp. 567-571.
fixed interval of time about the change in the parameters. This [11] M. Schwartz. Programming Arduino with Lab VIEW, Published by Pack
Publishing Ltd., 2005, ISBN 978-1-84969-822-1
makes the user keep a better eye at the premises.
[12] Arduino cc. “Arduino and Genuino Products Overview” (Arduino
However the system is developed only for small area and Newsletter, 2016 and
though the sensor is nicely calibrated, there are chances of error https://www.arduino.cc/en/Main/ArduinoBoardUno, Accessed on
October 15, 2019.)
in the readings as the sensor may get damaged when exposed
[13] C. Amariei. Adruino Development Cookbook, Pactk Publishing Ltd.,
to higher temperature beyond its limit. 2005, ISBN 978 1-78-398294 -3.
This concludes that the present proposed work was a [14] Xiamen Emote Display CO.LTD, Specification of LCD Module LCD
success and it will provide a convenient method for effective datasheet Modulesparkfun. [Online].
Available:https://www.sparkfun.com/datasheets/LCD. (29, Oct, 2008).
monitoring of temperature and humidity in real time. This
[15] D.T. Kenny. Basic Sensor Technology. In: J.S Wilson, ed. Sensor
system is compact to an extent and cost effective when Technology Handbook. 2005.
compared to prices of instruments used to measure the
[16] Texas Instruments, LM35 Precision Centigrade Temperature Sensors,
environmental factors. In future, this system would be http://www.ti.com/lit/ds/symlink/lm35.pdf, Accessed on November 15,
upgraded to web based monitoring system by using the GPRS 2019.
(General Packet Radio Service) technique which would ease [17] I. Toyoda and C. Denso. Capacitive humidity sensor. 2003. U.S. Patent
the user to have access over the system remotely over the 6,647,782.\
Internet. Also, an upgrade for the monitoring of larger area [18] G.M. Mutinda and P.K. Kamweru. Arduino UNO, ultrasonic sensor HC-
would be done. Additionally, sensors like barometric pressure SR04 motion detector with display of distance in the LCD..
sensor, gas detector for air quality check, and a web interface [19] U. Demisch and M. Testoterm GmbH and Co. (1991). Capacitive
would be all integrated into a single system which could just humidity sensor. U.S. Patent 5,050,434.
not only measure the temperature and humidity parameters but [20] Kouhia-Euku. (2016): DEVELOPMENT OF AN ARDUINO-BASED
EMBEDDED SYSTEM.: Case: Greenhouse monitoring. Published 2016
also the other parameters would be analyzed.
[21] S. Rajesh. Study and Control of DHT11 Using Atmega328P
Microcontroller , International Journal of Scientific & Engineering
ACKNOWLEDGMENT Research. IJSER (2019): 10(4).
The authors acknowledge Mr. Mutunga and Mr. Gitonga
for their technical support.
REFERENCES