Interactive Design Tools: Accelerometers : ADXL202 Calculator
An interactive design assistant for use with the ADXL202 accelerometer.
Troubleshooting | Related Information |

You will be asked to enter a number of design parameters important to your application. This will include such issues as how fast is the signal you need to measure, what is the required update or acquisition rate, what is the counter speed on your microcontroller. After entering target values (inputs) the spreadsheet will calculate outputs such as the resolution of the accelerometer. You can then iterate the input values and trade off parameters as necessary to meet your design goals.

Enter values where indicated. Intermediate results are shown in gray areas to the right of each data entry area. When your design is complete all values for your design will appear in the "Design Summary" below right and in the components box below the schematic.


 
ADXL202 Schematic

Design Summary

Parameters
Supply voltageV
Analog BandwidthHz
Acquisition Ratereadings / sec
Resolution (g's)g
Resolution
(deg of tilt)  
deg. of tilt
Microcontroller
counter rate
MHz
T2ms
Power cycling %% on time
TMAXdeg. C
TMINdeg. C
Zero g drift Tmaxg
Zero g drift Tming
Component Values
Supply Decoupling  0.1uF
CX, CYuF
RSETKohm




1.  Enter your nominal supply voltage

The XL202 will operate from 3.0V to 5.25V. Enter your nominal supply voltage here.
 V

2.  What is the fastest signal you want to be able to observe?

In this step you will determine the bandwidth for the analog stage of the accelerometer. The bandwidth generally determines the noise floor and thus the resolution of the accelerometer. In a later section you will also calculate digital noise sources from the PWM stage; the combination of these two noise sources determines the total noise floor. You will be measuring a real world acceleration, such as human or vehicle motion. What part of the signal content is important? If the signals are transient, such as shock or impulse, you may want to set a higher bandwidth. Human motion can often be measured at 10Hz or less. Don't forget to consider filter delays that could result in a lag between a stimulus and a response by the accelerometer, (dominated by the filter). The value for the XFILT and YFILT capacitors are calculated below. You will probably want to iterate to a standard capacitor value.

 
Enter desired bandwidth: Hz
Calculate filter capacitors
CX, CY:   uF

3.  Estimate P-P noise

The peak to peak noise of the accelerometer is the best indicator of the resolution of the accelerometer. Noise is a statistical process, and is best described by an RMS measurement, (available on the datasheet). P-P noise is then estimated using a statistical estimation. You need to select an RMS to P-P estimation. The table below lists several RMS to P-P noise multipliers, and for each predicts the amount of time the actual signal will EXCEED the estimated P-P noise. The lower the multiplier, the more likely it is that a noise event will exceed the P-P limit.


Enter RMS to P-P multiplier:    X RMS

RMS Multiplier% of time a signal will
exceed the P-P estimate
2X32.00%
4X4.60%
6X0.27%
8X0.01%

Calculate noise at the analog
outputs XFILT and YFILT


NoiseRMS g (max)
NoisePP g (max)
@ 4X RMS

NoisePP deg of tilt (max)
@ 17mg/deg of tilt

Note: Noise level is inversely proportional to supply voltage.
Note: Decrease Noise (increase resolution) by decreasing BW.

3A.  Iterate

Look at the P-P noise estimate; this is the noise limited resolution, (the smallest signal you can resolve). Is this acceptable for your application? If not you should consider adjusting the bandwidth down to reduce P-P noise and improve resolution.


4.  How fast would you like to acquire the signals?

In this section we will begin the design of the digital output, and the microcontroller interface. You will input an acquisition rate, i.e. how many times per second you want a new reading from the accelerometer. You are also asked how long the part should be powered each second. Note that if you only want a few samples per second, but intend to keep the part powered all of the time, then you will need to set a faster acquisition rate in order to get reasonable values for the PWM output. The program requests that you input the time required to do the multiplies and divides to calculate the acceleration. 3.0ms is the time required for a Microchip 16C63 running at 4 Mhz. This section generates a component value for the RSET resistor.


Enter desired
acquisition rate:
each channel / second
% of time
part will be powered:  
%

Calculate Acquisition Time

Maximum time available to acquire two channels ms
Time required to calculate two channels ms
Time left for signal acquisition ms
(two channels)

This implies a requirement for the value of the PWM period T2
Thus, T2 = ms
Value for RSET: Kohm

5.  Enter the counter rate of your Microcontroller and calculate the resolution of the digital output.

In Section 2, we calculated the resolution of the analog section. In this section we will calculate the resolution of the digital output; a fuction of the PWM rate T2 (calculated in section 4), and the counting rate of your microcontroller. Please note that the counting rate is different, and usually slower than the microcontroller clock rate. The output of this calculation is a measure of the quantization error of the counter. In some cases it may limit the ultimate resolution; we will explore this in section 7.


Enter counter rate: Mhz

Calculate output resolution

Resolution Counts per g
g (Quantization size)
deg. of tilt
bit counter is required

6. Check for aliasing and other errors in sampling:

In all cases the sample rate (1/T2) needs to be faster than the bandwidth of the analog section by a factor of at least 2 in order to meet the requirements of Nyquist. Nyquist notwithstanding, a ratio of at least 10 is recommend to minimize dynamic errors that are endemic to PWM sampling techniques. If your ratio is low, you can improve it by either increasing the sample rate (by increasing the acquistion rate in section 4) or decreasing the analog bandwidth (in section 2).


Ratio of sample rate (1/T2)
to analog BW:  

7. Estimate of total resolution (iterate to meet design objective)

We are now in a position to bring together the various calculations above to determine the resolution of the complete analog and digital design. The ultimate resolution is determmined by both the noise at the analog output (CX and CY) and the quantization bit size of the PWM + counter system. At this point check the total system resolution to see if it meets your requirements. If it does not, then revisit bandwidth at XFILT and YFILT, acquistion rate or counting rate to reduce noise. You may also want to consider digital filtering, (oversampling) to reduce noise at the expense of sampling rate as discussed in the next section.


Noise due to analog section g (max P-P)
@ 4X RMS
This is the noise contribution at the analog outputs XFILT, YFILT
Resolution of digital output counter gThis is the quantization noise of the digital output
Estimated Total Noise (resolution): g P-PThis is the total P-P noise, which is the root sum square of the analog and digital noise.
deg of tilt

Note: Noise (Resolution) is limited by: Bandwidth at XFILT, YFILT; reduce bandwidth if lower noise desired (section 2)

8. Option: Reduce noise by oversampling (at expense of bandwidth)

Another design option is to use digital filtering (averaging) in order to reduce noise, at the expense of bandwidth. By averaging several samples you are in effect filtering the signal. Implementing averages of 2,4 8, 16 samples are simple right shifts in microcontroller code (very efficient). For oversampling to work, samples need to be taken at a rate no faster than 10 times the analog bandwidth. Note: make sure oversampling is set to 1 sample if you don't want to use oversampling!


Estimate Noise (resolution)
with average of:
Samples    
Samples taken: ms apart
 
Noise before oversampling g P-P
Noise after oversampling g P-P% reduction
Bandwidth before oversampling Hz
Bandwidth after oversampling Hz

9. Estimated Drift of Zero g point

You can estimate the zero g temperature shift by entering your expected temperature range below and an estimate of the drift in mg/C (from the data sheet). Note that zero g drift can be positive or negative, but in general is very linear. X axis and Y axis drift are uncorrelated.


Temp. drift mg / C
Drift in mgDrift in deg. of tilt
mg deg of tilt
mg deg of tilt
TMAX C
TMIN C

10. View design summary at top


Troubleshooting

For further troubleshooting information, please visit our Interactive Tools troubleshooting page.


back to top

Related Information

ADXL202 Product Page

Minimizing Power Consumption in iMEMs Accelerometers (pdf, 49,316 bytes)

A Compact Algorithm Using the ADXL202 Duty Cycle Output (pdf, 236,174 bytes)

Using the ADXL202 Duty Cycle Output (pdf, 25,327 bytes)


back to top