
Instruments 3.2
By the end of this session, you should be able to:
So we need:
In process control:

Given inputs \(V_a\) and \(V_b\):
Common uses:

Spec: Trigger an alarm if - Temperature \(T > 160^\circ\mathrm{C}\) - AND pressure \(P > 10\ \mathrm{kPa}\)
Transducers:
Compute trip voltages:
Use:

You have a level sensor: \(V_L = 40\ \mathrm{mV/cm} \cdot h\), where \(h\) is level in cm.
Requirement:
Tasks (think‑pair‑share):
+ input?− input?

Behavior:
Advantages:
Tip
Open‑collector outputs are very common on comparators and some logic ICs used for interrupt lines, wired‑OR flags, and relays/LED drivers.
Noisy signal near the threshold:

Result:

Solution: Hysteresis (Deadband) → The comparator must cross a higher threshold to turn on than to turn off.


For \(R_f \gg R\):
Output goes high when: \[V_{\text{in}} \ge V_{\text{ref}} = V_H\]
Once high, output will stay high until input falls below: \[V_{\text{in}} \le V_{\text{ref}} - \frac{R}{R_f} V_0 = V_L\]
Hysteresis width (deadband): \[\Delta V = V_H - V_L = \frac{R}{R_f} V_0\]
Spec:
Compute:
Nominal reference at 50 cm: \[V_{\text{ref}} = 20\ \mathrm{mV/cm} \times 50\ \mathrm{cm} = 1.0\ \mathrm{V}\]
Splashing amplitude: \[\Delta V_{\text{noise}} = 20\ \mathrm{mV/cm} \times 3\ \mathrm{cm} = \pm 60\ \mathrm{mV}\] Total “noise range” = 120 mV.
Choose hysteresis slightly larger, say \(150\ \mathrm{mV}\).
From \(\Delta V = (R/R_f) V_0\) with \(V_0 = 5\) V: \[(R/R_f)(5\ \mathrm{V}) = 0.150\ \mathrm{V} \Rightarrow R/R_f = 0.03\]
If we pick \(R_f = 100\ \mathrm{k}\Omega\) → \(R = 3\ \mathrm{k}\Omega\).
Use these in the Figure 10 hysteresis comparator with \(V_{\text{ref}} = 1.0\ \mathrm{V}\).
A DAC converts a digital code (binary word) into an analog voltage or current.
Two main types in this section:
Uses in ECE:
For a unipolar \(n\)‑bit DAC with reference voltage \(V_R\):
Binary word \(b_1 b_2 \dots b_n\) with \(b_i \in \{0,1\}\):
\[ V_{\text{out}} = V_R \left[ b_1 2^{-1} + b_2 2^{-2} + \dots + b_n 2^{-n} \right] \tag{5} \]
Interpretation:
Maximum output when all bits are 1:
Alternative, easier formula using decimal equivalent \(N\):
\[ V_{\text{out}} = \frac{N}{2^n} V_R \tag{6} \]
where \(N\) is the base‑10 value of the input code.
Given:
Convert input to decimal:
Use Equation (6):
\[ V_{\text{out}} = \frac{167}{256} \cdot 5.0 = 3.2617\ \mathrm{V} \]
So the digital word A7H produces ≈ 3.26 V at the DAC output.
Tip
Practice: compute \(V_{\text{out}}\) for input 80H (10000000₂).
Given: 10‑bit DAC, \(V_R = 10.0\ \mathrm{V}\).
Use Equation (5): bits at positions 3, 5, 6, 8, 10 are 1:
\[ V_{\text{out}} = 10.0 \left[2^{-3} + 2^{-5} + 2^{-6} + 2^{-8} + 2^{-10}\right] = 10.0 [0.1767578] = 1.767578\ \mathrm{V} \]
Convert: \(20\mathrm{F}_\mathrm{H} = 527_{10}\), \(2^{10} = 1024\).
From Equation (6):
\[ V_{\text{out}} = \frac{527}{1024} \cdot 10.0 = 5.14648\ \mathrm{V} \]
Solve Equation (6) for \(N\):
\[ N = 2^n \frac{V_{\text{out}}}{V_R} = 1024 \cdot \frac{6.5}{10} = 665.6 \]
\(N\) must be an integer → can’t get exactly 6.5 V.
Only way to get exactly 6.5 V is to adjust \(V_R\).
Some DACs output from negative to positive voltage (bipolar).
A common representation is offset‑binary:
\[ V_{\text{out}} = \frac{N}{2^n} V_R - \frac{1}{2} V_R \tag{7} \]
So the output is nearly symmetric about 0 V but slightly less than \(+V_R/2\) at the max code.
10‑bit DAC, \(V_R = 5\ \mathrm{V}\)
Zero output occurs when Equation (7) = 0 → \(N = 2^{n-1} = 512 = 200\mathrm{H}\).
The smallest change in output for a 1‑LSB change in input is:
\[ \Delta V_{\text{out}} = V_R 2^{-n} \tag{8} \]
This is the voltage resolution of the DAC.
Example:
Design question: How many bits to get \(\Delta V \le 0.04\ \mathrm{V}\) with \(V_R = 10\ \mathrm{V}\)?
Solve:
\[ 0.04 = 10 \cdot 2^{-n} \Rightarrow 2^{-n} = 0.004 \Rightarrow n \approx 7.966 \]
So \(n = 8\) bits is sufficient.
Check:
\[ \Delta V_{\text{out}} = 10 \cdot 2^{-8} = 0.03906\ \mathrm{V} < 0.04\ \mathrm{V} \]

