Xmas cocktail ...Add digital barometer to mechanical dials and a dash of openHAB magic

openHAB enabled me to create an internet connected weather station from cheap components instead of spending a fortune on one of those semi pro hobbyist all in one stations. I new nothing about openHAB not that long ago but buoyed with some success at integrating my weather cheapo sensors I decided I needed a bigger challenge for the Christmas holidays. My weather station was missing a barometer and after much searching I failed to find anything that fitted the bill on the market. They were either the old fashioned, often expensive, bellows type barometers or modern, cheap but with tacky plastic housings with terrible displays.

With a spare Raspberry Pi and openHAB, just maybe, I could fix those little issues :slight_smile:

I wanted a barometer with physical dials but I also wanted it to be accurate using a modern digital pressure sensor and to be able to create charts,send email alerts and integrate it into my openHAB weather station environment.

And so, I decided to build my own over the Christmas break :slight_smile:

It was going to sit in pride of place on a desktop and it had to have an industrial look, nice dials, all to match my decor.

My goal was also to learn more about what I can do with openHAB, learn some Python, Linux, MQTT, I2C, plus learn a bit more about what I could with a Pi and a soldering iron. I didn’t know much about any of those things before I started.

It seemed like I had set myself for mount Everest to climb. Still it was Christmas and I had time to try.

Undaunted I planned ahead and procured the parts and then Christmas was upon us and I started the ascent.

I did finish the project in the allotted Christmas break except for the enclosure and face plate.That took longer than planned because I am perfectionist and it took several attempts over 4 weeks for drilling , painting and polishing, printing the graphics in order to get everything looking good and aligned well enough so that the dials and pointers were accurate through their ranges.

On the coding side I found it mostly easier than expected but key was to find helpful up to date and accurate sources of information. Python was no where near as bad as thought it might be but I did have a bit of trouble understanding threading. I needed that to stop failed connections to the MQTT broker crashing the script. The barometer has now run continuously for months.

I built it from these bits:

  • Spare Rapsberry Pi3b
  • BME280 i2C pressure sensor
  • Two Adafruit stepper motors and Adafruit stepper motor HAT for the Pi
  • Nice metal power button with LED ring for safe turn off the Pi
  • A couple of micro switches for detecting the home positions of the dials
  • A few pull up and pull down resistors for the homing micro switches
  • I reused some old power supplies minus their casings for the motors and Pi
  • Enclosure and wood face plate for mounting the dial graphics.

Here is the end result >
The barometer: 1hPa = 1mb




Side view showing location of homing microswitches behind the face plate




openHAB MQTT Thing via v2.5.1 binding
image
Grafana gauges:
gauge
tendency
Grafana chart
BERGFEX = the yellow trace is the local weather station I used for checking the calibration. If you look carefully you can spot on the chart where I recently adjusted it.

M

7 Likes

nice, can you share algorythm how you are predicting weather?
eg. only on pressure or are you using temp,humidity and pressure to guess weather?

aahh Predicting the weather. Now that’s interesting :sunny: :sun_behind_small_cloud: :sun_behind_rain_cloud: :cloud_with_rain: :cloud_with_lightning:

… This project is actually a stepping stone to a possible next. I was thinking of making animated scenes that swing into view depending on the barometer forecast. I could do this using a website but I would prefer to use the barometer.

So, at the moment I am observing the pressure changes to see how I could use that for a prediction. I am used to Atlantic weather storms hitting the UK. The changes are much more pronounced. But now I am located in Austria, central Europe and the changes are mostly more subtle and less connected to the pressure.

However, generally the same rules apply. Low = rain/clouds, warmer in winter, <5C maybe it snows. High = sunnier but colder in winter. A fast pressure change probably means the weather is going to change soon. A very fast increase is usually due to a thunderstorm directly overhead.

yeah i know these general ones, was wondering if you don’t have bit detailed ones, like combination of change within the time together with temperature and humidity… I mean, there is some info here and there but nothing really at one place to start with :wink:

No. Like I said I am just thinking about it and observing. Any tips on how to do it would be welcome. Code etc.