19

I have a 14-bit ADC. However, looking at the datasheet (see table 2 on page 5), the effective number of bits (ENOB) is always less than 12 bits.

Why is my the DAC claiming to be a 14-bit ADC when it only has 12-bit accuracy? What is the point of having two extra bits if they are meaningless?

Randomblue
  • 10,953
  • 29
  • 105
  • 178
  • 1
    While they might not be much use in a one-shot wideband sampler like a scope, they *are* meaningful in applications which integrate over time such as a software radio. With one of the FPGA-based implementations it would be easy to add a mode bit to toggle masking them off and see the difference in output of subsequent filters with and without the 'phony' bits as input. – Chris Stratton Jul 12 '12 at 15:20
  • 1
    That's how the chip is designed. Even if you get the 14 bit data, you can notice the last value of the data will be fluctuating and that is because of the noise bits. I have used a 24 bit ADC - AD7190 and it gives only 18 noise free bits. – PsychedGuy Feb 01 '16 at 13:06

4 Answers4

20

You've been bamboozled!

14-bit is marketing speak, and the hardware also gives you that, so they'll say you have nothing to complain about. Just above ENOB in the datasheet it gives SINAD (Signal to Noise and Distortion) numbers. That's 72 dB, and 1 bit corresponds to a 6 dB level, so that 72 dB is indeed 12 bits. The 2 lowest bits are noise.

It's possible to retrieve data which is lower than the noise floor, but it needs very good correlation, which means it has to be very predictable.

stevenvh
  • 145,145
  • 21
  • 455
  • 667
  • 9
    OK, downvoter, just tell me what's wrong here. – stevenvh Jul 11 '12 at 18:06
  • I don't see anything wrong either. – Olin Lathrop Jul 11 '12 at 18:08
  • @stevenvh: Thanks. What did you use to get the relation 6 dB <-> 1 bit? – Randomblue Jul 11 '12 at 18:10
  • Bit 1 represents twice the voltage of bit 0, and for voltages the dB ratio is defined as 20 x log(V1/V2) = 20 x log(2) = 20 x 0.301 = 6 dB. – stevenvh Jul 11 '12 at 18:13
  • 4
    Maybe the downvoter is the designer of the IC :-) – stevenvh Jul 11 '12 at 18:39
  • 1
    Stupid question: Do most ADCs behave this way? For example, if I want 10 bits of resolution, is it safe to assume that what I *really* need to shop for is a 12 bit ADC? – Chris Laplante Jul 11 '12 at 18:43
  • 3
    @Simpl: Not necessarily. You have to read the datasheet of any A/D you plan to use. There are a lot of tradeoffs to be made in the design of A/Ds, so what you can get will vary widely. Many A/Ds are good to +-1/2 count, but as this example shows, some are not. As always, READ THE DATASHEET. – Olin Lathrop Jul 11 '12 at 19:39
  • 4
    This is not "marketing speak". In fact this is quite common on high performance converters as used in software radios, etc. For many such applications, at some point in the signal processing you will filter and downsample, such that you can detect a narrowband signal with a power level far, far, below the broadband noise floor (but you do it in software, such that you can place a variable number of such filters anywhere in the bandwidth you want. To some extent you would get that anyway if you just masked off the "unreliable" bits, but you do better with them than without them. – Chris Stratton Jul 11 '12 at 19:53
  • @Chris - I noted in my answer that it's possible to get data from below the noise floor on condition that it's *well correlated*. If the input signal isn't and for instance would already contain some noise at -70 dB (which is uncorrelated), then there's *absolutely no way* to tell the small signal changes apart from the ADC's noise. No way. If you want to filter out the ADC's noise you'll also be changing the signal. – stevenvh Jul 12 '12 at 05:40
  • 2
    Any signal of narrower bandwidth than the adc is better correlated. You are dismissing something of everyday utility as a special case. – Chris Stratton Jul 12 '12 at 05:40
  • @Chris - Suppose the signal's LSB in a perfect ADC would read `001100110011..` in successive samples, and you add 2 LSB of Gaussian noise to it, do you mean you can recover the signal's LSB? – stevenvh Jul 12 '12 at 05:44
  • 2
    To understand why those bits are useful in real designs you need to think in the frequency domain, where noise is measured per unit bandwidth, rather than about the instantaneous output code. – Chris Stratton Jul 12 '12 at 05:51
  • @stevenvh,"That's 72 dB, and 1 bit corresponds to a 6 dB level,"May I know how you get 1 bit corresponds to a 6 dB level – Hari Dec 01 '22 at 08:59
  • 1
    @Hari $10\log_10(2^2) = ~6 dB$, square comes from the power ratio vs amplitude ratio. – nimish Feb 21 '23 at 18:36
  • @stevenvh,We know that ADC 1LSB=Vref/(2^N) where N is the resolution of the ADC. We know that ADC Effective number of bits (ENOB) is always less than the resolution "N". When calculating 1LSB do I need to take 1LSB = Vref/(2^ENOB) or I need to take 1LSB=Vref/(2^N) – Hari Jul 18 '23 at 05:55
14

Suppose one wishes to measure a steady voltage as accurately as possible, using an ADC that will return an 8-bit value for each measurement. Suppose further that ADC is specified so that a code of N will nominally be returned for voltages between (N-0.5)/100 and (N+0.5)/100 volts (so e.g. a code of 47 would nominally represent something between 0.465 and 0.475 volts). What should one wish to have the ADC output if fed a steady-state voltage of precisely 0.47183 volts?

If the ADC always outputs the value that represents the above-defined range in which the input falls (47 in this case), then no matter how many readings one takes, the value will appear to be 47. Resolving anything finer than that would be impossible.

Suppose instead that the ADC were constructed so that a random "dither" value linearly distributed from -0.5 to +0.5 were added to each reading before converting it to an integer? Under that scenario, a voltage of 47.183 volts would return a reading of 48, approximately 18.3% of the time, and a value of 47 the other 81.7% of the time. If one computed the average of 10,000 readings, one should expect it to be approximately 47.183. Because of the randomness, it may be slightly higher or lower, but it should be pretty close. Note that if one takes enough readings, one may achieve an arbitrary level of expected precision, though each additional bit would require more than doubling the number of readings.

Adding in precisely one LSB of linearly-distributed dithering would be a very nice behavior for an ADC. Unfortunately, implementing such behavior is not easy. If the dithering is not linearly distributed, or if its magnitude is not precisely one LSB, the amount of real precision one could get from averaging would be severely limited, no matter how many samples are used. If instead of adding one LSB of linearly-distributed randomness, one adds multiple LSB's worth, achieving a given level of precision will require more readings than would be required using ideal one-LSB randomness, but the ultimate limit to the accuracy that can be achieved by taking an arbitrary number of readings will be far less sensitive to imperfections in the dithering source.

Note that in some applications, it's best to use an ADC which does not dither its result. This is especially true in circumstances where one is more interested in observing changes in ADC values than in the precise values themselves. If quickly resolving the difference between a +3 unit/sample and a +5 unit/sample rate of increase is more important than knowing whether a steady-state voltage is precisely 13.2 or 13.4 units, a non-dithering ADC may be better than a dithering one. On the other hand, use of a dithering ADC may be helpful if one wants to measure things more precisely than a single reading would allow.

supercat
  • 45,939
  • 2
  • 84
  • 143
2

Bonus lesson: You really do get 14 bits of precision, but only 12 bits of accuracy.

gbarry
  • 8,615
  • 21
  • 31
  • 1
    Shouldn't that be "resolution" instead of "precision"? Precision refers to the error spread over different conversions, and with Gaussian noise at the two LSBs that will be 12 bit as well. – stevenvh Jul 12 '12 at 05:58
  • I went and read some definitions, and I believe you are right. I tend to shy away from "resolution" in this video age, but it's still the best term. I think maybe in high school, they didn't quite explain precision correctly. – gbarry Jul 17 '12 at 23:55
1

An additional caveat... sometimes you actually want randomness.

For example:

In cryptographic (security/authenticity) applications, pure "unguessable" randomness is required. Using a converter's LSB's (those below noise floor) is a quick way to generate purely random numbers.

When the ADC hardware is available for other purposes (sensors and the like), it's a quick-and-easy way to seed secure communication. You can enhance the effect by maximizing the gain on the input amplifier if available (many MCU's offer such a feature) and floating the input.

