This tutorial emphasizes the importance of designing circuits with care and thinking through all aspects of a design. All too often, engineers are led astray by a data sheet's specs, either because they have been rounded or because the engineer only kept the typical specifications in mind. With either pitfall, there can be disastrous results in a design. This document explains why relying on rounded numbers and typical specifications, and favoring simulations over physical prototypes can cause a circuit to fail.
A similar version of this article appears on RF & Microwave Systems, June 26, 2012.
Rounded Numbers Don't Always Add Up
As American Statesman Henry Clay once said, "Statistics are no substitute for judgment."1 What is true for statistics is also true for data sheet specifications. With the ever increasing demands on design engineers, and with efficiency at a premium, it can be tempting to trust a device's specs at first glance. However, logic must prevail—both in circuit design and in the real world. Engineers need to take the time to fully think through their designs to avoid errors caused by the necessary (although sometimes misleading) rounding of specifications.
As an example of the pitfalls of rounding, some digital-to-analog converters (DACs) with output buffers have contradictory specifications listed in the data sheet. For instance, an output swing (with no load) is 0V (ground) to VCC, but the zero error and offset are 10mV maximum above ground.
The output buffer is an operational amplifier (op amp). Years ago, early op amps could only get to within 2V to 3V of power and ground, so when one was designed to get within millivolts of ground, it was a big deal. A marketing genius coined the term "rail to rail"2 to describe the part, and it has become an industry-accepted generic term. Analog engineers knew it wasn't exactly a true phrase, but it was close and easy to say.
The conventional configuration (Figure 1A) of an output driver can't get near the power rails because it runs out of current and clips off the signal. Figure 1B shows a rail-to-rail output that if lightly loaded, can approach the power rails.3
As for the DAC buffer or op amp, if there is no load, it is impossible to measure, because a meter with infinite impedance doesn't exist. And we know that every practical circuit has finite leakage, so the output can only approach zero.
The difference is rounding or how closely one looks. Consider the board under test (Figure 2). It we look with an oscilloscope that displays a 5V swing (Figure 2A), the output of the part appears to swing between 5V and ground, as the errors are much smaller than the trace width. Now measure with a multimeter with 8 digits and a 1M? input impedance (Figure 2B). Suddenly, one sees through the magic of rounding—the output gets near ground but never equals ground without rounding off many digits.
The uninitiated digital engineer may see the term and actually believe that the op amp will go to ground. Therefore he designs the next circuit after the DAC so that it must go to zero to function. Although in fact, the DAC output will only be within a few millivolts of ground.
Anything but "Typical"
Unfortunately, relying on rounded numbers is not the only design pitfall that can fool an inexperienced (or overworked) engineer. Additionally, it is not good practice to design with typical specs in mind, especially when a device is meant to be produced in great quantities. A good analog engineering friend said, "You can make one of any circuit work." He meant that he could select components like in the early days of transistors, when some circuits would only work if one sorted the transistors for beta. He could hand-tweak the circuit, but no one could ever mass produce it.
"Typical" is a statistical statement that identifies a mythical average; it categorizes or names a point in a population of devices. But there may be no single part in a population that equals the average, because average is a statement of the whole, not the individual. For example, let's use a string of numbers: 1, 2, 7, and 10. The total is 20, and dividing by 4 gives us the average of 5. So the number string does not contain the average number (5), but it does contain a mean (7), which is the nearest number to the average. This corresponds to a remark Mark Twain made: "Figures often beguile me, particularly when I have the arranging of them myself."
If one depends on all specifications being "typical" on every part, there may be times that a specific circuit does not work. So why do semiconductor manufacturers quote typical specs on data sheets? They are for general guidance only. As humans, we do similar things in daily life. For example, we might talk of a distance measured in "car lengths." At one time, safety experts recommended leaving space between our car and the car in front of us. They said to leave one car length space for every 10 miles per hour that we are traveling (Sixty miles per hour meant leaving 6 car lengths of space.) This was a general rule, not an exact measurement. After all, did they mean the length of a Smart Car (8 feet or 2.6 meters) or a 1956 Cadillac™ (18.5 feet or 5.9 meters4)? Today, the same safety experts recommend watching the car ahead as it passes a fixed point on the roadway and counting one second for every 10 miles per hour. Does anyone get out a stop watch to measure? Only an engineer would want to measure nanoseconds—most people just say, "one, one thousand; two, one thousand" under their breath to measure this.
Do We Need to Build a Physical Prototype?
Obviously it is necessary to add different error sources together to properly evaluate system errors. This is why it is important to use applications notes5,6, calculators, and design tools as guides to help evaluate accuracy, noise, effective number of bits (ENOB), bandgaps, and yield7,8. But engineers must understand the limitations of circuit simulations when discussing whether physical prototypes are necessary. (Note: The debate concerning physical prototypes has been going on for decades, and this will not be the last word on the subject.)
To speed up the simulation (SIM) process, engineers often simplify the device models. For example, it is common to model transistors and other parts in the normal or forward-biased mode. This is logical because those are the most common modes used. We will look at an early SIM method called Simulation Program with Integrated Circuit Emphasis (SPICE9), an analog electronic circuit simulator that was pioneered in the early 1970s at the University of California, Berkley. A typical NPN transistor model operates with the transistor forward-biased as an emitter follower or as gain stage.
The linear forward-biased NPN transistor emitter follower (Figure 3A) is what is modeled in a typical SPICE model. Figure 3B is a Zener diode. When we short the base to the emitter, the transistor becomes a Zener diode like in Figure 3C. Could a SPICE model include the Zener mode? Of course, but it is not commonly needed and so would only slow down and complicate the simulation. This is just one shortcut to speed up the SIM. Many times the linear mode is so taken for granted that power supplies are not specified. The supplies are assumed to be far from the signal voltage, so the parts never operate in a nonlinear mode. The engineer needs to make sure that there is enough power head and foot room. In fact before many versions of SPICE will run, the DC bias points need to be first calculated in a separate step. This transistor model limitation is just one area where simulation and physical prototypes differ; almost all models are minimized to reduce complexity and reduce simulation or running time.
Additionally, sometimes data sheets are not clear about all the parameters. Some time ago, I worked for a semiconductor company that is no longer around that made discrete transistors on a single silicon substrate. There were two PNP and three NPN transistors that were manufactured together so that they matched and tracked well with temperature. Just before a prototype circuit was laid out as a PCB, an engineer noticed that the two circuits were not tracking well with temperature. He decided to use four of the transistors in the IC. They were used as two Darlington-connected emitter followers. Each of the circuits utilized one PNP and one NPN. Since they were just emitter followers replacing discrete transistor emitter followers, and time was critical, they were not prototyped. The boards came back and things almost worked—temperature tracking was good but we added huge differential gain and phase errors. It was the first time we had seen an emitter follower with differential gain, as differential gain is normally seen in a common emitter amplifier when the parasitic collector capacitance changes value with the collector voltage. It results in a change in high-frequency gain compared to the low-frequency gain.
This error occurred because the data sheet didn't specify that the back-biased diodes that isolated the transistors from the substrate were varicap diodes. A varicap10 diode, also called a "varactor" or "tuning diode," changes capacitance as a function of the voltage across the back-biased diode. This was a surprise that a physical prototype would have revealed. Thus, the lesson is to be very careful when deciding not to prototype. With surface-mounted parts (which are almost impossible to hand-wire prototype), creating multiple PCB layouts is a critical step. Your "prototype" may be the first of three layouts, and the final board hopefully is the third layout.
Many of us have been fortunate to have parents, grandparents, and analog mentors that reminded us that in electronics and life, there are no real shortcuts. Although it is tempting to use rounded numbers, typical specs, and speedy simulations in our designs, we have to ask ourselves whether these shortcuts really save time in the long run. Data sheet specs and simulations cannot compete with the value of an engineer's greatest assets—knowledge and judgment.
- For more information on Henry Clay, the "Great Compromiser," go to http://en.wikipedia.org/wiki/Henry_Clay.
- Tutorial 741, "Rail-to-Rail Outputs and Beyond-the-Rails Inputs: The Inside Story on Micropower Op Amps."
- Application note 4428, "Rail-to-Rail: Railroading and the Electronics of Op Amps."
- Cadillac length: http://auto.howstuffworks.com/1956-1958-cadillac-series-sixty-two-eldorado-biarritz.htm.
- Tutorial 4300, "Calculating the Error Budget in Precision Digital-to-Analog Converter (DAC) Applications."
- Application note 4003, "Series or Shunt Voltage Reference?"
- SPICE history: http://en.wikipedia.org/wiki/SPICE.
- Varicap information: http://en.wikipedia.org/wiki/Varicap.