Many digital devices incorporate analog circuits, also called "analog building blocks," that augment analog-to-digital interfaces for microprocessors, application-specific integrated circuits (ASICs), and field-programmable gate arrays (FPGAs). These analog building blocks can include internal voltage references, analog-to-digital converters (ADCs), or digital-to-analog converters (DACs).
If we ask the various manufacturers how good are their analog parts, they will undoubtedly reply, "quite good." Indeed, the circuits usually are quite amazing when we consider the environment inside the IC: heat, noise, ground bounce, crowding and constricted space, multiple layers, and ground lines running in different directions. Reconsidering this environment, now ask again, how good are the ICs? The answer becomes quite subjective. As Hamlet said, "There is nothing either good or bad, but thinking makes it so."1
Let's turn our attention from an analog IC to the structure of a mostly digital IC. There are literally hundreds or thousands of digital gates changing state at megahertz or gigahertz rates. They tend to share power supplies and they do share grounds. Given this "congestion," it is difficult to place decoupling capacitors inside the IC where they are really needed. The noise floor inside the IC is quite high as the digital circuits are protected by the logic thresholds.2 The digital signal is, in effect, cleaned up (i.e., noise is ignored) at every stage.
Now back to the analog IC. Application note 4345, "Well Grounded, Digital Is Analog
," explains how analog circuits are not protected by logic thresholds. Thus, we cannot say that any analog voltage above a threshold is a one or below another threshold is a zero. In analog the noise accumulates stage by stage. Consequently, analog ICs are "naked" and what you see is what you get. There is no proverbial discreet fig leaf or threshold to mask, or protect, anything.
Where does this leave us? As with all things in life, in electronics we must always trade one parameter for another, with the application dictating the proper trade-off of analog function. In this application note, we examine how the demand for economy of space and cost pushes analog circuits onto digital substrates, and what design challenges emerge.
Performance Trade-Offs Are Unavoidable
The semiconductor industry has a specific, perfect example of how digital interference increases the noise floor. It is a chopping op amp. The classic "chopper" interrupted the signal path to recalibrate the amplifier and thereby greatly reduce offset and drift. Later IC developments combined two parallel amplifiers built on a common silicon substrate. This design produced excellent matching between the two amplifiers; one amplifier was then chopped and the resulting error signal was applied to both amplifiers.3
In current technology we improve op amp performance by reducing offset, temperature drift, and 1/f or pink noise at low frequencies.4, 5 However advantageous this is for some applications, we degrade performance in another area—which is the point of the story. The unavoidable chopper switching noise propagates onto the bias and substrate. This noise occurs at higher frequencies and is caused by switching a small chopper switch with low current. Now imagine switching hundreds and thousands of digital gates (many switches each) on the same substrate with the analog circuits. Such is the challenge facing the microprocessor designer as he, or she, adds analog circuits to the part.
Look at how some IC data sheets specify the analog parts. Generally, only the resolution and the reference voltage range are specified. What? Most of the specifications that we analog designers expect to see in a stand-alone precision ADC, DAC, or voltage reference are missing. Noise, dynamic nonlinearity (DNL), integral nonlinearity (INL), offset, gain, and temperature coefficients (tempco) are just not there. This is a not-too-subtle hint that you are trading something for known precision. Is this bad? Not necessarily; it depends on the application.
Know the Application Well
In real estate it is said that the most important factor in a sale is location, location, location. In electronics design, it is application, application, application. If we need to measure a voltage with a 10% tolerance, the built-in ADC may be adequate. If we need more precision, however, an external ADC may be a better choice. Once again, it depends on the application.
Resolution and Accuracy
In a data converter there is a marked difference between resolution and accuracy. The resolution, or number of bits, is usually expressed in powers of two. That is a good number that indicates how many steps are in the full-scale value. OK, you say, but is it like asking how many steps are on a ladder? Resolution reveals nothing about accuracy or linearity, and specifically, whether the steps are all the same size and evenly spaced. Without adequate specifications, we cannot understand what happens as the temperature changes.
Accuracy and linearity, or actually the lack thereof, are illustrated in the metaphorical treatment of ladders in Figure 1. The straight, sturdy ladder with the man represents the reliable, predictable steps that we would expect in a precision ADC or DAC. The left ladder has some obvious problems; it may be noisy, disjointed (segmented poorly), skipping steps, and not monotonic. The next ladder is uneven and compressed in some places, which means that the ADC or DAC advertised as 12 bits (a poor 12 bits) is really a good 8-bit converter. The steps on the right ladder are stretched and irregular; it might not provide the expected resolution just when you need it. Does this mean the empty three ladders are unusable? No, again it depends on the application—perhaps the application only needs a low-accuracy measurement and one of these will work.
Figure 1. When envisioning data converter performance, the number of the rungs on a ladder represents the resolution.
Accuracy and a Voltage Reference
The first consideration is the voltage reference, which sets the full-scale value, controls the initial accuracy, and contributes to the tempco.
To reduce system costs the digital designer may include an ADC inside a microprocessor or FPGA. An easy way to evaluate the noise environment is to add extra bits of resolution to the ADC and see what happens. Later, one might describe it as 8, 10, or 12 effective bits. This is not a bad thing; extra bits may be useful even if they are just noise. Again it is the application that matters.
Suppose we want to measure something that does not change fast so we have time to average. If the noise is truly random, then the noise adds by the RMS and the signal adds directly every time that we double the number of samples. Therefore, normalizing the signal level to unity, two samples will yield a 3dB better signal-to-noise ratio (SNR). Four samples increases SNR by 6dB and so on. However, if the noise is coherent (i.e., the noise is the same from sample to sample), then the SNR does not improve. Actually, in most cases the total noise is a combination of random and coherent noise. You may find that the noise in your application improves by 1dB or 2dB with each doubling of the samples. This not only is good to know to trouble shoot and reduce noise sources, but it may also be just the tool to make the application practical or possible.
An ADC's internal analog voltage references will also experience difficulties inside a digital device. An example device has a 12-bit ADC with a ±1% reference. The data sheet says that an external reference can be used for more accuracy. What do the numbers tell us? The ADC is 1V full scale; 12 bits is 4095 levels of 0.000244V each, or 0.024% if everything is perfect. Now we overlay the reference voltage at ±1%, which is one part in 50 or > 5 bits (32) LSB levels. Not to worry—there is a useful tool, a spreadsheet to make an error budget for the combination of the ADC and reference or a DAC and reference.6
At the risk of totally boring readers, this cannot be said enough: It is not the error that is important, it is knowing if the error is acceptable for the application.
Open Loop, Closed Loop, and Servo Loops
There are two obvious divisions between converter applications: open loop and closed loop. Open-loop applications require the most stringent accuracy. An ADC, for example, might require a precise voltage with a particular, predictable output code. A DAC, in contrast, is an arbitrary waveform generator in which a specific digital code always produces a given output voltage. Closed-loop applications use the center of the ADC or DAC range because they are inside a servo loop. Servo action corrections mean that the absolute accuracy is less important, as long as the converter is monotonic. Therefore, if one increments a voltage in a rising direction, the ADC output code will always increment in the upward direction. The code cannot change direction (go down or decrement). Another way to say this is that the sign must never change. The same must be true when decrementing the ADC's voltage to be monotonic. DACs also need to be monotonic in servo or feedback applications. An example might be a motor controller that keeps the motor speed constant despite changes in the motor powerline voltage or the load applied.
If the ADC or DAC (integrated into a digital device) is inside a servo loop or in low-accuracy open-loop applications, the internal voltage reference may be adequate. If the application is more demanding, ADCs, DACs, and voltage references are available.
External Voltage References
Any circuit that handles small or sensitive signals can benefit from clean, low-noise power. A voltage reference can be such a stable low-noise power source for analog circuits. They can be inside an FPGA if there is a separate power pin provided, or can be an external analog circuit that feeds the FPGA.
Voltage references help FPGAs by providing a stable reference for ADCs and DACs. A reference is a small power supply with guaranteed initial accuracy and stability over temperature. For even more accuracy many voltage references can be externally trimmed by a few percent using a digital potentiometer (digipot).7, 8 This trimming allows one to compensate for ADC and DAC full-scale gain errors.
Not limited to FPGA applications, voltage references can also provide low power to radio low-noise amplifiers (LNAs), op amps, multiplexers (muxes), and filters.9
Pulse-Width Modulation (PWM) and Logic Translators
Typical digital power supplies have a voltage tolerance of ±5% to ±10%, which is quite reasonable for a digital supply. The digital parts ignore the voltage tolerance and reject the noise because of the thresholds inherent in the digital system.10
FPGA outputs commonly use DACs or PWM signals to control motors valves and other actuators. The advantages of an external DAC are higher resolution, cleaner voltage reference, and typically better frequency response. The improvement with PWM is, however, more subtle. In many cases the DAC will require less lowpass filtering compared to a PWM and, therefore, produce a faster response time or wider frequency response. But with PWM signals, an FPGA can count a high-frequency clock, making the time axis very precise. However, the voltage axis is imprecise and noisy. This is because the power supply that the PWM uses is the same digital supply that the rest of the digital parts use.
Conversely, the PWM is an analog output where voltage level and noise are not rejected or accommodated by a threshold. The digital (dirty) PWM output needs to be translated to a clean analog signal connected to a precise voltage reference. This could be done with transistors, but it is easier to use dual-supply logic translators. The translator can use the analog supply, which will likely be quieter. If more precision is necessary, a low-noise voltage reference can be used. This optimizes the PWM signal so it is precise in both time and amplitude. This precision will also minimize the lowpass filter complexity typically necessary to smooth the PWM signal into a slowly varying DC signal.
Digital design is difficult enough on anybody's "good day." Combining analog circuits on a digital IC substrate is even more difficult. There will be performance trade-offs and sometimes the analog portions won't be as good as the application demands. This is where Maxim parts can help by replacing FPGA and ASIC functions with external devices. That is why we have included references to application notes and analog building blocks useful in augmenting analog-to-digital interfaces for ASICs and FPGAs. They help save designs from errors, miscalculation, or last-minute disruptive changes. The saving is more than moving circuits to external devices. The savings include design time which impacts time to market, and manufacturing, testing, and debug time. Avoiding a spin or redo of a device is never a bad thing and may even allow a project to succeed and reach market when others may fail.
- William Shakespeare, Hamlet Act 2, scene 2, www.enotes.com/shakespeare-quotes/nothing-either-good-bad-but-thinking-makes.
- Application note 4345, "Well Grounded, Digital Is Analog"; tutorial 4992, "Reduce the Chances of Human Error: Part 1, Power and Ground"; and tutorial 4993, "Reduce the Chances of Human Error: Part 2, Super Amps and Filters for Analog Interface."
- For more details, see "Chopper Stabilized Amplifiers" course work, Aalto University, metropolitan Helsinki, Finland, http://metrology.hut.fi/courses/s108-180/Luento4/chopamp.pdf.
- Application note 4437, "Zero-Drift Instrumentation Amplifier (IA) Takes the Strain out of Sensor Measurements."
- Application note 4179, "Autozero Noise Filtering Improves Instrumentation Amplifier Output."
- Tutorial 4300, "Calculating the Error Budget in Precision Digital-to-Analog Converter (DAC) Applications."
- Application note 4494, "Methods for Calibrating Gain Error in Data-Converter Systems."
- Tutorial 5036, "Calibration Circuit Library."
- Application note 3657, "Ultra-Low-Noise LDO Achieves 6nV/√Hz Noise Performance."
- Application note 4345, "Well Grounded, Digital Is Analog."