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

Weather Station Controlled by The Arduino Platform

Uploaded by

IDFR IME
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Weather Station Controlled by The Arduino Platform

Uploaded by

IDFR IME
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Romanian Journal of Petroleum & Gas Technology No. ……../….

WEATHER STATION CONTROLLED BY THE ARDUINO PLATFORM

1
Petroleum-Gas University of Ploiesti, Romania
E-mail:

ABSTRACT
The project presents an application that involves the real-time acquisition of four
quantities: temperature, relative humidity, pressure and light intensity. Several sensors
are used that acquire these values (DHT11, BMP180, LDR5528) connected to an
Arduino Uno development board equipped with the Atmega328 microcontroller, using
digital and analog pins. The display of information is done on a monochrome screen
attached to the Arduino board.

Keywords: temperature sensor, humidity sensor, pressure sensor, Arduino

INTRODUCTION
Monitoring environmental variables such as temperature, pressure and humidity has a
long history. Measuring and keeping these environmental variables constant is
important in industrial processes.

Temperature is the main characteristic of the climate, the value of and depends on it
the regime of the other meteorological elements. It indicates the speed with which the
atoms that make up a substance move, in the case of heating, their speed increases.
Scientists say that at an extremely low temperature, called absolute zero, atoms or
molecules would stop moving completely [1].

Humidity represents the mass of water vapor in the atmosphere. Relative humidity (R)
– shows the degree of air saturation with vapors, being the percentage ratio between the
amount of water vapor that a volume of air contains and the amount that would saturate
that volume of air.

Atmospheric pressure is characterized by the following aspects: - represents a physical


quantity that reveals the pressure exerted uniformly by the air mass over the entire
thickness and on a unit of horizontal surface of the earth's crust; - represents a variable
physical quantity depending on the different thickness of the air masses, temperature,
altitude and air density. The measurement of atmospheric pressure is done with the
barometer. These can be with mercury, water or gas.

The luminous intensity is the luminous flux emitted in a given direction by a point
light source, relative to the solid angle unit in which the source emits. The SI unit of
Romanian Journal of Petroleum & Gas Technology No. ……../……….

light intensity is the candela. The sensation of intensity depends on the light energy that
falls in the unit of time on the unit of surface of the retina and varies according to the
energy of the light source, so with the flow of radiated energy.

WEATHER STATION DESIGN


The block diagram of the weather station is shown in figure 1.

Figure 1. Block diagram of the measurement system [2]

The Arduino block is the most important component of the system. It contains a
development board based on ATMEGA328 microcontroller. This block requires power
from a 5V power supply [5].
Source block ensures the voltage supply of the assembly between 7-12 V DC. It can
display graphics with a resolution of 84x84 pixels [5].
DHT11 block it contains the sensor for measuring temperature and relative humidity
(Figure 2). The sensor is calibrated under laboratory conditions and transmits
information through a digital interface. This sensor has two parts: a resistive humidity
measurement component and an NTC temperature measurement component; these parts
are connecting to an 8-bit microcontroller, which offers fast response, anti-interference
capability and cost-effectiveness. Each DHT11 element is calibrated and the calibration
coefficients are stored as programs in the microcontroller memory and are used by the
internal process of the sensor. The single-wire serial interface makes system integration
quick and easy [3].
Romanian Journal of Petroleum & Gas Technology No. ……../….…

Figure 2. The DHT11 sensor

BMP180 is a sensor module to measure pressure and altitude, with extremely low
consumption and very small dimensions (Figure 3).

Figure 3. The BMP180 sensor

BH1750 is a module that contains a sensor for measuring light intensity. With the help
of this sensor, the amount of light in luxury can be calculated. Having integrated a 16-
bit ADC (Analog to Digital) converter, it converts the information received from analog
sensors and transforms them into a compatible digital signal that can be easily read by
Arduino.

Figure 4. The BH1750 sensor


