Cleanly Elegant? Overfeatured? Too Expensive? Is a General-Purpose Analog Front-End Practical?
Most engineers with a few years experience have encountered "feature creep"–the tendency to keep adding extra features onto a piece of equipment so the original product becomes more complicated and more difficult to use. Meanwhile, there is also a real danger that we will burden every customer with the cost of things/features that only a small percentage of them need or want. This is exactly the problem with a general-purpose analog front-end (AFE).
How about a fanciful example? Suppose that Figure 1 was a recreational vehicle with all the comforts of home neatly packed inside. It might be very practical...then again, maybe not. Just because we shower and use bath tubs does not mean that we would use one on the top of a car. This is feature creep, and some projects can get out of hand and need to be reined in.
Figure 1. A car with silly features that make sense in a home, but not on the outside of a car. This is just not practical.
Now, turn back to our main subject, the AFE. An AFE connects our analog world to a digital processor so decisions can be made. A first reaction might be, "let's make a universal AFE," a design that works for every application. As we start, reality sets in. The list of sensors, voltage-limiting devices, current-limiting devices, risetime reducers, and many other devices (Table 1) to accommodate gets really long, really fast. So, how can a general-purpose AFE really be elegant? Can it have too many features? Then be too expensive? We think so.
But first let's discuss a successful generalist, the human body, and then relate some human sensing concepts to the AFE machine.
How Do We Sense Analog?
Figure 2. The most common human senses are sight, hearing, smell, taste, and touch.
What does "universal" or "general" really mean? "One size fits all." This is easy to say and we have all seen it written somewhere before. But in reality, it is extremely hard to do effectively. In clothing "one size fits all" really means that one size fits the majority. The fit may not be optimum or the best that could be made, but it should work... more or less.
The human body is a generalist compared to the individual sensory strengths of other animals. We have what are commonly considered the five senses that interface to our analog world: sight, hearing, smell, taste, and touch (Figure 2). Our marvelous brain makes sense of it all. People generally do these things well, but certain animals excel in specific senses. For example, an eagle has exceptional vision and flying high above, it can see a mouse, swoop down, keep the mouse in focus, and then attack. For hearing, a barn owl can detect, fly, and catch the mouse in absolute darkness. We have long used a dog's sense of smell to find people and detect drugs and explosives. A catfish has almost twice the taste buds as humans and uses them to find food in murky water and detect poisons.1 For touch,
A cat's whiskers are incredibly sensitive and help it judge size and distance incredibly accurately. But a seal's whiskers possess more nerve fibres per hair and are perhaps the most finely tuned whiskers in the animal kingdom. Using them, seals can track fish swimming 180 metres (591feet) away in even the murkiest of water.2
Gorillas have tremendous upper body strength; elephants move trees; birds fly and navigate using the earth's magnetic field and ultraviolet light; cheetahs run 60 miles per hour (97 kilometers per hour ); and squirrels balance on tiny branches. The point is that humans generally do many things well; however, there are animals that use a specific sense far better. Remember too that even our human bodies use different organs for each sense. For example, an ear does not make a good eye. In these cases, "One size–one analog sense–fits all" is hardly true.
The Problem of Analog in a Digital Engineer's World
For the last few years many schools have taught digital computer science to engineering students, but addressed very little analog engineering. Consequently, it is not unusual to find a small company with many digital and computer engineers, but no one with analog engineering knowledge. Faced with critical projects and the lack of analog expertise, some managers may think: "The project is mostly digital. Only a few percent is analog and it is in the front-end. I'll just assign someone to pick up the analog." Now the digital engineer has to scramble to develop new expertise. Many AFE reference designs are available, but they tend to be very application specific. In practice, the general-purpose AFEs do not usually help much. Thus, the digital engineer needs a bridge, an easy way to ensure that s/he has considered all of the potential analog errors and circuit difficulties. The engineer needs more useful reference tools. See Sidebar: Reference Books Assist with AFE Design for more information on new reference books.
Difficulties of a General-Purpose AFE Design
What about a machine's interface to the analog world? Is a general–purpose AFE better than one specific to an application? No. Experience tells us that "one size," a general AFE design, does not fit all because of the large range of applications and their different requirements. In fact the universal, all-purpose AFE would quickly become cumbersome, complicated, unaffordable, and eventually inadequate. Instead, an application-specific front-end is technically better and more affordable for designs. Ultimately, a designer must really know the application.
We start with an outline of a basic, typical AFE in its simplest form (Figure 3). This design appears straightforward, but what it lacks is what makes it problematic and cumbersome.
Figure 3.The simplest, typical general-purpose AFE interface to our analog world.
What can we do with Figure 3 to optimize AFE performance? Everything and not much. Until we define what we are going to sense and until we really understand the end application, we cannot optimize this basic design for a specific application. The operational amplifier (op amp) before the analog-to-digital converter (ADC) suggests many possible functions, including gain, impedance conversion, electrostatic discharge (ESD) protection, filtering for Nyquist, and protection from radio frequencies (RF). 3
We need to anticipate the majority of ESD, electromagnetic interference (EMI), and radio frequency interference (RFI) vulnerabilities in the application. The simple interface circuit in Figure 4 demonstrates the 80% of commonality in a circuit and where to anticipate the 20% of optimized design.4
Figure 4. The 20%/80% interface circuit, which can be applied to both input and output points.
In addition, the simple op amp of Figure 3 may need to be multiple op amps configured as an instrument amplifier to handle differential signals with large common-mode components. It may need to handle 2mV to 100V full-scale. Perhaps the op amp should become an 8-pole lowpass filter with an input impedance of less than 1Ω or higher than 100kΩ. Unfortunately, until we know the application we do not know what is needed.
Now let's consider input circuit protection. Figure 4 is a cookbook of ideas about what might be needed without knowing the specific application. We can group the ESD, EMI, EMS, and RFI devices in three categories:
- Voltage-limiting devices: gas discharge arrestors, metal oxide varistors, suppressor diodes, triacs, diacs, and switches
- Current-limiting devices: fuses, circuit breakers, and thermal cutouts
- Risetime reducers: resistors, inductors, coils, ferrite beads, and capacitors, all of which slow the rise time of a transient and thereby allow other protection devices time to function.
In fact, the application can measure a myriad number of factors, summarized in Table 1, and each factor influences how we optimize the AFE.Table 1. Physical Analog Properties Measured and Converted to Digital Signals for Processing
|ACCELERATION||DISSOLVED OXYGEN||ION CONCENTRATION||POSITION||TIME|
|Acoustics/sound||Distance||Gravity||Power||Time of flight|
|Angle||Energy||Light visible, IR, UV||Pressure||Torque|
|Biological samples||Flow||Location||Radiation, forms||Velocity|
|Charge (electrons)||Frequency||Magnetic fields||Resistance||Viscosity|
|Chemicals and gases||Friction||Mass||Resolution||Voltage|
|Current||Impedance||Ph||State of charge (SOC)||Water purity|
There are more considerations for your application-specific AFE. Remember that the savvy engineer knows the application well. Is there a radio (RF) transmitter nearby? Does the security guard have a 1W or higher power walkie-talkie? Many large seemingly random system errors occur if the inputs are not protected from unwanted RF interference. A sensor that is 2 inches away and another sensor hundreds of feet away need to be protected differently.5 For example, a temperature sensor on the same board is not likely to pick up large amounts of RF interference; however, hundreds of feet of wire make a good antenna. Good practice would place a lowpass filter on this input. One might be tempted to say that the radio signals are far above my Nyquist filter, so my Nyquist filter is adequate. Therefore, because the Nyquist filter generally requires a steep cutoff, inexpensive active op-amp filters are satisfactory. The danger here is that the RF signal is demodulated and downconverted by the ESD or other semiconductors before the Nyquist filter has a chance to act on the signal. The use of a simple RC or LC filter on the input before the first diode or transistor prevents this.6
So what can we do now? We can add circuits and blocks to adapt a general-purpose AFE for a specific application. Start with a few things that we measure, and some pitfalls to avoid. Our systems need to be built like large buildings–they need a good firm foundation. That foundation is clean power and ground, without which the system does not function at full efficiency. One trap that inexperienced engineers encounter is a too simple schematic notation for power and ground (Figure 5).
Figure 5. Four sheets from a typical system schematic for power and ground. Unspecific directions for routing the power and grounds lead to confusion during layout and manufacture and, quite likely, poor performance.
First, we realize that a schematic is an electrical diagram without regard to the physical layout of the printed circuit board (PCB). That said, the PC layout person must have more information than the basic information found in Figure 3 to ensure that power and ground work together.7 There is nothing wrong with having multiple schematic sheets (A, B, C, D above) and tying them together with net names. Several things can make this appear confusing on the schematic. Thus, we see four symbols for ground that must be explicitly described with their connection to a star ground point defined.
Starting with sheet A, the digital sheet, there are two ground symbols without explanation; a digital voltage is supplied in most devices. Because the power decoupling capacitors8 are found on sheet B, their relationship to the logic devices is unknown. The FPGA or microprocessor would typically have multiple power connections, but we have only shown one at this point. On sheet B, the relationship between the 24V as the power-supply input to the analog and digital power supplies is unknown. Is this the same 24V supplying the voltage to the motor on sheet D? On sheet C there are four grounds: an analog ground, an unknown ground on a connector, and one analog and one digital ground on the ADC. The ADC data sheet should be consulted for the proper way to attach those two grounds.9 On sheet D the predriver has analog power and an unknown ground, whereas the driver and motor have 24V and a different ground. All of this power and ground confusion can be cleared up with a good system map that specifies the interaction among the powers and grounds.
Another critical variable in a system application is the quality of the powerline. The long lines provide an opportunity for large power spikes from radio waves to ride along with the desired AC voltage. The first mode of defense is a lowpass common-mode AC power input filter.10 The next considerations are how do power spikes affect the switching power supply, and how much of the spike is rejected? Even if the power spikes are rejected, there are still two critical considerations: how much rejection is there, and will the output ripple of the switcher change as a result of the input changes? Does the output inductance, capacitance, and other filtering control the input spike error? If the switcher is followed by a low-dropout linear regulator (LDO), does that regulator pass the report spikes or is it decoupled so that these errors have no effect? None of these considerations are addressed by the general-purpose AFE.
Are there any standards or regulations with which the system must comply? Many modern industries have these in some form. Quick examples include G3-PLC for the smart grid deployment and an Emerson Process Management white paper which explains the application of standards in a chemical plant.11 Early in the design process, any regulations and standards must be known so you can make the proper component choices. Trying to change a nonconforming circuit after its introduction to the marketplace always causes engineering and manufacturing headaches.
Now what about data conversion? Signal processing? Data isolation? There are so many different functions operating in an application-specific AFE that many books have been written on the subject. Rather than drone on about topics already covered in reference materials, we will just stop here. We reiterate that a design engineer must know the application and recognize the many considerations in designing an AFE. A general-purpose AFE is useful as a starting point for a digital engineer, along with the additional knowledge about how to customize it for an application.
Finally, we want to highlight some good references on AFE design,12 including the new MAKE IT EASY ebooks to foster ideas and simplify the process. See the Sidebar: Reference Books Assist with AFE Design.References
- Melina, Remy, Life's Little Mysteries Staff Writer, "What Animal Has the Best Sense of Taste?" livescience, January 31, 2011, http://www.livescience.com/32970-what-animal-has-the-best-sense-of-taste.html. See also "Animals with the best sense of taste in the world," LargestFastestSmartest, Mar 30, 2012, http://largestfastestsmartest.co.uk/animals-with-the-best-sense-of-taste-in-the-world/.
- "Animals with the best sense of touch in the world," LargestFastestSmartest, Mar 30, 2012, http://largestfastestsmartest.co.uk/animals-with-the-best-sense-of-touch-in-the-world/.
- Several free calculators are available and may help users to understand the signal-chain AFE parameters and product data sheets. See Maxim Integrated's ebook, MAKE IT EASY, Signal Chain Calculators, Vol. 1. Chapters are "ADC/DAC Accuracy Calculator," "Effective Number of Bits Calculator ENOB," Thermal Noise Calculator," and more, http://www.maximintegrated.com/en/ebooks/Signal_Chain_Calculators.
- Maxim Integrated's ebook, MAKE IT EASY, Analog Power & Ground, Vol. 1, http://www.maximintegrated.com/en/ebooks/Power_and_Ground_Vol1.
- Maxim Integrated's ebook, MAKE IT EASY, Analog Power & Ground, Vol. 1, chapters on "Additional ESD, EMI, EMS, and RFI protection devices, "and "Discussion of individual protection devices and free simulation tools," http://www.maximintegrated.com/en/ebooks/Power_and_Ground_Vol1.
- Maxim Integrated's ebook, MAKE IT EASY, Analog Front End, RFI, EMI & ESD, Vol. 1, chapters on "How RF is demodulated inside ICs," http://www.maximintegrated.com/en/ebooks/Analog_Front_End_RFI_EMI_ESD.
- Maxim Integrated's ebook, "MAKE IT EASY, Analog Power & Grounds, Vol. 1 chapter on"The Importance of the Ground Plane and power planes," http://www.maximintegrated.com/en/ebooks/Power_and_Ground_Vol1.
- Maxim Integrated's ebook MAKE IT EASY, Analog Power and Ground, Vol. 1, chapter on "Temperature and Voltage Variation of Ceramic Capacitors, or Why Your 4.7µF Capacitor Becomes a 0.33µF Capacitor," http://www.maximintegrated.com/en/ebooks/Power_and_Ground_Vol1.
- As a side note, not all analog power and grounds are equal. Some sections can be more noise sensitive than others in the analog circuitry. For example, the voltage reference and ADC may benefit from having a separate analog power and ground. (Setting an error budget for a data converter and voltage reference together is a good practice.) See Maxim Integrated tutorial 4300, "Calculating the Error Budget in Precision Digital-to-Analog Converter (DAC) Applications," http://pdfserv.maximintegrated.com/en/an/AN4300.pdf.
- Maxim Integrated's ebook, MAKE IT EASY, Analog Front End, RFI, EMI, ESD, Vol. 1, for Powerline conducted emissions filter, http://www.maximintegrated.com/en/ebooks/Analog_Front_End_RFI_EMI_ESD.
- See "Need for Industry Standard," by G3-PLC Alliance, at http://www.g3-plc.com/content/need-industry-standard. Also March 2007 white paper, "NAMUR [a standards organization for chemical plants] and Emerson's DeltaV system's application of NAMUR's guidelines." © Emerson Process Management. 1996–2007, http://www2.emersonprocess.com/siteadmincenter/PM%20DeltaV%20Documents/Whitepaper .
- Ott, Henry W., Electromagnetic Compatibility Engineering, ©2009 by John Wiley & Sons, Inc., ISBN 978-0-470-18930-6. Ott’s work is an essential reference for cabling, grounding, filtering, shielding, grounding and Mixed-signal PCB layout, RF immunity and ESD.
See also The ARRL Handbook For Radio Communications, 2013, ©2012, Publisher: The American Radio Relay League, Inc.; ISBN: 978-0-87259-419-7, (Updated annually). The ARRL Handbook is a must-have for hobbyists and technical professionals. It starts with the fundamentals of radio electronics. Its practical applications and solutions cover circuit and antenna design, computer-aided design, equipment troubleshooting, and reducing RF interference.
Also the ARRL RFI Book, Practical Cures For Radio Frequency Interference, ©1998-1999, Publisher: The American Radio Relay League, Inc.; ISBN:0-87259-283-4, This reference provides practical methods to help consumer devices and any neighbors manage the volatile situations caused when electronics do not play together well.
Sidebar: Reference Books Assist with AFE Design
There are now free MAKE IT EASY eBooks to assist with AFE design. The eBooks answer frequently asked questions (FAQs) and compile application notes on common design themes. We hope that you find them useful.
MAKE IT EASY, Analog Front END, RFI, EMI & ESD, Vol. 1
Radio frequency interference (RFI) issues
Radio frequency (RF), electromagnetic interference (EMI)
Why RF goes straight through low-dropout linear regulators
ESD (electrostatic discharge) is no joke
Circuit interface protection ideas
Why digital circuits generate noise
Help ADC and DAC signal-to-noise (SNR) ratio
MAKE IT EASY, Signal Chain Calculators, Vol. 1
(The calculators below are for use with an HP® 50g calculator or free PC emulator.)
ADC/DAC accuracy calculator
Effective number-of-bits calculator ENOB
Thermal noise calculator
Bandgap reference calculator
Statistical process control calculator
Settling time calculator
Package thermal analysis calculator
MAKE IT EASY, Analog Power & Grounds, Vol. 1
Ground is just a "reference point" independent of any connection to earth ground
Why digital circuits ARE compromised by ground and power noise
Why many decoupling capacitors of differing values are needed over the operating frequency
The Importance of the ground plane and power planes
Identifying and separating good from noisy bad electrons, using a ground star point
Building fences to corral electrons and reduce fraternization of clean and noisy electrons
ESD, EMI, EMS, and RFI protection devices
Discussion of individual protection devices and free simulation tools
Capacitors value shrinks with increase in voltage
Free software tools to track capacitance change with voltage
Remote calibration of a power supply, overcoming component tolerances