Image
image
image
image


How Analog and Digital Designing Differs

Differences do exist between the analog and digital mind sets. But engineers and designers need to go back to the drawing board and master both domains in terms of precision, the reliance on hardware versus software, and time.

Bonnie Baker, Senior Applications Engineer, Texas Instruments

Nearly a decade ago at the Embedded Systems Conference (ESC) 2001, San Francisco, I was approached by a new graduate, engineering applicant. When he found out that I was a manager, he explained that he was looking for a job. He said he knew of my microcontroller company and wanted to work for them, if he could, and produced his resume. In turn I gave him a few more details about my role at the company.

At the time I managed the Mixed Signal / Linear Applications group. My department’s roles were product definition, technical writing, customer training and customer visits and we traveled all over the world doing our jobs. When I concluded my “sales” pitch, he proudly told me that it sounded like a great job. I re-emphasized that I was in the Analog arm of my company’s business. He obviously thought that he had done his homework because he proudly told me that “analog is dying” and that, eventually, digital will take over. And any one who knew anything about electrical engineering would agree. Right?

Over the course of my career, I have worked with a wide spectrum of analog and digital designers. Each one has their own quirks and reasons why they can’t do everything. In this article the digital designer will find some helpful tips when diving into the “darker (analog) side” of designing circuits. Or, from my perspective, they are finally rising to the light.

The basic difference between the analog versus digital mind set is embedded in the definitions of precision, hardware versus software, and time. When it comes to precision, the issues you might be concerned about would be how well your analog devices are matched to your task at hand, or how efficiently your software executes to digital code. Analog engineers quickly recognize that hardware changes are difficult, while digital engineers make software changes with a few computer key strokes. Then, there is the issue of time. In analog design, frequency dominates the designer’s decisions. And in digital design, the elapsed time plays a prominent role.

Precision

How do you start to define precision in your analog circuit? This question can be answered in three different ways. One answer is “as precise as it needs to be.” Some of your circuits will require accuracy to only one or two millivolts, while others will require accuracy to the sub-microvolt. This difference in system requirements will encourage you to settle for “close-enough” in some systems, and “what else can I squeeze out of this circuit” in other systems.

A second method for achieving accuracy involves an effort to really understand the components and devices with which you are working. In terms of components, a 1kΩ resistor or a 20pF capacitor, or any resistor or capacitor for that matter, is not always equal to the advertised absolute values. For instance, temperature can have a dramatic effect on both of these components. Furthermore, variations exist from device to device out of your bins in the lab. Combined, these two major issues can change the performance of your circuit dramatically, if you don’t take them into consideration.

In terms of devices, you will find that product data sheets have maximum and minimum guaranteed and typical values. The guaranteed values are self-explanatory. Your devices will not exceed these specified values as long as you stay within the conditions of the specification, and you haven’t overstressed your device with higher temperatures or higher voltages.

Typical values in a product data sheet are another matter. There are a variety of ways to determine what these typical values should be. Each manufacturer has their own way and justification for calculating these values. Some manufacturers take the average of a large sample of devices prior to the initial product release. Also, size and characteristics of the sample can vary considerably. For instance, some manufacturers attempt to be very thorough by selecting hundreds of samples from three or more wafer production lots, while others may take a small sample (15 to 30) from one wafer and produce typical values from that group. As you might suspect, the latter will not give a good picture of what the device really does over time.

Beyond sample size, calculating the typical values also can vary. Some manufacturers define their typical values as being equal to one standard deviation, plus the average. Others just take the average and use that as a typical number for their specifications. Some manufacturers use their SPICE simulation as their final guide for typical specification numbers. A word of caution here! Regardless of how the manufacturer determines the typical published value in their specification or data sheet, DO NOT design your circuits around typical specifications. Instead, always work with the minimum and maximum specifications.

The third aspect of accuracy is noise, where you are going to need some understanding of statistical calculations with large samples.

