Top Circuits to Know for Embedded Electronics

Notes for NAND Gates

In electronics design and undergraduate course work, there is a staggering amount of information to memorize about circuit design. The process may require remembering specific circuit layouts, mathematical expressions, physical constants, and so on. But in terms of what circuits one should know while developing embedded systems, there are several that stand out.

This list of circuits covers electrical designs that are important to know for working with digital logic and low voltages around 0 V to 50 V. These circuits are not only very common, but they also reveal a lot about what makes electronics behave (or misbehave). Many of these are mentioned only in passing in undergraduate courses.

The circuits in this list were chosen because of their ubiquity in the field, because of their educational value, and because of their relative ease of simulation. Each one can be built up using ordinary components. And they each involve fewer than 13 components. This list is not intended to be a tutorial, but more of a guide to help prioritize which skills may be the most relevant.

7400 NAND Gate Equivalent

The 7400 quad NAND gate chip is an example of a very important system called a logic gate. Logic gates are the building blocks of the classical digital computer. Many people are aware that digital computers see the world as 0s and 1s. What is not so universally known is exactly what those 0s and 1s represent.

The 7400 chip is a classic NAND (negative and) logic gate. When both of its input pins receive a high voltage, the gate will drive its single output pin to a low voltage. Otherwise, it will drive its output high. The same rule holds for the other 3 identical gates that the 7400 chip contains.

The 7400 NAND gate equivalent circuit breaks part of the 7400 down into its component transistors, diodes, and resistors [1].

Figure 1: NAND Gate 7400 Equivalent Circuit

At this level of detail, it loosely resembles an analog circuit. But the 7400 uses a mix of simple amplifiers to make sure that any input signal (digital or analog) will create a distinct high or low voltage output. The transition from the analog domain to the digital domain becomes apparent because the output will always generate a digital 0 or 1.

Because of the voltage difference between a 0 and 1 output is quite large, a digital signal is easy to interpret with confidence; even if the binary signal contains a fair amount of interference [1]. This behavior gives digital signals great noise immunity, which is why digital technology like the 7400 series chips ascended so rapidly in the mid-20th century.

The TTL logic method was so popular that it spun off an entire family of devices called the 7400 series. These devices include the 7402 NOR gate, plus many counters, encoders, decoders, and other digital devices. There have been many generations of the 7400 family over the years: such as the Schottky (S) generation, Low-power Schottky (LS), Fast logic (F), and Advanced High-Speed CMOS (ACT). Each one is a slight improvement on the last.
The original generation of 7400 is depicted here for its simplicity.

NAND as a Universal Gate

Besides the NAND gate, there is also the AND gate, the OR gate, the NOR gate, XOR gate, the buffer, and the inverter (NOT gate).

The NAND gates and NOR gates stand out because they have a property called functional completeness. Functional completeness means that any logic gate can be constructed using only NAND gates or NOR gates as its building blocks. This is modeled mathematically under DeMorgan’s laws, which are definitely worth remembering. This makes the NAND gate a sort of universal donor when it comes to building logic functions.

Figure 2: Logic OR Gate Constructed from NAND Gates

Taken to the extreme, more complex circuits like flip-flops, encoders, state machines, memory, and even entire central processing units (CPUs) can theoretically be built using only NAND gates. While such an approach would not be very practical due to using way more transistors than necessary, it is a useful thought exercise for fans of Boolean algebra.

Zener Regulator

The Zener regulator is another well-documented and versatile circuit to fit many applications.

Zener diodes won’t conduct in the reverse direction except for sufficiently-large voltages. While many other diodes can do this, Zener diodes are very precise about the voltage that can reverse them, which is the Zener voltage. This property can let the Zener diode act as a voltage regulator. While the Zener regulator is not as precise or efficient as an actual voltage regulator, the Zener circuit requires very little space.

With electronics growing smaller each year, Zener diodes have the added role of suppressing large voltage spikes caused by electrostatic discharges (ESD), near-strike lightning (NSL), inter-building lightning, electromagnetic pulses (EMP), and other electrical fault conditions.

