Temperature & weather forecast systems

Temperature and Weather Forecast Systems

1-wire Barometer

Assumptions/Design Criteria:

· The barometer will be operated indoors. This will minimize output variations caused by temperature and will lengthen the calibration intervals. It also means the circuit board will not have to be weatherproofed.

· Will be easy to calibrate. This means there will be a maximum of 1 calibration adjustment.

· The operating range will be from 28.00 inHg to 32.00 inHg

· Resolution will be greater than .01 inHg from sea level to 10,000 feet.

· The interface will be standard Dallas Semiconductor 1-wire.

· Because the unit will be designed for indoor operation, it can be externally powered.

· Will utilize the Motorola MPX4115A pressure transducer.

Based on these assumptions, table 1 was generated. This table calculates the station pressure for both the minimum (28.00) and the maximum (32.00) pressures for altitudes from sea level to 10,000 feet in 1000 foot increments. The station pressure is then converted to MPX4115A pressure sensor volts. Looking at the table, I discovered the predominant change in altitude in the offset voltage of the pressure sensor. I decided that this will be the adjustable parameter, and that the circuit gain would be fixed.

The OA Offset column is the op amp offset voltage that compensates for altitude. This will be the only calibration variable. Since the instrumentation amplifier is a rail-to-rail device, in theory it will operate down to 0 volts. However, to provide some margin, the offsets were chosen to allow a minimum of .2 volts at the lowest pressure. The gain of 10 was chosen to allow maximum output voltage swing for all altitudes. The resulting op amp output voltages are listed in OA Output column. This is the voltage applied to the DS2438 Vad input.

Circuit Design:

The following circuit design satisfies these requirements. I selected the INA122 instrumentation amp for several reasons: it eliminated several external resistors and it provides a very stable gain over a wide temperature. It also provides excellent rail-to-rail operation allowing full use of the 10 volt input range of the DS2438. The 40.2K ohm resistor sets the gain to 10. The variable resistor allows adjustment of the offset voltage from 2.0v to 4.0v. All parts are available from Digikey except the pressure sensor, which is available from Newark.

Calibration:

Hardware calibration is simply a matter of setting the offset voltage to the value listed in table 1 for your altitude. A jumper on the input of the DS2438 allows the use of the DS2438 to measure the offset. Put the jumper in the A-C position and using the iButton Viewer for the DS2438, set the voltage to the table value using the 25-turn pot. Once it’s set, put the jumper in the A-B position to read pressure.

For altitudes in between the values listed in the table, simple interpolation will give accurate results. An Excel spreadsheet will be also available online to calculate intermediate values.

Software:

Routines currently exist to measure the DS2438s Vad voltage. Once this voltage is measured, the pressure is calculated using:

Press = slope * Vad + intercept

Where the slope and intercept are the values listed in table 1 for your altitude. The prototype code I used had an external text file to store the slope and intercept values.

This allows the user to edit the file to fine-tune the calibration if desired.

Fine-tuning can be accomplished by monitoring the pressure and comparing it with a known reference source, such as a nearby airport or NOAA weather. Start by adjusting the intercept. When the reference station indicates a pressure near mid-scale (30.00 inHg), adjust the software intercept value until your weather station matches. Now monitor the pressure extremes to determine if the slope needs adjustment. An Excel spreadsheet will be available as an aid.

Future Options:

A fixed resistor could replace the variable resistor. This would eliminate any hardware adjustments. The value would have to be calculated for a given altitude. Another possibility is to use several DS2406 1-wire switches or a programmable potentiometer to set the offset programmatically.

Comments