Temperature 6.3 °C
Wind NNW @ 17 to 31 km/h
Baro Pressure 99.4 kPa
Precipitation 0.0 mm today
Lightning 0 counts today
Friday October 20 15:30

Techno Babble

Sensors

Weather station and rain guage
mounted on the roof.
Weather station photo
Temperature sensor
enclosure on a pole
in the backyard.
Stevenson screen photo

The weather station used is a kit from Dallas Semiconductor. It is mounted on the roof of our house and provides wind and rain data. The temperature inside this weather station is also available, but it tends to read somewhat high, especially on sunny days, because it is in a sealed enclosure. Instead, the temperature data is collected from a Dallas Semoconductor direct-to-digital sensor mounted in a ventilated enclosure in the backyard.

Barometric pressure is obtained from a Motorola MPX4115 silicon pressure sensor, an op-amp, and a Dallas Semiconductor DS2438 smart battery monitor (to perform 1-Wire analog to digital conversion).

Lightning is detected with a short antenna connected to a couple of transistors that switch the input to a Dallas Semiconductor DS2423 counter via an opto-isolator.

All the sensors use the novel 1-wire communication protocol invented by Dallas Semiconductor. This protocol allows supply voltage, clocking, digital sensor commands and digital return values all to be sent over a single wire (plus a ground wire, of course).

Acquisition

The TINI in a TILT development board
from Systronix.
TINI photo

The data sampling of the sensors is done by a TINI. The TINI is a single board computer the size of a memory DIMM that contains an MPU, flash memory, RAM, an ethernet controller, serial ports and more. It runs a Java VM, and is programmed in Java. Being another Dallas Semiconductor product, it has the ability to read 1-wire protocol devices directly.

The TINI samples the sensors every 3 seconds and then multicasts an IP message with the values.

Since adding more sensors and a 1-Wire hub, there has been a change to the sampling. Not only does each sensor take time to scan, but the hub has to be switched to connect each sensor to the TINI and this also takes time. The wind direction and speed are still sampled every 3 seconds, but the other sensors are now sampled only every 6 seconds. The temperature is read on one sample and the rest of the sensors on the alternate sample. The wind is read every sample to get the maximum number of samples for the only sensors that change within seconds.

Database

The Mac Mini
from Apple Inc..
Mac Mini photo

The multicast messages are received by a Java program running under Mac OS X (Leopard) on a Mac Mini. Exactly every 5 minutes, it constructs a reading from the previous 100 or so samples. These readings are saved in a MySQL database.

The Samples chart on the front page shows the number of samples (taken every 3 seconds) that were used to construct each 5 minute (300 second) reading. Ideally, this would always be 100, but the data gathering Java application sometimes has communication problems with sensors, and samples are therefore lost. This sampling approach to gathering the data allows averaging of the wind speed and direction over the 5 minute period, providing smoother data. The Gust wind speed is the peak 3 second sample within each 5 minute reading. The sampling and averaging also allows a finer granularity on wind direction than the 22.5 degrees provided by the wind vane.

The temperature at the airport and COP are obtained from Environment Canada's 24 Hour Retrospectives of hourly readings (airport, COP) which is why they are shown on the front page as discrete samples on the hour.

Early every morning, the readings for the previous day are statistically summarized into another MySQL database table.

Presentation

Java development made easy by Eclipse.
Eclipse

These web pages are being served by a Mac Mini running Mac OS X (Leopard). The software behind them is written in Java, but instead of just JSPs, it's using Jakarta Tapestry which allows web pages to be written with a event driven model - view - controller pattern instead of in an adhoc scripting language.

All of the charts are generated with Ploticus.

Randy.Peters@Wx.Ca