Langue English Język Polski Calculator - pressure reduced to sea level

Barometer

I decided to add atmospheric pressure to all the things I have been measuring. Friend of mine gave me barometer made according to 1-wire design by Davida W. Bray, but I somehow could not calibrate it. This was the reason why I decided to try how barometer which is a part of "weather station by titan" works. I used only some elements from this weather station design, i.e. DS2450 and MPX4115. In addition, due to the high sensitivity of the system for power supply voltage variation (jump in results) I decided to use voltage regulator 78L05 to connect the unit with 12V. DS2450 layout, unfortunately, can not detect whether the power is attached or not. So we have to manually send it the information that it has power supply on:
owwrite 20.sensor_number/power 1
The results were not perfect - the pressure readings jumped a little bit. Unfortunately I do not have access to any professional barometers to make comparisons. I decided to calculate average values for the data (after 5 readings, every 2 minutes on a rrd database entry) and now it looks much better.



Pressure reading is done by reading the voltage from the DS2450:
barometric_voltage=`owread 20.sensor_number/volt.A`
Then the recalculating of the voltage absolute pressure in hPa:
press_abs=`echo "scale=20 ;a=((($barometric_voltage / 5.04) + 0.095) / 0.009) ;\
        scale=2 ;(a * 100) / 10" |bc`
Where to 5.04 - is a reference voltage (voltage supplied to our system).
WARNING! This voltage should be measured as accurately as possible.
Correction (of our readings) made in relation to model barometer is added at the end of calculations. If we made correction by changing the value of voltage then that would result in incorrect readings of atmospheric pressure in all the cases where the atmospheric pressure is different from the value at which we made correction by changing the voltage. My correction is -17,1 hPa.
press_abs - our results - absolute pressure in hPa with an accuracy to two decimal places.

For indications that could be compared with other meteorological stations, we have yet to convert the result obtained to the relative pressure (sea level).
press_sea=`echo "g=9.780318 * (1 + 0.0053024 * (s($fi))^2 - \
        0.0000058 * (s(2 * $fi))^2) - \
        0.000003085 * $nh ;\
        t=((2 * ($temp + 273.15)) + ((0.6 * $nh)/100))/2 ;\
        kor=e ((g * $nh)/($nR * t)) ;\
        scale=2 ;($press_abs * kor * 10)/10" |bc -l`
where:
fi - latitude in degrees (eg 51.38)
nh - nh - height above sea level (eg 52) at which barometer is placed
temp - air temperature in °C
nR="287.05" - gas constant
press_abs - absolute pressure - measured by us - see above

The result is obtained in the variable press_sea in hPa with an accuracy to two decimal places. The accuracy can be changed by changing the last line of the script "scale = 2".

Presented method takes into account the conversion of gravity constant changing depending on the location (latitude) and altitude, the air density (temperature) and the difference in height (this method is similar to methods used by professional meteorological stations).

Everyone can easily calculate the variable to convert the absolute pressure to the relative and should not worry too much that it will be slightly different from the real world value, difference is caused by changes in temperature.

Designs for the conversion of pressure


Personal Weather Station.
icon IPv4 Home automation www.tomkii.net/tech/pomiary/ Język Polski - what I measure, which devices I use, and how do I use them.
Forum forum.tomkii.net/forum-5.html Język Polski

Contact e-mail: Napisz@Tomkii.net
Last Modified: 2017-06-26