Once again, it’s the sudden reverse conduction that makes this list. First, the Zener diode is placed by the designer in a position where it will normally conduct nothing, typically by pointing the cathode toward the positive voltage. In an alternating current circuit, two Zener diodes can be joined cathode to cathode so that one is always turned off. If a voltage surge occurs, the Zener diode turns on: essentially baring the brunt of the surge energy so that more fragile components don’t have to.

Resistive Voltage Divider

The voltage divider is a basic but critical first step toward understanding passive filters. If for example a circuit needs to reduce a 5-volt logic signal to a 3.3-volt logic signal, the voltage divider is probably the simplest way for it to do so.

Figure 3: Simple Two-Resistor Divider

Any voltage at the input will be scaled down based on the two resistor values.

The main disadvantage however that the voltage divider also places resistance between the input and the output, which may not be desirable. But if one of those resistors is a capacitor, the voltage divider forms a useful tool called the RC filter.

RC Filter

The RC filter is an essential circuit for filtering unwanted signals from a particular area of a circuit. Named after its 2 circuit elements: resistance (R) and capacitance (C); the RC filter is basically a voltage divider that uses a capacitor in place of one resistor.

Figure 4: RC Low-Pass Filter

The equation to describe the voltage dividers output will swap one of its resistor terms for capacitor terms. Just like the voltage divider, the RC filter has an input and an output. The way the resistance and capacitance are arranged will determine the type of filter it will form. These filters are a type of first-order filter. The term “first order” comes from the form of the equation that will model how it behaves.

  • A low pass filter forms when the resistance is in series with the input and the capacitor is parallel with the output. True to its name, the low-pass filter allows low frequencies to pass. This includes DC voltages. This is important in embedded digital applications where voltage supplies should be kept clean of sudden spikes in voltage.
  • A high pass filter is the opposite of the low-pass filter. High pass filters block DC voltages as well. This DC-blocking behavior is important in multi-state amplifiers that carry signals such as audio. Without them, any DC content (including offset errors) in the signal would also get amplified until the signal is out of range. Between amplifier states, a high-pass filter can work to “decouple” the individual stages so that audio is amplified and DC isn’t.

The range of frequencies the filter won’t effect is called the passband. The frequency that loses half its intensity to the filter is called the cutoff frequency—even though half the signal is still left. The cutoff effect for first-order filters is very gradual. High pass and low pass filters can be chained one after the other to form more complicated arrangements. Some things to remember are the cutoff frequency for these filters and their roll-off rate.

All capacitors have some resistance, as do circuit traces and wire. This essentially makes every capacitor an RC filter. But it goes even further than that thanks to the RLC filter…

RLC Circuit (Tank Circuit)

The RLC filter (also known as the tank circuit) is an essential circuit to know, largely because real-life electronics contain them unintentionally. Named after its 3 prominent circuit elements, resistance (R), inductance (L), and capacitance (C); the RLC circuit creates a feature called a second-order filter.

In the RC low pass filter, the goal is for the capacitor at the output to act as a sort of reservoir of electric charge [2] that will smooth out the voltage. Logic gates benefit from the capacitor, since having a noisy voltage source can result in false logic switching [3] of 0s and 1s. A capacitor in this arrangement is called a bypass capacitor.

So where does the RLC filter fit into all this?

All capacitors (including bypass capacitors) have some amount of internal resistance and inductance. The inductance in particular, is created by the length of the capacitor’s conductive terminals, copper/tin leads, and internal electrodes. This effectively makes every capacitor an RLC filter.

The copper circuit traces, hookup wires, and even the tiny bond wires inside a digital chip each have their own unwanted inductance and resistance. Because these extra resistances and inductances can’t be reasonably removed, they are often called “parasitics” in technical literature [4].

Wherever frequencies over a few megahertz are present, parasitic RLC structures can affect the circuit. The problem becomes more severe with higher and higher frequencies. The RLC system is a second-order system, rather than a first-order system; making the math a bit more challenging. But knowing the math and the physical effects (such as ringing) of the RLC circuit is an important first step toward dealing with circuits at high frequencies.

