Calibration Instructions for the v3 Barometer



There is a range mismatch between the output of the MPXA4115A (pressure transducer) and the desirable input to the DS2438 A/D.  If one were to interface the pressure transducer directly to the DS2438, the system would work, but the resolution would be unacceptable.  At any given location the pressure transducer only uses about 10% of it’s total available range.  So instead of having a range of 0 to 5 volts we have a 0.5 volt sub range within the 0 to 5 volt span.  At my location the low voltage output from the transducer (which represents 28 inHg) is 2.523 volts.  The high voltage output from the transducer (which represents 31 inHg) is 2.845 volts.


So what this design does for this example is to shift and expand that 0.32-volt range so that it covers a substantial portion of the 0 to 10 volt range of the DS2438.  For various reasons we have settled on having the full range of the DS2438 to be from 1.25 to 8.25 volts.  In other words we have a device that produces a linear function from 2.523 volts to 2.845 and we want to transform that function to a linear function that goes from 1.25 to 8.25 volts.  We think of this as an offset/gain transformation.


You should be aware that this part of the calibration assumes that each transducer performs according to the published transfer function.  They vary slightly from the published value, but never so much that the final calibration can be easily done in software.


The circuit is composed of 2 OpAmps.  Each OpAmp can be adjusted both for offset and gain.  However, to simplify the process, the first stage has essentially fixed gain and adjustable offset (VR1).  The second stage has essentially fixed offset and adjustable gain (VR2).  I say essentially in both cases because the adjustment of VR1, which is done to set the offset of the first stage, has a small effect of the gain of that stage.  Similarly, the adjustment of VR2, which is done to set the gain of the second stage, has a small effect of the offset of that stage.  As a result there is some back and forth adjusting required.

The Calibration

1.      Run the BaroCalc30 program, enter you elevation in feet.  Normally you would use the default values of 28/31 inHg and 1.25/8.25 volts.  You can use any values you like within reason,  Lower voltage goes with the lower pressure and higher voltage goes with the higher pressure.  On the menu of the program you are allowed to fix a Report header, or title that will print on the report.  Once you have entered your values on the left hand side of the window then click on “calculate” and the calculated values will appear.  When you click on “Print Report” the report will be placed in the same folder as the BaroCalc30.exe program and will be called “Output.txt”.  Just open that in Notepad and edit it as you see fit, then print it if desired .

2.      I should point out that you should preset VR1 and VR2 before soldering them in.  When presetting VR2, measure the resistance between the center pin and the pin closest to the edge of the board, and when presetting VR1 measure the resistance between the center pin and the pin closest to the center of the board.  The value printed in Output.txt is the value from the center pin of VR1 to ground that includes R6 (1800 Ohms).  So it is necessary to subtract 1800 Ohms for the value printed for VR1.  (We left it this way as if you happen to be much about 10,000 ft elevation, you will have to reduce the 1800-Ohm resistor.  But BaroCalc will still be useful information. If you have already soldered VR1 and VR2 in place you can probably measure the resistance between Pins 1 & 2 on U1 (LM358) to measure and set VR2 (with no power applied), you can then adjust VR1 to a rough offset using iButton viewer.

3.      Solder VR1 and VR2 in place and plug the barometer into the 1-Wire network. 

4.      Remove the jumper if fitted from Pin 4 and 5 of the J1 calibration header, now plug your calibration tool in ensuring that Pin 1 is connected to the +v connection on your tool, although it won’t do any damage if you connect it the other way round.  If you now apply the power the LED should come on.  You now need to setup your calibration tool with the values from the output.txt using your voltmeter.  If you set the calibration tool switch to select VLow and connect your voltmeter between J1 pin 3 and 4 you can adjust the VLow preset on the calibration tool to value from output.txt, now set the switch to select VHigh and adjust the VHigh preset to give the correct voltage for VHigh on J1 pins 3 and 4.

5.      Put your voltmeter between pin 1 of the LM358 and ground.  This measures the analog output of the OpAmp string that is the input to the A/D on the DS2438.  You can also use the iButton viewer to read the VAD voltage if the The following 2 steps should be made iteratively until there is no change.

6.      Set the switch on your calibration tool to VHi and carefully adjust VR2 to give 8.25 volts on the voltmeter.

7.      Set the switch on your calibration tool to VLow and carefully adjust VR1 to give 1.25 volts on the voltmeter.

8.      Repeat steps 6 and 7 until there is no change.  Move the jumper to the run position, you should get a voltage on the voltmeter between 4 and 6 volts depending on what the local barometric pressure is.  You can calculate the barometric pressure with the following formula (assuming you are using 28/31 and 1.25/8.25).

9.      Finally, when you get the barometer installed on your weather network you can make minor changes to the calibration to get it to agree very closely with nearby known to be accurate readings.  Let’s say that your barometer is reading 0.08 inHg too high.  Just subtract 0.08 from both the 28 and 31 inHg entered in the software settings.

Barometric pressure (corrected to sea level) =

     (Voltage reading – 1.25) / 7 * 3 + 28




1.      Check for bad solder joints.  Hold the board up to a light to see if any traces are broken.

2.      Make sure the DS2438 and LM358 are the correct way round

3.      Be sure you have correct polarity on the capacitors and diodes.

4.      Make sure that you wire the RJ45 plug up correctly, +12-24v is Pin 3 and or 6, 1-Wire Data is Pin 4, 1-Wire Ground is Pin 5 and Power Ground is Pin 7 and or 8, if used with the 1-Wire hub then this shouldn’t matter, just use a straight through 1-1 CAT5 patch lead.