# Inductors for Makers ###### Introducing the Stratify Toolbox

Want to streamline your embedded workflow with a modern, connected debugging tool?

This is the fifth article in a series to teach you all the EE you need to know for working with and designing microcontroller based circuits.

## Understanding the Basics

An inductor is basically a bizarro world capacitor. Where a capacitor uses electrical energy, an inductor uses magnetic energy. And while a capacitor charges-up with voltage, an inductor charges-up using current. The equations governing capacitor voltage apply to inductor current.

Physically an inductor is simply a coil of wire. The coil can be wrapped around a magnetic material in order to increase its inductance (kind of like the electromagnets used in electric motors). When current flows in the coils, magnetic energy builds up. The stored energy can be used to supply current to the circuit which is why one of the most common places you will see inductors used is in DC switching power supply circuits.

If you like the pressurized water system analogy, you can think of an inductor as …

### Math and Units

Inductance is measured in henrys which is a ratio how much voltage can be created per ampere over time.

$$henry = \frac{volt \cdot second }{amp} \space \to \space L = \frac{Q}{V}$$

We honor various super nerds from the past with inductor notation. The L used to represent inductance comes from Heinrich Lenz who discovered the relationship between current and magnetic energy in an inductor. The henry is from Joseph Henry who discovered inductance (independent of Michael Faraday).

Like capacitors, Ohm’s law doesn’t directly apply to inductors because they react rather than simply resist. When a device actively reacts, it has impedance rather than just resistance. Impedance is a combined measure of resistance and reactance. Other than the basic lingo, you don’t need to know much more about impedance. Let’s rather focus on a few use cases that are seen all-the-time in microcontroller circuits.

### Inductor Behavior in Microcontroller Circuits

Inductors have much simpler behavoir in DC circuits than in AC ones. Thankfully that makes them easy to analyze.

When a DC current is applied to an inductor, it has a transient response and a steady-state response. The transient response describes how the inductor charges up (or discharges if the current is removed) and the steady state describes the behavior after the inductor is charged.

#### Transient Response

In the circuit below, we will look at what happens when $$5A$$ is first applied and when the inductor reaches steady state.

The rate at which the capacitor charges depends on the capacitance $$1 \mu F$$ and the series resistance between the capacitor and the charging source ($$1k \Omega$$ in this case). The resistance times the capacitance is the time constant (this will come up later) and defines how long the capacitor takes to charge. The equation is:

$$V_C = V_S \cdot (1 - e^{\frac{-t}{RC}})$$

The plot below shows our circuit with the resistor at $$1k \Omega$$ and $$2k \Omega$$. Notice the increase resistance slows down the capacitors rate of charging.

    {
"type": "line",
"data": {
"labels": ["0us", "100us", "200us", "300us", "400us", "500us", "600us", "700us"],
"datasets": [
{
"label": "Capacitor Voltage (R = 1kOhms)",
"data": [0,
3.15498155,
4.319181384,
4.748775418,
4.907297202,
4.965792326,
4.987377242,
4.995342156],
"backgroundColor":"transparent",
"borderColor":"orange"
},
{
"label": "Capacitor Voltage (R = 2kOhms)",
"data": [0,
1.962716304,
3.15498155,
3.879231108,
4.319181384,
4.586432143,
4.748775418,
4.847391935],
"backgroundColor":"transparent",
"borderColor":"blue"
}
]
}
}


The equivalent circuit of an inductor in steady state can be modelled by zero resistance. When the inductor is fully charged, the circuit behaves as though it is a short (at least for our considerations).

## Inductors in Microcontroller Circuits

Now that you have a basic grasp of what an inductor is and how it behaves, if you learn a few rules of thumb you can understand what most inductors are doing. We will start by looking at inductors in switching power supplies.

### Power Inductors in Switching Supplies

Decoupling capacitors are placed next to the power pins of chips in order to both provide energy to the chip and prevent the chip from injecting noise onto the power supply. Digital chips run on a clock. Every clock cycle there is a brief moment when the internal circuitry changes state. In this moment, there is a tiny current spike.

