1-Wire Barometer. Part 3

Suggestions on Final Calibration

Getting your barometer accuracy calibrated will take adjustment over several cycles of barometric pressure change. The initial calibration will not be accurate unless your MPX4115 has the same output vs pressure slope as the typical sensor.

Our recommendation is that you do not attempt to adjust the potentiometers of your barometer until you create a spreadsheet of local airport pressure vs your readings, and do this for a significant number of readings over a range of pressures.

Following is a 14 day data spreadsheet with a pressure range of 1.27 inHg -- 29.31 to 30.58. The barometer was calibrated for a range of 28.8 to 30.8, giving a resolution of 0.01 inHg. (This data was obtained from barometer V1.1a.)

Final Calibration


  • The slope of the trendline is nearly perfect: 1.00143.
  • The offset is also excellent. If extrapolated to a pressure of 0 inHg the predicted reading is: -0.03856 inHg.
  • The standard error is 0.01263 inHg.
  • The average difference between local readings and the local airport 25 miles away is: 0.0050.

To reduce this error to 0 requires me to adjust R4 to 1/2 of the A/D resolution. Hard to do.

Once you have those results you can use a linear trendline (regression) to find the slope of local vs airport readings. If the trendline slope is not 1.0, use that slope to correct your gain resistor R3.
The slope will be a multiplicitive change to the current R3 resistance. For example: if current R3 resistance is 3K and the slope is 1.05, change R3 to 3K/1.05 = 2.85K.

Before you spend too much time getting an accurate calibration you should decide what range of pressure changes you want to track and what range of output voltages of U1A you consider satisfactory.

Happy Construction!

Technical Details

The Version 1.1a web page gives complete details of its design. Those details largely apply to this design also.

The available Design Simulator computes much of this information. So only the very basic details are presented here.

To find the equivalent sea level barometric pressure at any altitude use the following formula:

pressure (inHg) = exp((log(1 - 6.87324e-6 * altitudeFt) * 5.256)) * seaLevelPressure, or
pressure (kPa) = exp((log(1 - 22.5498e-6 * altitudeMeters) * 5.256)) * seaLevelPressure;

To find this MPX4115 voltage output we can use the formula on the MPX4115 data sheet:

MPXVoltage = 5.0 * (0.009 * kPa - 0.095) or
MPXVoltage = 5.0 * (0.009 * inHg * 3.3863 - 0.095)

Thus the maximum voltage is: 5.0 * (0.009 * 31 * 3.3863 - 0.095) = 4.25, and the minimum voltage at 28 in Hg is: 2.45.

A range of 4.25 to 2.45 is required to allow locations as high as 10,000 feet.

To get the very best resolution you need to establish the linear range of the opamp and DS2438. To do this:

  1. Change the jumper from Run to Test.
  2. Change R5 until the the voltage at pin 7 saturates.
  3. Collect data for a spreadsheet by change R5 in small steps recording the voltages at R5 and LM358 pin 7. Plot it on the spread sheet.
  4. Make another plot for U1A and the DS2438 by recording the input voltage at LM358 pin 3 and the 1-Wire output of the DS2438.

Select the best linear range by examining the plots.
Using this data with the Design Simulator your get find the values for the best resolution.

Following is a sample graph for a barometer input voltage range of: 4.17 to 3.72 volts, and a A/D value of 3.25 to 1.27. Taken for barometer V1.1a.

The results show a very linear graph with a small standard error.
It would appear that the upper range could be extended to 3.30, or 3.40 volts.

hiBaro = 31.0, loBaro = 28.0
hiOut = 8.25, loOut = 1.25
inHg/volts = (hiBaro - loBaro)/(hiOut - lowOut) = 0.428
A/D resolution = 2^10 / 10 volts = 100
barometer resolution = 0.428 / 100 = 0.00428 inHg.

Disclaimer and Usage Information

This circuit and construction details are provided without warranty of any kind. This information is published in good faith, and it is believed to be a circuit which will function as described above. However, proper construction techniques are required, and it has not been extensively tested. The user assumes the entire risk related to the use of this information which is provided "as is". The author disclaims any and all warranties.

This circuit is offered for noncommercial purposes only. Any other use must have prior written authorization from David W. Bray, or from Jim Jennings.

You may have to register before you can post comments and get full access to forum.
User Name