Noise in electronics can be random. If it is a random event over the frequency spectrum, it is void of coherent frequencies. Noise occurs inside all analog devices including passive and active devices. If you sample the noise events in your circuit, they could build a normal distribution over time. If the noise samples fall within a normal distribution, repeated samples differ around a central value. The distribution is roughly symmetric around this central value. The distribution produces a curve with its highest occurrence at the center point, tailing off to zero in both directions. Because this distribution is consistent with the Central Limit Theorem, you can use standard calculations such as Mean and Standard Deviation to predict the general magnitude of future occurrences with respect to the normal curve.

For further information about noise in electronics refer to the comprehensive series of articles posted on www.en-genius.com [1].

Hardware vs. software

There are pragmatic ways of thinking when you embark on the ownership of analog. Think of your hardware designs in terms of learning the fundamentals about your components, knowing the general behavior of your basic building block devices, and always run a high-level evaluation of your circuits first. Note that while circuit board layout issues are important to think about, they are excluded from this article.

Precision in the digital world relates to how accurately you created your code, regarding interactions within the code and with external events such as interrupts.

1. Learn the fundamentals about your components:

For the very simplest of basics you need to know about the fundamentals of resistors, capacitors and inductors. And, if early in your career you were only superficially exposed to these devices, your job is far from done. The question you need to ask yourself here is, “What do I really need to know as an analog design engineer?”

Resistors are simple devices. There are several perspectives to consider when using this type of component in your design. The fundamental way of thinking about a resistor is that it influences voltages and currents in your design. Thevenin’s equation defines this explicitly as:

Where V is voltage
R is resistance in ohms
I is current in amperes

To recall this formula I rely on my elementary geography lesson: Vermont is always over Rhode Island.

This is the first level description of the resistors in your circuit. For practical purposes, this is a DC equation – not AC. If you work past this formula, be concerned about the parasitic characteristics around the resistor. Namely, there is a parasitic capacitor in parallel with the resistive element, and a parasitic inductor in series. These components are artifacts of the physical device. See Figure 1 for a diagram of the resistor with these parasitics.

Figure 1: A typical resistor model illustrated. The parasitic elements of a standard resistor are parallel capacitance (CP) and series inductance (LS).

Truthfully, I never worried about the resistor’s parasitic capacitance until I started designing photodiode-sensing, transimpedance circuits. Figure 2 shows an example of this circuit type. If you blindly build this photo-sensing circuit (without concern for CP), the output can mysteriously sing like a bird (oscillate) without too much effort. This oscillation is usually caused by an inappropriate choice of CF, but it also can be caused by that phantom capacitor, CP. These capacitors, in combination with the photodiode parasitic capacitance and the amplifier’s input capacitance, interact to establish stability – or not.

Figure 2: Ignoring the parasitic capacitance of the feedback resistor can cause a transimpedance photo sensing circuit to become unstable [2].

This circuit example is one place where the resistor’s parasitic capacitance can bite you. You can extrapolate this to other circuits, if you are using small value discrete capacitors in parallel or series with discrete resistors.

The resistor’s parasitic inductance can affect higher speed systems where lower value resistors are the norm. Generally speaking, the impedance of higher value resistors is more affected by the parasitic capacitance. The impedance of low-value resistors is affected by the parasitic inductance. Figure 3 illustrates this point.

Figure 3: The impedance of a resistor changes from the defined DC resistance value to other values over frequency. The parasitic capacitance and impedance influence these changes.

In a DC environment, capacitors act like a “brick wall” to voltages and currents. In your design, consider the operation and impact of capacitors in the time and frequency domain. This formula for the capacitor is one that I frequently use in my designs:


Where C is capacitance in farads
V is change in voltage in volts
t is change in time is seconds

We also know that over frequency, capacitors and resistors are used to generate low-pass and high-pass filters. With the capacitor there is a series of parasitic resistance (RESR) and inductance (LESL). A diagram of these parasitic components is in Figure 4.

Figure 4: A typical ceramic capacitor model illustrated. The standard capacitor’s parasitic elements are parallel resistance (RS), also known as effective series resistance (ESR), and series inductance (LS), also know as effective series impedance.

When you first learn about capacitors, it seems that the capacitor is purely a capacitive element that interacts in the circuit with ideal resistors and ideal inductors. This is not necessarily true. The parasitic resistance and inductance of a capacitor changes the impedance of the basic capacitor over frequency. This behavior is reflected in Figure 5.

