You are on page 1of 6

Development of a Low Cost Weather Station Using

Free Hardware and Software

Robison Cris Brito Fábio Favarim Guilherme Calin Eduardo Todt


Federal University Federal University Federal University Federal University
of Technology - Paraná of Technology - Paraná of Technology - Paraná of Paraná
Campus Pato Branco Campus Pato Branco Campus Pato Branco UFPR
robison@utfpr.edu.br favarim@utfpr.edu.br calin@alunos.utfpr.edu.br todt@inf.ufpr.br

Abstract—Weather stations are a valuable tool to many allow the further insertion or removal of any sensors, being
different areas, like agriculture, aviation, construction, sports and sold as a closed product, and the data generated is usually
recreation, specially because they collect weather data, which can stored locally in the station. The computer interface for data
be stored and processed to gather specific information to correlate visualization or manipulation of this data is usually static, also
events to the weather action. This work shows a development not allowing the customization.
model of a low cost weather station, using only free hardware
and software, connected to the internet, giving real time data Low cost weather stations would allow its popularization in
taken from the station, as well as history of the stored data. institutions, companies and homes, generating data that could
This station, even though using low cost or handcrafted sensors,
be used based on specific needs. This data could be stored in a
like those that measure wind speed, wind direction and rainfall
index, showed consistent results costing only 10% of the price, database or shared online in web pages. The history of this data
in comparison with some professional weather stations, allowing stored throughout the years would allow the study of climate
its popularization in agriculture, homes and institutions. standards of a specific region, associating it to specific events
and supporting areas like agriculture, even allowing prediction
Keywords—IoT, Open Hardware, Open Software, Arduino, of future climate manifestations.
Raspberry, Weather Station
As it is now, weather stations are usually found in large
I. I NTRODUCTION urban centers, in climate research institutions or in airports.
The disadvantage is that in many cases, these stations are many
A weather instrument is an equipment used to acquire miles away from the place they are monitoring, and depending
weather information. Some examples of weather instruments on the distance, the data collected might be inconsistent with
are thermometer, to measure temperature, barometer, to mea- what is truly happening there. Information like rainfall index,
sure atmospheric pressure, and anemometer, to measure wind temperature and wind speed are highly unstable, and distance
speed. The gathering of those instruments in a same equipment variation will make the data differ from the real conditions of
constitutes a weather station [1]. The data collected by weather the place one wishes to monitor.
stations are used in many different areas, like agriculture,
aviation, navigation, construction, sports and recreation. Besides, the popularization of weather stations allow the
centering of data gathered in a single database, like the APRS
Nowadays, some institutions and companies have their
service (https://aprs.fi), developed by an amateur american
own weather stations to collect weather data, like airports,
radio that allows the plotting of data from the weather stations,
environmental and agriculture agencies. This data is used to
as well as where they are. This is a big contribution for
their own ends, and in some cases, shared between third
climate monitoring, even allowing predictions, that could be
parties.
more precise with a bigger amount of data generated by these
Many companies, like the Brazilians NMET - Instituto weather stations.
Nacional de Metereologia, Somar Metereologia, and Simepar,
have weather stations to process the collected data and predict Concepts like free software, and more recently, free hard-
climate changes. ware, could contribute to the popularization of weather sta-
tions, because these concepts can significantly reduce the cost
In these cases, the weather stations used are professional, of a station.
and their cost is proportional to their complexity and precision
of the sensors used. For example, the WMR200, is made by the It’s given the name Free Software to every software that
company Oregon Scientific, and its cost is over 1000 Dollars, ensures that the end users have freedom in using, studying,
not counting the import taxes to bring it to Brazil, making sharing and modifying that software [2].
the purchase impracticable to small companies. Many times,
Free hardware or open-source hardware is a term for
the high cost is due to the use of proprietary hardware and
tangible artifacts — machines, devices, or other physical things
software components.
— whose design has been released to the public in such a way
Another limitation of professional weather stations is that that anyone can make, modify, distribute, and use those things
most of them are not customizable, meaning that they don’t [3].

978-1-5386-0956-9/17/$31.00 2017
c IEEE
Authorized licensed use limited to: ESCUELA POLITECNICA DEL LITORAL (ESPOL). Downloaded on August 04,2023 at 21:21:51 UTC from IEEE Xplore. Restrictions apply.
Facing such difficulty of acquiring a professional weather
stations, the authors of this work were motivated to the
project and development of a low cost weather station, based
on free hardware and software, with similar capacities of a
professional station, but with a reduced cost and with the
possibility of modifications and enhancements, in a way that
the monitoring sensors can be freely chosen by the one
assembling the station, further reducing or increasing the cost
based on one’s needs. Another possibility is the storage and
sharing of the acquired data in a cloud structure.
To measure the climate data, a specific gathering of sensors
are needed. Sensors are devices that, given a physical quantity,
provide a signal in its output that indicates this quantity (BAS-
TOS, 2002). In short, a sensor is an element that translates an
usually non-electrical value to an electrical value, that can be
measured, amplified or even modified. Fig. 1. Proposed Weather Station Use Case Diagram.

Some sensors used in this work were simply bought, like


temperature and atmospheric pressure sensors, because there
are low cost sensors in the market for these purposes, and
creating a project for a new sensor is not justifiable and not
necessary.
However, rainfall index, wind speed and wind direction
sensors can be created using standard electronic components,
like magnetic sensors, using mechanical resources and physical
properties that allow a considerable reduction of cost, com-
pared to commercial weather sensors available in the market. Fig. 2. System Structure Block Diagram.
In order to manage and control these sensors, as well to
share the collected data, some new low cost single board
computers, like Arduino and Raspberry PI, may be used. data to a web server, in a database, as well as sharing
this data in REST format, that can be read by web pages,
desktop applications and mobile devices. The connection to the
II. D EVELOPMENT OF A M ETHODOLOGY OF THE Internet can also be done through a wifi or cellular (GSM, 3G,
P ROPOSED W EATHER S TATION 4G) network. Using cellular networks allows more flexiblity,
The weather station project, development, assembling and allowing weather station be place in remote places, since there
tests were made in the Hardware and Software Lab of the is signal. In order to accomplish this, is necessary to connect
Academic Department of Computing, on the Universidade a wifi ou cellular interface network to the Raspberry.
Tecnológica Federal do Paraná university, Pato Branco campus, Proprietary resources weren’t used in the creation of this
by a team composed by professors and students of Computer weather station. All the elements, like hardware, software and
Engineering. communication protocols are free to use and have low cost.
At first, it was proposed a weather station architecture, and In the following, the hardware components used in the
a correspondent requirement analysis was made.The general development of the weather station are shown. The prices
features are shown in the use case diagram - Figure 1 (a), and described are from May/2017, FOB (Free on Board), showing
the monitoring features available to the user are shown in the an average of the prices displayed in North American retailer
Figure 1 (b). pages.
The proposed architecture considers the scalability of the
system, allowing the connection of new sensors, therefore A. Raspberry PI
supporting the monitoring of new data. The architecture was
envisioned in a way that these inclusions must have minimum Raspberry PI was the first small computer to be popular
impact on the development of station’s new versions. To reduce around the world, available in the market and accessible to
complexity and costs, and to allow further modifications, the everyone, with millions of units sold until 2013. This compact
proposed architecture is structured in layers, as shown in the device was developed in 2006, in Cambridge University, UK,
Figure 2. by a team of teachers and students of the computing area.
Raspberry PI has the same features of a portable computer.
In this structure, there is a specific hardware for each The Raspberry version used in this work was the first to be
feature, so the sensors send the data measured to the Arduino sold commercially, and has an ARM processor of 700MHz/32
(through cable, analogically or digitally depending on the bits, 512 MB of RAM memory, USB inputs, HDMI output
sensor). The Arduino exchange information with the Raspberry and 10/100 Mbps network interface, being a good low cost
PI using I2C communication protocol. The Raspberry was option to provide internet access for IoT projects. Raspberry
connected to the Internet through RJ-45 cable, sending the PI supports many operating systems, and Raspbian is the

Authorized licensed use limited to: ESCUELA POLITECNICA DEL LITORAL (ESPOL). Downloaded on August 04,2023 at 21:21:51 UTC from IEEE Xplore. Restrictions apply.
most common of them. It is a free operating system based were mounted at equal angles to each other on a vertical
on Debian, optimized for Raspberry PI hardware. Between shaft. We have used a version with three hemispherical cups.
the supported programming languages are Python, Java (the The wind cups have a reed switch (magnetic sensor) mounted
language of choice in this work), C, among others [4]. For inside near the shaft. This reed switch is activated once per
hardware component integration, I2C communication interface revolution of the cups. The Figure 3 shows the reed switch
is commonly used. Raspberry PI has only free software, and used in our anemometer. We have utilized a water proof reed
the version used in this project costs about 25 dollars FOB. switch and it costs about 2.50 dollars FOB.

B. Arduino
Arduino [5] is one the most popular open electronics
prototyping platform, based on the work of Hernando Barragán
[6]. Arduino allows its programming through C language,
and has equivalent features of most microcontrollers. Its main
advantages are the easiness of programming and new resources
integration, through the use of shield modules. It has many
analog and digital inputs and outputs, becoming a good choice
for motor drive, or, in this project, for the reading of sensor
data. Due to its limitation of Internet access, it’s more com-
monly used for actuation and reading of data, which can be
transmitted to a computer (Raspberry in this case) for further
processing and sharing of data with the Internet. The Arduino
version used in this project costs about 15 dollars FOB. Fig. 3. Anemometer reed switch

C. DHT22 The wind speed is calculated using the Equation 1:


This sensor measures temperature and humidity, and has
2×P I×radius×RP M )
a great cost benefit ratio, due to its reliable accuracy and 60
low cost. This sensor sends information in digital format, windspeed = × 3.6 (1)
1000
through one-wire communication, which is an asynchronous
communication that uses only one wire. This sensor sends 40 where radius is the distance from the cups to the shaft,
bits of data. The first bits are organized in four octets to send measured in mm, it is used to calculate the circumference
the integer and decimal parts of temperature and humidity, of the circle traversed by the rotating cups, and RP M is the
while the fifth octet is a simple checksum for error detection. In amount of switch activation per period of time, it is divided
the proposed weather station, this sensor is placed in an outside by 60 to know the amount of rotations per minute (RPM). The
environment, to measure room temperature and humidity [7]. division by 1000 is to know the wind speed in m/s and the
This sensor has been made for internal environment usage, so multiplication by 3.6 is to know the wind speed in km/h.
it’s necessary to place it in a spot protected from direct sun
exposition and rain. The cost is about 5 dollars FOB. The physical structure of this sensor was made of alu-
minum, as it is intended to be placed in an external area, this
D. BMP180 material does not oxidize. Therefore, this sensor could also be
made with recyclable material. The cost for developing this
Temperature, atmospheric pressure and altitude sensor. Just sensor is around US$ 10.00, but on an industrial scale the
like DHT22, has a great cost benefit ratio, making it ideal for cost may fall considerably. Sensors with the same structure
this project. This sensor sends its reading in digital format as are usually sold for US$ 35.00 FOB.
well, but using I2C communication, which is a synchronous
communication for short distances. In this communication, two
F. Wind Direction Sensor
wires are used, one for data and one for clock, to synchronize
the communication. The master and the slaves devices have The wind direction sensor is a device that harnesses the
unique addresses, to distinguish between sender and receiver wind energy (eolian energy) to move or direct a propeller,
in data exchange [8]. Just like DHT22, BMP180 must not be measuring the wind direction. In this case, propellers are not
exposed to sun and rain. In this project, this sensor is used in needed, using instead an arrow that rotates over a vertical axis.
internal environment, therefore allowing this station to measure
internal (BMP180) and external (DHT22) temperature. This For this project, a voltage divider is used, with 10KOhm re-
sensor costs about 5 dollars FOB. sistors arranged in series, connected to Reed Switch magnetic
switch sensors. As there are four cardinal and four collateral
E. Anemometer points measured by this sensor, eight sets of magnetic switches
and resistors were used. Depending on the position of the
An anemometer is a device for measuring wind speed[9]. arrow, one of the magnetic switches is turned on, generating
The term is derived from the Greek word anemos, mean- different voltage level ranges for each cardinal or collateral
ing wind. For this project, we have utilized the Robinson points. A voltage table was then made using those ranges,
anemometer [10]. It consisted of four hemispherical cups each and the calibration of the sensor was made according to the
mounted on one end of four horizontal arms, which in turn cardinal points (North, South, East, West) and collateral points

