|
Test
Your EQ #154 Answer
|
Answer
5
This
circuit is actually a simple form of delta-sigma modulator
being used as an A/D converter. The value of variable
c represents the voltage at the wiper of the potentiometer.
Negative feedback is used to make the voltage at the output
of the RC filter track the voltage coming from the potentiometer.
If the negative input of the comparator is too high, then
the digital output goes low to pull it lower. If it's
too low, then the digital output goes high to pull it
up. Overall, the duty cycle of the digital output will
match the voltage on the potentiometer expressed as a
percentage of the power supply voltage.
The software measures the duty cycle of the digital output
by counting the intervals that it's high within a period
of 256 intervals. This creates a simple kind of down-sampling
low-pass filter in the digital domain. The output sample
rate is 2560/256 = 10 Hz.
Contributor: Dave Tweed
Published
May 2003