Mte 312
Mte 312
CANDIDATES NAME :
ADEBISI ADETUNJI JOSEPH
ADEBAYO EZEKIEL
ADEGBASO DAMILOLA VICTOR
ADELEGAN RAPHAEL BABATUNDE
ADEBAYO EZEKIEL
MEE/2020/1005
MEE/2020/1003
MEE/2020/1008
MATRICULATION
NUMBER :
MEE/2020/1010
I, ADEBISI ADETUNJI JOSEPH, declare that this thesis is an original work and has not been
presented wholly or partially for the award of a degree elsewhere.
CERTIFICATION PAGE
DEDICATION
ACKNOWLEDGEMENT
We would like to acknowledge Antti Tohka (HOD, Metropolia UAS) for his instructions
and supervision throughout the process of writing this thesis. Our sincere thanks go to
Dr. Minna Paananen-Porkka (Senior Lecturer), for her academic guidance. I am grateful
to all my teachers, family and friends. Special thanks to Gopal Dangi for his priceless
support and Bijay Karki for his assistance.
TABLE OF CONTENTS
List of Figures
List of Graphs
Graph 1: Humidity and temperature plotted against time (inside the building).............
20
Graph 2: Humidity and temperature plotted against time (outside the building) ...........
21
Graph 3: Humidity and temperature plotted against time (Inside the building) .............
21
Abbreviations
RH Relative Humidity
USB Universal Serial Bus
1 Introduction
The number of embedded devices that can interact with environment are already
connected to internet, and it is estimated that the number reaches 50 billion by 2020
(Kouhia, 2016). The growth of such interacting objects achieved this staggering pace
with the development of microcontroller based easy-to-use designed system which are
replacing old systems designed with complicated electronic circuits.
This thesis is an academic work made in the final year of environmental engineering
studies. The purpose of the thesis was to build an Arduino based embedded device for
building monitoring (monitoring environmental variables temperature and humidity) and
to study the characteristics of its performance. To study its performance characteristics,
Arduino was tested in three different temperature and humidity conditions. The different
environmental conditions were created by using the device in NTP (normal room
temperature/humidity), outdoor temperature/humidity and the insulated wooden box.
The result is shown graphically in ‘Result and Analysis’ section. This thesis includes
3
practical steps to follow for developing the device that can measure temperature and
humidity of building or surrounding and display readings in a LCD display (liquid crystal
display) and serial monitor as well using Arduino board and sensors. The developed
system is useful in monitoring two variables- temperature and humidity- in a building,
laboratory and greenhouse. In this thesis, the required equipment, connections and
circuit diagrams with necessary codes were compiled in a step by step order.
The Materials and Methods chapter contains the details of the apparatus used and
procedures followed for creating a building monitoring system. An attempt was made to
explain the circuit diagrams and methodologies as simply as possible, which makes the
procedure easy to follow and repeat even without any experience in programming and
electronics.
2 Background
Arduino, the open source hardware has shown ability to meet the need of accurate and
real-time monitoring and controlling of environmental variables. The Arduino user
community is a forum where many people can share their ideas, use each other’s work
and modify them to innovate and advance many different interacting objects. Arduino is
use in a wide range of projects to develop objects that can interact with people or
environment and internet.
The materials required are easily available, cheap in price and easy to use with the
help of available open source information. Arduino has been used to build robots,
drones, remote controllers, monitoring devices and many interesting objects which is a
one big step towards making the world more automated and sustainable. Arduino can
be told to do such things in appropriate language that Arduino understand: C, C++.
4
The projects related to monitoring environmental variables are simple and common but
always with great importance; many projects on greenhouse building monitoring and
household plant monitoring are available (Akami, et al., 2015). This thesis was
expected to be helpful in learning electronics and programming as well as
documentation process.
3.1.1 Arduino
The heart part of the building monitoring system; the Arduino is defined in Wikipedia as
‘’ an open source computer hardware and software company, project, and user
community that designs and manufactures single-board microcontrollers and
microcontroller kits for building digital devices and interactive objects that can sense
and control objects in the physical world’’ (Anon., 2017). In other words, it can also be
defined as a singleboard microcontroller for building digital objects and interactive
devices. Arduino is designed to sense the environment and/or surrounding by receiving
input signal through sensors and communicates with its surrounding through actuators.
An actuator could be a simple LED (light emitting diode), a motor or sensors, ethernet
or some other electronics depending on the project (kushner, 2011). The Arduino
hardware are available in many format and design enabling different features. The
programming is based on hardware wiring. The Arduino software can be run on
Windows, Linux or Mac OS (Sandhu, 2016).
2017). In Italian ‘’Uno’’ means one and the board was named so because the Arduino
Uno board is the first in a series of USB Arduino boards. The block diagram and other
features of Arduino Uno are provided in Appendix 1.
3.1.2 Sensors
Sensors are used in many objects and places, for example, touch-sensitive phone
screen, motion sensitive light switch and several applications. The use of sensors has
been expanded widely with the development of microcontrollers. The sensors are used
in robotics, airplanes and aerospace, cars and many other applications (Blaauw, et al.,
2016).
The sensors used in this work is temperature and humidity sensor-DHT11. The
sensorDHT11 is an Analog sensor designed to sense the physical change in heat and
moisture when exposed in air with suitable wiring and programming.
Its small size, cheap price, low power consumption, quick responses are the
characteristics for being one of the best choices for many users . The sensor DHT11 is
applicable in HVAC (heating, ventilation and air conditioning), it can be used in testing
and inspecting equipment and consumer goods. It is also applicable to use in building
a weather station or a humidity regulator. The use of DHT11 sensor has shown its
usefulness measuring and controlling temperature and humidity in home appliances,
medical and many other sector (Anon., 2017)
The Figure 2 shows the DHT11 temperature and humidity sensor. The sensor DHT11
has following performance range and accuracy. A detailed datasheet is included in
Appendices.
Measurement range:
Temperature: 0 to 50°C
Humidity: 20 to 90 % RH
Accuracy:
Temperature: ±2 %
Humidity: ±5 %
Where the operating Voltage remains between 3V to 5.5V (Anon., 2017)
7
Where 𝑅𝐻 is relative humidity, 𝜌𝑤 is the density of water vapour, and 𝜌𝑠 is the density
of water vapour at saturation.
The sensor DHT11 detects moisture in the air by measuring the electrical resistance
between electrodes. It is fabricated with a moisture holding substrate. When substrate
absorbs moisture, ionization takes place and results in the increase in conductivity
between the electrodes. The relative humidity is proportional to the change in
resistance between electrodes due to moisture absorbed.
The typical circuit diagram for DHT11 is shown in Figure 3 and the detailed datasheet
for DHT11 is given in Appendix 2.
8
3.1.3 IDE
The brain part of the building monitoring system, the Arduino IDE (integrated
development environment), is a software development environment or software
application for Arduino where users can write different kind of computer programs and
test. The user can write codes in IDE in a language which an Arduino understands, i.e.
C, C++. The program (codes) written in IDE, when uploaded into the Arduino
microcontroller determines what and how the system 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 (Kouhia, 2016).
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 (Anon., 2017).
The software page where Arduino codes are written looks like as shown in Figure 4. 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 (Kouhia, 2016). The following figure
shows the screen capture of Arduino IDE.
9
3.2 Setup/connection
Arduino can be programmed to give the readings (measurement data) in serial monitor
and/or in the LCD display. The wiring and connection is one of the most important part
of electronics to work it properly. The required materials for the project are listed below:
• an Arduino board (Arduino Uno)
• a breadboard
• a sensor (DHT11)
• a 220 Ω resistor
• a potentiometer
10
• jumper wires
• an LCD Display
The required wiring and pins to connect the LCD display and the sensor with Arduino is
given below (Circuitbasics, 2017):
Schematically, the connections for LCD display and DHT11 sensor with Arduino Uno
can be shown as in following Figure 5 (Circuitbasics, 2017).
11
When all the connections and wiring are done, the code should be written in IDE and
the codes written in IDE tells the Arduino to function so that the measurement obtained
from sensor can be read in LCD display.
The necessary codes for displaying temperature and humidity readings in LCD display
are given below after the Figure 6 and Figure 7, which show the codes while program
running in IDE.
12
The programming codes displaying humidity and temperature readings in LCD with
Arduino and DHT11 sensor are given below. The codes were developed with the help
of an original source (Circuitbasics, 2017). It is given in a format that can work by
simply copying and pasting in IDE.
14
void setup()
{ lcd.begin (16,2);
// the codes written here is to run the programme once
lcd.print("Booting Up"); Serial.begin(9600);
delay(300);//Let system settle
Serial.println("Humidity and temperature\n\n"); delay(700);//
delay helps the system cool down by have pause
}
void loop() {
// the codes written here is to run programme repeatedly until the power off or
//stopped.
DHT.read11(dht_dpin);
lcd.setCursor(0,1); val =
analogRead(tempPin); float
mv = ( val/1024.0)*5000; float
cel = mv/10; float farh =
(cel*9)/5 + 32;
lcd.print("TEMP = ");
lcd.setCursor(0,1);
lcd.print(cel);
lcd.print(farh); //
15
lcd.print(farh,"*F")
delay(500);// delay sets the
frequency
lcd.print("Humidity = ");
lcd.print(DHT.humidity);
lcd.print("% "); delay(500);
lcd.print("temperature = ");
lcd.print(DHT.temperature);
lcd.println("C ");
}
After writing, the codes given above should be verified by IDE and when the verification
completes the program is ready to be uploaded in Arduino. While the programme is
running, the LCD display shows the reading as shown in Figure 8 .
The wiring for connecting the DHT 11 sensor with Arduino to display reading in serial
monitor is given below (Circuitbasics, 2017). The data obtained in serial monitor can be
exported to other analysing tools.
The following Figure 9 is the schematic diagram for wiring DHT11 sensor with Arduino
to give the data readings in serial monitor (Circuitbasics, 2017).
After wiring the necessary codes for to write in IDE for humidity and temperature sensor
(DHT11) to give data readings in serial monitor are shown below the following Figure 10
which is also included in the codes section right after the Figure 10:
17
Figure 10: Sketches for DHT11 to give the readings in serial monitor
The above codes and their brief explanation is given below (Circuitbasics, 2017). The
codes given below can be directly copied and pasted in IDE to run it.
When these codes are written in IDE and uploaded to Arduino, the humidity and
temperature measurement starts to appear in serial monitor which is shown in Figure
11. The serial monitor gives the humidity and temperature measurement result in a
frequency set as delay() while writing codes.
19
After wiring and writing the code, the program was run and the built device was
successful in measuring humidity and temperature. The LCD display and serial monitor
readings are shown in Graph 1Graph 2 and Graph 3 below.
To study the performance characteristics of the used Arduino-based humidity and
temperature sensor, the test was done in three different conditions. The first test was
done inside an environmental laboratory room and the other two tests were done inside
a box and outside laboratory, respectively. To create a different temperature and
humidity, the sensor was kept inside an insulated wooden box and for the 3 rd test the
measurement was taken outside of the building.
The measurement data was analysed using excel, the original data in serial monitor is
given in Appendix 2
The following graphs show humidity and temperature plotted against time.
Graph 1: Humidity and temperature plotted against time (Inside the building)
The sensor was again used to measure temperature and humidity outside of the
building and the measurement results plotted against time are shown below.
21
Graph 2: Humidity and temperature plotted against time (outside the building)
The final test was done inside a wooden box. The measurement results are shown
against time in the following graph.
Graph 3: Humidity and temperature plotted against time (Inside the box)
The device is upgradable. The pressure sensor can be included. It can be programmed
to work offline using Arduino shield. The measurement data can be accessible in other
22
5 Conclusion
The project was interesting and was practically helpful to learn to use microcontrollers
(Arduino), programming language C and basic electronics. This was a very helpful
project in learning and understanding the world of microcontrollers, and using
microcontrollers in real life. The thesis project was a platform to advance the technique
of research, test and documentation that was learnt throughout the studies in the
degree programme.
6 References
Akami, P., Oke, A. & Akpomiemie, O., 2015. Impact of environmental factors on
building project. ScienceDirect, 11(1), pp. 91-97.
Banzi, M., n.d. How Arduino is open-sourcing imagination. s.l.: TED Talk.
Blaauw, F. et al., 2016. Let's get Physical-An intuitive and generic methodd to combine
sensor technology with ecological momentary assessments. SciencceDirecct, Volume
63, pp. 141-149.
Kenny, D. T., 2005. Basic Sensor Technology. In: J. S. Wilson, ed. Sensor Technology
Handbok. s.l.:s.n.
Kouhia, E.-P., 2016. Developement of an Arduino based Embedded system, s.l.: s.n.
McRoberts, M., 2010. Beginning Arduino. In: Beginning Arduino. s.l.:s.n., p. 172.
Vleeschouver, K. D., Loey, Van, A. & hendrickx, M. E., 2017. The Effect of High
Pressure-High Temperature Processing Conditions on Acrylamide Formation and Other
maillard Reaction Compounds. Journal of Agricultural and food chemistry, Volume
2010, 58(22), pp. 11740-11748.
Appendices