Key characteristics:

Benefits:
A valve opens linearly with 0–10 V input. An 8‑bit DAC controls it.
We want:
But with reference \(V_R\), maximum DAC output is:
\[ V_{\max} = V_R \left( \frac{1}{2} + \frac{1}{4} + \dots + \frac{1}{256} \right) = 0.9961 V_R \]
Set equal to 10 V:
\[ 10 = 0.9961 V_R \Rightarrow V_R = \frac{10}{0.9961} \approx 10.039\ \mathrm{V} \]
Voltage step:
\[ \Delta V_{\text{out}} = V_R 2^{-8} = 10.039 \cdot \frac{1}{256} = 0.0392\ \mathrm{V} \]
Since 0–10 V is 0–100% opening:
\[ \text{Percent per step} = \frac{0.0392}{10} \times 100\% \approx 0.392\% \]
ADC is the inverse of DAC:
Unipolar ADC relationship (reverse of Equation 5):
\[ b_1 2^{-1} + b_2 2^{-2} + \dots + b_n 2^{-n} \;\le\; \frac{V_{\text{in}}}{V_R} \tag{9} \]
Since the left side can only take discrete values spaced by \(2^{-n}\):
ADC outputs:
Sensor: temperature with \(V = 0.02\ \mathrm{V}/^\circ\mathrm{C} \cdot T\).
Need to measure from \(0^\circ\mathrm{C}\) to \(100^\circ\mathrm{C}\) with resolution \(0.1^\circ\mathrm{C}\).
Max sensor output at 100°C:
\[ V_{\max} = 0.02 \cdot 100 = 2\ \mathrm{V} \]
So choose \(V_R = 2\ \mathrm{V}\).
Change in sensor voltage for \(0.1^\circ\mathrm{C}\):
\[ \Delta V_{\text{req}} = 0.1^\circ\mathrm{C} \cdot 0.02\ \mathrm{V}/^\circ\mathrm{C} = 2\ \mathrm{mV} \]
We need ADC LSB \(\le 2\ \mathrm{mV}\):
\[ 0.002 = 2 \cdot 2^{-n} \Rightarrow 2^{-n} = 0.001 \Rightarrow n \approx 9.996 \]
So 10 bits are required.
Check actual LSB:
\[ \Delta V = 2 \cdot 2^{-10} = 0.001953\ \mathrm{V} \approx 1.95\ \mathrm{mV} < 2\ \mathrm{mV} \]
Effective temperature range:
So actual measured range with full 10 bits is about \(0.1^\circ\mathrm{C}\) to \(99.9^\circ\mathrm{C}\).
Instead of Equation (9), we often use:
\[ N = \operatorname{INT}\left(\frac{V_{\text{in}}}{V_R} 2^n\right) \tag{11} \]
Then convert \(N\) to hex or binary.
5‑bit ADC, \(V_R = 5\ \mathrm{V}\), \(V_{\text{in}} = 3.127\ \mathrm{V}\).
Compute:
\[ N = \operatorname{INT}\left( \frac{3.127}{5} \cdot 2^5 \right) = \operatorname{INT}(20.0128) = 20_{10} \]
Same result as using fractional bits.
10‑bit ADC, \(V_R = 2.500\ \mathrm{V}\).
(a) Given \(V_{\text{in}} = 1.45\ \mathrm{V}\), find hex output.
\[ N = \operatorname{INT}\left(\frac{1.45}{2.5} 2^{10}\right) = \operatorname{INT}(593.92) = 593_{10} \]
593₁₀ = 251H.
(b) If output is 1B4H, what \(V_{\text{in}}\)?
1B4H = 436₁₀. Invert Equation (11):
\[ V_{\text{in}} = \frac{N}{2^n} V_R = \frac{436}{1024} \cdot 2.5 = 1.06445\ \mathrm{V} \]
But any input in:
\[ [1.06445\ \mathrm{V},\; 1.06445 + \frac{2.5}{1024} = 1.06689\ \mathrm{V}) \]
will quantize to the same code 1B4H.
Note
Every ADC code corresponds to a range of input voltages, not a single unique value.
For bipolar input (e.g., from \(-V_R/2\) to \(+V_R/2\)), offset‑binary ADC uses:
\[ N = \operatorname{INT}\left[ \left(\frac{V_{\text{in}}}{V_R} + \frac{1}{2} \right) 2^n \right] \tag{12} \]
Check key points (example: 8‑bit, \(V_R = 10\ \mathrm{V}\)):
8‑bit, \(V_R = 5.00\ \mathrm{V}\).
For \(V_{\text{in}} = -0.85\ \mathrm{V}\):
\[ N = \operatorname{INT}\left[\left(\frac{-0.85}{5} + 0.5\right)256\right] \approx \operatorname{INT}(84.48) = 84_{10} = 54\mathrm{H} = 01010100_2 \]
For \(V_{\text{in}} = +1.5\ \mathrm{V}\):
\[ N \approx \operatorname{INT}(204.8) = 204_{10} = \mathrm{CCH} = 11001100_2 \]
For target output 72H (114₁₀): solve for \(V_{\text{in}}\):
\[ V_{\text{in}} = \frac{N}{2^n} V_R - \frac{V_R}{2} = (114/256)5 - 2.5 \approx -0.2734\ \mathrm{V} \]
Any input between −0.2734 V and −0.2539 V converts to 72H.


