|
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.
|
 |
|
|
|
|
|
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
|
|
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 |
| 2X | | 32.00% |
| 4X | | 4.60% |
| 6X | | 0.27% |
| 8X | | 0.01% |
| |
|
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.
|
| |
|
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
| |
|
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).
|
|
|
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.
|
|
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!
|
|
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.
|
|
10. View design summary at top
|