circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

December 2005, Issue 185

Browser-Based Telemetry System


TAI8570 PRESSURE SENSOR

After learning several hard lessons, I realized that it was less expensive and easier to buy off-the-shelf hardware than it was to bog myself down building with breadboards and PCBs.

Intersema Sensoric’s MS5534A pressure sensor is used in commercially available altimeters and hand-held GPS units. The MS5534A is a piezoresistive sensor that has its own ADC and a three-wire serial interface. The raw analog values are strongly dependent on temperature and process tolerances. For this reason, each MS5534A has been factory calibrated at two different temperatures and two different pressures. These calibration coefficients are stored on the 64-bit PROM to allow for temperature compensation by the host controller.

A TAI8570 1-Wire sensor from AAG Electronica effectively interfaces with the MS5534A to the 1-Wire bus via two Maxim DS2406 switches. The DS2406 is a dual-addressable switch with an extra 1 KB of memory. The two DS2406 switches are used to read and write to and from the MS5534A. Figuring out which switch is easy because the TAI8570 comes with a sticker that labels the 1-Wire addresses of the reader and writer switches (see Figure 2). If you want to build your own, simply use one of the many available 1-Wire discovery programs to find the address of your switches. Timing diagrams to perform reads and writes are available online, but the topic is beyond the scope of this article. Suffice it to say that both temperature (degrees Celsius) and pressure (millibars) can be read with the source code available on AAG’s web site. All that’s missing is the pressure-to-altitude conversion algorithm.

(Click here to enlarge)

Figure 2—The AAG TAI8570 costs approximately $67. It has two RJ11 jacks for easy 1-Wire daisy chaining.

The formula for converting raw air pressure values into meters is too much to ask of most microcontrollers. Anticipating this, the Intersema staff chopped the exponential function into 16 intervals so the altitude can be easily calculated with a look-up table. This piecewise linearization introduces an acceptable ±6-m error (see Figure 3).

(Click here to enlarge)

Figure 3—The source of inaccuracy is where the raw air pressure (mbars) is converted to meters via the look-up table.

After XML data was being sent to my web browser, I started wondering if these numbers had any meaning. The constantly changing air pressure caused by changes in the weather caused ±80-m swings in some tests while they remained stationary overnight. At this point, I called in some help to test the sensor and the code in a mobile environment. To calibrate and validate a sensor, all you can do is compare it to one you trust (e.g., a $300 GPS unit).