Barometer Calibration
A few years ago, I built an electronic barometer (based on the MPX4115A sensor), recently I decided it was time to calibrate it properly.
The purpose of this page is to explain how I did this, to make a permanent record of the method for myself - and for anyone else that may find it useful.
The MPX4115A sensor used in the barometer has an output voltage that is linear to change in pressure. To get the best resolution from the barometer, this voltage is offset and amplified by electronics in the barometer . To convert the final output voltage into SLP (Sea Level Pressure) we need to determine the "transfer function" of the barometer.
By plotting the output voltage of the barometer against a "known" pressure reference, we end up with a LINE on a graph. The equation of this line, allows subsequent conversion of the raw "voltage" to atmospheric "pressure".
The internet allows gathering pressure records easily, and a spreadsheet can then calculate a trendline (using linear regression) as follows - where we can see the equation of the line as: y = mx + c. (click on graph for detail).
At this stage it is interesting to compare the elegance of the above equation - to the adjustment of a mechanical aneroid barometer.
I have a very nice brass aneroid barometer, which has an adjustment screw on the back that allows one to change the offset ("c" or 908.11 in above graph). I have adjusted the aneroid barometer so that at normal pressure (1013 hPa) it reads correct. however at high or low pressure the aneroid barometer is not so accurate because the slope ("m" or gain) is not correct. To correct the slope (or mechanical gain) of the aneroid requires playing with the internal leverage from the pressure capsule to deflection needle - this is not so easy to do!
However, with an electronic barometer, the above equation provides for both "offset" and "gain", so a computer can calculate the pressure with the simple expression:
Pressure = 15.21 x V (output voltage) + 908.11
A lovely practical example of High School maths!
Having got the answer I was seeking, I should go back a few steps and explain in a bit more detail how I got the raw data to make the above graph.
The first step is to find a weather station near you . If you don't know your latitude and longitude, you can use this Interactive World Map.
The nearest station to me (3Km) is listed as ZL3GP - a site that has a working barometer. But even better, there is a link on that page for Quality control graphs. This is where the power of the internet (and lots of work by keen amateurs) really comes together.
The "Quality control" page has a link called summary and this where it gets interesting. At the bottom of the summary page we can see how well the ZL3GP barometer readings match other stations (no point in asking the time from a person whose watch runs fast). In this instance the notable references stations are NZCH (Christchurch METAR station) and 93781 (Metservice AWS ). The current two month reading shows a perfect agreement (0.0mb) between the local airport METAR station and station ZL3GP.
This is certainly good enough for me - that the barometric readings from ZL3GP are "as good" as the airport METAR readings. I am not sure which is the better calibrated reference - the METAR or the Metservice AWS. However the Metservice AWS readings appear not to be made available to the public (apart from the teasing 3 Hourly observations) - so for me it meant the METAR was to be the reference for my barometer.
On the above mentioned page for ZL3GP there is a link called Weather data that gives the previous 24 hourly measurements. I used a variation of this function that allows the previous 10 days worth of hourly readings to be downloaded. This was how I gathered the recent ZL3GP readings - to copy and paste into an editor, and massage for insertion into a spreadsheet.
Some care is needed when using the data to check there are no missing or duplicate hours.
The PC I used to record my barometer, I changed to UTC (to match the internet records of ZL3GP) - to make aligning the two sets of barometer readings easy.
Comments:
The above graph only covers about 25 mb which is only about a 1/3 of the normal range for atmospheric pressure. However it is enough to create a reasonable length line to obtain the "offset" and "slope" I need. I will wait till Mother nature drops the pressure some more - to see how "linear" my sensor is.
Many thanks to ZL3GP (who doesn't even know he has helped me) for making his data available on the web, and so allowing me to now have a nicely calibrated barometer.
Points on the above graph that are not so close to the regression line, occurred when the pressure was changing rapidly, where the (3km) distance between stations caused a slight error. Wind effects would probably account for the rest of the deviations. However I was very pleased with how well the two barometers agreed.
I have been asked why I didn't use the local airport METAR directly (which has a known calibrated barometer). The data I found on the web (for the local METAR), only reads to integer hPa values. The other reason is distance - the ZL3GP station is only 3Km compared to about 14km to the airport Metar station.
As a final test of my barometer calibration, I made hourly readings for several days (using the above formula to convert Volts to hPa) , and plotted the difference to the local airport METAR readings. I used the Wunderground site to obtain the METAR readings - to produce the following graph.
January 2008