Inputs/outputs:
Two common internal architectures covered here:
We’ll look at both in more detail.

Algorithm (for each conversion):
After \(n\) steps, the output word is the converted result.
Input: \(V_x = 3.217\ \mathrm{V}\), \(V_R = 5\ \mathrm{V}\).
Steps:
Final result: \(b_1 b_2 b_3 b_4 = 1010_2\).


Key idea: integrate input, then integrate reference in opposite direction.
Integrate \(V_x\) for fixed time \(T_1\):
\[ V_1 = \frac{1}{RC} \int_0^{T_1} V_x dt = \frac{T_1}{RC} V_x \tag{14} \]
Switch input to constant reference \(V_R\) (opposite polarity), integrate down:
\[ V_2 = V_1 - \frac{1}{RC}\int_0^{t_x} V_R dt = \frac{T_1}{RC} V_x - \frac{t_x}{RC} V_R \tag{16} \]
Stop when comparator detects \(V_2 = 0\): solve for \(t_x\):
\[ V_x = \frac{t_x}{T_1} V_R \tag{17} \]
A counter counts clock pulses during \(t_x\) → directly proportional to \(V_x\).
Important
Note that \(R\) and \(C\) cancel out in Equation (17). Dual‑slope ADC accuracy depends mainly on reference voltage and timing, not precision of \(R\) and \(C\).
Given:
Step 1: Compute \(V_1\):
\[ V_1 = \frac{T_1}{RC} V_x = \frac{10\ \mathrm{ms}}{(100\ \mathrm{k}\Omega)(0.01\ \mu \mathrm{F})} \cdot 6.8 = 6.8\ \mathrm{V} \]
(Here, the RC values make the integrator output equal to \(V_x\) after 10 ms.)
Step 2: Compute \(t_x\) using Equation (17):
\[ t_x = \frac{T_1 V_x}{V_R} = \frac{10\ \mathrm{ms} \cdot 6.8}{10} = 6.8\ \mathrm{ms} \]
Total conversion time:
\[ T_{\text{conv}} = T_1 + t_x = 10\ \mathrm{ms} + 6.8\ \mathrm{ms} = 16.8\ \mathrm{ms} \]
Sensor: \(V_T = 6.5\ \mathrm{mV}/^\circ\mathrm{C} \cdot T\) up to 100°C.
6‑bit ADC, \(V_R = 10\ \mathrm{V}\).
(a) Design amplifier gain so max code at 100°C.
Sensor output at 100°C:
\[ V_{\text{sensor,max}} = 6.5\ \mathrm{mV/^\circ C} \cdot 100^\circ\mathrm{C} = 0.65\ \mathrm{V} \]
ADC input code 111111₂ → \(V_x\) from Equation (5):
\[ V_x = V_R \left( \frac{1}{2} + \dots + \frac{1}{64} \right) = 10 \cdot 0.984375 = 9.84375\ \mathrm{V} \]
Required amplifier gain:
\[ \text{gain} = \frac{9.84375}{0.65} \approx 15.14 \]
Use op‑amp configuration (Figure 18) to implement this gain.

