I want to convert analog output of an accelerometer to digital codes.
I understand that the sampling rate of the ADC should be with reference to Nyquist criteria.
Please let me know how to decide on the resolution needed.
Noise is the determining factor.
You first must start with the noise level of what your Accelerometer + Amplifier puts out, lets call this N for noise. Then you need to find what your accelerometer puts out at it's maximum, we will assume that this will be some RMS value and call it S for signal.
Your SNR (signal to noise ratio) \$=\frac{S}{N}\$
The base number of Bits you need is \$ B = log_2(SNR)\$
But this is not sufficient as the ADC will have some inherent noise itself. to ensure that the ADC noise does not interfere, or to put it another way , to ensure that the ADC noise does not factor into the signal you must ensure that the resolution is greater than the B value calculated above. For a very strict definition the noise from the ADC should be 10% of the signal noise but you may find that 25% is adequate.
In your ADC data sheet you'll find a number called ENOB (Effective number of bits).
In the 10% case:
ENOB > B + \$log_2(10)\$ > B + 3.32
In the 25% case:
ENOB > B + \$log_2(4)\$ > B + 2
Next you have to scale the output of your accelerometer and buffer amplifier so that the max of is a little less than the maximum of what the ADC can handle (again from the datasheet).
If you have matched the ENOB and the scale then everything else is taken care of.
It depends on the significance you need and the supported range. Consider an accelerometer that outputs 0 to 5 volts (range), and you want to measure with two decimal (significance). That would mean you would have \$5\cdot100=500\$ possible values. To get that amount of possible values in a binary number, you would need \$\lceil\log_2{(500)}\rceil=9\$ bits. In case you only want one decimal, you would have \$5\cdot10=50\$ possible values, needing \$\lceil\log_2{(50)}\rceil=6\$ bits.
You should indeed consider sample rate as well. When you use a higher resolution, the ADC will not be able to handle as much conversions as it would be when using a lower resolution. How much it differs can be find in the relevant datasheet.
Sometimes / most of the time, you can only choose between a few resolutions, for example 8 or 16 bits. You can calculate the significance you get with, for example, 8 bits, like this: \$2^8=256\$, so we have 256 possible values. On a range of 5V, that would give a significance of \$5/256=0.0195V\$.
In the datasheet of the accelerometer, you can find how 1V translates to the data you need. For a temperature sensor for example, you will find something like '5K/V' - this would mean one Volt difference means a 5K (Kelvin) difference. That means the output will change with 0.2V when the temperature changes with 1K. When you want a resolution of 0.1K, that would mean a resolution of 0.02V. This would mean you need \$5/0.02=250\$ values, needing \$\lceil\log_2{250}\rceil=8\$ bits.
Resolution of ADC is the measure of its preciseness. It depends upon how much sensitivity do you require for your design. For your case it will be converting accelerometer's voltage signals into digital output.
First measure your peak voltage from accelerometer say 100mv, then decide how much sensitivity do you require e.g. your design must be sensitive to 0.5mv signals. Divide 100mv by 0.5mv you get 200. This is the number of voltage steps you want to divide your signal into and the closest resolution for this number is log(200)/log(2) = 7.6 which is rounded off to 8. so you need an 8 bit ADC for this particular example.
NOTE: In above example it has been assumed that the input signals are of positive polarity only. In case of a negative polarity you need to shift the signal into positive polarity.
@Vicky Rao I think the reply by @Arslan Abbas is very relevant..
use the formula :
ADC bit resolution = (log ((VD * E) / (R * Vs))) / (log (2)) + B
here VD is full scale I/P voltage range of ADC. Vs is full scale O/P voltage range of measured signal. E is value represented in engineering units that Vs represent. R is the resolution that is required. B = 1 if ADC used is bipolar else 0.
The LSB achieved by the ADC can be calculated (LSB represents the smallest increment that the converter can resolve)
Q = VD / 2^a
where VD is The input analog voltage range of the ADC and a is the resolution of ADC selected
consider the example : VD = (+2.5V – (-2.5V)) = 5V (The input analog voltage range of the bipolar ADC is set at ±2.5V) and a 16 bit resolution is selected hence
Q = 5/ 2^16
Q = 76.29µV