Nokia 5110 LCD it can display alphanumeric characters, lines and other shapes or even
images. All this is possible thanks to the monochrome screen with a resolution of 84x48
Romanian Journal of Petroleum & Gas Technology No. ……../……….

pixels. This module has an integrated PCD8544 driver that ensures compatibility with
most Arduino, Raspberry Pi, etc. development boards.

Figure 5. Nokia 5110 display

The assembly diagram of the sensors is presented in figure 6.

Figure 6. Connection diagram for mounting the sensors


Romanian Journal of Petroleum & Gas Technology No. ……../….…

HARDWARE AND SOFTWARE IMPLEMENTATION


Schematically, the connections for the LCD display and sensors with the Arduino Uno
can be shown as in Figure 7.

Figure 7. Electrical connection diagram of the weather station

When all the connections and wiring have been made, it's time to write the code in the
IDE. The program for displaying the values of temperature, humidity, pressure and light
intensity, on the LCD display, is as follows:

/**
* define the LCD 5110 library
*/
#include "Nokia_5110.h"
#define RST 12
#define CE 11
#define DC 10
#define FROM 9
#define CLK 8
Nokia_5110 lcd = Nokia_5110(RST, CE, DC, DIN, CLK);

/**
Romanian Journal of Petroleum & Gas Technology No. ……../……….

* define the DHT11 temperature and humidity sensor library


*/
#include <DHT.h>
#define Type DHT11
int sensePin=2;
DHT HT(sensePin, Type);
float humidity;
float tempC;

/**
* define the BMP180 pressure and temperature sensor library
*/
#include <SFE_BMP180.h>
#include <Wire.h>
/* Create an object named "pressure" */
SFE_BMP180 pressure;
/**
* define the light intensity sensor library BH1750FVI
*/
#include <BH1750.h>
/* because 2 sensors are connected to analog pins 4 and 5, the signals are picked up at different
memory addresses */
BH1750 lightMeter(0x23);

void setup() {
/*DHT11 temp+humidity*/
Serial.begin(9600);
HT.begin();

pressure.begin();

Wire.begin();
lightMeter.begin();
}
void loop() {
/* define the humidity variable and initialize it with the value from the DHT11 sensor*/
humidity=HT.readHumidity();
/* define the temperature variable and initialize it with the value from the DHT11 sensor*/
tempC=HT.readTemperature();;
lcd.clear(); // Clear method with no parameter, clears the whole scene and then sets the cursor to
the first row and first column. X=0, Y=0
/*displays the humidity on the screen*/
lcd.print("Wet: ");
lcd.print(humidity);
Romanian Journal of Petroleum & Gas Technology No. ……../….…

lcd.print("%");
/*displays the temperature on the screen*/
lcd.setCursor(0, 1);
lcd.print("Temp: ");
lcd.print(tempC);
lcd.print("C");

/*displays on the screen the local pressure in mb and mmHg*/


double P,T;
lcd.setCursor(0, 2);
pressure.getPressure(P,T);
lcd.print("Local pressure: ");
lcd.setCursor(0, 3);
lcd.print(P,0);
lcd.print(" mb ");
lcd.print(P*0.75,0);
lcd.println("mmHg");

/*displays the light intensity in lux on the screen*/


float lux = lightMeter.readLightLevel();
lcd.setCursor(0, 4);
lcd.print("Light: ");
lcd.print(lux);
lcd.println("lx");
delay(2000); // Pause for 2 seconds.
}
While the program is running, the values of the parameters provided by the sensors are
displayed on the LCD display.
Romanian Journal of Petroleum & Gas Technology No. ……../……….

EXPERIMENTAL RESULTS
In order to study the performance characteristics of the completed assembly, several
tests were carried out, under different conditions. The first test was carried out inside a
room, the second inside an isolated plastic enclosure and the third test took place in the
outside environment. The measurement data were analyzed using the Excel program.

