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
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
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
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.