To show the efficiency of this method, the following example will show that it is not
necessary to use an external ADC to get higher accuracy. A signal generator is used
to produce a linear ramp signal from 0V to 5V. In a ‘low noise’ environment, with a
signal generator and an
AVR controller plugged into an STK500 board, there may not
be enough noise to toggle the last few bits of the 10-bit signal. It is therefore
necessary to add artificial ‘noise’ to the input signal, to make the LSB toggle. Four
methods were used successfully:
• Adding noise, generated by a signal generator, directly to the input signal.
• Generating noise with the AVR, using PWM, and adding it to the input signal.
• Adding noise, generated by the AVR, to AREF when using AVCC as VREF.
• Adding noise, generated by the AVR, to AREF when using AREF as VREF.
The easiest way to dither a signal is to add white noise directly to the signal, but in
most cases the user does not have, or does not want to have, this kind of noise signal
in the measuring environments. A more available method is to set up one of the
counters in the
AVR to produce a PWM signal and then low-pass filter this ‘noise’ to
appear as a DC with a ripple peak-to-peak value of a few LSB. An example of such a
filter’s details and component values are shown in Figure 3-5.
Lesezeichen