Figure 5: Parallel RLC Filter with Mesh Current Equation and Resonant Frequency

Beyond parasitics, the R-L-C filter (also called a tank circuit) is a good starting point for anyone wanting to work with radio receivers or transmitters. The RLC bandpass filter, in its parallel form has been used by engineers to build the front-end filters for radio receivers for over a century [5].

Thevinin and Norton Equivalent Circuits

Unlike the other circuits featured here, the Thevinin Circuit and its close counterpart: the Norton equivalent are not specific designs. Rather they are more of a concept that helps developers simplify complicated circuits down to only two elements. This simplified circuit is called the equivalent circuit.

If a voltage or current source drives dozens of resistors, the amount of math required to calculate what happens at the output would be daunting. But with careful training, the developer can use some step-by-step simplifications to find the equivalent circuit.

First, the method to find the Thevinin voltage is to determine what the voltage would be at the output terminals (a and b) if they were connected to an open circuit [6]. Next, the method to find the Norton current is to find the current that would flow from the output terminal a to terminal b if they were connected to a short circuit. Finally, there are many ways to calculate the equivalent resistance of the circuit. If only independent voltage sources and current sources are present: the more popular method is to deactivate those sources, and then find the resistance between terminals a and b.

The result is a single voltage source with a series resistance (the Thevinin equivalent), or a current source with a parallel resistance (the Norton equivalent). The idea can be extended to use impedances rather than real resistance.

Knowing this, a linear circuit of any complexity can be simplified down to a very basic equivalent circuit that requires very little math. This is one reason why—for example—engineers can confidently develop grid-powered equipment without needing a schematic for the entire power grid. Mastering the equivalent circuit is more about practice than memorization.

Inverting Op-Amp

The inverting op-amp is a highly practical and well-documented amplifier. Its main advantage over the single transistor-based amplifiers is its linearity and ease of use. Whereas the voltage divider can only divide an incoming voltage by a fixed amount, the inverting op-amp can multiply.

Figure 6: Inverting Operational Amplifier

It’s worth noting that the inverting configuration can also multiply a signal by exactly -1. This is called the unity gain configuration. It can also attenuate or reduce the signal, much like the voltage divider. However some op-amps may become unstable at unity, and they become very unstable below unity. Reading the data sheet is an essential way to verify whether this is the case.

Wheatstone Bridge

This is another fundamental circuit that consists only of resistors, usually with one of an unknown value. As essentially two voltage dividers joined by a voltmeter; the Wheatstone bridge is a helpful tool in instrumentation and measurement.

Figure 7: Wheatstone Bridge

When the resistor pairs on both sides of the bridge are in balance, the meter at the center of the bridge reads zero. Otherwise, it will indicate a voltage and that the resistances are imbalanced. This effectively converts an imbalance in the resistances to a change in voltage. Besides being good at determining unknown resistances, this technique has been used since the 1800s to improve telegraph equipment [7]. Wheatstone bridges have several variants such as the Maxwell bridge and the Wein bridge, which can evaluate capacitors and inductors in the same fashion.

Common Emitter Amplifier and Common Source Amplifier

Sharing the number one spot for the top circuits to know for embedded electronics are the common emitter amplifier and the common source amplifier.

Figure 8: Common Emitter Amplifier for Low Frequency Use

Both are important when dealing with microcontrollers, microprocessors and programmable logic. These small digital devices are great for pushing out digital information, but they cannot supply a large amount of electric power. Typically, the individual pins of a microcontroller can only supply a few dozen milliamps before they sustain damage. To connect a microcontroller to a larger device (such as very bright LEDs, electromotors, etc.), the microcontroller should use an amplifier.

  • The common emitter amplifier uses a bipolar junction transistor (BJT). The base pin of the BJT effectively acts as the input pin. The emitter is connected to common ground or another common voltage source (hence the name common emitter). The collector functions as the output.
  • The common source amplifier is a close variant that uses a field effect transistor (FET) in place of the BJT. The gate pin serves as an input. The source is connected to a common voltage. The drain serves as the output.

