Jun 05
If you are an engineer who regularly works with your hands, you likely troubleshoot on a daily basis. It's just part of the job. Sure, you can say, "I never mess up!", but hardly anyone will believe you. Because even when your best laid plans go perfectly, Murphy's Law will soon kick in to balance things out. We learn to deal with these things and have developed tools and measurement equipment to help us diagnose and deal with these problems: Multimeters, Electrometers, SourceMeters, Oscilloscopes, Network Analyzers, Logic Analyzers, Spectrum Analyzers, Semiconductor Test equipment (ha, guess I know a little about that stuff)...the list goes on and on. But what has struck me lately has been that as parts on printed circuit boards get smaller and smaller, troubleshooting is getting...well....more troubling.
- Package Types -- I don't want to get into another discussion of analog vs digital, but I will say that digital parts on average have many more pins which complicates things. And as the parts get more and more complex, they require more and more pins. The industry solution was to move to a Ball Grid Array package, using tiny solder balls on the bottom of the chip that then line up with a grid of similar sized holes on the board. When you heat up the part the solderballs melt and hold the chip into place and connects all of the signals. The problem is the size of the solderballs and the connecting vias: they're tiny. Like super tiny. Like don't try probing the signals without a microscope and some very small probes. But wait, it's not just the digital parts! The analog parts are getting increasingly small to accommodate any of those now-smaller-but-still-considerably-bigger-than analog parts. You thought probing a digital signal was tough before? Now try measuring something that has more than 2 possible values!
- Board Layers -- As the parts continue on their shrink cycle, the designers using these parts also want to place them closer together (why else would they want them so small?).The circuit board designers route signals down through the different layers of insulating material so that mutiple planes can be used to route isolated signals to different points on the board. So to actually route any signals to the multitude of pins available, more and more board layers are required as the parts get smaller and closer together. Granted, parts are still mounted on either the top or bottom of the board. But if a single signal is routed from underneath a BGA package, down through the fourth layer of an 8 layer board board and then up to another BGA package, the signal will be impossible to see and measure without ripping the board apart.
- High Clocks -- As systems are required to go faster and faster, so are their clocks. Consumers are used to seeing CPU speeds in the GHz range and others using RF devices are used to seeing even higher, into the tens of GHz. The problem arises when considering troubleshooting these high speed components. If you have a 10 GHz digital signal and you expect the waveforms to be in any way square (as opposed to sinusoidal) you need to have spectral data up to the 5th harmonic. In this case, it means you need to see 50 GHz. However, as explained with analog to digital converters in the previous post, you need to sample at twice the highest frequency you are interested in to be able to properly see all of the data. 100 GHz! I'm not saying it's impossible, just that the equipment required to make such a measurement is very pricey (imagine how much more complicated that piece of equipment must be). High speed introduces myriad issues when attempting to troubleshoot non-working products.
- Massive amounts of data -- When working with high speed analog and digital systems there is a good amount of data available. The intelligent system designer will be storing data at some point in the system either for debugging and troubleshooting or for the actual product (as in an embedded system). When dealing with MBs and even GBs of data streaming out of sensors and into memories or out of memories and into PCs, there are a lot of places that can glitch and cause a system failure. With newer systems processing more and more data, it will become increasingly difficult to find out what is causing the error, when it happened and how to fix it.
- Less Pins Available out of Packages -- Even though digital packages are including more and more pins as they get increasingly complex, often times the packages cannot provide enough spare pins to do troubleshooting on a design. As other system components that connect to the original chip also get more intricate (memories, peripherals, etc), they will require more and more connections. The end result is a more powerful device with a higher pin count, but not necessarily more pins available for you the user/developer to use when debugging a design.
- Rework -- Over a long enough time period, the production of printed circuit boards cannot be perfect. The question is what to do with the product once you realize the board you just constructed doesn't work. When parts were large DIP packages or better, socketed (drop in replacements), changing out individual components was not difficult. However, as the parts continue to shrink and boards become increasingly complex to accommodate the higher pin counts, replacing the entire board sometimes becomes the most viable troubleshooting action. Environmentally this is a very poor policy. As a business, this often seems to be a decent method (if the part cost is less expensive than the labor needed to try and replace tiny components) but if and when the failures stack up, the board replacement idea quickly turns sour.
While the future of troubleshooting looks more and more difficult, there have always been solutions and providers that have popped up with new tools to assist in diagnosing and fixing a problem. In fact, much of the test and measurement industry is built around the idea that boards, parts, chips, etc are going to have problems and that there should be tools and methods to quickly find the culprit. Let's look at some of the methods and tools available to designers today:
- DfX -- DfX is the idea of planning for failure modes at the design stage and trying to lessen the risk of those failures happening. If you are designing a soccer ball, you would consider manufacturability of that ball when designing it (making sure the materials used aren't super difficult to mold into a soccer ball), you would consider testability (making sure you can inflate and try out the ball as soon as it comes off the production line) and you would consider reliability (making sure your customers don't return deflated balls 6 months down the line that cannot be repaired and must immediately be replaced). All of these considerations are pertinent to electronics design and the upfront planning can help to solve many of the above listed problems:
- Manufacturability -- Parts that are easy to put onto the board cuts down on problem boards and possibly allows for easier removal and rework in the event of a failure. It becomes a balancing act between utilitizing available space on the board and using chips that are easier to troubleshoot.
- Testability -- Routing important signals to a test pad on the top of a board before a design goes to the board house allows for more visibility into what is actually happening within a system (as opposed to seeing the internal system's effect on the top level pins and outputs).
- Reliability -- In the event you are using parts that cannot easily removed and replaced and you are forced to replace entire boards, you want to make sure your board is less likely to fail. It will save your business money and will ensure customer satisfaction.
- Simulation -- One of the best ways to avoid problems in a design is to simulate beforehand. Simulation can help to see how a design will react to different input, perform under stressful conditions (i.e. high temperature) and in general will help to avoid many of the issues that would require troubleshooting in first place. A warning that cannot be overstated though: simulation is no replacement for the real thing. No matter how many inputs your simulation has and how well your components are modeled, no simulation can perfectly match what will happen in the real world. If you are an analog designer, simulate in SPICE to get the large problems out of the way and to figure out how different inputs will affect your product. Afterward, construct a real test version of your board or circuit and make sure your model fits your real world version. By assuming something will go wrong with the product, you will be better prepared for when it does and will be able to fix it faster.
- Very very steady hands -- Sometimes you have to accept the fact that you messed up and the signal traces on your board and you have to rewire it somehow. My analog chip designing friends needn't worry about trying this...chips do not have the option for re-wiring without completely reworking the silicon pathways that build the chip. In the event you do mess up and have to try and wire a BGA part to a different part of the board or jumper 0201 resistors, make sure you have a skilled technician on hand or you have very steady hands yourself. And in the event you find yourself complaining about how small the job you have to do is, think of the work that Willard Wigan does...and stop complaining.
- On the Chip/Board tools -- Digital devices have the benefit of being stopped and started at almost any point in a program (debug). Without being able to ascertain what the real world output values are though, it doesn't help too much. If in the event you do not Design for Test and actually pull signals you need to probe to the top level then you create a board then there are a few other options. One option is to try and read your memory locations or your processor internals directly by communicating through a debugger interface. But if you are looking at a multitude of signals and want to see exactly how the output pins look when given a certain input there is another valuable tool known as "boundary scan". The chip or processor will accept an interface command through a specified port and then serially shift the values of the pins back out to you. Anytime you ask the chip for the exact state of all the pins, an array of ones and zeros will return which you can then decode to see which signals and pins are high or low.
- Expensive equipment -- As mentioned above when describing an RF system measurement needs, there will always be someone who is willing to sell you the equipment you need or work to create a new solution for you. They will just charge you a ton for it. In cases I have seen where a measurement is really difficult to calculate or you need to debug a very complicated system, the specially made measurement solutions often perform great where you need them, but are severely limited outside of their scope. To use the example from before, if you needed a 100GHz oscilloscope, it is likely whomever is making it for you will deliver a product that can measure 100GHz. But if you wanted that same scope to measure 1 GHz, it would do not perform as well because it had been optimized for your specific task. However, there are exceptions to this and certain pieces of equipment sometimes seem like they can do just about anything.
Debugging is part of the job for engineers. Until you become a perfect designer it is useful to have methods and equipment for quickly figuring out what went wrong in your design. Over time you become better at knowing which signals will be critical in a design and planning on looking at those first, thereby cutting down on the time it takes to debug a product. And as you get more experience you recognize common mistakes and are sure not to design those into the product in the first place.
Do you know of any troubleshooting tools or methods that I've missed? What kinds of troubleshooting do you do on a daily basis? Let me know in the comments!
May 19
Analog. Digital. Continuous. Discrete. Choices abound.
Well, not really.
In reality you will deal with both kinds of signals when working on just about any electronics these days. A simple example is in a switching regulator. These devices are meant to take input power from a wall plug or something providing a relatively constant voltage and then the regulator will ensure that the voltage is always the same when leaving. Internal to the circuit, a "digital" signal (on or off) determines when to let in incoming power go from the input to the output. The "digital" signal translates into an "analog" voltage at the output, hopefully the voltage you programmed.
From there, systems become increasingly complicated, translating real world data to digital format, processing the digital data and spitting it back out again. The guts of the systems have infinite internal combinations and options, but in the end just about every hybrid system looks like this:

The remainder of this post will be devoted to explaining situations that are either contained within the above system or situations that benefit from looking nothing like it; some of these situations mandate analog or digital implementation but more importantly, some are best implemented as analog or digital.
To start, what is the definition of analog? We'll consider it a continuous signal that has infinite bandwidth and complete spectral information. Analog in the context of this site usually refers to the circuitry used to operate on those continuous signals, but we also use the word "analog" interchangeably to describe the signals. Which situations are best suited to using analog components and circuitry?
- Continuous filtering -- Filtering a signal is necessary when it has frequency components included that you do not want. Some filters are digital and are extremely accurate at removing one signal while retaining others (FIR). However, if you are dealing with a continuous signal and you want to filter ALL possible frequency content (and not be limited by the sampling frequency you used when converting to digital), then you need a continuous analog filter. There are many options available that can also help to push your filtering towards accuracies similar to digital filters but they become increasingly complex (multi-pole active filters). The main advantage to an analog filter here is that it is simple, less expensive (usually) and beyond your roll-off frequency you know that all information is being removed (whereas it might still be hidden in a sampled signal).
- Pre-A/D and Post D/A -- Hybrid systems require both analog-to-digital converters and digital-to-analog converters to switch between continuous and discrete data. However, the sampling frequency must be at least twice the frequency of the highest frequency component contained within the signal, as explained by Nyquist's Theorem. In order to ensure that the Nyquist Theorem is fulfilled, you can filter (see above) any signals that are inadvertently included in the original signal so that it does not create noise and artifacts after sampling. Since the signal is not yet digital, you HAVE to filter the signal with an analog filter (convenient, right?). Once you are done operating on a signal digitally and you convert it back to analog, all processing must once again be done with analog components and circuitry (see picture above). I usually think of an iPod after the signal has gone through the DAC. You need to control the gain (volume) and shape the frequency components (tone). Some post DAC activities can be done in the processor, but are often more efficient (read: cheaper) to do in simple analog components after the DAC.
- High power -- While digital measurement and control is possible for high power systems, having a digital signal that switches between 0 and 400V would not be efficient. In either AC or DC systems, analog components are responsible for transforming and transmitting signals (although there may be digital control of those analog components at some point in the system). The continuous nature of power delivery mandates analog components that are well characterized and durable.
- Gain Control/Signal Conditioning -- Say you want to measure the amplitude of a 4000 V signal. You decide that you want to use a computer to do so, so you shove your signal into an A/D converter. But wait, where the heck do you find an A/D converter that can convert a 4000V signal? Sorry, they don't exist (yet). You instead have to condition the signal to fit into a range of 0V to +2.5V, or whatever is the input range of your specific ADC. You can do so with a simple resistive divider (passive, simple) or an inverting amplifier (active, more difficult).
- Control systems -- While digital control systems are possible and are becoming more and more prevalent, analog systems can be simpler. One of the simplest examples is an inverting op-amp configuration. The load of the op amp is the plant, the op amp is the controller and the resistors are the feedback paths to the summing node. There are some delays in the system, but in general, the signal can handle a wide range of frequencies without complicated circuitry and the system can adjust to however the input changes. In a similar digital system, the feedback resistor would be replaced with an ADC, some kind of computing machine (microcontroller) and a DAC to convert the data back to analog to push into the summing node. The system is dependent upon the technology and speed of the components, whereas the analog system is dependent on resistors and the nature of the load (plant). Digital control systems are becoming more popular as DACs and ADCs become faster and more accurate but as of now, analog control systems remain simpler in some of the more common instances.
- Sensors -- These devices are meant to help convert real world information that isn't necessarily electrical, into a format that is recognizable by a computer or embedded system. Oftentimes these are not taking real world (analog) data and directly turning them into digital signals. Instead, the sensor (sometimes known as a transducer) first creates an analog signal that can later be converted. Converse to the high voltage systems, sensors are often very low amplitude and require some signal conditioning to increase the value of the signal to better utilize the full range of an ADC.
- Fidelity/Data loss -- Some people just love analog stuff, especially when it comes to music. Even though audio systems containing ADCs and DACs are making very good analog equivalents these days, you will have to tear the record players and the tube amps out of the hands of the most die hard audiophiles. So instead of converting back and forth between digital and analog media, they prefer to keep the signal continuous all the way throughout the process. Starting from the air pressure variations emitted from Louis Armstrong's trumpet that are then captured by a microphone and then amplified and pressed into a record, then touched by a needle and amplified again by a transistor or tube amp to recreate the sound as it is pushed out of your high end speakers. And even though there are processes to mathematically capture all of the data that is present to sample and perfectly recreate the original signal, some people won't touch the stuff. Since I can't afford the high end equipment audiophiles claim is necessary, I will sit on the sidelines for this argument. However, I enjoy that there is still so much interest in preserving audio fidelity in analog formats and don't mind that it keeps analog engineers employed.
I feel a little silly explaining digital advantages because they seem to be flaunted at every opportunity by media and digital chip makers. Still, let's go over some of the more important places to use digital as opposed to analog.
- Computing -- Again, I know it sounds silly, but digital has emerged as the better way to compute numbers. How did they compute mathematical sums before the advent of the microchip and digital logic? Why, operational amplifiers of course! That is actually where the name comes from, since there are many different possible operations for incoming signals. If you have two incoming signals, one at 2 volts and the other at 1 volt, you can: add them (summing amplifier), subtract them (differential amplifier), integrate them or differentiate them. While this can and still does work quite well on a large signal DC basis, using operational amplifiers in the computing machines today would be a bit unruly. Just to start the power usage and the offsets would pose enough problems to make you run out and buy ADCs, DACs and micro-controllers. If you have a big math problem to do, follow that urge. However, if you do have a simple math operation you need to do on two signals and you don't want the overhead of a digital section, op amps can still do the trick nicely; with their fast reaction and the complete lack of sampling issues you won't miss those ones and zeros for a second.
- Counting -- In analog systems, counting can be a difficult task. Instead, using integrators to "sum up" signals is a way to figure out where you might be in a process. Discretizing a signal and then counting how many times it happens can have many uses in control systems, measurement systems and a range of other applications.
- Memory -- Storing analog signals would be difficult. For even a simple 0-1V signal, you would have to be able to store an infinite number of values. If you have 4 bits to represent the range from 0 to 1 volt, then you instead only need 16 places to store values. In control systems and other places that require memory, the old way to "store" values was to sufficiently delay them and feed them back so as to combine them with a newer signal. Using memory now allows for interesting systems and use of state machines to determine what to calculate or execute next based on current and past input data.
- High noise environments -- If you are trying to transmit an analog walkie-talkie signal (5Vpp sine wave) in a field that happens to have a white noise generator transmitting (2V) at the same frequency you are using, it is likely that whoever is on the receiving end of that signal will also get a good bit of white noise in their signal (think static). If you instead use a digital signal (varying between 0 and 5V) your friend who has a digital transceiver will be able to discern your transmitted highs (5V) and lows (0V) even if they also have noise added to them. Once the digital data is received and decoded, the original signal (5Vpp sine wave) can be reconstructed on the receiving end.
- Signals Transmission - As stated above, there are advantages to transmitting digital signals as opposed to analog. Most notable is the lower power spectral density of the digital signals and that less power is needed to transmit those signals. In current events, we see TV transmission changing from analog to digitla because of the lower power required to transmit the signal and the possibility for multiplexing signals on specific frequencies in order to get more channels transmitted in the allowable spectrum.
- Data storage -- To use the mp3 example again from above, data is best stored in a digital format (easy there audiophiles, records are alright for some people too). True, some information is lost, but only information above the Nyquist Sampling rate. In audio signals, most people cannot hear above 20 kHz, so there isn't too much to worry about beyond that (perhaps the harmonics that some people claim to hear and desire in their recorded works).
- RF -- Digital Signal Processing (or DSP) is one of my favorite digital topics. There are so many cool things you can do with a Radio Frequency (RF) signal once it is sampled and put into a powerful processor. In fact, this process makes your cell phones and Wi-Fi connections possible. FIR filters, CIC filters, baseband shifting and so many other interesting topics make it possible. Hell, maybe some day I'll start "Chris Gammell's DSP Life". Anyway, can't we do this stuff in analog? Well yes, we can. But with RF, it comes down to precision. With the filters listed above, you can trade off processor time/power for a more precise filter. In analog systems, you instead need more and more precise components and increasingly complex systems to achieve similar results. In DSP there is also reconfigurability, either through logic rework (FPGAs) or coding (in DSP chips), so long term investment usually will favor DSP over analog RF solutions. Finally, there is more efficient use of bandwidth with digital systems, so you can shove more data into the same frequency space. All of these things have helped to push the RF areas towards digital processing.
I think one of the most interesting things when reviewing this list is that it's possible to implement solutions in myriad ways. Oftentimes cost and tradition (or past work) determine which way a solution will eventually lean (digital or analog). And although I hope to expand upon it in future posts the most interesting thing to me is that analog and digital begin to merge at the extremes: do analog signals really exist if energy is explainable by quantum mechanics? Will digital signal continue to only have two logical states when there is so much data storage capacity available between 0 and 1?
Please comment on the above lists--right or wrong--and let me know a situation or two that you think benefits from analog or digital.
Dec 19
I was at the gym the other day and glanced over at a fellow gym-goer on their cellphone. I did a triple take as the phone was a flip phone that was maybe 4 inches wide and 5 inches high on each flap of the flip (making a 10 inch phone when completely extended). On my third glance at this monstrosity of a phone I realized it was in fact a Blackberry that he had pulled out of it's case/holder but the case looked like the bottom half of a flip phone. It got me thinking about design longevity.
I think back on the cell phones of the past and recent past and remember how clunky and awkward they were. That was maybe 5 years ago and those phones have long been sitting at the back of peoples' desk drawers or hopefully donated to causes that recycle phones. I am amazed that these phone manufacturers continually get away with phones that will be obsolete in 5 years maximum. Why don't we expect more from our mobile devices (in terms of longevity)? Do we really think your phone will last more than 3 years?
My most recent phone just passed away after 2 years. In my case I MAYBE dropped my phone in a bowl of soup, but I think it just got one of the external speakers; really I think the kiss of death was something a bad battery (which was not contaminated with soup). But even if it lasted another year and THEN died, would I have been upset? I don't think I or most people would be because we have come to expect consumer products to have a shorter life span.
How do we design electronics for the long term? There are a bunch of great examples of electronics that have been built to last:
- Military designs --Aside from the humongous budgets that most contractors have for their military products, the specs on military designs can be equally large in scope. Translation: The military gets high quality products that were expensive but are built to last. These products are often ahead of the technology curve (thanks to the money available), so the technology often goes obsolete later too. The final piece is that the harsh environments encountered by military personnel requires gadgets that are sturdy enough to last for a long time; the ones that function in the field can continue to do so for a long time. A good example would be this emergency radio which was recently torn down by EETimes after an eBay purchase. The 1950s internals reveal high quality workmanship with components that match.
- Space designs -- Although NASA's budget has been cut back since Bush has taken office, this research intensive organization has produced some of the finest inventions for human kind. Not only that, they have a mandate to create equipment that can last for long periods of time. My favorite example is the Voyager 1 satellite, currently exiting our solar system and headed further than any other human instrument has ever been. Not only that, but this advanced spacecraft started taking up close pictures of Jupiter and Saturn before I was even born (first passed Jupiter in 1979). The fact that this machine is still functional, still running tests and still capable of sending back data until 2025 (est.) is mind boggling. Not only that, but the spacecraft has not had the advantage and protection of the earth's ionosphere, so it has been taking much more direct cosmic radiation than normal electronics.
- Power companies -- These terrestrial behemoths don't have to worry about cosmic radiation quite as much as the NASA folks, but they often have materials carrying hundreds of amperes of current over long distances. Unfortunately, these systems are in need of some updating (especially to accommodate new renewable energy resources onto the grid), but once they are built, I'm sure they will hold up. Usually power companies achieve longevity in their equipment by using high quality, high strength materials that are designed with enough overhead to manage higher loads that they expect to see (i.e. A copper wire that is designed to carry 1000A of current, but only carries 600A on a regular basis).
- Nuclear Facilities -- Some of the remnants of the Cold War include the control systems that decided whether missiles would fire or not. These are still some computers operational today in Russia that (we hope) are still making logical decisions. While I don't agree with these computers in the first place, I sure hope they continue to hold up, otherwise it will prove to be a doomsday device. Proper shielding from radiation and free radicals help to prevent aging damage to electronics from fissile material, in addition to starting with high quality, military-grade products.
- Autos -- While the auto industry might be falling on its face currently, the designers in Detroit used to help drive new technologies in many other walks of life. Looking at cars that have lasted since the 50s and beyond, we see examples of simple yet elegant electrical designs that were meant to last. Cars have not always had the GPS systems of today (which I'm guessing will have a much shorter lifespan), but have had electronics powering the wiper blades and the spark plugs for a long time. These systems in vintage cars require some maintenance and the occasional fuse replacement, but on the whole are sturdy enough to continue powering well-cared for vintage vehicles.
So these industrial/military and some commercial applications obviously present the need for longevity in finished products. However, designers need to consider many different parameters of a system in order to produce the best product for the long term.
- Communication protocol -- This item applies most directly to cell phone makers and is a decent excuse for their short life products (but does not excuse everything about them). Unfortunately for phone users (and fortunately for phone makers), wireless protocols are always changing in order to try and achieve the highest bandwidth, usually through higher frequencies or different transmission methods. So once a technology changes for good, older phones become obsolete (and the phone makers happily sell you a new shiny one). This problem also exists when looking to the internals of products; to prevent obsolescence due to outdated protocols, they should be standard to the industry in which the product will be used, simple enough to incorporate into a new standard (and included legacy support) and well documented. Nothing is worse than having a 20 year old device that works fine but can no longer transmit information. An example might be an industrial test fixture on an old computer that only has a 5.25 inch floppy drive. The test fixture might work great, but getting data off that computer is no longer viable so the entire setup is obsolete. A tried and true method for machines to communicate has always been serially and with good reason. While a newer communication protocol might require myriad signals that are not available on an older product, most improvements to a serial signal are often speed (increasing the frequency of the oscillator driving the serial line) or encoding. Since devices can be re-programmed to send a new encoding or you could slow down the device on the receiving end, serial communications seem to be a viable solution for lots of applications.
- Long term drift of components -- Designing for 10's of years often requires attention to detail and deep pockets. The most important first step is to watch for this parameter on a data sheet for any critical component (marked as "long term drift", often given as a percentage change over a specified period). But beware, many vendors simply leave this data off of their spec because they either do not think it is relevant, do not want to display poor data or because they don't know what it means. In any of these situations it is critical to demand this data or to perform testing yourself in order to create lasting products.
- Susceptibility to thermal stress -- Size matters when it comes to handling thermal stress; this is partially why older electronics hold up so well. The smaller components on a device get, the less heat they can dissipate (assuming similar materials in a larger package). A good example would be resistors. A 0603 resistor (.6mm x .3mm) can only dissipate 1/10 of a watt while a standard through-hole component can dissipate 1/4 watt on average. This is a trade-off that must be made in any system designed for portability, but could result in lower product lifetime (especially in high heat or high current situations).
- Standard packaging -- The chip industry is a highly competitive environment where silicon designs are always being touted as the next best thing. Unfortunately for older products, this can often mean that components such as op-amps or a buck converter will no longer be produced. It's a symptom of being in a dynamic industry and has to be dealt with. The best way to combat obsolescence is to create projects that have standards designed in to them. Thinking about creating a great new analog circuit with a non-standard pin-out in a device package that is so obscure that you have trouble finding it in catalogs? Why not try making some other compromises on your circuit board and squeezing in a proven SOIC-8 with a pin-out similar to 4 other op-amps. You'll be happy you do in about 4 years when that op-amp you're using goes obsolete.
There are probably other ways to help design a product with a long life span, but these are a good start. A common theme is to pay more for higher quality components, which might not be preferred in certain situations. However, designing products for the long term can help save money year after year by not having to replace products or maintain sold products so spending a little more up front could pay off in the end. Some newer consumer electronics industries create new products each year either to drive demand or to fulfill needs after older devices break (which they may have produced). In the process, they try to drive cost down by using the cheapest parts available; this can cause failures and unhappy customers. To design a long term product, costs and long term design considerations must be balanced.
What's the longest period you've ever had a piece of functioning electronics? What kinds of changes did you see over the years? Have you ever created a low cost design that lasted more than 5 years? Let me know in the comments.
Dec 16
Products today mostly use Printed Circuit Boards (or PCBs) to successfully route signals from one component in a circuit to the next. There are multiple layer circuit boards with printed metal "wires" that run between the various elements in a circuit. However, this was not always the case. In the good ol' days, there were different variations and precursors to the PCB. Some of these included point to point wiring (just soldering a wire between say a resistor and a capacitor), wire wrap boards (think of a point-to-point board on a grid with more wires than you'd know what to do with), acid etched copper on dielectric (think of a 1 layer PCB with very large and rounded signal traces) and many others. These kinds of boards had many many different methods but also had less restrictions than modern designs. In fact, Paul Rako from EDN recently wrote a great article on prototyping using some of these older methods. He references many techniques of the greats like Bob Pease and Jim Williams and their rapid prototyping techniques. It's an information rich article and I would highly suggest checking it out. OK, back to the party.
So what has changed when moving from older boards and circuit designs to newer circuit boards?
- Speed -- There' s no denying that the boards of today are faster than those of yesteryear. The extremes are apparent in the RF industry which is/was doing well because of the cell phone becoming the hottest platform to develop for (PCs are still around of course but the excitement is in the cell phone industry). When frequencies get into the GHz range and you're trying to guide signals instead of wire them, you know that your boards will be finicky. Additionally, the speed increase is not limited to the RF industry as many new designs have at least some component of a clocked digital system on them. Even pushing into the MHz range can be difficult with older board techniques. Wiring point to point is not as viable with high speed signals, especially when you have upwards of 32 wires between two components (a data line).
- Size/Type of components - This is another symptom of newer industries. As products go increasingly mobile, parts begin to shrink out of necessity or because the cost of making the older, larger parts becomes prohibitive. As such, the boards have made a large change going from through-hole components (like the capacitors in the picture at the top of this site), to Surface Mount Technology. This has affected the construction of final boards (SMT usually requires machine placement for quick and reliable boards). This also means that the amount of power a board containing only SMT parts can absorb (when the board is considered as one entity) is reduced as the smaller SMT parts cannot handle as much current without blowing up.
- Number of connections -- I've included a picture of wire wrap from the Wikimedia commons site below. Notice anything about it? It's ridiculous! And I would encourage you to go to the Wikipedia page and look into some of the other types of wire wrapped boards. Now let's look at a common package today, the Ball Grid Array (BGA). This type of package uses little solderballs on the bottom of the package to adhere to the board. It is glued on at first and when you reflow (heat up to make the solder melt), the balls fall into place on whatever PCB you have produced (assuming you have made the PCB correctly). BGAs start around 144 pins (maybe 196?) I believe and go to upwards of 1000 pins per part. Can you imagine trying to hook up 1000 wires like below? I don't think so.
.jpg)
- RoHS -- Lead is bad for the environment, for your health and for any children who decide to ingest it. In fact, the only people who speak the wonders of lead these days are cranky analog engineers such as myself, trying to solder something (I'm a 6 out of 10 on the cranky scale). Why do we love lead? Because Lead-Tin (Pb-Sn) solder is much easier to work with due to the lower melting temperature and higher thermal capacity. So as RoHS becomes more widespread, with the Silver-Tin (Ag-Sn) solder that is more difficult to work with, it become another element of board design that must change.
So obviously some stuff has changed. Some is for the better, some not so much. Let's look at board problems encountered in modern day printed circuit boards in order to see the problems encountered as circuit boards have become more inexpensive and repeatably made:
- Capacitance in the board -- Printed circuit boards are constructed from a non-conducting material so that signals do not leak from one lead to another. However, in constructing the perfect insulator, they also created a material with a significant (but not huge) dielectric constant. This means if two signals are routed over top of one another (acting like plates), then the sandwich of the signal and the dielectric will act like a capacitor. Not only that, but as you increase the frequency of a signal (with speeds upwards of GHz), the capacitor looks more and more like a shorted wire! This phenomenon is known as "cross-talk" and can affect myriad high-speed or high voltage situations.
- Inductance in the leads of a chip -- Before the BGAs mentioned in point 3 above, there were packages (usually square) with leads coming out the sides known as Quad Flat Packs (QFPs). The leads coming out of them vary in thickness, but usually get thinner as there are more leads on a chip. As the leads get thinner and longer, the inductance of those leads goes up. We remember that inductors are the "opposite" of capacitors in that they allow low frequency signals to pass and block high frequency signals. In a system that is mostly high frequency signals (think digital), the inductance of the leads can have a serious affect on how well a signal propogates from one element on a circuit board to the next. BGAs have started to reduce this problem, but the cost of dealing with BGAs can be quite prohibitive for smaller operations.
- Timing -- In a high speed system that requires signals to depart a component at a certain time and arrive at a different component a short (predictable) while later, there are many things that can prevent the signal from arriving undisturbed. We've already seen the capacitive and the inductive effects mentioned above, but what about resistance? Although everything has some amount of resistance, the lines in a board routing one component to the next can have an affect on the overall performance of a circuit. If one of these lines is longer than another than there will be a noticeable difference in the resistance of that line. Most importantly, when comparing the impedance (sum of the resistance and the frequency dependance of the impendance and capacitance) of two different lines going between components (say a processor and a RAM chip), differences can cause the signals to arrive at different times in different conditions. The rise times, the fall times, the over shoot, the under shoot, and the general shape of a signal can all be affected by the characterisitcs of the connection. It is useful to remember that every connection really acts like an RLC filter circuit, the only difference being how much resistance, inductance and capacitance are present and how they will affect the final signal.
- Ground/Power Plane -- Other advantages a circuit board brings, especially multilayer circuit boards, is the ability to route a plane of power or a grounding plane underneath a portion of a design. If we think of a PCB as a large sandwich, the grounding plane would be like a slice of cheese, running underneath many of the different components of a circuit but not necessarily connected to them. If you design a circuit to have "vias" then an example component on the very top of a circuit board can connect down to the plane and access the power, ground or whatever signal happens to be running underneath there. This technique can be quite useful if you have many different op-amps in a certain area that will require positive and negative power supplies. Or if you have a large connector that requires a majority of pins to be grounded, a grounding plane can be useful to quickly connect many signals to the same net. However, as with any system, there are real-world consequences to deal with; in this case, we have to deal with electrons acting like electrons. With grounding planes, all of the pins on a board that are tied to ground will technically be at ground, however if one pin happens to have a large current going into the ground, then that area might have a slightly higher potential (voltage) than other ares of the grounding plane. This could have some definite effects in sensitive electronic situations and should be considered when designing a new PCB.
- Heat/Warping -- A major downside to PCBs is the rigidity of the material; worse, when it heats up, it can often warp and become unusable. This could also be a problem in acid etched and wire wrap boards (the warping), but since the connections are often either larger traces or wires, the chances that the warping would break the connection are lower. Worse yet, the example above (dumping current into a ground plane) can create its own heat and warp a board without even being in a heated environment. Thermal budgets become important in any new PCB design and you should be mindful of them. Some SPICE programs even allow you to check out what the heat/power dissipation will be before putting the components on a board.
- Low Power -- Unfortunately for high power circuit manufacturers, PCBs require extra care when they contain high voltages or high currents. Newer boards are often optimized for power savings, so high power situations are not as much of a priority for the tools that create PCBs. There are often constraints in the layout programs to ensure proper safety requirements, but other steps might be necessary, like separating high power lines from one another so they do not spark or create noise on other lower power lines.
Printed circuit boards allow for reliable products that can quickly be deployed to customers or used in a lab situation to test new circuit configurations. As long as you are mindful of the pitfalls of PCBs listed above, you can create circuit designs that can do just about anything imaginable. If you have any suggestions on how to create better PCBs or circuits in general, please leave your thoughts in the comments.
Oct 10
I was going to call this post "A portrait of an electrical engineer as a young man (or woman)" but decided against it. I've got nothing on James Joyce, neither in loquaciousness nor confusing writing.
Anyway, I have been pondering what kind of employee I would hire out of school for an electrical engineering position. There are some basic skill sets that will allow just about any young engineer to succeed if they have these skills (the best situation) or at least appear they will succeed if written on their resume (not the best situation). Either way, let's look over what a new grad should have on their utility belt before going out into the scary real world.
- Conceptual models of passive components -- This has been one of the most helpful things I have learned since I have left school...because this kind of thinking is not taught in classrooms (at least it isn't in the curriculum). The idea is to conceptualize what a component will do, as opposed to what the math is behind a certain component or why the physics of material in a component give it certain properties. Why does this matter? When you're looking at a 20 page schematic of something you've never seen before, you don't care what kind of dielectric is in a capacitor and how the electric field affects the impedance. Nope, you care about two things: What is the value and how does it affect the system. The first question is easy because it should be written right next to the symbolic notation. The second is different for each type of passive component you might encounter. Let's look at the common ones
- Resistors -- The best way I've found to think of resistors is like a pipe. The electrons are like water. The resistance is the opposite of how wide the pipe is (if the resistance is higher, the pipe is smaller, letting fewer electrons through in the form of current). Also, the pressure (voltage) it takes to get water (electrons, current) through a pipe (resistor) will depend on the thickness of the pipe (resistance). Well whaddaya know? V=IR!
- Capacitors -- At DC, a capacitor is essentially an open circuit (think a broken wire). If you apply charge long enough (depending on the capacitance), it can consume some of that charge; after it is charged it will once again act like an open circuit. When considering AC (varying) signals, the best way to think about a capacitor is like a variable resistor. The thing controlling how much the capacitor will resist the circuit is the frequency of the signal trying to get through the capacitor. As the frequency of the signal goes up, the resistance (here it is called "impedance") will go down. So in the extreme case, if the frequency is super high, the capacitor will appear as though it is not there to the signal (and it will "pass right through"). Taking the opposite approach helps explain the DC case. If the signal is varying so slowly that it appears to be constant (DC), then the impedance of the capacitor will be very high (so high it appears to be a broken wire to the signal).
- Inductors -- Inductors have an opposite effect as capacitors and provide some very interesting effects when you combine them in a circuit with capacitors. In their most basic form, inductors are wires that can be formed into myriad shape but are most often seen as spirals. Inductors are "happy" when low frequency signals go through them; this means that the impedance is low at low frequencies (DC) and is high at high frequencies (AC). This makes sense to me because if the signal is going slow enough, it's really just passing through a wire, albeit a twisty one. An interesting thing about electrons going through a wire is that when they do, they also product tiny magnetic fields around the wire (as explained by Maxwell's Equations). When a high frequency signal tries to go through the inductor, the magnetic fields are changing very rapidly, something they intrinsically do not want. Instead it "slows" the electrons, or really increases the impedance. This "stops" higher frequency signals from passing through depending on the inductance of the inductor and the frequency of the signal applied. Looking at the how they react to different frequencies, we can see how inductors and capacitors have opposite effects at the extremes.
- Diodes -- I think of diodes as a one way mirror...except you can't see through the one way until you get enough energy. The one way nature is useful in blocking unwanted signals, routing signals away from sensitive nodes and even limiting what part of a varying signal will "get through" the diode to the other side.
- Transistors -- I always like thinking of transistors as a variable resistor that is controlled by the gate voltage. The variable resistor doesn't kick in until the gate voltage hits a certain threshold and sometimes the variable resistor also allows some energy to leak to one of the other terminals.
- C coding -- Sorry to all you analog purists out there, but at some point as an engineer, you need to know how to code. Furthermore, if you're going to learn how to code, my personal preference for languages to start with is C. Not too many other languages have been around for as long nor are they as closely tied to hardware (C is good for writing low level drivers that interpret what circuits are saying so they can talk to computers). I'm not saying higher level languages don't have their place, but I think that C is a much better place to start because many other languages (C++, JAVA, Verilog, etc) have similar structure and can quickly be learned if you know C. Even though the learning curve is higher for C, I think it is worth it in the end and would love to see some college programs migrate back towards these kinds of languages, especially as embedded systems seem to be everywhere these days.
- How an op amp works -- I set the op amp apart from the passives because it is an active component (duh) and because I think that it's so much more versatile that it's important to set it apart conceptually. I've always had the most luck anthropomorphizing op amps and figuring out what state they "want" to be in. Combining how you conceptually think about op amps and passives together can help to conceptualize more difficult components, such as active filters and analog to digital converters.
- The ability to translate an example -- A skill that nearly every engineering class is teaching, with good reason. Ask yourself: are homework problems ever THAT much different from the examples in the book? No. Because they want you to recognize a technique or a idiosyncrasy in a problem, look at the accepted solution and then apply it to your current situation. Amazingly, this is one of the most useful skills learned in the classroom. Everyday engineering involves using example solutions from vendors, research done in white papers/publications and using even your old textbooks to find the most effective, and more importantly, the quickest solution to a problem.
- High level system design -- This is similar to the first point, but the important skill here is viewing the entire picture. If you are concentrating on the gain of a single amplification stage, you may not notice that it is being used to scale a signal before it goes into an analog-to-digital converter. If you see a component or a node is grounded periodically, but ignore it, you may find out that it changes the entire nature of a circuit. The ability to separate the minutiae from the overarching purpose of a circuit is necessary to quickly diagnose circuits for repair or replication in design.
- Basic laws -- It is amazing to me how much depth is needed in electrical engineering as opposed to breadth. You don't need to know all of the equations in the back of your textbook. You need to know 5-10; but you need to know them so well that you could recite them and derive other things from them in your sleep. A good example would be Kirchoff's laws. Sure, they are two (relatively) simple laws about the currents in a node and the voltage around a loop, but done millions of times and you have a fun little program called SPICE.
- Budgeting -- There are many important budgets to consider when designing a new project. In a simple op amp circuit, there are many sources of error and inefficiencies. Determining and optimizing an error budget will ensure the most accurate output possible. Finding and determining areas that burn power unnecessarily must be discovered and then power saving techniques must be implemented. The cost is another consideration that is usually left to non-engineering, but is an important consideration in many different projects. Finding cost effective solutions to a problem (including the cost of an engineer's time) is a skill that will make you friends in management and will help you find practical solutions to many problems.
- Math -- Ah yes, an oldy but goody. Similar to the passive components, having a conceptual notion of what math is required and how it can be applied to real life situation is more important than the details. Often knowing that an integral function is needed is as important as knowing how to do it. And similar to the basic laws, you don't need to know the most exotic types of math out there. I have encountered very few situations where I need to take the third derivative of a complicated natural log function; however, I have needed to convert units every single day I have been an engineer. I have needed simple arithmetic, but I've needed to do it quickly and correctly. Sure, you get to use a calculator in the real world, but you better learn how to use that quickly too, because your customers don't want to wait for you to get out your calculator, let alone learn how it works.
Each of these skills could be useful in some capacity for a new electrical engineer grad. There are many different flavors of engineering and the skills listed above are really modeled off what would be good for an analog system engineer (who develop commercial or industrial products). However, a future chip designer and even a digital hardware engineer all could benefit from having the skills listed, as it is sometimes more important to be open to new opportunities (especially given the possibility of recession and potential shifting of job markets).
Did I miss anything? Do you think there are other skills that are necessary for young electrical engineers? What about general skills that could apply to all young engineers?