(b) Temperature resolution
ADC LSB:
\[ \Delta V_{\text{ADC}} = V_R 2^{-6} = 10 \cdot 2^{-6} = 0.15625\ \mathrm{V} \]
Sensor equivalent change at input:
\[ \Delta V_T = \frac{0.15625}{15.14} = 0.01032\ \mathrm{V} \]
Convert to temperature:
\[ \Delta T = \frac{0.01032\ \mathrm{V}}{6.5\ \mathrm{mV}/^\circ\mathrm{C}} \approx 1.59^\circ\mathrm{C} \]
During conversion, ADC repeatedly samples \(V_{\text{in}}\). If \(V_{\text{in}}\) changes too much during this time, the result is invalid.
Condition for no more than 1 LSB change during conversion time \(τ_c\):
\[ \frac{dV_{\text{in}}}{dt} \le \frac{\Delta V}{\tau_c} = \frac{V_R}{2^n \tau_c} \tag{18} \]
Example: 10‑bit ADC, \(V_R = 5\ \mathrm{V}\), \(τ_c = 20\ \mu\mathrm{s}\).
\[ \frac{dV_{\text{in}}}{dt} \le \frac{5}{2^{10} \cdot 20\times 10^{-6}} \approx 244\ \mathrm{V/s} \]
For a sinusoidal input \(V_{\text{in}} = V_0 \sin(\omega t)\),
Max derivative: \(|dV_{\text{in}}/dt|_{\max} = \omega V_0\).
So:
\[ \omega V_0 \le \frac{V_R}{2^n \tau_c} \Rightarrow \omega \le \frac{V_R}{2^n \tau_c V_0} \tag{19} \]
In terms of frequency \(f = \omega/(2\pi)\):
\[ f \le \frac{V_R}{2^{n+1} \pi \tau_c V_0} \tag{20} \]
For full‑scale sinusoid \(V_0 = V_R\):
\[ \omega_{\max} \approx \frac{1}{2^{10} \cdot 20\ \mu\mathrm{s}} \approx 48.8\ \mathrm{rad/s} \Rightarrow f_{\max} \approx 7.8\ \mathrm{Hz} \]
Even though \(τ_c\) = 20 µs seems fast, for 10‑bit accuracy, the max signal frequency is surprisingly low if we require no 1‑LSB change during conversion.