Authorized licensed use limited to: ESCUELA POLITECNICA DEL LITORAL (ESPOL). Downloaded on August 04,2023 at 21:21:51 UTC from IEEE Xplore. Restrictions apply.
are going to stay in outdoor environment. Caution was taken
to protect and seal the electronic components, since they are
going to be in contact with rain. The objective was to find low
cost components to fulfill the goal of the project. Factors like
accuracy were also taken into consideration when choosing the
components.
To connect the anemometer, wind direction sensor and
pluviometer to the Arduino, an auxiliary circuit was needed,
as shown in the Figure 6. This circuit has all the necessary
components for sensor instrumentation, and also provides the
communication interface to the Arduino.

Fig. 4. Wind direction sensor.

(Northeast, Northwest, Southeast, Southwest). The Figure 4


shows a picture of this sensor’s circuitry.
Just like the anemometer, the mechanical structure of this
sensor is made of aluminum, handcrafted for a cost of about
12 dollars. Commercially, sensors of this same model may be
bought for about 38 dollars FOB.

G. Pluviometer
Pluviometer is a weather device used to measure, in mil-
limeters, the amount of liquids or solids (rain, snow, hail) that
fell during a determined interval of time and at some area.
The pluviometer used in this work uses a scale system, that Fig. 6. Circuit schematic for sensor instrumentation.
when filled with rain water, tips the scale to remove the water
and computes 0.25 mm of total rainfall index. To identify the The final project of the working weather station is shown
movement of the scale, a Reed Switch magnetic switch sensor in the Figure 7. Armored cables were used for the connection
was also used. of the external sensors, exposed to the weather, to the circuit
The Figure 5 shows the internal structure of the pluviome- board containing the instrumentation circuit, Raspberry PI and
ter. Arduino, as well as the BMP180 sensor that stays within
internal environment.
When the Raspberry PI, Arduino and instrumentation cir-
cuity are installed in an outdoor environment, an armored box
to seal the components must be used to protect them from the
weather and rain.
Apart from the sensors mounted and configured to work in
the weather station, an Arduino software was also necessary
to perform the reading of the station’s data. The software was
made based on the type of reading of each sensor, being either
analog or digital, as well as the I2C communication.
It was also developed a Java application for the Raspberry
PI, that communicates with the Arduino through I2C commu-
Fig. 5. Detail of pluviometer. nication, taking the data read from the sensors and storing this
data in a MySQL database located in the network, in a remote
server. This reading is done from time to time, and this interval
The mechanical structure of this sensor was also made of
parameter between readings is read by the Raspberry from the
aluminum. The cost of this handcrafted assembling is about
database.
15 dollars. Commercially, similar options are found for about
42 dollars FOB. At last, a simple web application was made, using Java
Server Faces language, as well as a web service to share
III. R ESULTS the data stored in the databse for any device (computer,
smartphone, digital TV, among others).
The anemometer, wind direction sensor and pluviometer
were calibrated, and their cost were compared to commercial This application has features like showing a report of all
sensors. The physical and mechanical structure of these sensors data read and written by the weather station, showing filter
were developed in aluminum, to avoid oxidation, since they functionality, as well as showing present climate information.