Both designs have their own unique strengths and limitations. BJT transistors require an electric current at their base to activate, whereas FET transistors only require a voltage. Regardless, the simplicity of this arrangement makes it an easy tool for driving electronics that the microcontroller alone cannot handle.

Conclusion

One of the best ways to get to know these circuits inside and out is to try building them. Modern tools also let the developer simulate them using a SPICE simulator (Simulation Program with Integrated Circuit Emphasis). Alternatively, try to alter a circuit element one at a time to get a more intuitive understanding of the role it plays.

Honorable Mentions

Here are a few recommended circuits that didn’t quite make the list, but might be featured in greater detail on a future date.

  • PID Controller: The proportional-integral-derivative (PID) is useful in closed-loop control systems. They are popular in temperature controllers, speed controllers, and inverted pendulums.
  • Joule Thief: This is a simple switched power supply. They are useful in converting small voltages from cells and batteries to larger voltages, and they have a very low part count.
  • Summing Amplifier: This is an analog mixer useful for applications ranging from audio mixing to medical instrumentation.
  • 555 Timer: The popular 555 timer is an adjustable waveform generator useful in generating “one-shot” and periodic (repeating) waveforms from just a few components.
  • 741 Op-amp equivalent: Like the 7400 NAND gate, this legacy device has a rich history in electronics. Its many non-ideal behaviors make it a powerful learning tool, despite being deprecated by newer alternatives.

References

[1] J. Alkalay and D. Weiner, “Performance Degradation of a 7400 TTL Nand Gate Due to Sinusoidal Interference,” in IEEE International Symposium on Electromagnetic Compatibility, Baltimore, MD USA, 1980.
[2] W. M. McCullough, “Digital Integrated Circuit Susceptibility,” in Symposium Digest: Seventh National Symposium Electromagnetic Compatibility, New York, NY, 1968.
[3] W. B. Kuhn and A. D. Fund, “Power supply bypass capacitors—Myths and realities,” in IEEE Radio Frequency Integrated Circuits Symposium (RFIC), Phoenix, AZ, USA, 2015.
[4] C. R. Paul, “Effectiveness of Multiple Decoupling Capacitors,” IEEE Transactions on Electromagnetic Compatibility, vol. 24, no. 2, pp. 130-133, 1992.
[5] S. Aghazadeh, H. Martinez, A. Saberkari and E. Alarcon, “Tunable Active Inductor-Based Second-Order All-Pass Filter as a Time Delay Cell for Multi-GHz Operation,” Circuits, Systems and Signal Processing, vol. 38, no. 8, pp. 3644-3660, 2019.
[6] H. Pratt, “Long Range Reception with Combined Crystal Detector and Audion Amplifier,” Proceedings of the Institute of Radio Engineers, vol. 3, no. 2, pp. 173-178, 1915.
[7] C. A. Berry and D. J. Walter, “DC and Transient Circuit Analysis,” in The Industrial Electronics Handbook: Fundamentals of Industrial Electronics, B. M. Wilamowski and D. J. Irwin, Eds., Boca Raton, CRC Press, 2011, pp. 16-18.
[8] B. S. J, “Improvement in duplex telegraph instruments and circuits therefor”. U.S. Patent 132,932, 12 Nov. 1872.

Important Notice: This article and its contents (the “Information”) belong to Unboxing-tomorrow.com and Voxidyne Media LLC. No license is granted for the use of it other than for information purposes. No license of any intellectual property rights is granted.  The Information is subject to change without notice. The Information supplied is believed to be accurate but Voxidyne Media LLC assumes no responsibility for its accuracy or completeness, any error in or omission from it or for any use made of it.  Liability for loss or damage resulting from any reliance on the Information or use of it (including liability resulting from negligence or where Voxidyne Media LLC was aware of the possibility of such loss or damage arising) is excluded.