8‑bit bipolar ADC, \(V_R = 5\ \mathrm{V}\), \(τ_c = 12\ \mu\mathrm{s}\).
Input: triangular wave from −1 V to +1 V with period \(T\) (see Figure 19).
Slope of each edge:
From Equation (18):
\[ 8f \le \frac{5}{2^8 \cdot 12\times10^{-6}} = 1627.6\ \mathrm{V/s} \]
So:
\[ f \le 203.5\ \mathrm{Hz} \]
Above this frequency, the ADC cannot maintain 8‑bit accuracy on this triangular wave without a sample‑and‑hold.


Solution to slew‑rate problem: hold the input constant during conversion.
Operation:

FET used as an electronic switch. Nonideal aspects:
Finite ON resistance of switch (\(R_{\text{ON}}\)) and source resistance \(R_s\):
Model during sampling (Figure 23a):

Cutoff frequency:
\[ f_c = \frac{1}{2\pi (R_s + R_{\text{ON}}) C} \tag{21} \]
Finite OFF resistance and finite input resistance of buffer:
Model during hold (Figure 23b):

Equivalent resistance:
\[ R_{\text{eq}} = \frac{R_{\text{OFF}} R_{VF}}{R_{\text{OFF}} + R_{VF}} \]
Droop time constant:
\[ \tau_D = R_{\text{eq}} C \tag{22} \]
We must choose \(C\) such that droop during conversion doesn’t exceed 1 LSB according to Equation (18). This leads to:
\[ \frac{V_C}{\tau_D} \le \frac{V_R}{2^n \tau_c} \Rightarrow \tau_D \ge 2^n \tau_c \frac{V_C}{V_R} \tag{24} \]
Typically evaluate worst case \(V_C = V_R\).
Given:
Worst case \(V_C = V_R\). From Equation (24):
\[ \tau_D \ge 2^{12} \cdot 30\ \mu\mathrm{s} = 4096 \cdot 30 \times 10^{-6} = 0.12288\ \mathrm{s} \]
Now find \(C\) from Equation (22):
\[ \tau_D = \frac{R_{\text{OFF}} R_{VF}}{R_{\text{OFF}} + R_{VF}} C = \frac{(10^7)(10^7)}{10^7 + 10^7} C = 5 \times 10^6 C \]
Set \(\tau_D \ge 0.12288\ \mathrm{s}\):
\[ 5 \times 10^6 C \ge 0.12288 \Rightarrow C \ge 0.0246\ \mu\mathrm{F} \]
Choose \(C \approx 0.025\ \mu\mathrm{F}\).
\[ f_c = \frac{1}{2\pi (R_s + R_{\text{ON}}) C} = \frac{1}{2\pi (50 + 10)\cdot 0.025\times 10^{-6}} \approx 108\ \mathrm{kHz} \]
So the S/H can correctly track input frequencies up to ≈108 kHz in sample mode.
Important dynamic parameters:
Total time between valid samples (throughput):
\[ T = \tau_c + \tau_{\text{acq}} + \tau_{\text{ap}} \tag{25} \]
Maximum sampling frequency:
\[ f_{\max} = \frac{1}{T} \]
Given:
Then:
\[ T = 40\ \mu\mathrm{s} + 4\ \mu\mathrm{s} + 0.05\ \mu\mathrm{s} = 44.05\ \mu\mathrm{s} \]
\[ f_{\max} \approx \frac{1}{44.05\ \mu\mathrm{s}} \approx 22.7\ \mathrm{kHz} \]

Modern ADCs commonly provide:
Address decoder logic determines which addresses correspond to ADC controls/data.