Authorized licensed use limited to: ESCUELA POLITECNICA DEL LITORAL (ESPOL). Downloaded on August 04,2023 at 21:21:51 UTC from IEEE Xplore. Restrictions apply.
165 dollars, as WMR200 costs 1035 dollars, Kastrel 4500 costs
840 dollars and WS-2010 costs 500 dollars, FOB. Meaning
that, for 15% of the price of WMR200, the proposed weather
station has almost the same features, with the possibility of
enhancing and modifying it with new sensors.

IV. C ONCLUSION
This work has accomplished its proposed goal, that was the
development of a low cost weather station that stores climate
data remotely in a database server allowing its access from
anywhere through any device.
For the development, low cost free hardware and software
were used, to reduce the prototype cost. The data generated
by the station was compared with commercial sensors, not
showing significant divergences.
The usage of Raspberry PI as a central element has sur-
passed expectations, showing low energy cost, reduced phys-
ical size and high processing power, allowing the execution
of the developed applications through commercial languages,
like Java language.
Its connectivity with automation elements also deserves
Fig. 7. Fully working weather station. attention, allowing I2C communication with Arduino or other
microcontrollers, and if necessary, there is an automation
shield called PIFACE [11].
The Figure 8 shows the graphical interface of the web In the control aspect, Arduino has also surpassed expec-
application, in which the user might consult the data generated tations, in special by the easiness of use, allowing users with
by the weather station. reduced experience to develop applications for this platform.
However, some difficulties arose in using two sensors
with time dependant readings, like the anemometer and the
pluviometer, due to not being able to efficiently use two
threads at the same time. To initially solve this limitation, two
Arduinos were used, one for each of these sensors.
One possible solution for this limitation would be the usage
of a microcontroller with preemptive RTOS. A preemptive real
time operating system deals with many tasks, aside from inter-
rupt service routines. These tasks may or not be independent
from each other, and the system preempts them according to
set rules (like time limit) to achieve concurrency. In this way,
we could create a task for each sensor. Any microcontroller
that has a ARM Cortex M3 or above processor on it can be
Fig. 8. Data taken from the database held by the Weather Station.
used for this goal, like the STM32F429 that costs about 8
Comparison between the Proposed Weather Station and dollars.
other Comercial Weather Stations As a future work, is intended to use the proposed architec-
The proposed weather station was compared with two other ture to develop a portable weather station, without internet
professional weather stations, to identify the main differences access (to allow usage in rural area) that stores the data
of features and cost. collected in a SD card, for further data transfer to a collector
device, like tablets or smart phones. It’s also possible to
The compared weather stations are: (1) Proposed weather measure the energy cost of the station to create a solar panel
station in this work, (2) WMR200, (3) Kestrel 4300, (4) WS- for it, allowing its placement anywhere.
2010 commercial stations. As observed, the proposed weather
station has 10 out of 14 implemented features. The WMR200 R EFERENCES
has 11 features, the Kestrel 4500 has 9 features and the WS-
2010 has 10. [1] B. C. Mikiten and S. Mikiten. Development of a forth based remote
weather station. In Proceedings of the first annual workshop on Forth
The stations were analysed based upon 14 features, as - FORTH 89. ACM Press, 1989.
shown in the Table I. [2] Richard M. Stallman and Joshua Gay. Free Software, Free Society:
Selected Essays of Richard M. Stallman. Free Software Fundation,
Analysing cost, the proposed weather station costs about Boston, MA USA, 2002.

