Weather Station Controlled by The Arduino Platform
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.
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.
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.
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. ……../….…
BMP180 is a sensor module to measure pressure and altitude, with extremely low
consumption and very small dimensions (Figure 3).
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.
pixels. This module has an integrated PCD8544 driver that ensures compatibility with
most Arduino, Raspberry Pi, etc. development boards.
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 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");
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
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
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
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:
CONCLUSION
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. ……../……….