ADC, DAC y sensores
IntroducidoEn esta lección
| English | Significado |
|---|---|
| resolution/ˌrezəˈluːʃn/ | Resolución |
| LSB/ˌel es ˈbiː/ | Bit menos significativo |
| ADC/ˌeɪ diː ˈsiː/ | Conversor analógico-digital |
| DAC/ˌdiː eɪ ˈsiː/ | convertidor digital-analógico (DAC) |
Volts in, numbers out
- The world speaks in volts; the CPU speaks in numbers. The node's temperature reading is only as good as its converter and its wiring.
- Errors here are quiet: the code runs, the number looks fine, and it is wrong.
Resolution: one LSB
- An ADC 模数转换器 turns a voltage into a code. An N-bit converter on a reference $V_{\text{ref}}$ has a resolution 分辨率 of one LSB 最低有效位: $V_{\text{ref}}/2^{N}$.
- Each code stands for a band of inputs one LSB wide. Reconstructing the input at the band midpoint gives at most half an LSB of ideal quantisation error within the input range. More bits means finer steps.

Un conversor analógico-digital de 8 bits utiliza una referencia de 3.3 V. ¿Cuál es un LSB, en mV? Proporcione 1 cifra decimal.
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
$3.3/2^{8} = 3.3/256 = 12.9$ mV. Cada bit adicional reduce a la mitad el paso.
From voltage to code
- The code is $\left\lfloor \dfrac{V_{\text{in}}}{V_{\text{ref}}} \times 2^{N} \right\rfloor$, so half of $V_{\text{ref}}$ reads $2^{N-1}$.
- A DAC 数模转换器 works in reverse: writing 2048 to a 12-bit DAC on 3.3 V gives 1.650 V.
Un conversor A/D de 12 bits con una referencia de 3.3 V lee 0.5 V. ¿Qué código produce?
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
$0.5/3.3 \times 4096 = 620.6$, y el código es el número entero inferior: 620.
Escribe 1024 en un convertidor D/A de 12 bits con una referencia de 3.3 V. ¿Qué voltaje sale, en V? Da 3 decimales.
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
$1024/4096 \times 3.3 = 0.825$ V, un cuarto de la referencia.
Worked example: the 12-bit sensor
- At $V_{\text{ref}} = 3.3$ V, one LSB is $3.3/4096 = 0.806$ mV, and 1.65 V reads 2048.
- To resolve 0.1 °C at 10 mV per °C the node needs 1 mV steps. 12 bits (0.806 mV) pass; 10 bits (3.22 mV) fail.
Un sensor da 10 mV por °C y debe resolver 0.1 °C con una referencia de 3.3 V. ¿Cuál es el conversor A/D mínimo funcional?
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
0.1 °C equivale a 1 mV, así que el paso debe ser como máximo 1 mV. 11 bits dan 1.61 mV y no cumplen; 12 bits es el primero que pasa.
The sampling capacitor
- Inside the ADC, a small capacitor (about 7 pF) charges through the source resistance before each conversion.
- The error left on the capacitor falls as $e^{-t/RC}$. A full-scale step must shrink to half an LSB, a factor of $2^{N+1}$, so the sampling time must be at least $R_{\text{source}}\,C \ln(2^{N+1})$.
Worked example: the source-impedance trap
- For a 50 kΩ source on 12 bits: $50\,000 \times 7\text{ pF} \times 9.01 \approx 3.2$ µs. This is a full-scale-step estimate for this simple RC model.
- With a 1 µs window, the same bound allows only 16 kΩ. Choose the longer window, or lower the divider resistors.
Fine ADC steps need time for the sample to settle
$V_{error}=\Delta V e^{-t_s/(RC)},\quad t_s\ge RC\max[0,\ln(2^{N+1}\Delta V/V_{ref})]$
Start with the worked 50 kΩ source and 7 pF sampling capacitor on a 12-bit ADC. A 3.2 µs acquisition window meets the half-LSB settling budget; a 1 µs window misses it. Lower the source resistance or lengthen acquisition, then compare 16 bits to see why finer voltage steps demand a smaller remaining error. Separate acquisition error from quantisation.
Una fuente de 10 kΩ alimenta un conversor A/D de 12 bits con un capacitor de muestreo de 7 pF. ¿Cuál es el tiempo de muestreo más corto, en µs? Usa ln(2^13) = 9.01 y da 2 decimales.
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
$10\,000 \times 7 \times 10^{-12} \times 9.01 = 0.63$ µs. Una fuente de 50 kΩ necesita cinco veces más tiempo.
Three common slips
- Bits without the reference. 0.806 mV is true only at 3.3 V.
- ADC as a voltmeter. Its sampling current loads a high-impedance sensor, as the RC bound shows.
- Averaging to buy bits. 16 samples of random noise gain about 2 bits, but no average removes a fixed offset.
Promediar N muestras de ruido aleatorio gana medio bit por cada duplicación de N. ¿Cuántos bits ganan 64 muestras?
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
64 es $2^{6}$, seis duplicaciones, por lo tanto $6 \times 0.5 = 3$ bits. El promedio no puede eliminar un desplazamiento fijo.
Un ADC de 12 bits siempre mide hasta 0.806 mV, independientemente de su voltaje de referencia.
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
Un LSB equivale a $V_{\text{ref}}/4096$. Que 0.806 mV sea cierto solo ocurre en 3.3 V; en 2.5 V el paso es de 0.61 mV.
Recap
- One LSB $= V_{\text{ref}}/2^{N}$; the requirement picks N. On a 3.3 V reference:
| Bits N | 8 | 10 | 12 | 16 |
|---|---|---|---|---|
| One LSB (mV) | 12.9 | 3.22 | 0.806 | 0.050 |
- A code identifies a one-LSB input band; midpoint reconstruction has a half-LSB error bound.
- Sampling time $\ge R C \ln(2^{N+1})$ trades source resistance against speed.
¿Qué salió mal? Solo el equipo del sitio ve esta información.