Time [min] 0 5 10 15 20 25 30 35 40 45 50 55 60
Temperature [o 27,1 27,2 27,2 27,1 27,1 27,1 27,1 27,1 27,1 27,1 27,1 27,1 27,1
C]
Relative humidity [%RH] 36 35 36 36 35 35 36 36 36 35 35 35 35
Pressure [mmHg] 515 515 513 515 514 516 516 515 515 514 514 515 516
Light intensiy [lux] 39 39 37 34 36 37 38 36 39 37 34 36 37

Figure 8. Test 1: measured values inside the building


Romanian Journal of Petroleum & Gas Technology No. ……../….…

Time [min] 0 5 10 15 20 25 30 35 40 45 50 55 60
Temperature 27,1 27,2 27,3 27,7 27,9 28,2 28,4 28,2 28,7 28,8 28,9 30,2 30,1
[0C]
Relative humidity [%RH] 36 37 40 43 45 48 47 49 52 52 51 53 53
Pressure [mmHg] 515 515 513 515 514 516 516 515 515 514 514 515 516
Light intensity [lux] 24 25 28 23 26 27 24 28 22 23 25 26 23

Figure 9. Test 2: measured values in an isolated enclosure


Romanian Journal of Petroleum & Gas Technology No. ……../……….

Time [min] 0 5 10 15 20 25 30 35 40 45 50 55 60
Temperature 32,0 32,1 32,2 32,2 32,2 32,4 32,1 31,4 31,5 32,3 28,9 30,2 30,1
[oC]
Relative humidity [%RH] 34 34 34 34 34 35 35 35 34 34 34 34 35
Pressure [mmHg] 505 505 505 506 506 504 505 505 504 504 506 505 506
Light intensity [lux] 27124 27314 29400 28756 28452 29431 25947 24359 22112 22614 20430 21300 24475

Figure 10. Test 3: measured values outside the building


Romanian Journal of Petroleum & Gas Technology No. ……../….…

Considering that the blocks on which the sensors are mounted for the acquisition of the
measurements carried out in this project are already calibrated in the laboratory, the
accuracy of the measurements carried out is the one declared by the sensor
manufacturers:

Table 1. Accuracy values declared by the sensor manufacturers


sensor Measurement range Accuracy of measurement
DHT11 – temperature 0-50 C +-2C
DHT11- relative humidity 20-90% +-5% RH
BMP180 – pressure 300-1100 hPa +-2hPa
BH1750 – luminous intensity 1 – 65535 lx +-1.2 lx

CONCLUSION

The measurement of environmental factors is essential to control the microclimates


necessary in the development of human activities as well as in various industrial
processes. This functional system, in terms of hardware and software, allows us to
measure temperature, relative humidity, pressure and light intensity in a room.
Uncertainty in temperature and humidity measurements can come from various causes.
This depends in part on the instruments, which may suffer from drift, short-term
"noise", operating limits, resolution and so on. Calibration uncertainty must be taken
into account.
To improve the assembly, sensors with a higher measurement accuracy and a lower
resolution can be implemented. Also, alerts can be implemented to inform users about
exceeding certain predefined parameters.
It can be implemented, using the pressure already read, and a calculator to calculate the
altitude.

REFERENCES
[1] Bucur G., Intelligent measurement systems – basic structures and applications, UPG
Ploiesti Publishing House, 2018, pp 133-144
[2] Alexe M., Campineanu A., Weather station controlled by the Arduino platform,
project in the field of Measurements and Transducers, year III, AIA IFR, coordinator
assoc.prof. G. Bucur, UPG Ploiesti, 2022
[3] https://docplayer.ro/138308836-Lucr%C4%83ri-de-laborator-monitorizarea-
factorilor-de-mediu-asist-dr-ing-%C8%99erban-sorina-gabriela-tema-de-studiu-nr-2-
factorii-de-mediu-agrometeorologici-me.html
[4] www.cleste.ro
[5] www.mouser.com
Romanian Journal of Petroleum & Gas Technology No. ……../……….

You might also like