Authorized licensed use limited to: ESCUELA POLITECNICA DEL LITORAL (ESPOL). Downloaded on August 04,2023 at 21:21:51 UTC from IEEE Xplore. Restrictions apply.
TABLE I. C OMPARISON BETWEEN FEATURES OF THE WEATHER STATIONS .
Web
Rain Int. Ext. Air Wind Wind Thermal Dew Atm. Wheather Data Digital
Station Hight data
index temp. temp. hum. speed direction perception point press. forecast process. compass
access
1 X X X X X X X X X X
2 X X X X X X X X X X X
3 X X X X X X X X X
4 X X X X X X X X X X

[3] OSHWA. Open source hardware definition.


[4] Robison Cris Brito, Mainara Cristina Lorencena, Handrey Emanoel
Galon, , and Willian Silva. Raspberry pi: Plataforma mobile para
desenvolvimento java. In Revista Mobile Magazine - Edição 59. Editora
Neoficia, 2014.
[5] Massimo Banzi. Getting Started with Arduino. Make Books - Imprint
of: O’Reilly Media, Sebastopol, CA, ill edition, 2008.
[6] Hernando Barragán. Wiring: Prototyping Physical Interaction Design.
PhD thesis, Interaction Design Institute Ivrea, Ivrea, Italy, 6 2004.
[7] Ltd Aosong Electronics Co. Datasheet digital output
relative humidity temperature sensor/module - dht22. In
https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf.
Acessado em 24 de maio de 2017., mar 2017.
[8] Bosh Sensortec. Datasheet bmp180 - digital pressure sensor.
In https://cdn.sparkfun.com/datasheets/Sensors/Pressure/BMP180.pdf.
Acessado em 24 de maio de 2017., mar 2017.
[9] John H. Jory. Hot-wire anemometer paper tape reader. In Papers
presented at the December 13-15, 1960, eastern joint IRE-AIEE-ACM
computer conference on - IRE-AIEE-ACM 60 (Eastern). ACM Press,
1960.
[10] K. SCHREBER. The robinson anemometer. 1915.
[11] Robison Cris Brito, Mainara Cristina Lorencena, Handrey Emanoel
Galon, , and Willian Silva. Piface: Automação industrial utilizando
java. In Revista Mobile Magazine - Edição 60. Editora Neoficia, 2014.

Authorized licensed use limited to: ESCUELA POLITECNICA DEL LITORAL (ESPOL). Downloaded on August 04,2023 at 21:21:51 UTC from IEEE Xplore. Restrictions apply.

You might also like