-
Notifications
You must be signed in to change notification settings - Fork 6
Background: Analog to digital converters (ADCs)
An analog-to-digital converter is an electronic circuit that transforms an analog electronic signal into a digital signal.
The PSoC provides two types of ADCs.
- Successive Approximation (SAR) ADCs (2 available simultaneously)
- Delta-Sigma ADC (1 available)
The SAR ADC uses a digital-to-analog converter (DAC) to approximate an analog input signal.
The SAR ADC works as follows:
-
First, a controller tells the N-Bit DAC to generate an output voltage.
-
The output of the DAC is then compared to
V_in
using a voltage comparator. This tells us if the initial guess is too high or too low. -
The controller then adjusts the output of the DAC and guesses again.
-
This is repeated until
V_in
is found.
Pros:
- Lower cost than Flash ADC
- Can be built for high-resolution applications.
Cons:
- Slower speed at high accuracies due to the need to compare many values.
The Delta-Sigma ADC is based on a delta modulator---a feedback control system that produces an output signal from an input signal. The feedback path contains an integrator, which integrates the output signal to create a feedback signal x̂(t)
. The feedback signal is subtracted from the input signal x(t)
to generate an error signal e(t) = x(t) - x̂(t)
. The error signal is fed into a voltage comparator, which compares the error signal to GND (0 V) and produces an output signal y(t)
, which is either V_ref
or -V_ref
.
The Delta-Sigma ADC works as follows:
-
First, from the analog signal an estimate
x̂(t)
is subtracted to calculate an error signale(t) = x(t) - x̂(t)
. -
The error is fed into a 1-bit voltage comparator (quantizer) which outputs:
y(t) = V_ref, e(t) ≥ 0
y(t) = -V_ref, e(t) < 0
-
This "tracks" the input signal.
-
The accuracy depends on
V_ref
and the sampling timedt
.
Pros:
- Very high resolution
- Almost completely digital
Cons:
- Can be slow if oversampled