Chapter 11
Mixed-Signal Electronics and Data Conversion
Bachelor Program in Mechatronics Engineering
Analog and Digital Electronics
•
Bachelor
Mixed-Signal Electronics and Data Conversion
Introduction
Most mechatronic systems combine continuous physical phenomena with discrete computation. Temperature, force, position, pressure, velocity, and light vary continuously, whereas microcontrollers, digital signal processors, and computers represent information as binary numbers. Mixed-signal electronics provides the interface between these domains.
An analog-to-digital converter (ADC) transforms a continuously varying electrical signal into a digital code. A digital-to-analog converter (DAC) performs the reverse operation. Sampling, quantization, voltage references, clock sources, filtering, and signal conditioning determine whether this interface is accurate and reliable. A converter with many bits is not automatically a good converter: speed, noise, linearity, reference stability, layout, cost, and application requirements must be considered together.
Learning Objectives
By the end of this chapter, the reader should be able to:
distinguish sampling, quantization, coding, and reconstruction;
apply the Nyquist criterion and explain aliasing;
calculate quantization step size, theoretical signal-to-quantization-noise ratio, and data rate;
compare common ADC and DAC architectures;
select sample-and-hold circuits, voltage references, and clock sources;
interface converters to sensors, actuators, and microcontrollers;
evaluate resolution, accuracy, speed, noise, linearity, and cost;
diagnose practical mixed-signal errors and propose suitable remedies.
1. The Mixed-Signal Conversion Chain
A typical measurement chain is:
Physical variable → sensor → analog conditioning → anti-alias filter → sample-and-hold → ADC → digital processing
For output control, the reverse path is:
Digital processing → DAC → reconstruction filter → power or actuator circuit
The sensor may produce a small voltage, current, resistance, or charge. Analog conditioning can provide amplification, offset removal, excitation, isolation, and filtering. The ADC then maps the conditioned voltage to a finite set of digital codes. On the output side, the DAC generates a staircase-like voltage or current, which is usually smoothed by a reconstruction filter.
A mixed-signal design must preserve information while satisfying electrical constraints. These include input range, source impedance, common-mode voltage, conversion time, interface timing, supply voltage, electromagnetic compatibility, and thermal behavior.
2. Sampling of Analog Signals
2.1 Definition
Sampling measures an analog signal at regularly spaced instants. If the sampling period is Ts, the sampling frequency is
fs = 1/Ts
where fs is in hertz and Ts is in seconds. For an analog signal x(t), ideal uniform samples are
x[n] = x(nTs) = x(n/fs)
where n is an integer sample index.
Sampling does not inherently quantize amplitude. In principle, samples may still have continuous amplitude; quantization occurs when each amplitude is assigned to one of a finite number of numerical levels.
2.2 The sampling theorem
For a strictly band-limited signal whose highest frequency is fmax, perfect reconstruction is theoretically possible when
fs > 2fmax
The quantity 2fmax is the Nyquist rate. The frequency fs/2 is the Nyquist frequency for a particular sampling system. The theorem assumes ideal sampling, a band-limited input, an ideal reconstruction filter, and sufficiently long observation time. Real systems therefore use margin rather than operating exactly at twice the highest signal frequency.
A signal is often deliberately low-pass filtered before conversion so that its energy above fs/2 is sufficiently small. This filter is called an anti-aliasing filter.
2.3 Aliasing
Aliasing occurs when different analog frequencies produce the same sampled sequence. A sinusoid at frequency fin is indistinguishable after sampling from frequencies related by
falias = |fin - kfs|
where k is an integer chosen so that the result lies between zero and fs/2. This relation assumes ideal uniform sampling.
For example, a 9 kHz signal sampled at 10 kHz appears at
falias = |9 - 1×10| = 1\text{ kHz}
The ADC cannot determine from the samples alone whether the original frequency was 1 kHz or 9 kHz. Once aliasing has occurred, digital processing cannot reliably remove it. The remedy is analog filtering before sampling, together with a suitable sampling frequency.
2.4 Oversampling
Oversampling means sampling substantially faster than the minimum rate. It relaxes the transition-band requirements of the anti-alias filter and can improve the distribution of quantization noise over frequency. It increases data rate and processing demand, however, and does not compensate for poor analog design or excessive input noise.
A practical sampling frequency is selected from the signal bandwidth, filter characteristics, required control latency, ADC conversion time, processor capacity, and storage or communication limits.
Analog signal conversion chain showing anti-alias filter, sampling, ADC, DAC and reconstruction filter
Figure: Analog signal conversion chain showing anti-alias filter, sampling, ADC, DAC and reconstruction filter
Figure: A representative mixed-signal signal path.
3. Quantization and Coding
3.1 Quantization step
An ideal N-bit converter has 2N possible codes. For a unipolar converter with input range from 0 to VREF, the nominal code width is
q = VREF/2N
where q is in volts per code. Some data sheets define the least significant bit (LSB) using this full-scale span; others distinguish between endpoint span and the interval represented by the code centers. The data-sheet definition must therefore be checked.
For a bipolar range from -VREF to +VREF, the total span is 2VREF, so
q = 2VREF/2N
assuming the stated range is the actual converter input span.
Quantization replaces a continuum of amplitudes with discrete levels. The quantization error is the difference between the input and the represented value. For rounding to the nearest level, the ideal error lies approximately within
-q/2 ≤ eq < q/2
provided the signal is not clipped and the converter behaves ideally.
3.2 Resolution versus accuracy
Resolution is the number of distinguishable code intervals, normally expressed in bits or LSBs. Accuracy is closeness to the intended voltage or value. Offset error, gain error, integral nonlinearity (INL), differential nonlinearity (DNL), reference error, noise, and temperature drift can make an actual converter less accurate than its nominal resolution suggests.
A 16-bit ADC may have a theoretical code width of only a few tens of microvolts, while its noise may be several codes. In that situation, the effective number of useful bits is lower than 16.
3.3 Quantization-noise model
For an ideal ADC, if the quantization error is modeled as uniformly distributed and uncorrelated with the signal, its root-mean-square value is
eq,rms = q/√12
This model is most useful for sufficiently varying signals and many samples; it is not always valid for deterministic, low-level, or strongly correlated signals.
For an ideal ADC driven by a full-scale sine wave, the theoretical signal-to-quantization-noise ratio is approximately
SNRq ≈ 6.02N + 1.76\text{ dB}
where N is the number of bits. The equation assumes an ideal converter, a full-scale sinusoid, no external noise or distortion, and a measurement bandwidth covering the quantization noise. Real ADCs have lower signal-to-noise-and-distortion performance.
Worked Example 1: Resolution and quantization noise
An ideal 12-bit ADC has a 0–5.000 V input range. The code width is
q = 5.000/212 = 5.000/4096 ≈ 1.221\text{ mV}
The RMS quantization error is
eq,rms = 1.221/√12 ≈ 0.352\text{ mV}
The ideal full-scale-sine SNR is
SNRq ≈ 6.02×12 + 1.76 = 73.999 ≈ 74.0\text{ dB}
These are ideal values. Reference noise, thermal noise, input-driver noise, distortion, and layout may dominate in practice.
3.4 Converter nonidealities
Offset error: the transfer characteristic is displaced from its ideal position.
Gain error: after offset correction, the slope differs from the ideal slope.
DNL: the width of an individual code differs from one LSB. Excessive DNL can produce missing codes.
INL: the deviation of the transfer curve from a selected ideal straight line.
Noise: random variation in output code or analog output.
Latency: time from input sampling to availability of the corresponding output code.
Aperture uncertainty: uncertainty in the instant at which a sample is taken.
Calibration can correct stable offset and gain errors, but it cannot fully remove noise, missing codes, or unpredictable timing errors.
4. Sample-and-Hold Circuits
A sample-and-hold (S/H) captures an analog voltage on a capacitor during the acquisition phase and maintains it during ADC conversion. A switch connects the input to the capacitor; a buffer isolates the stored charge from the ADC input.
Important specifications include:
acquisition time: time required for the capacitor voltage to settle;
aperture time and aperture jitter: timing of the sample and its uncertainty;
droop rate: rate at which the held voltage changes;
pedestal error: voltage step caused by switch charge injection;
feedthrough: unwanted coupling from input to hold capacitor;
source-drive requirement: current and settling capability demanded from the signal source.
For an RC acquisition network, the capacitor approaches the input voltage exponentially. If the permissible settling error is ε of a full-scale step, a simplified requirement is
tacq ≥ -RC\ln(ε)
where R is the effective source resistance in ohms, C is the hold capacitance in farads, and tacq is in seconds. This assumes a first-order network and a step input. For an N-bit converter, settling to approximately one-half LSB corresponds to ε ≈ 1/2N+1 of full scale, although actual ADC input structures may require a more detailed model.
A high source impedance can therefore prevent an ADC from settling, even when the sensor voltage itself is correct. A buffer amplifier, longer acquisition time, or an ADC designed for high-impedance sources may be necessary.
5. ADC Architectures
5.1 Flash ADC
A flash ADC uses a resistor ladder and many comparators in parallel. It provides extremely high speed but requires approximately 2N − 1 comparators for N bits. Power, area, input capacitance, and cost increase rapidly with resolution.
5.2 Successive-approximation ADC
A SAR ADC uses a sample-and-hold, comparator, internal DAC, and digital successive-approximation logic. It tests bits from most significant to least significant. SAR devices provide a strong balance of resolution, speed, power, and cost, making them common in industrial measurement and control.
5.3 Integrating ADC
An integrating ADC measures the time required for an integrator to reach a reference condition. Dual-slope converters are slow but offer excellent rejection of periodic interference, especially mains-frequency interference. They are widely used in precision digital multimeters.
5.4 Pipeline ADC
A pipeline ADC divides conversion into stages. It offers high throughput and moderate-to-high resolution but introduces latency. It is useful in communications, imaging, and high-speed instrumentation.
5.5 Sigma-delta ADC
A sigma-delta ADC oversamples, shapes quantization noise, and digitally filters the result. It can provide excellent resolution and noise performance over a defined bandwidth, but its data rate, latency, and out-of-band behavior must be considered in control systems.
Architecture
Main strength
Main limitation
Typical use
Flash
Very high speed
High power and hardware count
High-speed instruments
SAR
Balanced performance
Requires suitable input settling
Industrial control
Dual-slope
Precision and interference rejection
Slow conversion
Digital meters
Pipeline
High throughput
Latency
Imaging and communications
Sigma-delta
High resolution in limited bandwidth
Latency and digital-filter delay
Precision sensors
6. DACs and Reconstruction
A DAC converts a digital code into an analog voltage or current. Common architectures include binary-weighted resistor, R–2R ladder, current-steering, and pulse-density or pulse-width methods.
An ideal unipolar DAC output can be represented as
Vout = Dq
where D is the numerical code and q is the nominal output increment, subject to the DAC's transfer convention. A practical data sheet may use VREF(D/2N) or an endpoint-adjusted expression; the specified transfer equation must be followed.
An R–2R ladder uses only two resistor values, R and 2R, which improves manufacturability compared with a binary-weighted ladder requiring many accurately weighted values. Current-steering DACs are fast but can generate glitches when several bits change simultaneously.
The raw DAC output is generally a staircase. A reconstruction, or anti-imaging, filter smooths the staircase and suppresses spectral images around multiples of the update frequency. The filter must be designed around the desired signal bandwidth, update rate, allowable ripple, phase response, and settling time.
For actuator control, a zero-order hold is often part of the DAC system: each output value remains constant until the next update. In a control loop, filter delay can reduce phase margin, so a very aggressive filter may improve spectral purity while harming dynamic stability.
7. Voltage References
The voltage reference establishes the scale against which conversion occurs. Reference quality directly affects absolute accuracy and, for many converters, gain stability.
Important reference specifications include initial accuracy, temperature coefficient, long-term drift, output noise, load regulation, line regulation, startup behavior, output current, and dynamic response. A reference may be internal to the converter or external. An external reference provides flexibility but adds layout, decoupling, and compatibility responsibilities.
For a reference with temperature coefficient α expressed in parts per million per degree Celsius, a temperature change ∆T produces an approximate fractional change
∆VREF/VREF ≈ α×10-6∆T
This approximation assumes a small temperature range and a locally constant temperature coefficient.
A reference bypass capacitor should be placed according to the converter data sheet. Excessive capacitive load can destabilize some reference buffers, while inadequate decoupling allows digital switching currents to modulate the reference. The reference return path must be treated as a precision analog node, not as an arbitrary power connection.
8. Clock Sources and Timing
The clock determines when samples are taken or when conversion steps occur. Clock frequency accuracy affects time scale; clock jitter affects sample timing. For a sinusoidal input of frequency fin, RMS aperture jitter tj produces an approximate jitter-limited SNR of
SNRjitter = -20\log10(2πfintj)\text{ dB}
where fin is in hertz and tj is in seconds. This relationship assumes small timing errors and a sinusoidal input. Jitter becomes particularly important for high-frequency inputs; it is usually less significant for slowly varying temperature or position signals.
Clock options include crystal oscillators, crystal-controlled microcontroller clocks, PLL-derived clocks, RC oscillators, and external clock modules. Crystal sources generally offer better stability than RC oscillators, while PLLs provide frequency multiplication at the cost of added phase noise and design complexity. Clock routing should minimize crosstalk into sensitive analog nodes.
9. Selection and Interface Criteria
Selection begins with system requirements rather than bit count. The following criteria should be quantified:
Input or output range: Match the converter range to the conditioned signal. Unused range reduces effective resolution.
Resolution and ENOB: Effective number of bits reflects actual dynamic performance better than nominal bits.
Accuracy and linearity: Examine offset, gain error, INL, DNL, drift, and calibration capability.
Speed: Check sample rate, conversion time, settling time, throughput, and latency.
Noise and dynamic range: Compare converter noise with sensor noise and required minimum signal.
Interface: Confirm SPI, I²C, parallel, LVDS, or other protocol, logic levels, timing, and isolation requirements.
Power and thermal behavior: Include analog supply, digital supply, reference power, and heat dissipation.
Cost and availability: Consider the complete solution, including amplifiers, reference, filters, PCB area, calibration, and software.
The effective input resolution can be related to the usable input span and the smallest reliably distinguishable voltage. If the usable span is Vspan and the smallest useful change is Vmin, a rough required-bit estimate is
N ≥ \log2(Vspan/Vmin)
This is a planning relation, not a guarantee of accuracy. Noise and nonlinearity may require additional bits or signal averaging.
Interface best practices
Use an input driver capable of charging the ADC sampling capacitor within the acquisition interval.
Place decoupling capacitors close to supply and reference pins.
Separate high-current digital return paths from sensitive analog returns, while maintaining a deliberate ground strategy.
Keep clock and fast digital traces away from high-impedance analog nodes.
Protect inputs against overvoltage, electrostatic discharge, and sensor wiring faults.
Verify logic thresholds and timing with the actual supply voltages.
Use differential signaling where common-mode interference is significant.
Calibrate offset and gain when the accuracy budget requires it.
10. Worked System Example: Temperature-Controlled Oven
Background
Consider an illustrative 0–200 °C laboratory oven controlled by a microcontroller. A conditioning circuit produces 0–3.300 V over the temperature range. The control system needs a temperature resolution of 0.1 °C, and the useful temperature bandwidth is below 5 Hz.
Problem and analysis
The required voltage change per 0.1 °C is
Vmin = 3.300×(0.1/200) = 1.65\text{ mV}
The minimum ideal resolution estimate is
N ≥ \log2(3.300/0.00165) = \log2(2000) ≈ 10.97
Thus, at least 11 ideal bits are needed. Because sensor noise, reference drift, and control margins exist, a 12- or 16-bit ADC may be appropriate. The minimum sampling rate from the strict Nyquist criterion is greater than 10 samples/s, but a practical rate such as 100 samples/s provides filtering and control margin without creating excessive data.
An anti-alias low-pass filter should significantly attenuate signals above 50 Hz if 100 samples/s is used. Its cutoff must be selected with the desired passband below 5 Hz and sufficient transition-band attenuation. A SAR ADC is suitable because the application requires moderate speed and low latency rather than extreme bandwidth. A sigma-delta ADC could provide excellent resolution, but its digital-filter latency must be checked against the temperature-control loop.
The ADC reference should be low-noise and stable over the oven's environmental temperature range. If the ADC uses a 3.300 V reference, a reference drift of 50 ppm/°C over a 20 °C change causes approximately
∆VREF/VREF ≈ 50×10-6×20 = 0.001 = 0.1\%
This corresponds to a full-scale change of about 0.2 °C in the idealized temperature mapping, before other errors. Calibration or a more stable reference may therefore be required.
Approach and outcome
A suitable implementation uses a buffered sensor signal, a two-pole anti-alias filter, a 12- or 16-bit low-latency ADC, a stable reference, and a 100 Hz timer-triggered conversion. Digital averaging can reduce random noise, but the averaging window must not create unacceptable control delay. The heater output may use a DAC, PWM, or time-proportional switching output; if a DAC is used, its update rate and reconstruction filter must not destabilize the loop.
Learning points
The example demonstrates that resolution is only the starting point. Sampling rate, latency, reference drift, analog filtering, sensor noise, and control dynamics jointly determine performance.
11. Challenges, Safety, and Contemporary Practice
Mixed-signal systems are vulnerable to ground loops, electromagnetic interference, power-supply coupling, reference contamination, sensor aliasing, and software timing errors. Mechanical systems add vibration and cable motion, which can create interference or intermittent connections.
Safety-related measurement systems require fault detection, plausibility checks, defined behavior on ADC failure, watchdog operation, and appropriate isolation. A converter reading should not be treated as valid merely because it lies within its numerical range. Diagnostics may compare redundant sensors, detect stuck codes, monitor reference health, and identify impossible rates of change.
Modern converters increasingly integrate programmable-gain amplifiers, calibration engines, digital filters, diagnostics, and serial interfaces. Delta-sigma devices and oversampling improve low-bandwidth precision, while high-speed SAR and pipeline converters support robotics, motor drives, machine vision, and communications. Artificial intelligence may process converted data, but it cannot recover information lost through aliasing, clipping, inadequate bandwidth, or poor calibration. Data quality remains an engineering responsibility.
Chapter Summary
Mixed-signal electronics connects continuous physical systems to digital computation. Sampling selects discrete time instants, while quantization maps amplitudes to finite code levels. The sampling theorem requires a sampling frequency greater than twice the highest signal frequency under ideal band-limited assumptions. Aliasing is irreversible frequency ambiguity and must be controlled with analog filtering and suitable sampling rates.
For an ideal converter, the code width depends on reference span and number of bits, while quantization noise is approximately q/√12 under appropriate statistical assumptions. Real performance is limited by offset, gain error, INL, DNL, noise, reference instability, clock jitter, and settling. SAR, flash, integrating, pipeline, and sigma-delta ADCs serve different speed, resolution, and latency requirements. DACs require attention to linearity, glitches, update rate, and reconstruction filtering.
Successful design selects the complete conversion chain—not merely the converter—using accuracy, ENOB, bandwidth, latency, noise, reference quality, clock performance, power, interface, safety, and cost. Careful grounding, decoupling, filtering, calibration, and validation are essential professional practices.
Key Terms
Sampling: Measuring an analog signal at discrete time instants.
Sampling frequency: Number of samples acquired per second.
Nyquist rate: Twice the highest frequency in a strictly band-limited signal.
Nyquist frequency: Half the sampling frequency.
Aliasing: Irreversible ambiguity caused by undersampling.
Anti-aliasing filter: Analog filter that attenuates frequencies before sampling.
Quantization: Mapping continuous amplitude to discrete levels.
LSB: Least significant bit; the nominal smallest code increment.
Resolution: Number of distinguishable digital levels or bits.
Accuracy: Closeness of a measurement to its intended value.
INL: Deviation of a converter transfer characteristic from an ideal straight line.
DNL: Deviation of an individual code width from one LSB.
Sample-and-hold: Circuit that captures and maintains an analog voltage.
Aperture jitter: Uncertainty in the sampling instant.
ADC: Analog-to-digital converter.
DAC: Digital-to-analog converter.
Voltage reference: Stable voltage establishing conversion scale.
ENOB: Effective number of bits indicated by actual dynamic performance.
Reconstruction filter: Filter that smooths DAC output and suppresses spectral images.
Latency: Time between input sampling or command and corresponding output availability.
Review Questions
Short Answer Questions
Distinguish sampling from quantization.
What is aliasing, and why is it difficult to correct digitally?
Define ADC resolution and explain why it does not equal accuracy.
State two functions of a sample-and-hold circuit.
Why is a voltage reference important in an ADC or DAC?
Long Answer Questions
Explain the sampling theorem, Nyquist frequency, anti-alias filtering, and aliasing using a suitable example.
Compare flash, SAR, integrating, pipeline, and sigma-delta ADC architectures.
Explain quantization error, RMS quantization noise, and the ideal ADC SNR relationship.
Describe the main specifications used to select an ADC for an industrial sensor system.
Explain DAC reconstruction, zero-order hold behavior, and the influence of filter delay in a control loop.
Analytical / Application Questions
A 10-bit ADC has a 0–2.500 V range. Calculate its nominal code width and determine whether it can resolve a 3 mV sensor change ideally.
A 14 kHz interference signal enters a system sampling at 20 kHz. Calculate its aliased frequency and propose an analog remedy.
Design a selection argument for a temperature-control system requiring less than 10 Hz bandwidth, low latency, 0.05 °C resolution, and low cost. Discuss ADC architecture, sampling rate, filtering, reference, and calibration.
Multiple Choice Questions with Answers
Question 1
A signal with highest frequency 8 kHz is sampled uniformly. Which sampling frequency satisfies the ideal Nyquist condition?
A. 8 kHz
B. 12 kHz
C. 16 kHz exactly
D. 20 kHz
Correct Answer: D. 20 kHz
Question 2
A 12-bit ADC has a 0–4.096 V input range. What is its nominal code width?
A. 0.1 mV
B. 1 mV
C. 4 mV
D. 12 mV
Correct Answer: B. 1 mV
Question 3
A 9 kHz sinusoid is sampled at 10 kHz. What frequency does it alias to?
A. 1 kHz
B. 5 kHz
C. 9 kHz
D. 19 kHz
Correct Answer: A. 1 kHz
Question 4
Which ADC architecture generally provides the best combination of moderate speed, resolution, power, and cost for industrial control?
A. Flash
B. SAR
C. Dual-slope only
D. Pipeline only
Correct Answer: B. SAR
Question 5
For an ideal N-bit ADC driven by a full-scale sine wave, which expression approximates quantization SNR?
A. 3.01N + 1.76 dB
B. 6.02N + 1.76 dB
C. 20N dB
D. N/6.02 dB
Correct Answer: B. 6.02N + 1.76 dB
Question 6
What is the principal purpose of an anti-aliasing filter?
A. To increase ADC clock frequency
B. To attenuate unwanted input frequencies before sampling
C. To convert binary data into analog voltage
D. To eliminate all quantization error
Correct Answer: B. To attenuate unwanted input frequencies before sampling
Question 7
Which specification describes deviation of an individual ADC code width from one LSB?
A. Offset error
B. Gain error
C. DNL
D. Aperture time
Correct Answer: C. DNL
Question 8
For a first-order sample-and-hold acquisition circuit, increasing the source resistance generally has what effect?
A. It reduces acquisition time
B. It increases acquisition time
C. It eliminates quantization noise
D. It increases the number of ADC bits
Correct Answer: B. It increases acquisition time
Question 9
Which component establishes the voltage scale used by many ADCs and DACs?
A. Voltage reference
B. Reconstruction capacitor only
C. Digital isolator only
D. Output relay
Correct Answer: A. Voltage reference
Question 10
Clock jitter is most damaging to conversion of which signal?
A. A slowly varying room temperature signal
B. A DC reference voltage
C. A high-frequency sinusoidal signal
D. A disconnected input
Correct Answer: C. A high-frequency sinusoidal signal