You are on page 1of 12

SMART- SMART-iSTEAMS Multidisciplinary Conference

Ogwuashi-uku, Delta State, Nigeria, February 2018

Arduino-Based Weather Monitoring System


Ejodamen Pius Uagbae1, Ekong, Victor Eshiet2 , Inyang, Udoinyang Godwin3
1,2,3
Department of Computer Science
University of Uyo
Uyo, Akwa Ibom State, Nigeria.
E-mail: 1pius247@gmail.com, 2victoreekong@uniuyo.edu.ng,
3
udoiinyang@yahoo.com
Phone: 08066264879, 208056043359, 308036688711
1

ABSTRACT

Arduino is an open-source platform that enables us to quickly build electronics projects. It


consists of both a physical Programmable Circuit Board (PCB) and a piece of software (an
Integrated Development Environment (IDE)) that works on all known operating systems.
We use the Arduino to develop a weather monitoring system based on temperature and
humidity variables obtained from a DHT11 sensor. The system, when tested, was able to
report if weather is Hot, Normal, or Cold based on the exact temperature and relative
humidity within a 20meter area. We also demonstrate the recycling of plastic foam to be
used as an insulator and casing for electronic components. Plastic foam, which is a waste
material, greatly contributes to the Global Warming Potentials (GWP) when discarded
improperly.

Keywords: Arduino, Temperature, Humidity, Waste, Plastic foam.


SMART-SMART-iSTEAMS Conference Proceedings Paper Citation Format
Ejodamen Pius Uagbae, Ekong, Victor Eshiet & Inyang, Udoinyang Godwin (2018): Arduino-Based Weather
Monitoring System. Proceedings of the SMART-iSTEAMS Multidisciplinary Conference, February, 2018,
Ogwuashi-uku, Delta State, Nigeria. Pp 835-846

1. INTRODUCTION

Weather is the state of the atmosphere and can be determined by several variables
including pressure, wind, precipitation, solar radiation, temperature and humidity and so
on. Temperature and humidity have shown to be suitable in forecasting weather condition
in a short term (Danladi et al, 2017). These factors can be measured to determine the
quality of local atmospheric conditions and weather forecast. Forecasting is a method of
making future prediction using previous or present information (Danladi et al, 2017).
Monitoring weather conditions is necessary to maintain quality working conditions and also
needed for planning purposes.

Relative Humidity (RH) is the ratio of the current absolute humidity to the highest possible
absolute humidity (which depends on the current air temperature). Absolute humidity
refers to the mass of water vapor divided by the mass of dry air in a volume of air at a
certain temperature (Friedl, 2017). The air’s ability to hold water increases with an increase
in temperature. At 100% RH, the air is totally saturated with water vapor and cannot hold
835
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

any more, creating the possibility of rain. The temperature at which saturation occurs is
called the dew point (Shelton, 2008). The RH near the ground is often lesser than higher
up the atmosphere where the clouds are forming. The human skin relies on air to get rid of
moisture; it sweats in an attempt to keep cool and maintain its current temperature.

If the air is at 100% RH, sweat will not evaporate into the air. Hence, we tend to feel much
hotter than the actual temperature when the relative humidity is high. If the relative
humidity is low, we can feel much cooler than the actual temperature because our sweat
evaporates easily so we can feel cool. In other words, warm air can hold more water than
cold air. Weather monitoring is imperative wherever there is a need to prevent
condensation, corrosion, mould, warping or other spoilage of products. This is
highly relevant for foods, pharmaceuticals, chemicals, fuels, wood, paper, and many
other products. Also, understanding the pattern of change of weather parameters,
we can determine if it would rain soon or not. This information is very vital to
farmers who need rain for the healthy growth of their crops. Similarly, event
planners will require weather information to prepare for a party that would not be
disrupted by rain, or extreme weather conditions.

1.1 Waste Recycling


Waste is a discarded material which is a by-product of human activity. A waste material is
often abandoned after the needed part have been extracted or used up. A material may
also become waste when it is no longer serving its original purpose. For example, when a
mattress becomes too compressed to lie upon, it is often discarded. Similarly, palm nuts
are classified as waste after the oil has been extracted. Notably, a waste material can be used
for other purposes when it no longer plays its original role.

Foam is a material often used as a protective casing for new electronic devices such as
Television sets, Printers, and so on. It prevents significant damage to the equipment in the
event of a sudden fall or rough handling. However, it becomes waste after the electronic
equipments have been removed from their casing. This waste, when burnt indiscriminately,
would pollute the environment. Foam is plastic that is passed through some processes to
make solid. In some cases, the plastic forms bubbles which trap gasses (blowing agents) that
are used to create the foam. This type of foam is known as closed cell foam. It has
insulating properties that makes it suitable in building insulation, food packaging, thermal
insulation, refrigerated transport and storage, and many other applications. There are many
types of foam including isocyanurate(ISO) foam, extruded polystyrene(XPS) foam,
polyurethane(PUR) foam, and expanded polystyrene(EPS) foam (Vetter and Ashford,
2011). These foams could be very difficult to compact and to recycle. They do not
decompose quickly.

