Analog Electronics Digital Electronics Engineering

When To Use Analog Vs. Digital

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?

  1. 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).
  2. 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.
  3. 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.
  4. 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).
  5. 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.
  6. 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.
  7. 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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).
  7. 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.

Analog Electronics Learning Life Work

What is an engineer?

I’ve been having what some would call an identity crisis. How, you ask? I’ve been working on digital electronics.


I found out that in the early 90s and even earlier, analog engineers routinely switched from working in the analog domain to the digital domain…because it was paying really great. Not only that, most analog engineers had the expertise to do what most early digital engineers were doing (basically stringing together a lot of digital gates in DIP packages). It wasn’t until later that digital engineers started acting more as programmers and VHDL/Verilog experts.

So why do I bring this up? Because I’ve been thinking about the versatility required from engineers in general, not just analog or digital engineers. Routinely engineers are asked to switch modes or tasks or careers in order to get a job done. It’s not that other professions are never asked this; it’s just that the chameleon-like requirement placed on engineers seems to define the profession. Allow me to explain.

What is an engineer?

An engineer puts theories into practice using available devices and elements. They create new products and pass on knowledge through design iterations and trial and error. Their work should be directly applicable to the real world (sometimes in the form of an end-product, sometimes not) and hopefully able to be reproduced successfully in the same form for multiple parties (mass manufacturing). Engineers are often rooted in math and science but require a wide range of skill-sets in order to properly construct an end product.

I think it is important to note that an engineer is different from a scientist, although the line can often be blurred (especially when looking back at the inventors of the early 20th century). In modern times a scientist is usually tasked with pushing the barrier and finding new theories and concepts. This means that the concept will not necessarily be available in product form right away (although this is not always the case), as the product form must be iterated upon and improved for production.

Another interesting point is how the above definition manifests itself in higher education. When I was in school, the focus was definitely on making engineering scientists, that is engineers who are taught to research new methodologies and concepts with the final product in mind. There was much less focus on using existing products (i.e. discrete transistors) to create something new or to solve a problem. I do not think that it is a huge problem, as some of my classmates went on to work on their Master’s degrees or to work in research labs. The rest of us trying to break into industry were a little more strapped on what is expected from an engineer. Let’s go over what some of these things might be.

  1. Flexibility — This could be a theme of this article. Engineers have to be flexible and think on their feet. Again, I’m not saying scientists and other professions do not have to do this, only that it is required for many engineers. I went into my first job (working in a fab) as an electrical engineer student and ended up looking at chemical reactions and doing process engineering. The company I worked for didn’t want an electrical engineer, they wanted and engineer, someone they could teach their methods to and who could pick up the nuances as quickly as possible. I think it’s also important to note that they didn’t just hire engineers, they also hired scientists (don’t worry, I like scientists).
  2. Science and math knowledge — No surprise here, you have to know the basics in order to really get going in the field. However, I think that the interesting thing is that the basics is usually the majority of what you need. I used Ohm’s Law more often in practice than I use the knowledge of how to do the third integral of a sphere.
  3. Design re-use and not trying to re-invent the wheel — This was actually the reason I wanted to write this post, to point out that engineers often enter the field thinking they will be designing every piece of a system from the ground up. First off, this is irresponsible. The industries would never have standards if every engineering firm was trying to redesign a buck-boost converter everyday. Instead, engineers use optimized solutions available from vendors. Not only does it help standardize, it saves time.
  4. KISS — This directly relates to the above point. You have to keep it simple, because there are only 24 hours in a day. I have claimed to be a system designer before (or at least will be). To design a full system, you have to look at the simplest and fastest solutions because they are often the best and most elegant solutions. Not only that, if you don’t do it as fast and simple as possible, someone else will, and then you’ll lose out on a customer, contract, etc.
  5. Learning is pain — Even though continual learning is one of the main reasons I got into engineering, it’s not always fun. It’s not a great feeling when someone asks you to do something and then you have to slink away because you have no clue how to do it. Hopefully you’re slinking to go learn about it and not running away, but that is dependent on the person. The point is, learning is a difficult process and we really learn the most when we’re in situations that stretch us to the limits. In my experience, I always learned more in classes where I worked to get a C than in the ones where I breezed by and got an A.

Engineering is a field I entered because of the myriad things I could work on throughout my career. I did not switch to the digital domain for the money. I switched to digital work because I was asked to and it has been really interesting so far. Programmable logic is something I’ve worked on in the past and something I’m sure will become more prevalent in the workplace as design requirements become more stringent and timetables get shorter. If you are an engineering student or an aspiring engineer reading this article, I would highly suggest the profession (just make sure you note the above points). If you’re an experience engineer, please feel free to leave your experience in the comments. Thanks for reading.