Another A/D strategy: convert sensor signal into frequency, then count pulses.
Components:
For \(n\)‑bit counter, to use full range at \(f_{\max}\):
\[ T_c = \frac{2^n - 1}{f_{\max}} \tag{26} \]
For intermediate frequency \(f\), count:
\[ N = f T_c \]
Sensor: frequency varies from 2.0 to 20 kHz; use 8‑bit counter.
Max count: \(2^8 - 1 = 255\).
Design \(T_c\) so that \(f_{\max} = 20\) kHz → N = 255:
\[ T_c = \frac{255}{20,000} = 0.01275\ \mathrm{s} = 12.75\ \mathrm{ms} \]
At \(f_{\min} = 2.0\) kHz:
\[ N = f_{\min} T_c = 2000 \cdot 0.01275 = 25.5 \Rightarrow 25_{10} = 00011001_2 \]
So digital output ranges from about 25 to 255 over sensor’s frequency range.

LM331 output frequency:
\[ f_{\text{out}} = \frac{R_S}{R_L} \frac{1}{R_t C_t} \frac{V_{\text{in}}}{2.09} \tag{27} \]
Design example: 0–5 V input → ~0–10 kHz output.
Take \(R_S = 15\ \mathrm{k}\Omega\), \(R_L = 100\ \mathrm{k}\Omega\). For \(V_{\text{in,max}} = 5\ \mathrm{V}\), we want \(f_{\text{out}} = 10\) kHz:
\[ 10,000 = \frac{15k}{100k} \frac{1}{R_t C_t} \frac{5}{2.09} \Rightarrow R_t C_t \approx 3.59 \times 10^{-5}\ \mathrm{s} \]
Pick \(C_t = 0.01\ \mu\mathrm{F}\) → \(R_t \approx 3.6\ \mathrm{k}\Omega\).

Standard astable frequency:
\[ f = \frac{1}{0.693 (R_A + 2 R_B) C} \tag{28} \]
If \(R_A\) or \(C\) is a sensor (e.g., light‑dependent resistor, capacitive level sensor), then frequency changes with the measured variable.
Use this frequency with the counter‑based ADC approach from Figure 25.
Sensor: \(R_A\) varies from 36 kΩ at 1.5 W/m² to 4 kΩ at 10 W/m².
Use 555 timer with:
Let’s choose \(T_c = 10\ \mathrm{ms}\). Then:
Maximum frequency at \(R_A = 4\ \mathrm{k}\Omega\) should give N ≈ 1023:
\[ f_{\max} = \frac{1023}{T_c} = 102,300\ \mathrm{Hz} \]
From Equation (28):
\[ 102,300 = \frac{1}{0.693 (4k + 2R_B) C} \]
Pick \(R_B = 2\) kΩ, so \(R_A + 2R_B = 4k + 4k = 8k\Omega\):
\[ C \approx \frac{1}{0.693 \cdot 8k \cdot 102,300} \approx 0.00018\ \mu\mathrm{F} \]
At minimum light (1.5 W/m², \(R_A = 36\) kΩ):
\[ f_{\min} = \frac{1}{0.693 (36k + 4k) C} \approx 20,042\ \mathrm{Hz} \]
Count:
\[ N_{\min} = f_{\min} T_c \approx 200 \]
So digital output varies roughly from 200 to 1023 as light increases. The relationship is nonlinear because \(f \propto 1/(R_A + 2R_B)\).