ADC randomness primarily derives from two physical principals: quantization-noise and thermal noise.

These effects have a threshold at the macroscopic level. For example, numbers sufficiently away from the bit boundary don't need to be rounded and therefore experience no quantization error or randomness. Thermal noise doesn't affect the more significant bits in the conversion in most scenarios.

By extension, you can see that varying the conversion parameters (sampling time, depth, rate, reference voltage) will effect change in the randomness of the results by moving the threshold of randomness (either increasing it by raising or decrease it by lowering the threshold). Similar effect is accomplished by varying the environmental/system parameters (temperature, power supply, etc).

That said, many successful commercial hardware random number generators rely on this technique because outside effects, only reduce the randomness -- they by no means eliminate it (physically impossible).

You can compensate for a reduction in randomness by doing more conversions and appending the results. This process of bit-extension (concatenation of successive conversions' low-bits) is used in the STM32 Nucleo Dongles, the FST-01 (including NeuG 1.0), LE Tech's Grang family of devices, and many others.

The Grang devices generate bits by converting at over 400 million conversions per second (1 bit per conversion). If you do enough conversions you can guarantee high randomness even in the face of environmental conditions.

DrFriedParts
  • 12,482
  • 36
  • 54
  • 2
    It's a very bad idea to assume that the ADC noise is a good random noise source. It's entirely likely that it's correlated to other stuff going on in the circuit, IC temperature, and many other things. If you need genuine randomness, make sure you test your source! – Connor Wolf Apr 21 '13 at 00:04
  • "Testing your source" is an obvious requirement in *any* scheme. However, it is by no means "a very bad idea"... even if correlated to temperature. That only reduces the randomness, not eliminates it. You can compensate by bit-extension (concatenation of successive conversions' low-bits). – DrFriedParts Apr 21 '13 at 00:18
  • I said it's a bad idea to **assume**, not a bad idea in general. If you do thoroughly test the randomness of your ADC noise source and it checks out, then I wouldn't have issues with it. – Connor Wolf Apr 21 '13 at 00:21