ADXL202/ADXL210
STRATEGIES FOR USING THE DUTY CYCLE OUTPUT A DUAL AXIS TILT SENSOR: CONVERTING
WITH MICROCONTROLLERS ACCELERATION TO TILT
Application notes outlining various strategies for using the duty When the accelerometer is oriented so both its X and Y axes are
cycle output with low cost microcontrollers are available from parallel to the earth’s surface it can be used as a two axis tilt
the factory. sensor with a roll and a pitch axis. Once the output signal from
the accelerometer has been converted to an acceleration that
USING THE ADXL202/ADXL210 AS A DUAL AXIS TILT varies between –1 g and +1 g, the output tilt in degrees is calcu-
SENSOR lated as follows:
One of the most popular applications of the ADXL202/ADXL210 Pitch = ASIN (Ax/1 g)
is tilt measurement. An accelerometer uses the force of gravity Roll = ASIN (Ay/1 g)
as an input vector to determine orientation of an object in space.
Be sure to account for overranges. It is possible for the acceler-
An accelerometer is most sensitive to tilt when its sensitive axis ometers to output a signal greater than ± 1 g due to vibration,
is perpendicular to the force of gravity, i.e., parallel to the shock or other accelerations.
earth’s surface. At this orientation its sensitivity to changes in
tilt is highest. When the accelerometer is oriented on axis to MEASURING 360ⴗ OF TILT
gravity, i.e., near its +1 g or –1 g reading, the change in output It is possible to measure a full 360° of orientation through grav-
acceleration per degree of tilt is negligible. When the accelerom- ity by using two accelerometers oriented perpendicular to one
eter is perpendicular to gravity, its output will change nearly another (see Figure 15). When one sensor is reading a maxi-
17.5 mg per degree of tilt, but at 45° degrees it is changing only mum change in output per degree, the other is at its minimum.
at 12.2 mg per degree and resolution declines. The following
table illustrates the changes in the X and Y axes as the device is
tilted ± 90° through gravity.
+908
Y
3608 OF TILT 1g
Y
08 1g X
X
–908
X OUTPUT Y OUTPUT ( g) Figure 15. Using a Two-Axis Accelerometer to Measure
X AXIS ⌬ PER ⌬ PER 360 ° of Tilt
ORIENTATION DEGREE OF DEGREE OF
TO HORIZON (ⴗ) X OUTPUT ( g) TILT (mg ) Y OUTPUT (g) TILT (mg )
–90 –1.000 –0.2 0.000 17.5
–75 –0.966 4.4 0.259 16.9
–60 –0.866 8.6 0.500 15.2
–45 –0.707 12.2 0.707 12.4
–30 –0.500 15.0 0.866 8.9
–15 –0.259 16.8 0.966 4.7
– 0 0.000 17.5 1.000 0.2
– 15 0.259 16.9 0.966 –4.4
– 30 0.500 15.2 0.866 –8.6
– 45 0.707 12.4 0.707 –12.2
– 60 0.866 8.9 0.500 –15.0
– 75 0.966 4.7 0.259 –16.8
– 90 1.000 0.2 0.000 –17.5
Figure 14. How the X and Y Axes Respond to Changes in
Tilt
REV. B –9–