Comparators & Hysteresis
DACs
Unipolar DAC output: \[ V_{\text{out}} = V_R \left( b_1 2^{-1} + \dots + b_n 2^{-n}\right) \tag{5} \] or \[ V_{\text{out}} = \frac{N}{2^n} V_R \tag{6} \]
Bipolar DAC (offset‑binary): \[ V_{\text{out}} = \frac{N}{2^n} V_R - \frac{1}{2} V_R \tag{7} \]
DAC / ADC resolution (LSB size): \[ \Delta V = V_R 2^{-n} \tag{8,10} \]
ADCs
Unipolar ADC inequality: \[ b_1 2^{-1} + \dots + b_n 2^{-n} \le \frac{V_{\text{in}}}{V_R} \tag{9} \]
Unipolar ADC code: \[ N = \operatorname{INT}\left(\frac{V_{\text{in}}}{V_R} 2^n\right) \tag{11} \]
Bipolar ADC (offset‑binary): \[ N = \operatorname{INT}\left[\left(\frac{V_{\text{in}}}{V_R} + \frac{1}{2}\right) 2^n\right] \tag{12} \]
Dual‑Slope ADC
Integrator output after input phase: \[ V_1 = \frac{T_1}{RC} V_x \tag{14} \]
Voltage during reference discharge: \[ V_2 = \frac{T_1}{RC} V_x - \frac{t_x}{RC} V_R \tag{16} \]
Relation between input and discharge time: \[ V_x = \frac{t_x}{T_1} V_R \tag{17} \]
Dynamic Constraints & S/H
Max allowed input slew during conversion: \[ \frac{dV_{\text{in}}}{dt} \le \frac{V_R}{2^n \tau_c} \tag{18} \]
For sinusoid \(V_{\text{in}} = V_0 \sin(\omega t)\): \[ \omega \le \frac{V_R}{2^n \tau_c V_0} \tag{19} \] \[ f \le \frac{V_R}{2^{n+1} \pi \tau_c V_0} \tag{20} \]
S/H sampling cutoff: \[ f_c = \frac{1}{2\pi (R_s + R_{\text{ON}}) C} \tag{21} \]
Droop time constant: \[ \tau_D = \frac{R_{\text{OFF}} R_{VF}}{R_{\text{OFF}} + R_{VF}} C \tag{22} \]
Droop constraint: \[ \tau_D \ge 2^n \tau_c \frac{V_C}{V_R} \tag{24} \]
Sampling throughput: \[ f_{\max} = \frac{1}{\tau_c + \tau_{\text{acq}} + \tau_{\text{ap}}} \tag{25} \]
Frequency‑Based Converters
Count time for \(n\)‑bit counter with max frequency \(f_{\max}\): \[ T_c = \frac{2^n - 1}{f_{\max}} \tag{26} \]
Count for arbitrary frequency \(f\): \[ N = f T_c \]
LM331 V‑to‑F converter (approx): \[ f_{\text{out}} = \frac{R_S}{R_L} \frac{1}{R_t C_t} \frac{V_{\text{in}}}{2.09} \tag{27} \]
555 timer astable frequency: \[ f = \frac{1}{0.693 (R_A + 2 R_B) C} \tag{28} \]
Use this interactive cell to explore how reference voltage and number of bits affect the LSB size (resolution) for DACs and ADCs using
\[\Delta V = V_R 2^{-n}\]
Experiment with converting a digital code to an analog voltage using
\[V_{\text{out}} = \dfrac{N}{2^n} V_R\]
Now convert analog voltage to digital code using
\[ N = \operatorname{INT}\left(\frac{V_{\text{in}}}{V_R} 2^n\right) \]
Explore a bipolar DAC:
\[ V_{\text{out}} = \frac{N}{2^n} V_R - \frac{1}{2} V_R \]
Use this cell to experiment with hysteresis width \(\Delta V\) for a comparator:
\[ \Delta V = \frac{R}{R_f} V_0 \]
Use the sliders to control number of bits and reference voltage. The DAC transfer curve updates in real time.
Visualize how an ADC with given n and V_R quantizes a linearly increasing input.
Simulate the successive approximation process for a 4‑bit ADC with \(V_R = 5\ \mathrm{V}\), as in Example 17.
Explore Equation (18):
\[ \frac{dV_{\text{in}}}{dt} \le \frac{V_R}{2^n \tau_c} \]
Explore the counter‑based A/D relationship for an \(n\)‑bit counter and a signal frequency \(f\).
Given
\[T_c = \frac{2^n - 1}{f_{\max}}, \quad N = f T_c\]