This article describes how to make a network enabled weather station that may be used to monitor ambient air temperature, humidity, and barometric pressure in the laboratory.
When conducting experiments on the rotating turntable in the GFD laboratory it is often desirable to keep the mechanical forcing very small in order to operate in a low Rossby number regime. These experiments can be complicated by unwanted buoyancy-driven flows that can sometimes arise when the ambient air temperature in the lab fluctuates by more than a few degrees Celsius. Since it may be desirable to isolate the two effects – buoyancy driven flow and mechanical driven flow – for ease of “clean” data interpretation, we log the time series of temperature, barometric pressure and humidity in the lab atmosphere when conducting the experiment.
A Raspberry Pi mini PC – described by it’s creators as a “tiny and cheap computer for kids” – is used here to log the ambient air temperature, humidity and barometric pressure in the laboratory. Measurements are collected from digital sensors attached to the RasPi’s exposed I2C IO pins. I2C is a two-wire serial bus appropriate for this application because it allows for easy connection of multiple, external devices. The sensors purchased for this project come pre-assembled on breakout boards that are pre-wired with the necessary circuitry. The data may be telemetered by way of a wireless LAN using a wifi dongle attached to the RasPi’s USB bus. Data acquisition and data storage on the server are carried out using a script written in the Python programming language.
(1) Raspberry Pi mini PC
(1) Sparkfun Barometer Breakout Board w/ Bosch BMP085 sensor
The prototype weather station was assembled on bread board.
The RasPi must be configured to allow access to the SMBus/I2C devices in order to communicate with the sensors. The easiest way to get up and running is to start out with Adafruit’s Occidentalisdistro. It comes pre-configured to enable the hardware needed to support I2C. Most of the information you need to know about setting up the RasPi is available at the Raspberry Pi Foundation’s website and numerous other online resources. We have also compiled a list of adaptations, as well as some general tips that might speed the process of deploying a Raspberry Pi.
These examples depends on our in-house library WeatherStation.py, which depends on the third party library Adafruit_BMP085.py, which in turn depends on Adafruit_I2C.py. We have supplied a currently-current (as of 2013-08-26) gfdi/gfdiPiTools copy of each of these for convenience, but you may want to find and obtain the latest versions.
You can clone gfdiPitools and the example scripts easily using git.
git clone https://github.com/gfdi/gfdiPiTools.git
For more detail: Laboratory ‘Weather Station’