Most insulating foams are manufactured using foam blowing agents (also known as foam
expansion agents) that are high-GWP greenhouse gas (GHGs), which include
chlorofluorocarbons (CFCs), hydrochlorofluorocarbons (HCFCs), and hydrofluorocarbons
(HFCs) (Vetter and Ashford, 2011). The negative impact of these foam expansion agents
on Global Warming Potentials (GWP) are thousands of times greater than carbon dioxide
(Vetter and Ashford, 2011). They are also Ozone-Depleting Substances (ODSs) that

836
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

destroy the protective stratospheric ozone layer. These chemicals will eventually be emitted
into the atmosphere as waste during use or at end-of-life or thereafter if not properly
recovered and destroyed.

Vetter and Ashford (2011) proposed that it would be an environmental advantage if


emissions are mitigated by diverting ODS and HFC containing foams out of the waste
stream to be processed in special ways that avoid ozone depletion and GHG emissions.
Alternatively, the supposed waste material can be converted into other uses such as casing
for electrical appliances.

2. COMPONENTS USED FOR THE DESIGN

Table 1 below shows the components used for the construction of an Arduino-based
Temperature and Humidity Monitoring System. The specific properties of each of the
components used in the design are also detailed in the table.

Table 1: List of Components used for the design


S/N Part Type Properties
1. DHT11 Humidity and Temperature Sensor

2. Microcontroller Arduino UNO (Rev3)

3. Resistor, R1 tolerance ±5%; resistance 220Ω;

4. Resistor, R2 bands 4; tolerance ±5%; pin spacing 400 mil; resistance 10kΩ;

5. Monitor Liquid Crystal Display (LCD); characters 16x2; 1602A

6. Jumpers male – male, male – female

7. POT variant trim; package trim_pot

2.1 DHT11 Humidity Temperature Sensor


Varying temperature and humidity information of the environment are captured by the
DHT11 component (see Fig 1). It is a Temperature and Humidity Sensor which has a
calibrated digital signal output. The DHT11 ensures a high reliability and long-term
stability by using the exclusive digital-signal-acquisition technique and temperature &
humidity sensing technology. With a resistive-type humidity measurement component and
a temperature measurement component, the DHT11 provides a reliable data. Its element
is calibrated in the laboratory under extremely accurate humidity calibration conditions
and stores the calibration coefficients in memory as programmes for later use (D-Robotics,
2010). The temperature and humidity sensor used for this study has a coverage range of
up to 20meters. It complies with standard reference temperature for industrial
measurement which is given as 200c – 250c; details of how this was arrived at were discussed
by Doiron (2007).

837
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

It has low power consumption and an impressively small size suitable for most projects. It
is worthy of note that the DHT11 sensor requires a minimum of one second delay for it to
stabilize. This delay is imperative to guarantee a reliable data from the sensor (D-Robotics,
2010). Besides temperature measurements, DHT11 also measures relative humidity –
which is the amount of water vapour in the atmosphere (D-Robotics, 2010). Normally, at
the saturation point, water vapour begins to condense to form dew (Shelton, 2008).
Changes in the air temperature greatly determine its saturation point. Notably, a higher air
temperature holds more water vapour than a cold air temperature. At 0% Relative
humidity – expressed as a percentage – the air is considered totally dry, but condenses at
100%.The value of relative humidity can be calculated as:

Relative Humidity (RH) = - -


(1)
The ranges and accuracy of the DHT11 is as follows (D-Robotics, 2010):
 Humidity Range: 20-90% RH
 Humidity Accuracy: ±5% RH
 Temperature Range: 0-50 °C
 Temperature Accuracy: ±2% °C
 Operating Voltage: 3V to 5.5V

Fig.1: DHT11 Temperature and Humidity Sensor

2.2 Arduino UNO (Rev3)


Arduino is an open-source platform comprising of both a physical Programmable Circuit
Board (often referred to as a microcontroller) and a piece of software that can be installed
on the computer, used to write and upload computer code to the physical board. The
Arduino software works on all known operating systems. It is an Integrated Development
Environment (IDE) that provides programmers with tools such as a source code editor,
automation tools, and a debugger (Arduino, 2018). There are several variants of the
Arduino hardware including the Arduino Uno which is used for this study. The Arduino
board is a vital component in this design. It has an inbuilt Atmel ATmega328P
microcontroller which reads and reports signals from the DHT11 sensor.

