Choosing the right ADCFollow article
Most articles about choosing an ADC explain the different architectures of ADC types (if you like to get more information about them, I recommend this brilliant page or this fantastic introduction). I will try a different approach. When I started designing mixed circuits, precise analogue parts have been exorbitantly expensive. In those days, a 12 Bit ADC with a 250 kHz sample rate was massive as a matchbox and cost several hundred dollars. So there was no chance to exaggerate requirement definitions. But today, I often catch myself doing so because ADCs have constantly become faster, cheaper and smaller while offering higher resolutions. So my approach in this article is to show the reasonable limitations of requirements before choosing an ADC.
The Greek words “ana -logos” express an “equivalent” or an “analogy”. So in its original sense, an “analogue value” expresses a “very close match” to the real-world measurement. If your ability to count would be poor and limited to your ten fingers, this makes sense. For example, expressing the output voltage of your power supply in 10% steps from zero to 100% would never be as close to the actual voltage as an analogue meter with a large scale. But using this example, you can also clearly realise that analogue measurements also have limited precision at the end of the day (e.g. the scale of the meter has a limited number of ticks). From today’s point of view, a digital value is often much more precise than an analogue.
Selection of ADC's for full range see your local RS.
So here we are, already at the first central point of analogue to digital conversion:
The digital resolution (i.e. the number of total counts expressed in bits) does not need to exceed the analogue precision!
Example: Your task is to measure a temperature precisely (+/-0.05 °C tolerance). You also need to know the temperature range, which in your case is -50°C up to 350°C. At first glance, this looks like high precision. So you tend to use something like a 16 bit ADC. But wait! The pure values show a range of 400°C with a 0.1 °C precision which is a resolution of 4000 or 12 bit (4096 counts).
This example also shows us the real challenge: You need a sensor and an “analogue front end” (AFE), which matches this precision: At least 12 x 6 = 72 dB (SNR, linearity, offset, thermal drift). You could digitally compensate for any constant errors like offset or linearity. Using “averaging” methods, you could enhance the SNR for random noise (i.e. not for any periodic noise like injected signals). Thermal drift can be digitally compensated using the actual temperature of the AFE. But it all starts with the sensor: Typically, RTDs (Resistance Temperature Detector) like Pt100 sensors are used for such tasks. None of the precision classes of RTDs would match your needs. The best class (AA) only gives you 0.1°C precision at 0°C but only 0.7°C at 350°C). Even if you could calibrate a Pt100 to match the desired precision, the AFE would still be challenging. RTDs use 4-wire technology where two wires are used for the excitation current and two wires to measure the voltage drop over the RTD. The voltage input circuit would need to have 4000 times higher input resistance than the RTD, which is commonly not a problem. But the excitation current needs to come from a high precision current source and should be less than one mA. So its accuracy must be better than 0.25 nA! Such values always will need a temperature compensation (e.g. any 1% current defining resistor would introduce a 50ppm/°C drift).
Can you see the point? Precision is commonly not defined by the ADC resolution but by the sensor and AFE in combination with the digital post-processing. And we should always question the design goals before choosing the best ADC. In our example, we could ask What temperature are we measuring? I dare to say there is no common medium with a homogeneous temperature matching 0.1°C. And even if we measure in such a medium: Wouldn’t our sensor change the temperature itself more than 0.1°C? E.g., an RTD always has a heat emission of R*I² (~0.1 W @ 1mA) and would undoubtedly raise the medium’s temperature locally by more than 0.1°C. Take an effective heat capacity of 4 J/Kg per °C of water: A 100 mW heat source would need just four seconds to raise the temperature of a 1x1x1 cm cube of water (1 g, assuming no further heat conduction or emission).
So let us assume you still stick with the design target of resolution and range. Would 12 bit ADC resolution be okay? As I mentioned, the sensor would be an RTD, and thus, the voltage drop over the temperature-dependent resistor would be our ADC input. So for a one mA constant excitation current and a Pt100 sensor, we get the following voltages: 80.3 mV @ -50°C and 229.7 mV @ 350°C.
If our AFE would not subtract any offset voltage, our ADC range should cover the voltage range of 0 to 230 mV. The minor voltage change for 0.1°C would be about 35 µV. Even if the AFE would contain a PGA (programmable gain amplifier), raising the 230 mV range to a typical ADC range like 5 V (i.e. by the amplification of 21.74), we end up with a desired resolution of min. 0.76 mV. This resolution already needs 13 bits to achieve the desired total counts of ~6,579.
So always keep any offsets in mind when calculating your ADC resolution!
Once you know the reasonable resolution your ADC should have, you need to understand the specifications in its datasheet. If offset, linearity or dynamic resolution are less than ½ LSB (least significant bit), the resolution in bit is a fake value. This is because the overall precision of the ADC must deliver 2^N correct values to have an actual resolution of N bits. If any of these values are missing or does not correlate with the input value, the N bit resolution is worth nothing. This is the main problem of many integrated ADCs in microcontrollers. They may have a 12-bit resolution, but their precision is often less than 2 LSB. Thus you only get 10 bits of precise values. In this great article, you can find realistic results from studying the 12-bit ADCs in an ESP32: Using only 2/3 of the voltage input range, you may be lucky to get an 8-bit resolution but not more!
Besides the challenge of designing low noise, low drift and low offset AFEs with differential inputs, we need to think about dynamic values and thus dynamic accuracy. Any dynamic signal needs to be sampled to get a stream of discrete digital values. And this leads us to the second central point of analogue to digital conversion:
The dynamic resolution (i.e. the conversion rate) does not need to exceed the analogue bandwidth by more than factor two substantially!
There is a theoretical junction between resolution and sample rate. For example, suppose the signal contains frequencies up to 100 Hz. In that case, a digitising process typically needs to take samples at least twice that frequency (200 Hz) to avoid any “aliasing” (Nyquist Theorem, e.g. explained here). But if we would use a sample rate of 400 Hz, then we can calculate the mean value of every two values and still get a 200 Hz sample rate. But calculating the mean of two values would double our resolution. So “Oversampling” allows increasing the resolution. This is the central concept of ADCs with the so-called “Delta-Sigma-Architecture”.
Let’s get back to dynamic resolution: Our RTD example perfectly demonstrates limited dynamic changes. There would be no use to sample the temperature signal faster than 10 Hz because a Pt100 could not precisely follow changes larger than a 1°C/s temperature change. If we need a better dynamic resolution for the temperature, we need to replace the sensor (e.g. against an optical temperature sensor). Just using a fast AFE and ADC would not help at all.
Inside the AFE architecture, you will likely have a PGA with a limited slew rate and bandwidth. As with the sensor, increasing the sample rate does not help compensate for a limited bandwidth of the AFE.
So the conclusion is: Know the bandwidth of your original measurand, your sensor and your AFE before selecting a sample rate or bandwidth for your ADC!
Once you have decided which range of resolution and bandwidth is needed for the ADC, you need to focus on the third central point of analogue to digital conversion:
The cost for and ADC should never blow the BOM and development budget!
As a circuit designer, you need to watch the BOM (Bill Of Material). The most sophisticated and reliable design is worth nothing if it blows the BOM limit for the project. Analogue parts are a substantial scope of the BOM.
Time is money, and thus you should not forget to define the easiest and possible way to interface the ADC with your controller. Also, have a look at the user guide. Are there design examples or application notes which may speed up the integration? How difficult is it to understand the internal architecture and registers?
So I urge you to consult one of the fantastic vendor web pages with selection tools for ADCs (e.g. this TI site for over 900 ADCs).
At DesignSpark, we are together here to share our knowledge and questions. So please feel free to comment and share your experience with us.