AC, Filters & Op-Amps: Make Circuits Behave by Frequency
Once you can draw a battery-and-LED circuit, the next big leap is frequency — why a capacitor blocks DC but passes a signal, how an LC pair "tunes" to one frequency, how you build a filter, and how a tiny op-amp becomes a precise amplifier. This module builds that intuition with live calculators and animated visuals.
You already know that a resistor, a capacitor and an inductor each oppose current — but only the resistor does so the same way at every frequency. The moment you let the frequency change, capacitors and inductors start to select: they pass some signals and reject others. That selection is the entire basis of filters, radio tuning and most of modern signal processing, and the op-amp is the workhorse that makes these ideas practical. Work through the four modules in order; each calculator lets you feel the maths before you commit to a value.
By the end you should be able to: compute reactance and impedance, find a resonant frequency and its bandwidth, design a first-order low- or high-pass filter, and wire up the five standard op-amp topologies with the correct gain.
1. AC and reactance
A DC supply pushes charge one way at a constant rate. An AC supply instead swings back and forth, and the cleanest mathematical form is a sine wave: v(t) = Vpeak·sin(2πft). Three numbers describe it. The peak (Vpeak) is the maximum it reaches; the frequency f (in hertz) is how many complete cycles happen each second, with the period T = 1/f the time for one cycle; and the phase tells you where in the cycle you are at a given instant. Because a sine spends as much time positive as negative, its average is zero — which is why we quote an AC voltage as an RMS (root‑mean‑square) value, the DC equivalent that would deliver the same power. For a pure sine, VRMS = Vpeak/√2 ≈ 0.707·Vpeak, so the "230 V" on a mains socket is an RMS figure, not the peak.
Here is where AC differs fundamentally from DC. A resistor opposes current by the same R at every frequency, but a capacitor and an inductor oppose it by an amount that depends on frequency — and we call that opposition reactance, measured in ohms just like resistance. Capacitive reactance is XC = 1/(2πfC): it is large at low frequency (so a capacitor blocks DC) and shrinks toward zero as frequency rises (so at high frequency it behaves like a short). Inductive reactance is the mirror image, XL = 2πfL: small at low frequency (an inductor passes DC) and growing toward an open as frequency rises. A capacitor therefore passes AC but not DC; an inductor passes DC but resists change. They are opposites, and that opposition is the raw material of every filter.
When R, L and C are combined, the total opposition is called impedance, Z, still in ohms but "complex" because it carries a phase as well as a size. For a simple series combination the magnitude is |Z| = √(R² + (XL − XC)²). The phase relationship is the part that surprises beginners: in a pure resistor voltage and current are in step; in a pure capacitor the current leads the voltage by 90°; in a pure inductor the voltage leads the current by 90°. A mnemonic that sticks is “ELI the ICE man” — going around the loop, in an L (inductor) E(mf) leads I, and in a C (capacitor) I leads E. This phase shift is what lets a capacitor and inductor cancel each other (resonance) and is the seed of filter behaviour, so hold onto it.
Reactance explorer
Set the frequency and the parts, then watch which reactance wins and the resulting impedance and phase. The bars compare XC and XL at a glance.
| Property | Capacitor (XC) | Inductor (XL) |
|---|---|---|
| Formula | XC = 1/(2πfC) | XL = 2πfL |
| At low frequency | High (≈ open circuit) | Low (≈ short circuit) |
| At high frequency | Low (≈ short circuit) | High (≈ open circuit) |
| At DC (f = 0) | Open circuit | Short circuit |
| Current vs voltage | Current leads by 90° | Voltage leads by 90° |
Go deeper — why do we use RMS instead of peak?
Power in a resistor is p = v²/R. If v is a sine, v² is always positive and its average works out to Vpeak²/2R. A DC voltage that produced the same average power would be VRMS where VRMS²/R = Vpeak²/2R, so VRMS = Vpeak/√2. RMS is therefore "the DC equivalent for heating," which is why meters and mains ratings use it. Note the √2 only holds for a pure sine — a clipped or square wave has a different RMS, which is why an oscilloscope (which shows peak/peak) and a meter (which shows RMS) can disagree on the same signal.
Resistors are frequency‑blind; capacitors and inductors are not. Capacitors block low, pass high; inductors pass low, block high. Impedance adds them with a phase angle, and "ELI the ICE man" tells you which quantity leads. Everything downstream is built from these two curves.
2. Resonance
Because XL grows with frequency and XC shrinks with frequency, there is exactly one frequency where they are equal in magnitude: XL = XC. That frequency is the resonant frequency, and setting 2πfL = 1/(2πfC) and solving for f gives f₀ = 1/(2π√(LC)). Notice what this means: at f₀ the inductor and capacitor "fight" with equal and opposite reactance, so their effects cancel and only the resistance is left. This is resonance — the point where a circuit is most sensitive to one frequency and relatively indifferent to its neighbours.
In a series RLC circuit the consequence is dramatic. At f₀ the net reactance is zero, so the impedance is at its minimum (|Z| = R) and the current is at its maximum. Below f₀ the circuit is net‑capacitive; above f₀ it is net‑inductive. How tall and narrow that peak is depends on the Q factor (quality factor), which for a series circuit is Q = (1/R)·√(L/C). A high Q means low loss relative to the energy sloshing between L and C, giving a sharp, tall resonance; a low Q gives a broad, flat one. Q also tells you how "selective" the circuit is — a radio with a high‑Q tuned circuit separates two close stations better.
In a parallel (tank) circuit the picture inverts: at resonance the impedance is at its maximum and the current drawn from the source is at its minimum, even though a large current can circulate internally between L and C. The practical span a resonant circuit responds over is its bandwidth, BW — the frequency range between the two points where the power falls to half (the −3 dB points) — and it is tied to Q by BW = f₀/Q: higher Q, narrower bandwidth. Resonance is everywhere in real electronics: selecting a radio frequency, setting a filter's corner, the "ringing" you see on an oscilloscope after a step, and the heart of nearly every oscillator. Designing one means choosing L and C to land on your f₀ and choosing R to set the Q (and therefore the bandwidth) you want.
Resonance calculator
Enter L, C and R to find the resonant frequency, Q and bandwidth. The response curve sharpens as Q rises — a high‑Q tank is a narrow spike, a low‑Q one a broad hill.
| Property | Series RLC | Parallel (tank) |
|---|---|---|
| Impedance at f₀ | Minimum (|Z| = R) | Maximum |
| Source current at f₀ | Maximum | Minimum |
| Net reactance at f₀ | XL = XC (they cancel) | |
| Q factor | (1/R)·√(L/C) | R·√(C/L) |
| Typical use | Pass one frequency (band‑pass), oscillator | Reject one frequency (notch), tuning tank |
"Resonance means the current is huge and dangerous." In a series circuit the source current is indeed large at f₀, but in a parallel tank the source current is at its lowest while a large current circulates privately between L and C. Always ask which circuit you're looking at before reasoning about current.
3. Filter design
A filter is any circuit whose gain depends on frequency — it passes some frequencies and rejects others. The simplest is the first‑order RC low‑pass from the figure at the top: a resistor in series, a capacitor to ground. At low frequency the capacitor's reactance is high, so the output (taken across the capacitor) closely follows the input. At high frequency XC is low, shunting the signal to ground, and the output falls. The cutoff frequency fc is defined as the frequency where the output has fallen to 1/√2 ≈ 0.707 of its low‑frequency value — the −3 dB point — and for a single RC stage, fc = 1/(2πRC). Below fc the response is essentially flat; above it, it rolls off.
There are four basic filter shapes, all built from the same parts. A low‑pass passes below fc and blocks above (the RC above). A high‑pass is its mirror — capacitor in series, resistor to ground — passing above fc and blocking below (it uses the same fc = 1/(2πRC)). A band‑pass passes a band between two cutoffs, which you can make from a resonant RLC or by cascading a low‑pass and a high‑pass. A band‑stop (or notch) does the opposite, rejecting a band while passing below and above — a parallel resonant circuit in line with the signal is a classic example. The steepness of the transition is the roll‑off: a single pole gives 20 dB per decade (6 dB per octave), and stacking poles steepens it (40 dB/dec for two, and so on).
Finally, passive versus active. Passive filters use only R, L and C — simple and needing no supply — but they load the source, can't provide gain, and inductors are bulky and lossy. Active filters use op‑amps with just resistors and capacitors: they offer gain, a high input impedance (so they don't load the previous stage), and precise, repeatable cutoffs without any inductor, at the cost of a power supply and a finite bandwidth. When you design one in practice: pick fc from 1/(2πRC) and choose a standard R and C that get close; remember the source and load impedances will shift the real corner; and expect the tolerance of R and C to set how exact the cutoff actually is. The Sallen‑Key topology (a two‑pole active filter) is a common next step and appears in the op‑amp discussion.
Filter designer (1st‑order RC)
Choose low‑pass or high‑pass, set R and C, and watch the −3 dB corner (the dashed line) move on the response. The horizontal axis is log frequency; each gridline is one decade.
| Type | Pass band | 1st/2nd‑order realisation | Slope |
|---|---|---|---|
| Low‑pass | below fc | R in series, C to ground | 20 dB/dec |
| High‑pass | above fc | C in series, R to ground | 20 dB/dec |
| Band‑pass | between fc1, fc2 | Resonant RLC, or LP + HP cascade | 40 dB/dec |
| Band‑stop (notch) | below & above | Parallel resonant circuit in line | 40 dB/dec |
The "ideal" corner assumes the source resistance is zero and the load is infinite. In reality the source resistance adds to R and the load resistance loads the capacitor, both pulling the real fc away from 1/(2πRC). For anything precise, buffer the stage with an op‑amp follower (next module) so the filter only sees the R and C you chose.
4. Practical op‑amp topologies
An operational amplifier is a very high‑gain differential amplifier that, in real designs, is almost always wired with negative feedback to turn that huge raw gain into a small, precise, predictable one. The "ideal" op‑amp model that makes the maths easy has four traits: infinite open‑loop gain, infinite input impedance (no current enters the input pins), zero output impedance, and — the payoff of negative feedback — the two input voltages are driven to be equal. That last point is the virtual short: you may assume V+ ≈ V− and that no current flows into either input. Nearly every standard topology falls out of just those two assumptions plus Ohm's Law, so master them and the circuits stop being memorisation.
The symbol on every schematic: the + (non‑inverting) and − (inverting) inputs on the flat side, the output on the point. With negative feedback, the op‑amp drives its output until V+ ≈ V− — the virtual short that makes the gain equations below work.
The two workhorse amplifiers differ only in where the signal enters. The inverting amplifier feeds the signal through a resistor Rin to the − input, with a feedback resistor Rf from the output back to −, and the + input tied to ground. The virtual short holds − at ground (a "virtual ground"), so the input and feedback currents are equal and opposite, giving a gain of Av = −Rf/Rin — the minus sign meaning the output is 180° out of phase. The non‑inverting amplifier applies the signal to the + input and uses a resistor divider (Rf and Rin) from the output to the − input; here the gain is Av = 1 + Rf/Rin, with no inversion. Both let you dial in an exact gain with just two resistors and an inexpensive precision part.
Beyond basic amplification, three more topologies cover most needs. The voltage follower (buffer) ties the output straight back to the − input, giving Av = 1: no voltage gain, but a very high input impedance and very low output impedance, which is exactly what you need to isolate one stage from the next without loading it. The summing amplifier puts several inputs, each with its own resistor, into the − node; the output is the weighted sum, Vo = −(Rf/R1·V1 + Rf/R2·V2 + …), which is the principle behind audio mixing and digital‑to‑analog weighting. The differential (subtractor) amplifier uses four resistors to amplify only the difference between two inputs — with matched ratios, Vo = (Rf/Rin)·(V2 − V1) — rejecting whatever the two inputs share. That common‑mode rejection is quantified by the CMRR and is the reason differential inputs are used in instrument and sensor circuits.
Real op‑amps deviate from ideal in ways that matter. The gain‑bandwidth product (GBW) is roughly constant, so closed‑loop gain times bandwidth ≈ GBW: ask for more gain and you get less bandwidth, which is the hidden limit on how fast your filter or amplifier really is. The slew rate caps how quickly the output can move, so a large, fast signal gets "slewed" (a flattened, distorted top). Outputs can't reach the supply rails, leaving headroom; exceed it and the output saturates (clips) against a rail. And small input offset voltage and bias currents cause errors that bite in precision or high‑source‑impedance circuits. So before you build: check GBW against your highest frequency, leave output headroom, and pick a part whose offset and slew rate suit the job — the topology tells you the gain, the part's specs tell you whether it can actually deliver it at that speed.
Op‑amp gain calculator
Pick a topology and set the resistors to get the closed‑loop gain and a sample output for your input. Follower needs no resistors; summing adds a second input resistor.
Go deeper — the inverting gain, step by step
Because of the virtual short, the − input sits at the same voltage as the + input, which is ground — so it's a "virtual ground." The input current is therefore I = Vin/Rin. No current enters the op‑amp input, so that same current must flow through Rf to the output. The output must be at Vo = −I·Rf (the minus because current flows from the virtual ground out through Rf). Substituting gives Vo/Vin = −Rf/Rin. Every step used only the virtual short, zero input current, and Ohm's Law — no property of the op‑amp's huge gain except that the feedback can hold the virtual short.
| Topology | Closed‑loop gain | Phase | Typical use |
|---|---|---|---|
| Inverting | −Rf/Rin | Inverted (180°) | Signal inversion, scaling, summing |
| Non‑inverting | 1 + Rf/Rin | In‑phase | Gain with high input Z, level shift |
| Follow / buffer | 1 | In‑phase | Impedance isolation |
| Summing | −(Rf/R1·V1 + Rf/R2·V2…) | Inverted per input | Audio mixing, DAC weighting |
| Differential | (Rf/Rin)·(V2 − V1) | — | Difference signals, common‑mode reject |
Three real‑world limits show up before anything else: (1) not enough gain‑bandwidth — your filter corner or signal frequency is too high for the gain you've set, so it rolls off early; (2) output headroom — the required output exceeds what the supply rails allow, so it clips; (3) slew rate — a big, fast edge gets flattened. Check all three against your part's datasheet, not just the topology's gain equation.
Now try it
Bring the modules together: design a 1 kHz low‑pass (R = 1 kΩ, C ≈ 160 nF), confirm its corner with the filter designer, then place it before an inverting amplifier set to −10 and watch how the high frequencies are tamed before they're amplified. That sequence — filter first, then gain — is the backbone of countless real signal chains, and it's the natural bridge to the Power & RF Design path when you're ready.
Continue the learning series from the Learn Electronics hub, or open the calculator directory for the RC/RL cutoff, resonant‑frequency and Inverting Amplifier Gain, Non-Inverting Amplifier Gain tools.
All values here use standard teaching figures for small‑signal parts; always confirm the exact ratings (tolerance, GBW, slew rate, supply) on the datasheet of the specific components you use.