838
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

The Arduino Uno has fourteen (14) digital input/output pins, six (6) analog inputs, a
Universal Serial Bus (USB) connection, a power jack, a reset button and much more.

It contains everything needed to support the in-built microcontroller. It can be powered via
an AC-to-DC adapter or battery. It can also get power supply from the computer when it is
connected with a USB cable. The Arduino platform has become very popular with
amateurs and professionals alike. Amongst other reasons, the Arduino does not need a
separate programmer in order to upload program codes onto the board. It comes pre-
burned with a bootloader that allows you to upload new code to it without the use of an
external hardware programmer (Arduino, 2018). A USB cable is used to connect the
Arduino hardware to the computer and the instruction codes are uploaded from the
Arduino software.

The Arduino programming software is very easy to learn and to program. It adopts a
modified C++ programming language structure. However, most of the complexities in the
C++ language have been simplified; making programmers to achieve much with lesser
codes. Notably, the Arduino software is free and available online and the Arduino
hardware is cheap (Arduino, 2018). Also, the Arduino allows the use of Libraries to extend
the functionality in sketches; hence enhancing the programmer’s ability to develop
programs that meet industry standard. The codes produced using Arduino programming
software (IDE) is known as a sketch (Arduino, 2018). This sketch can then be uploaded
into the microcontroller as a firmware.

Firmware is series of instructions that are written and uploaded into an electronic device to
control how it communicates with other hardware devices. Fisher (2017) describes it as the
‘software’ written for hardware. However, a firmware cannot be substituted for the term
‘software’ because they are considerably different. For instance, the firmware cannot be
altered or deleted by the end user; it remains in the hardware to influence its behaviour.
When the hardware device – such as the microcontroller – receives power supply, the
firmware becomes activated and the instructions are executed. It is important that power
supply remain stable while uploading a firmware into the hardware to prevent possible
damage to the device (Fisher, 2017).

The Arduino hardware and software was designed to enable anyone create interactive
objects or environments. It can interact with Geographic Positioning System (GPS) units,
sensors, cameras, motors, smart-phones, Television (TV), the internet and other electronic
devices.

2.3 Resistor
Resistor is an electronic component designed to resist the flow of current across a device.
The resistance to current flow results in a voltage drop across the resistor device. Resistor
devices may provide a fixed, variable, or adjustable value of resistance. Resistor values are
expressed in Ohms, the electric resistance unit. Resistors are incorporated within electrical
or electronic circuits to create a known voltage drop or current-to-voltage relationship.

839
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

2.4 Liquid Crystal Display (LCD)


In this study, a Liquid Crystal Display (LCD) was used as a monitor showing massages on
the screen. A 16 by 2 LCD, as shown in Fig 2, was used for this study which was suitable
for the task. This means that the LCD has two(2) display lines with each line displaying 16
characters.
Although this class of LCD requires a 16 pin connection, a lesser number can be used if
only four(4) data lines are used instead of the default eight (8) data line connection.

Fig 2: A 16 by 2 Liquid Crystal Display

2.5 Jumper
Jumpers are like on/off switches they may be removed or added to alternate component
performance options. A jumper is made of materials that conduct electricity and is
sheathed in a nonconductive plastic covering to prevent accidental short circuit. The
jumper’s main advantage is its one-time configuration, which make it less vulnerable to
corruption or power failure than firmware.

2.6 Potentiometer
A potentiometer is a three-terminal variable resistor that is mechanically actuated. The
resultant output voltage is a function of the position of this contact. One of the terminals is
connected to a mobile contact moving over the resistive track, while the other two terminals
are linked to the ends of the resistive element. Potentiometer is recommended for use as a
voltage divider.

840
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

3. METHODOLOGY AND SYSTEM DESIGN

The Arduino Uno Microcontroller Board was used as the main hardware component,
while the Arduino IDE was used in writing the instruction codes (known as firmware)
which was uploaded into the microcontroller.
Fig 3 shows the circuit diagram used to design the Weather Monitoring System. Fig 4
highlights the implementation of the circuit diagram using the selected components. The
connections between components are also shown.

Fig 3: Schematic for Arduino-based Weather Monitoring System

841
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

Fig 4: Connections for the Arduino-based Weather Monitoring System

842
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

3.1 Flowchart for program design

START

Import relevant libraries: LiquidCrystal, DHT

Assign Arduino pins to control display on LCD

Declare and Initialize variables

Define the function of each Arduino pin i.e.


INPUT or OUTPUT

DELAY for more than one second

Is DHT11 NO
Sensor
ready?

YES

Read Sensor Values

