K2LMG/W5EUT 1-Wire Barometer -- 5/10 Volt Design
Version 2.0

This article describes details for constructing a 1-Wire Barometer which will work on a Dallas Semiconductor Corporation 1-Wire network. It differs from the popular Version 1.1a in that it has more than twice the resolution.

As with 1-Wire Barometer Version 1.1a, this design uses a Motorola MPX4115 Silicon Pressure Sensor, a Dallas Semiconductor DS2438 Smart Battery Monitor (to perform 1-Wire analog to digital conversion), an operational amplifier, two voltage regulators, two diodes, a LED, and several resistors and capacitors.

For background information please see the Version 1.1a web page.

Printed Circuit Board

Jim Jennings has designed a single sided printed circuit board for this barometer, as he did previously for Version 1.1a. You can either make the PC board yourself or purchase it from Far Circuits. This new V2.0 board is universal in that it may be used to build either barometer V1.1a or V2.0.



Circuit Details

The circuit requires an additional power source other than that of the 1-Wire network. The MPX4115 requires about 7 ma of current. This is more than a 1-Wire network can provide without an elaborate circuit to store parasitic power from the 1-Wire network for short burst of current for pressure measurements.

The resolution of the barometric pressure is about 0.00417 inHg (0.0139 kPa) for a pressure range of 31.0 to 28.0 inHg (105.0 to 95.0 kPa, or 1050 to 950 mb). Better resolutions are possible with a more restricted pressure range.

Circuit Schematic


This schematic is missing the modulator connector. See downloads below.

Circuit Description

For barometric pressures the MPX4115 output voltage ranges from about 4.25 to 3.79 volts at sea level, and about 2.77 to 2.45 volts at 10,000 feet. Most of this range is above the active voltage range of a 5 volt opamp circuit. In effect the sensor voltage is referenced to the power supply, not ground as desired. Fortunately the DS2438 Smart Battery Monitor accepts inputs as high as 10 volts. Thus by powering an opamp from 10 volts the output of the MPX4115 is well in the opamp and DS2438 range.

The MPX4115 output is fed through a RC filter to opamp stage, U1B, which has a fixed gain of approximately 4. This stage has an adjustable voltage input which is added to the barometric sensor output within the opamp, thereby allowing the adjustment of the output voltage offset to the A/D converter.

This in turn is fed to opamp stage, U1A with an adjustable gain. It is capable of a gain range of 1/1 to about 4.14/1.

The two 10-turn potentiometers (pots) control the gain and offset. R3 controls the gain of U1A and R4 controls the offset of the output voltage to the 1-Wire DS2438 A/D converter.

Note that the MPX4115 feeds R1 through a jumper. This allows easy change of the input voltage from a source than the MPX4115 for calibration.

Simulators for Calibration and Alternative Barometer Designs

The design presented in the schematic above is not the only possible barometer that can be constructed with this printed circuit board. Not only is the printed circuit board designed to be modified for different voltage sources and 1-wire networks, but the values of the resistors can be modified for different ranges of barometric pressure and resolutions.

Two simulators are provided:

Jim Jennings has provided a Visual Basic Calibration Simulator for pre-calibration of the two pots, R3 and R4, and for calibration after construction.

Dave Bray has provided an Excel Spreadsheet for modifying the design for different barometric pressure ranges and resolutions.

Downloads

The following are files associated with this construction available for download. They are:

Parts List

This parts list is for Version 2.0 of the K2LMG/W5EUT Barometer design presented in the the above schematic.
This is for 31.0 to 28.0 inHg range, sea level to 5000ft. If other ranges and altitudes are desired use the baro20simulator.xls to find the values needed. Suggested values changes for high altitude and more resolution are listed below.

PC board
Order from
www.farcircuits.net
Ask for latest Jennings Barometer
$4 plus shipping of approximately $1.50.
IC's
The first 2 parts are available from Newark (www.newark.com)
U2MPX4115A or MPXA4115A
U3 DS2438Z
The remaining parts are available from Mouser (www.mouser.com) as well as others.
U1 LM358N #512-LM358N
U5 LM78L05 #511-L78L05ACZ
U4 L78M10 #511-L78M10CV
D1-D3 1N5817 #583-1N5817
D4 5 volt LED #512-MR5460
Resistors (all fixed resistors 1/4 watt metal film).
R1 100K
R3 5K pot #72-T93YA-5K
    For a 1 inHg range use10K pot #72-T93YA-10K
R4 2K pot #72-T93YA-2K
R5 10K pot #72-T93YA-10K
R6 15K
R7 2.7K
R8 5.6K (6.98K if over 5000 ft elevation)
R9 2.4K (1K if over 5000 ft elevation)
R10 2.7K
R11 2.2K
Capacitors
C1 1 MFD tantalum #80-T350A105K025
C2 2.2 (or 4.7) MFD electrolytic #140-XRL35V4
C3-C4 4.7 MFD tantalum #80-T350B475K016
Hardware
2 gang modular connector #154-6612
Dip socket #575-199308
Sip sockets (for pots)See note #575-193110
Power connector #163-5004
Header #571-41032390

Note: The Sip socket(s) are for the pots. Needed only if they might be changed.

Parts URL: Mouser Electronics,   Digi-Key,   Newark Electronics,   Radio Shack   among many others.

Testing and Initial Calibration

It is assumed that you already have 1-Wire hardware and software working on a computer. If not you must obtain information on both at: iButton-TMEX and Developers Tool Kit
  1. Download the simulators.zip package.
  2. Connect the barometer to your 1-Wire interface on your PC and run the iButton viewer.
  3. Run Jim's Baro20Cal.exe. You will need the VB 6.0 runtime files on your computer. If you do not have these files a search of "visual basic V6.0 runtime" on Google.com will find many free sources for them.
  4. Enter your altitude and desired low and high barometric pressures. To convert kPa to inHg divide kPa value by 3.3863 (or millibars by 33.863).
  5. Set R3 and R4 to the values with a multimeter.
  6. Connect the jumper pin to supply voltage directly to opamp U1B from the calibration pot R5. The Test position.
  7. Apply power to your barometer.
  8. Set R5 to LoVin. The iButton viewer should show a voltage near LoVolt. Adjust R4 to make it be equal to LoVolt.
  9. Set R5 to HiVin. The iButton viewer should show a voltage near HiVolt. Adjust R3 to make it be equal to HiVolt.
  10. Repeat steps 8 and 9 until no more adjustment is needed.
  11. Remove power from your barometer and set the jumper to the Run position.
  12. Connect your barometer to your 1-Wire network and run your weather station software.
  13. Finish the calibration by setting the barometric pressure reading to that of a nearby airport barometric pressure.


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


Results


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.

Resolution:
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 are visitor to this page.


Main Page