Columnists
Mixed-signal tools of the trade
By Bonnie Baker, Microchip Technology Inc -- EDN, 6/26/2003
Some engineers work more on digital designs, and others work in the analog domain. The point where these two domains come together could present a troubleshooting challenge. For instance, it is easy to say that one sample from an ADC is all that you need to get an accurate picture of your data-acquisition system. You could assume that this sample is accurate, and, if it isn't, the controller can fix it. Conversely, if the system requires analog filtering, you could save considerable computing time. Further exploration of this sampling system may demonstrate that the converter's output value changes slightly from sample to sample. In this circumstance, it is easy to assume that this slight change is just noise.
Generally, if you intend to design a "one-shot" data-acquisition system in which you need a quick decision, your best defense is to evaluate this system with a large quantity of multiple, timed samples.
Figure 1 and Figure 2 show graphic examples of this type of problem, with the output response of a 12-bit-sampling ADC having a clean dc input. These figures use 4096 samples of data from the ADC, taken at a sample rate of 40,000 samples/sec.
If you view the data only in the format in Figure 1, it is easy to conclude that the ADC does not have 12 bits of accuracy. But don't stop there. Something may be occurring in the system beyond the ADC. Figure 2 shows the same data in the time domain.
It is now obvious that the noise that Figure 1 illustrates has frequency content. An FFT evaluation reinforces this conclusion. In this example, you can track this noise back to the switching power supply, which happens to have inadequate filtering.
You can take one of two avenues when attacking this problem. You can eliminate the noise in the analog domain with power-supply filtering techniques. A second approach is to take several samples and average them. The code width on this sample set is 2½ bits. To produce a single code result, the controller or processor needs a rolling average of 4N samples, where N is the number of bits that you want to reduce. In this case, it's 41.5, or 8 samples.
With a small increase in cost, the power-supply redesign will produce a reliable, repeatable output. Alternatively, if you use the controller to implement an averaging algorithm, the impact on the system is increased code size and execution time. So what is the right option for your application? The choice is yours, of course, but in the initial evaluation, don't forget to look at the data from at least three perspectives: histogram, scope plot, and FFT.
| Author Information |
Bonnie Baker is the analog/mixed-signal-applications engineering manager for Microchip Technology's microperipherals division. You can reach her at Bonnie.Baker@microchip.com. |















Bonnie Baker is the analog/mixed-signal-applications engineering manager for Microchip Technology's microperipherals division. You can reach her at