Are the
NO Compare the temperature and
values out humidity values and display on LCD
of range?

YES

Power
supply
YES available?

NO

END

Fig 5: Flowchart of the developed firmware loaded into the microcontroller


843
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

Fig 5 shows the flowchart for the design of the instructions that drives the microcontroller.
The firmware was developed using Arduino IDE which provided needed tools to debug
and upload to the microcontroller.

4. RESULTS AND DISCUSSION

The Arduino IDE was used in developing the sketches that were uploaded as firmware into
the microcontroller. Thereafter, the system could work without the user's intervention.
Libraries are required for a robust firmware development using Arduino. In this case, we
used the ‘LiquidCrystal’ and ‘dht’ libraries. Next we set the Arduino pins and attached
them to the LCD for display. Arduino pins 9, 10, 4, 5, 6, 7 were attached to the RS, E, D4,
D5, D6, D7 pins respectively on the LCD. The ‘pinMode’ of Arduino pin 12 was set as
INPUT. This is the pin that reads the numeric values from the signal pin of the DHT11
sensor. At least a second delay is required to get reliable readings from the DHT11 sensor.
However, we used three(3) seconds delay to ensure that the previous values have been
displayed. It is also important to confirm that the temperate and humidity readings are
within the acceptable range for the sensor. In this work the humidity range was between 20
- 90 relative humidity, while the temperature ranged between 0 - 500c. Once the read values
are within range, it is displayed on the LCD screen as seen in Fig 6.

(a) Weather forecasting system (b) Internal circuit connections

Fig 6: Plastic foam casing the components for the weather forecasting system;

844
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

5. CONCLUSION

We can determine if the weather is HOT, NORMAL, or COLD based on the air
temperature and humidity read by a DHT11 sensor. All the components used in this
project were cased with plastic foam – which would have otherwise being discarded as
waste. The circuit diagram and the component connections used for the design are
presented in Figure 3 and 4. We also presented the flowchart used for the firmware design
which was uploaded into the Arduino-based microcontroller. The system was stable as
appropriate delays were enforced to enable communication between the components
before a report was displayed. This weather monitoring system will provide farmers,
pharmacists, event planners and others with accurate information to guide them to take
appropriate action. The system is not currently designed to control other devices.
However, future studies can extend the system to control several task based on weather
conditions.

6. CONTRIBUTIONS TO KNOWLEDGE

Plastic foam contains expansion agents which are Ozone-Depleting Substances (ODSs) that
can destroy the protective stratospheric ozone layer and increase the Global Warming
Potentials (GWP) when it is disposed as waste. This study demonstrates how waste could
be turned to wealth. We used disposed plastic foam as casing – which also served as
insulator – for operational electronic components. We also demonstrated the practical
application of Arduino-based microcontroller and a DHT11 sensor to monitor the weather
conditions with a 20meter area.

845
SMART- SMART-iSTEAMS Multidisciplinary Conference
Ogwuashi-uku, Delta State, Nigeria, February 2018

REFERENCES

1. Arduino (2018). Arduino Uno Rev3. Available at:


http://arduino.cc/en/Main/ArduinoBoardUno>
2. Danladi A., Stephen M., Aliyu B. M., Gaya G. K., Silikwa N. W., Machael Y.
(2017). Assessing the influence of weather parameters on rainfall to forecast river
discharge based on short-term, Alexandria Eng. J. (2017),
http://dx.doi.org/10.1016/j.aej.2017.03.004
3. Doiron T. (2007). 20°C—A Short History of the Standard Reference Temperature
for Industrial Dimensional Measurements. Journal of Research of the National
Institute of Standards and Technology, Volume 112, Number 1, January-February
2007. Available online at http://www.nist.gov/jres
4. D-Robotics (2010). DHT11 Humidity & Temperature Sensor, D-Robotics UK.
Retrieved on 18 February 2018 from www.droboticsonline.com.
5. Fisher T. (2017). What is Firmware?. Retrieved online on 10 February 2018 from
https://www.lifewire.com/what-is-firmware-2625881
6. Friedl, S. (2017).What is Humidity? - Definition, Measurements & Effects.
Chapter 19, Lesson 6 Transcript. Retrieved from
https://study.com/academy/lesson/what-is-humidity-definition-measurements-
effects.html
7. Shelton, D. P. (2008). Air Properties: Temperature and Relative Humidity.
NebGuide, University of Nebraska-Lincoln Extension, Institute of Agriculture and
Natural Resources.
8. Vetter A. A. J and Ashford P. K (2011). Developing a California Inventory for
Ozone Depleting Substances (ODS) and Hydrofluorocarbon (HFC) Foam Banks
and Emissions from Foams. Caleb Management Services Limited, United
Kingdom.

846

You might also like