Figure 5: The frequency response of a capacitor varies at lower frequencies due the series resistance, and higher frequencies due to the series inductor.

In Figure 5, the capacitor’s series resistor (RESR) causes the capacitor impedance to decrease over frequency. The series inductance (LESL) causes the capacitor impedance to increase at the higher frequencies.

Capacitors are very useful for power supply decoupling, circuit stability, loading low dropout regulators and loading voltage references. However, in all cases, use the capacitors to modify ac frequencies – not DC signals.

2. Know the general behavior of basic building blocks:

Consider these basic circuit cells as the instruction codes in your microcontroller. Start by using them in their most common circuit configurations or the classical approach. In analog your basic building blocks are:

  • Resistors
  • Capacitors
  • Inductors
  • Analog to digital converters and
  • Operational amplifiers

3. Higher level thinking:

Are you afraid of math? Don’t dwell on it at first. Just concentrate on the practical side of analog applications and learn the rules of thumb. Many of us start out by working through the problem before we realize what the bigger issues are. This is a lot like writing the code before working on the program’s state diagram. Once you step back and think about it, you may find that your detailed analysis is way off. If your analysis is correct, it is probably only part of the picture. Here is a perfect example of what I mean:

Problem
What is the corner frequency of the single-pole, low-pass R|C filter shown in Figure 6?

Figure 6: Circuit Example

Answer
“Hand wave” solution: Wait a minute … this isn’t a low-pass filter but a high-pass filter. You probably know this right away from examination, but it’s amazing how many overlook this simple conclusion! If you assume that the author made a mistake and reversed the placement of the resistor and capacitor, the corner frequency would be equal to , or about 167Hz. How did I get there? Isn’t (2) equal to about six? As a first pass, I might accept that error because capacitor device-to-device error is probably 10 or 20% accurate. If you calculate the exact values, the pole is located at 159.1549 Hz.

Calculated solution (with blinders on):

 

From this calculation, there is a zero at DC and a pole at 159.1549 Hz.

These two solutions don’t agree. And I bet a SPICE simulation would match your calculated solution. You can use TINATM [3], the free SPICE software from Texas Instruments to do your simulations. The moral to this story is to think your way through the problem first – then use SPICE to verify your analysis. With this type of analysis, keep in mind the accuracy (or lack thereof) of the various components and devices in your system. After, and only after, you know generally how the circuit works and how the system responds, give your mathematical and SPICE skills a try.

Time (versus frequency)

Digital design strategies flourish in the time domain. Although it may appear the microcontroller or DSP chips create concurrent events, the behind the scenes technique that is used to accomplish this appearance is code multi-tasking.

Alternatively, pure analog design strategies flourish in the frequency domain. Analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) are just a few of the primary devices that straddle the time and frequency domains.

Conclusion

Differences do exist between the analog and digital mind sets. I have often heard that once an analog designer, always an analog designer (and visa versa) – but I think that the tides are changing. It seems to me that all engineers and designers need to go back to the drawing board and master both domains in terms of precision, the reliance on hardware versus software, and time.  

References

TINA is a trademark of DesignSoft, Inc. TINA-TI is a trademark of Texas Instruments and DesignSoft, Inc.

About the Author

Bonnie Baker is a Senior Applications Engineer for Texas Instruments and has been involved with analog and digital designs and systems for over 20 years. In addition to her fascination with circuit design, Bonnie has a drive to share her knowledge and experience. She has written hundreds of articles, design notes, application notes, conference papers and authored “A Baker’s Dozen: Real Analog Solutions for Digital Designers.” Bonnie can be reached at ti_bonniebaker@list.ti.com.

 Share
Digg Reddit Del.icio.us Stumble Upon Facebook Twitter Google BlinkList Technorati Mixx Windows Live Bookmark MySpace Yahoo Bookmarks Diigo


Insert your comment

Author Name(required):

Author Web Site:

Author email address(required):

Comment(required):

Please Introduce Secure Code:





image
image
image