Advertisement
Advertisement

EDN Access--04.24.97 Adjustment-free inclinometer operates on 2.7V

-April 24, 1997



April 24, 1997

Adjustment-free inclinometer operates on 2.7V
John Wettroth, Maxim Integrated Products, Sunnyvale, CA

The circuit in Figure 1 is an inclinometer (tilt-measuring circuit) in which the sensor is filled with liquid electrolyte. Acting like a potentiometer, this sensor produces a voltage proportional to the tilt on the center electrode. Because the liquid is subject to electrolysis, the sensor must have an ac-forcing voltage with an average dc component of zero. An eight-channel, 12-bit A/D converter, IC1, digitizes the sensor output for use by the µC (IC2).

Conditioning circuitry for this type of sensor usually includes op amps, analog switches, and potentiometers. Because potentiometer settings drift with time and temperature, such systems require periodic recalibrations based on a precise and tedious procedure. A synchronous approach not only eliminates the need for calibration, but also operates on a single supply voltage as low as 2.7V (Figure 1).

Two CMOS port pins on the µC generate 50-Hz square waves, 180º out of phase, as an ac drive for the sensor. When the sensor is level, its center-electrode voltage (filtered by R1/C1 and fed to the A/D converter) is midway between these drive-electrode voltages, which are approximately VCC and 0V. Each port pin has a finite resistance and resultant voltage drop. Thus, to compensate for the resulting inaccuracies, a voltage divider comprising R2 and R3 samples the drive signal's midlevel voltage and feeds it to Channel 2 of the A/D converter. This voltage remains constant, but the center-electrode signal varies above or below midlevel, according to the direction of tilt.

The A/D converter digitizes the tilt signal on one channel and the reference (midlevel) signal on another channel and feeds the result of both conversions to the µC. The ac drive dwells for 10 msec on each polarity, allowing about nine time constants for 12-bit settling before the A/D conversion. The converter's pseudodifferential input negates the absolute value of these signals, which is approximately one-half of VCC). Thus, the magnitude and polarity of Channel 0 with respect to Channel 1 indicate the magnitude and direction of tilt. The measurement is ratiometric and, therefore, relatively immune to large variations in the supply voltage; the effect of supply variation is typically 0.2% of full scale per volt of supply change.

Two consecutive half-cycles comprise a measurement: The µC first calculates the difference between the sensor's and reference's values. The µC then applies an opposite-phase drive signal and calculates the same difference. Subtracting these values produces twice the desired tilt value and negates the need for null adjustment by canceling any systematic offsets. Software handles the values as 2's complement quantities and displays the result on the LCD, which is included mainly for demonstration purposes, as integers. (Click here to download the file from DI-SIG, #2020.)

Although the current software does not implement low-power operation, you can design the circuit to operate at low power. For example, you can shut down IC1 between conversions, and this IC draws only 10 µA in that condition. While IC1 is shut down, the system should write a low to the µC's port pins 12 and 13 to prevent dc from damaging the sensor. (Consult the sensor data sheet for the maximum dc allowed.) You can set the µC's internal watchdog to wake up every second or so for a new measurement. Operating at a few measurements per second and replacing the LCD with a MAX7211 can lower the overall supply current to 100 µA.

The techniques in Figure 1 are compatible with most µCs and µPs. Note that some µPs (mostly, variants of the 8051) exhibit unequal source and sink currents at the port pins, so, for reliable operation, you should provide external CMOS inverters between the pins and the sensor. Again, you must carefully design the power-up initialization and power-down conditions to minimize dc through the sensor.

Finally, you can expand these techniques to accommodate dual-axis sensors by dedicating two more port pins for a second pair of force electrodes. The measurement procedure is nearly identical, except that the sensor pins for each axis must be alternately tristated while you take a measurement on the other axis. This provision minimizes any cross-axis interactions, which is difficult to do with the more common analog techniques. (DI #2020)

Figure 1
This tilt-sensor circuit is simple, accurate, inexpensive, and adjustment-free.



| EDN Access | Feedback | Table of Contents |

Copyright c 1997 EDN Magazine, EDN Access. EDN is a registered trademark of Reed Properties Inc, used under license. EDN is published by Cahners Publishing Company, a unit of Reed Elsevier Inc.

Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES