10
\$\begingroup\$

How would you write or label the output of an analog-to-digital-conversion? I don't seem to have a good grasp for the english when I try to write this out.

counts? arbitrary units?

For example, if I want to write this out as algebra or label in a chart:

raw signal [au]: 200

\$\endgroup\$
2
  • 3
    \$\begingroup\$ According to the University of Chicago, after a quick google search, "Raw value: The digital number output by the ADC; the units in which raw values are measured are called ADU (analog-to-digital units) or DN (data numbers). " theory.uchicago.edu/~ejm/pix/20d/tests/noise \$\endgroup\$ Commented Oct 29, 2014 at 20:37
  • 1
    \$\begingroup\$ It's really just a proportion value, of the ADC's reference voltage, and the detected voltage... \$\endgroup\$ Commented Oct 29, 2014 at 20:38

6 Answers 6

11
\$\begingroup\$

"Count" would be the most appropriate term, since they are in fact countable. Full scale on a e.g. 12-bit ADC would be from 0 count to 4095 count.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Where I work we also use the plural, counts. For example, "after I turned the potentiometer, the ADC result changed by 12 counts". \$\endgroup\$ Commented Oct 29, 2014 at 20:57
  • 5
    \$\begingroup\$ At Maxim (internally) we call this value the LSB Count, since the LSB in this context means the analog voltage that corresponds to one count of the Least Significant Bit of the digital output. \$\endgroup\$ Commented Oct 29, 2014 at 21:00
3
\$\begingroup\$

The results of an Analogue to Digital Converter's (ADC) conversion are represented as a digital number with varying resolution depending on the bit-length of the converter and settings used. You can often have 8, 10, 11, 12, 16, and even 24 bit ADC peripherals in microcontrollers or dedicated external ICs.

The results are obtained usually by a sample-and-hold input setup, which using a known conversion time, the resulting voltage built up on the sampling capacitor is the representation of the external signal input.

The results are digitized as a proportion of a reference voltage given to the ADC. If the input signal is 1V, with a 3V reference, then the result (no matter what resolution you have, be it 8 bit or 24 bit) will be 1/3. The better resolution ADC obviously gives you much better ability to distinguish between 1.001V and 1.002V, or similar difference in input signals. If you are doing small-signal detection, like the PPM of a certain gas in a gas sensor output signal, then higher resolution and often a lower reference voltage is commonly used.

For rough voltage signals, like the state of charge of a lithium ion battery pack for a hobby project, a simple 8-bit ADC is enough to work out if you are getting low, or need to turn off the charge, etc.

The conversion result's units are merely a proportion of the reference given to the ADC. If you have an imprecise or noisy reference even if your input signal is steady, you can have errors. Either way, the main point here is there is not really an easy unit to refer to ADC conversion results.

According to the University Of Chicago they refer to the results of an ADC conversion as "raw values" and are: "The digital number output by the ADC; the units in which raw values are measured are called ADU (analog-to-digital units) or DN (data numbers). "

I agree with the ADU unit of measure, it seems nice and keeps in the context that it's a ADC conversion output, so anyone reading should immediately be aware of the proportional issue. If not, then the reader should be informed prior to mentioning the units of their significance.

They can be converted to percentages merely by dividing the raw value given by the ADC by the maximum possible value given the resolution of the converter. For example if your 8-bit ADC returns 100, you can say that it is (100/255) * 100 = 39.21% and can be seen as more of an "intensity" or "signal strength" in that case; however it really depends on the scenario if this is useful to think of this way.

Often the raw values are immediately converted to something that makes sense, such as a battery voltage (after a voltage divider factor has been applied, for example) or a dB intensity for sound/noise. The reference to ADC conversion results is not very common, and as you've seen it's usually because without prior reference or meaning it's hard for readers to understand it's significance. Another example may be the output of a Gyroscope sensor's X axis, which has an analogue output with a particular gain formula given by the manufacturer, and the analogue result should be processed immediately to give you a more useful unit of 'degrees per second', which people (and any further use in the program) can usually make better sense of.

\$\endgroup\$
1
\$\begingroup\$

The unit is one

I've grappled extensively with this question. I'm not comfortable with using the word "count" as a unit of measurement, because it simply isn't a unit. The SI Brochure states that

Counting quantities are also quantities with the associated unit one.

(Section 2.3.3, "Dimension of quantities".)

and that

[...] values of quantities with unit one are expressed simply as numbers.

(Section 5.4.7, "Stating quantity values being pure numbers".)

ADC output values, as the expression of a countable quantity, have indeed an associated unit of one. ADC output values are merely indices of markings on a tension scale, against which the ADC measures an input tension.

Similarly, the number of markings on the tension scale is also a countable quantity with unit one. An 8 bit ADC can encode measured tensions in 256 distinct values; i.e., it uses a tension scale with 256 markings.

The ADC output value simply tells us which marking to look at. Knowing a marking's index, the total number of markings in the scale and the reference tension of the ADC, we can derive the corresponding measured tension.

"Count", "digital number" or "ADU" as units are not universally accepted and quite frankly, make no sense. Think of the markings on an analog thermometer; would you ever read out a temperature in "count" units?

Communicating ADC output values

If you want to label the axis for ADC output values in a chart, simply write "ADC output value" or "ADC output value / 1" (indicating that the unit is "one"). If you want to state the output of an ADC measurement, say "it is 127", not "it is 127 count".

If you are concerned with that using no units (i.e. using unit one) with ADC measurements provides little context of the measurement's nature, then I refer you to the SI Brochure again:

Unit symbols must not be used to provide specific information about the quantity and should never be the sole source of information on the quantity.

(Section 5.4.2, "Quantity symbols and unit symbols".)

References

  1. SI Brochure, 9th. edition. Bureau International des Poids et Mesures. December 2022. https://www.bipm.org/en/publications/si-brochure/
\$\endgroup\$
2
  • \$\begingroup\$ I'd call that "unitless" \$\endgroup\$ Commented Sep 8, 2023 at 11:23
  • \$\begingroup\$ @ScottSeidman I generally would too, but to remain consistent with the SI in my post, I've used unit one. I'm still deciding whether to use the term "unitless" on my day-to-day. I suppose the CGPM would argue that every quantity, countable or no, has a unit, wherefore unitless would make no sense. See <physicsforums.com/threads/…>. \$\endgroup\$ Commented Sep 8, 2023 at 11:33
0
\$\begingroup\$

For the most common types (SAR and SR ADCs reading a 0-VREF or ±VREF range), it's simply a fraction of that range.

In other words, the output is an integer representing the fixed-point fraction of the input as a fraction of VREF.

This is most apparent when the result is left-justified, i.e. a 12-bit result is zero-padded on the right so that its value is 0...0xfff0 (where "0x10000" would be full scale, but is not representable in 16 bits, so we naturally have a number system where the full range from zero to (full scale - 1 LSB) is representable -- identical to the ADC's reading). We can treat this as a fraction, by multiplying it by another number (representing some other unit in the digital domain; a voltage calibration factor, say), and shifting the appropriate number of bit positions to maintain a 16-bit result. Say our VREF is 5V and we want to represent that as 4.12 bit fixed point (so, integral part from 0 to 15, a bit over 3 digits worth of fraction -- this would be a X.XXX reading), we'd multiply by (uint32_t)(5.0f * (1 << 12)) (replace 5.0f with the exact calibration factor) to get a 32-bit result*, then shift-right the result by 16 to get the calibrated output.

*Recall that number of bits is additive under multiplication, so a 16x16 gives 32-bit result. This is unfortunately confused by several languages, like C, where the result has the same size as the largest argument. Thus, forcing one argument to 32-bit size is necessary in C.

We might instead use the raw ADC value (right-justified), and we could treat that as e.g. a 4.12-bit fixed-point value directly; or we could accumulate 16 successive samples (as a decimation or sliding-average filter, take your pick), which sums up to the same range -- but gets us a few more ENOB (effective number of bits) due to filtering out some of the quantization noise (assuming some suitability conditions apply). This reduces the frequency response of course, so assumes the sample rate is higher than the required signal bandwidth by as much. In any case, this gives us a 16-bit result. The statistical gain from N samples is lg(N)/2 bits, so we expect a confident 14-bit result, with two extra bits "for flavor". (These bits can be helpful down the line as conserving rounding errors.)

(Mind that filtering does not improve the systematic error of the ADC, or overall system, it only reduces the noise floor due to sample-to-sample variation.)

One of the upsides to this is, by handling a purely ratiometric value throughout the calculation, well first of all, anything that is itself ratiometric, is trivial -- if you have a bunch of analog status inputs (e.g. thermistors, potentiometers, Hall effect sensors, etc.), and you run them all from the ADC VREF (or a buffered copy thereof), their results are perfectly proportional, and VREF tolerance is irrelevant!

But also, even if the values carry units, if you don't have to do any other unit relations internally, you can apply the calibration factor at the very end, and now the gain of your entire signal chain, minus the output itself, is perfectly predictable: you don't have to worry about saturation anywhere along the chain, that can't be anticipated from any sequence of possible ADC readings. Potential saturation is independent of calibration factors!

One of the downsides of number formats like this, is handling overflow, and implementing saturating arithmetic where applicable. You need to ensure all manipulations are done with adequate overhead, and/or with gain strictly less than or equal to 1 so that overflow (wraparound) does not occur; or to detect overflow at every step of the calculation and saturate accordingly.

Intermediate 32-bit calculations are typical; even on 8-bit systems like AVR, largely because C doesn't have a native 24-bit type as such. (Yes, there are __uint24 and such types, but what I mean is, avr-gcc emits 32-bit operations regardless. You can construct 24-bit operations just fine in ASM, of course.) Saturating arithmetic is also a pain in C, as operations don't produce an intrinsic carry result; it's slightly less painful in ASM, but far more tedious (as ASM is wont to be).

\$\endgroup\$
0
\$\begingroup\$

"Tick" is the unit I use. ex, "The ADC read 32760 ticks." I don't think there is an official unit. I've seen "counts" used in datasheets, such as "ADC count"

\$\endgroup\$
-1
\$\begingroup\$

If I were to input that as data on a chart, I'd label it either "ADC OUT", or "n", and specify the base.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.