$$V_L = L \frac{di}{dt}$$

    {
"type": "line",
"data": {
"labels": ["0ns", "1ns", "2ns", "3ns", "4ns", "5ns", "6ns", "7ns", "8ns", "9ns", "10ns", "11ns", "12ns", "13ns", "14ns", "15ns", "16ns", "17ns", "18ns", "19ns"],
"datasets": [
{
"label": "Clock",
"data": [
0, 0,
0, 0,
1, 1,
1, 1,
0, 0,
0, 0,
1, 1,
1, 1,
0, 0,
0, 0
],
"backgroundColor":"transparent",
"borderColor":"orange"
},
{
"label": "Current Consumption",
"data": [
2, 2,
2, 2,
5, 2,
2, 2,
2, 2,
2, 2,
5, 2,
2, 2,
2, 2,
2, 2
],
"backgroundColor":"transparent",
"borderColor":"blue"
}
]
}
}


The decoupling capacitor is placed physically close to the VDD and GND pins of the digital chip. This creates two current loops shown as A and B below. The decoupling capacitor delivers the energy needed for the current spikes on loop B. Loop A doesn’t have to deal with the spikes and just provides steady current to the capacitor.

Generally, you will see $$0.1 \mu F$$ capacitors place right next to pins. You will also see $$1.0 \mu F$$ and $$10.0 \mu F$$ capacitors placed in the vicinity of the part. Loop B should be kept as small as possible (because it actually acts as an inductor which counteracts the effects of the capacitor). For designs that are less than 50MHz, these simples rules will usually do the trick. The higher the frequency is, the more challenging it is to design circuit boards with good decoupling capacitors.

Now that you know all that, you can basically just ignore all the decoupling capacitors on a microcontroller schematic. Unless you are having some really weird noise or power issues then they are doing their job just fine.

### Filtering Capacitors

Decoupling capacitors are actually a filtering capacitor for power lines, but capacitors are also used when filtering sensor signals. This is most commonly seen with low pass filters that are used before inputting a signal to an ADC.

The circuit below is a basic low pass filter circuit. Because of how the capacitor charges and discharges slowly, fast signals from $$V_I$$ will not make it to $$V_O$$.

The frequency at which half of the power is absorbed in the capacitor is known as the cutoff frequency. For this circuit it is:

$$\omega _{cutoff} = 2 \pi f = \frac{1}{RC}$$

$$f_{cutoff} = \frac{1}{2 \pi \cdot 1k\Omega \cdot 1 \mu F} = 159.15Hz$$

So frequencies below $$159.15Hz$$ can deliver more than half the power than they could without the filter while frequencies above $$159.15Hz$$ can deliver less than half the power. As the frequency gets higher, less power can be transferred across the filter.

### DC Blocking Capacitors

DC blocking capacitors are used with audio signals to remove the average voltage of the signal so that it is centered around $$0V$$.

The circuit above just causes an AC signal with a DC offset on $$V_I$$ to become a zero-centered AC signal on $$V_O$$. This technique is used a lot with audio signals to zero-center the signal.

    {
"type": "line",
"data": {
"labels": ["0us", "100us", "200us", "300us", "400us", "500us", "600us", "700us", "800us", "900us"],
"datasets": [
{
"label": "Vin",
"data": [
3,
5,
3,
5,
3,
5,
3,
5,
3,
5
],
"backgroundColor":"transparent",
"borderColor":"orange"
},
{
"label": "Vout",
"data": [
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1
],
"backgroundColor":"transparent",
"borderColor":"blue"
}
]
}
}


This circuit configuration is actually called a high pass filter and basically does the opposite of what the low pass filter does. It prevents signal transfer of low frequencies (you know, like near zero aka DC values).

### You are (hopefully) smarter for having read this

Hopefully, you grasped the basics of how capacitors work (of course, you did). Capacitors are just two metals plates that store a charge. They are basically used for filtering signals. Of course they are used for more advanced circuits, but the vast majority of what I see are power decoupling caps, low pass filter caps and DC blocking (or high pass) caps.

X