Yet Another Weather Station

I have had a life long interest in weather and meteorology. For years I have thought about setting up my own weather station. I often looked at commercial weather station kits but they tend to be either too toy-like, too expensive or too inflexible. What I wanted was something that would give good quality weather data and that I would have complete control over.


In 2017 I decided to finally get on with it and build my own weather station based on Raspberry Pi and Arduino hardware, and open software. This page provides an overview of the project and links to a growing set of blog posts focussing on various aspects or the project and what I have learnt.

What is in a name?

DIY weather stations are nothing new. A quick web search returns an amazing range of projects, and many of these have been a source of inspiration or instruction for me. When I realised how wide-spread an activity this is I started thinking of my project as "YAWS", Yet Another Weather Station (in the time honoured naming tradition of YACC and Lex). After a while I thought to check to see whether others were using the same name, and sure enough there are a plethora of YAWS projects out there. I toyed with the idea of YAYAWS and PAWS (Pi/Arduino Weather Station), but I am probably going to stick with YAWS for now.

Why a Weather Station?

For me this has been an immensely enjoyable and rewarding project. I can understand why so many people have been drawn to similar projects. Apart from the intrinsic appeal (to me) of gathering weather data, this is a great project for a number of reasons, such as:

  • It is simple enough to be approachable - You can get a temperature sensor rigged up and logging data to a database in a matter of hours, and grow from there.
  • It is rich enough to be challenging - You can take the project pretty much as far as you want. The end is not in sight for me, with plans for various upgrades, serious thoughts about ultrasonic anemometers, and dreams of LIDAR.
  • It encompasses a huge scope - Depending on how deep you want to take the project it can touch on a huge range of areas, such as electronics, coding (including database design and management, web development), construction and 3d printing.
  • Simple problems turn into interesting rabbit holes - Time and again I have found myself spending hours learning about some aspect or other of electronics, software development, physics or maths that I would never have expected to be relevant. For example, I had never given much though to the problem of averaging of circular quantities until I started investigating some anomalies in my wind direction data.
  • There is a huge community of fellow weather tragics and makers out there - Given the rise of the maker movement, open hardware and software, and the web there probably has never been a time where there is so many resources available for this kind of project.

This project has really brought home to me that I am at my happiest when I am learning something new and being able to apply it. This project has been a rich playground of opportunities to explore, learn and apply. 

 An Overview

In it's current form YAWS has two main components:

  1. The weather station - A set of sensors attached to an Arduino Uno board; and
  2. The base station - A Raspberry Pi that drives data collection from the station, runs the database (MySQL) and web server (Flask).

These components are connected via a slightly complicated arrangement of a 50m four core wire, an Arduino Mega and a pair of XBee radio modules. The overall design and the reasons for this complexity are discussed in detail in the post here.

High level schematic.png.001.png

The sensors currently included in the weather station are a tipping bucket rain gauge, a 16 position wind vane, a cup anemometer and a BME280 giving temperature, atmospheric pressure and relative humidity. From these raw inputs I also derive apparent temperature and pressure trend.

Sorry, the Pi must be offline

The weather station is polled every minute for a set of observations, so the latest observations in the database are never older than a minute (unless the station is down for any reason). Currently the observations for each 5 minute mark are stored. My intention is to keep these detailed observations for a limited period (e.g. 3 days) and roll them up to daily summary records that will be kept for the long term. 

The data is available on the web served up by a Flask application. Currently this is just in the form of single web page showing the current data and graphs of the data from the last 24 hours. The post here discusses how the graphs are generated on the fly within the Flask application using the Cairo drawing library. The web server is visible on the Internet thanks to a dynamic DNS service.

All components of the system are readily available online or from hardware shops. I have bought most of my components at Core Electronics (online) or Jaycar Electronics (in store). 

More details 

I intend to document various aspects of the project in more detail in a set of blog posts. Currently the following posts are available:

This is very much a work in progress (both the project and the write-up) and I will be adding more detail over the coming weeks. Topics I intend to cover next include:

  • Design and assembly of the weather station controller and enclosure.
  • Overview of sensors and metrics.
  • Getting useful data from a cup anemometer.
  • Design and construction of an enclosure for the BME280 sensor (in lieu of a Stevenson Screen).
  • Apparent temperature calculation.
  • Pressure trend calculation and classification.
  • Wind barbs and wind speed classification.
  • MySQL set-up on an external HDD.
  • RJ11/12 sockets and cables.
  • Resources on the net.