← AM Modulator/Demodulator Design

Formula sheet

Every formula this tool uses, grouped by circuit: AM basics shared by everything, the JFET modulator, the diode-and-tank modulator, and the envelope demodulator. Each one is derived from the one before it, in the same order as the tool's own "show the math" panels.

1

AM basics

The AM signal

A carrier A_p cos(omega_p t) whose amplitude follows the message m(t), scaled to stay between -1 and +1. The bracket is the envelope; n, the modulation index, is how far the message may push the amplitude away from A_p.

xAM(t)=Ap[1+n m(t)]cos⁡(ωpt)x_{AM}(t) = A_p\left[1 + n\,m(t)\right]\cos(\omega_p t)

How to use: every circuit in this tool either produces this form (modulators) or undoes it (demodulator).

Spectrum: where the sidebands come from

For a single-tone message m(t) = cos(omega_m t), multiplying out with the product-to-sum identity splits the signal into three sinusoids: the carrier, untouched, and two shifted copies of the message, the sidebands, each of amplitude nA_p/2. The message never appears at its own frequency.

cos⁡α cos⁡β=cos⁡(α−β)+cos⁡(α+β)2\cos\alpha\,\cos\beta = \dfrac{\cos(\alpha-\beta) + \cos(\alpha+\beta)}{2}
xAM(t)=Apcos⁡(ωpt)+nAp2cos⁡((ωp−ωm)t)+nAp2cos⁡((ωp+ωm)t)x_{AM}(t) = A_p\cos(\omega_p t) + \dfrac{nA_p}{2}\cos\big((\omega_p-\omega_m)t\big) + \dfrac{nA_p}{2}\cos\big((\omega_p+\omega_m)t\big)

How to use: the signal occupies a band 2 f_m wide around f_p; that is the bandwidth the tank modulator's filter has to pass.

Modulation index from the envelope

The envelope peaks at A_p(1+n) where m = +1 and dips to A_p(1-n) where m = -1; subtracting and adding the two removes A_p.

Vmax=Ap(1+n),Vmin=Ap(1−n) ⇒ n=Vmax−VminVmax+VminV_{max} = A_p(1+n),\quad V_{min} = A_p(1-n) \ \Rightarrow\ n = \dfrac{V_{max} - V_{min}}{V_{max} + V_{min}}

How to use: read V_max and V_min off a scope. n > 1 folds the envelope (the carrier flips phase) and an envelope detector then recovers a distorted message; n < 0.7 wastes most of the power on the carrier. Target 0.7 ≤ n ≤ 1.

Power efficiency

The average power of a sinusoid of amplitude A is A²/2. The carrier carries A_p²/2, each sideband (nA_p/2)²/2, and only the sidebands carry the message; the efficiency is the sideband share of the total.

η=PsidebandsPcarrier+Psidebands=2×n2Ap28Ap22+n2Ap24=n22+n2\eta = \dfrac{P_{sidebands}}{P_{carrier} + P_{sidebands}} = \dfrac{2 \times \dfrac{n^2 A_p^2}{8}}{\dfrac{A_p^2}{2} + \dfrac{n^2 A_p^2}{4}} = \dfrac{n^2}{2 + n^2}

How to use: n = 1 gives 33%, n = 0.33 gives about 5%. The carrier is kept anyway because it lets a rectifier plus a low-pass filter recover the envelope.

2

JFET modulator

Channel conductance (ohmic region)

In the ohmic region the gate controls the width of the channel. The standard drain-current model there is quadratic in V_DS; the linear part is Ohm's law with a conductance that depends on the gate only. V_P is the pinch-off voltage (negative for N-channel), I_DSS the current at V_GS = 0.

ID=β[(VGS−VP) VDS−VDS22],β=2IDSSVP2I_D = \beta\left[(V_{GS}-V_P)\,V_{DS} - \dfrac{V_{DS}^2}{2}\right], \qquad \beta = \dfrac{2 I_{DSS}}{V_P^2}
G(VGS)=1rDS=β (VGS−VP)G(V_{GS}) = \dfrac{1}{r_{DS}} = \beta\,(V_{GS} - V_P)

How to use: G is a straight line: 0 at V_GS = V_P, 2 I_DSS/|V_P| at V_GS = 0. Measure I_DSS and V_P on the actual part; both vary a lot between individual JFETs. Two distinct conditions on V_DS, which in the gain cell is the carrier itself:

(a) triode region: VDS≤VGS−VP  at the most negative gate, VGS,min−VP=(1−s)∣VP∣2\text{(a) triode region: } V_{DS} \le V_{GS} - V_P \ \text{ at the most negative gate, } V_{GS,min} - V_P = \dfrac{(1-s)|V_P|}{2}
(b) within it, VDS=Accos⁡ωpt⇒the VDS2 term is βAc24(1+cos⁡2ωpt): a DC offset and a 2fp tone, no envelope distortion\text{(b) within it, } V_{DS} = A_c\cos\omega_p t \Rightarrow \text{the } V_{DS}^2 \text{ term is } \dfrac{\beta A_c^2}{4}(1 + \cos 2\omega_p t)\text{: a DC offset and a } 2f_p \text{ tone, no envelope distortion}

Past (a) the channel saturates and the envelope is clipped at its troughs. Inside (a) the squared term never touches the envelope; at the output it is R_b beta A_c²/4, worth reporting in dBc so the 2 f_p line can be checked against other bands.

Characterizing the part: three ways to the same line

Only the line G = beta (V_GS - V_P) matters. The datasheet pair (V_P, I_DSS) fixes its slope through the square law; the other datasheet pair (V_P, r_DS(on)) fixes it through its value at V_GS = 0; a set of measured points fixes it by least squares over a chosen window, which then also sets the bias (its middle) and the largest swing (its half-width). The J11x presets are datasheet LIMITS (largest r_DS(on), a range for V_P), so a measurement replaces them.

β=2IDSSVP2orβ=1rDS(on) ∣VP∣orG=a VGS+b⇒β=a, VP=−ba\beta = \dfrac{2 I_{DSS}}{V_P^2} \quad\text{or}\quad \beta = \dfrac{1}{r_{DS(on)}\,|V_P|} \quad\text{or}\quad G = a\,V_{GS} + b \Rightarrow \beta = a,\ V_P = -\dfrac{b}{a}
divider measurement: rDS=Rseries VDVin−VD,implied IDSS=βVP22,rDS(on)=1β∣VP∣\text{divider measurement: } r_{DS} = R_{series}\,\dfrac{V_D}{V_{in} - V_D}, \qquad \text{implied } I_{DSS} = \dfrac{\beta V_P^2}{2}, \quad r_{DS(on)} = \dfrac{1}{\beta |V_P|}
conductance depth: s=VswingVC−VP(equals the swing fraction when VC=VP/2)\text{conductance depth: } s = \dfrac{V_{swing}}{V_C - V_P} \quad (\text{equals the swing fraction when } V_C = V_P/2)

How to use: keep V_D small in the divider measurement (the part must stay in the ohmic region) and never measure I_DSS of a J111 with a large V_DS, the TO-92 cannot take V_DS x I_DSS. Read R² and the largest deviation of the fit: if the points bend away from the line, narrow the window to the straight stretch. n can never exceed s.

Datasheet figures and the SPICE model

A datasheet prints V_P as the gate-source cutoff voltage V_GS(off), a range read at a tiny drain current; I_DSS as a minimum; r_DS(on) as a maximum on switching JFETs; and on amplifier JFETs the forward transfer admittance |y_fs| at V_GS = 0 instead of r_DS(on). In the square-law model the channel conductance at V_GS = 0 equals that transconductance.

rDS(on)=∣VP∣2IDSS=1gfs0,gfs0=2IDSS∣VP∣r_{DS(on)} = \dfrac{|V_P|}{2 I_{DSS}} = \dfrac{1}{g_{fs0}}, \qquad g_{fs0} = \dfrac{2 I_{DSS}}{|V_P|}
SPICE: Vto=VP,Beta=IDSSVP2=β2\text{SPICE: } V_{to} = V_P, \qquad \text{Beta} = \dfrac{I_{DSS}}{V_P^2} = \dfrac{\beta}{2}

How to use: with only |y_fs| printed, enter r_DS(on) = 1/|y_fs|. SPICE writes the square law as Beta (V_GS - V_P)², so its Beta is half the beta used here.

Bias point

Halfway along the gate range is halfway up the conductance line, leaving equal room to swing both ways (or the middle of the measured window).

VC=VP2,G(VC)=IDSS∣VP∣,rDS(VC)=∣VP∣IDSSV_C = \dfrac{V_P}{2}, \qquad G(V_C) = \dfrac{I_{DSS}}{|V_P|}, \qquad r_{DS}(V_C) = \dfrac{|V_P|}{I_{DSS}}

How to use: the DC level the gate-drive summer must deliver to the gate.

Gain cell

Non-inverting amplifier with the JFET channel as the bottom leg of the feedback divider (drain at the - input, source grounded) and R_b as the top leg. The - input follows the + input, so the channel current equals the R_b current.

xprDS=Vout−xpRb ⇒ Vout=xp[1+Rb G(VGS)]\dfrac{x_p}{r_{DS}} = \dfrac{V_{out} - x_p}{R_b} \ \Rightarrow\ V_{out} = x_p\big[1 + R_b\,G(V_{GS})\big]

How to use: the carrier x_p(t) drives the + input, the gate voltage V_GS(t) carries the message.

Message on the gate, modulation index

With V_GS = V_C + x_m(t) and the gate swinging by a fraction s of the |V_P|/2 room, the linear conductance becomes G(V_C)[1 + s m(t)]; x is R_b in units of the channel resistance at bias. The output is then exactly the AM form, and the instantaneous gain K(m) is also the op-amp's noise gain.

G(VC+xm)=G(VC)[1+s m(t)],x=RbrDS(VC)G(V_C + x_m) = G(V_C)\big[1 + s\,m(t)\big], \qquad x = \dfrac{R_b}{r_{DS}(V_C)}
Vout(t)=xp(t) (1+x)[1+x s1+x m(t)] ⇒ K0=1+x,n=s x1+xV_{out}(t) = x_p(t)\,(1+x)\left[1 + \dfrac{x\,s}{1+x}\,m(t)\right] \ \Rightarrow\ K_0 = 1 + x, \qquad n = s\,\dfrac{x}{1+x}
K(m)=1+x (1+s m),Kmax=1+x(1+s),Kmin=1+x(1−s)K(m) = 1 + x\,(1 + s\,m), \qquad K_{max} = 1 + x(1+s), \qquad K_{min} = 1 + x(1-s)

How to use: n can never reach s (the swing fraction is its ceiling); a bigger R_b gives both more gain and deeper modulation, but also a larger K_max for the op-amp to follow. For a target n, invert:

x=ns−n,Rb=rDS(VC) xx = \dfrac{n}{s - n}, \qquad R_b = r_{DS}(V_C)\,x

How to use: round R_b to a part in stock, then take x back from the rounded value, x = R_b / r_DS(V_C), and n = s x/(1 + x) from that x: it lands a little off the target, and that is the n the circuit has.

Inverting cell: JFET as the input resistor

The channel moves from the feedback divider to the input: a follower puts the carrier on the drain, the source sits on the virtual ground, R_2 feeds back. The "1 +" of the non-inverting gain disappears, so the modulation index equals the conductance depth whatever x is, and x is chosen small for the op-amp's sake. The noise gain the op-amp must follow is still 1 + R_2/r_DS.

Vout=−R2 G(VGS) xp=−x [1+s m(t)] xp ⇒ K0=x,n=s,Knoise(m)=1+x(1+s m)V_{out} = -R_2\,G(V_{GS})\,x_p = -x\,\big[1 + s\,m(t)\big]\,x_p \ \Rightarrow\ K_0 = x, \qquad n = s, \qquad K_{noise}(m) = 1 + x(1 + s\,m)
x≤0.2 GBW/fp−11+s (capped at 10),R2=rDS(VC) xx \le \dfrac{0.2\,GBW/f_p - 1}{1 + s} \ (\text{capped at } 10), \qquad R_2 = r_{DS}(V_C)\,x

Whatever feeds the channel adds to r_DS: with a source impedance Z_s the gain is R_2/(r_DS + Z_s), which compresses the crest (where r_DS is smallest) more than the trough. The bare carrier divider is several hundred ohms against an r_DS(min) of the same order; a follower makes Z_s a few ohms. A fixed non-inverting stage then brings the small output x A_c up to the wanted level; its loss at f_p is constant, so it cannot bend the envelope.

gain(m)=x (1+sm)1+Zs G(VC) (1+sm),Kpost=VtargetxAc=1+RtopRbottom\text{gain}(m) = \dfrac{x\,(1 + s m)}{1 + Z_s\,G(V_C)\,(1 + s m)}, \qquad K_{post} = \dfrac{V_{target}}{x A_c} = 1 + \dfrac{R_{top}}{R_{bottom}}

How to use: pick this cell when the non-inverting one cannot reach the wanted n within the gain-bandwidth rule. Cost: follower, cell and post-gain make three op-amps plus the gate-drive summer, against two in all for the non-inverting cell. The triode limit on the carrier is the same in both: V_DS is the carrier either way.

Carrier amplitude

The carrier is V_DS, so it has to respect the triode limit at the most negative gate swing (with a margin k) and, times K_max, fit inside the op-amp's output swing. A resistive divider brings the source down to A_c; it drives the + input, which draws no current, so no buffer is needed.

Ac=min⁡(k (VGS,min−VP), Vout,maxKmax),Rtop=Rbot(AsrcAc−1)A_c = \min\left(k\,(V_{GS,min} - V_P),\ \dfrac{V_{out,max}}{K_{max}}\right), \qquad R_{top} = R_{bot}\left(\dfrac{A_{src}}{A_c} - 1\right)
output carrier K0Ac,envelope KminAc…KmaxAc,Ipeak=AcrDS,min,2fp tone =RbβAc24\text{output carrier } K_0 A_c, \quad \text{envelope } K_{min}A_c \ldots K_{max}A_c, \quad I_{peak} = \dfrac{A_c}{r_{DS,min}}, \quad 2f_p \text{ tone } = \dfrac{R_b \beta A_c^2}{4}

How to use: k = 0.5 is a comfortable margin. I_peak flows through R_b out of the op-amp; keep it under about 10 mA for a small op-amp. Round R_top up, to the next value on hand, so that A_c lands at or just under the limit and never above it.

Output gain stage

When the cell's carrier K_0 A_c is smaller than the level wanted, a fixed non-inverting stage after the cell makes up the difference. Its gain does not move with the message, so its loss at f_p is the same at the crest and in the trough: it changes the level and leaves the envelope, and n, alone. A larger carrier on the JFET would give the same level, but at the cost of I_peak and of the channel's straight line.

Kpost=VtargetK0Ac=1+RtopRbottom,∣Hpost(fp)∣=11+(fpKpost/GBW)2K_{post} = \dfrac{V_{target}}{K_0 A_c} = 1 + \dfrac{R_{top}}{R_{bottom}}, \qquad |H_{post}(f_p)| = \dfrac{1}{\sqrt{1 + (f_p K_{post}/GBW)^2}}
Kpost Kmax Ac≤Vout,max,2πfp Kpost Kmax Ac≤SR2K_{post}\,K_{max}\,A_c \le V_{out,max}, \qquad 2\pi f_p\,K_{post}\,K_{max}\,A_c \le \dfrac{SR}{2}

How to use: pick R_bottom near 1 kΩ and R_top = (K_post - 1) R_bottom. The inverting cell always has this stage when its small output needs it; for the non-inverting cell it is an option, one more op-amp.

Op-amp gain-bandwidth and slew rate

A non-inverting stage of gain K rolls off at GBW/K. Here K follows the message, so the loss at the carrier frequency is largest at the crest, which flattens the top of the envelope: a distortion of the message, measured as the harmonics of the compressed envelope over one message cycle (THD).

∣H(fp,m)∣=11+(fpK(m)GBW)2,neff=Kmax∣H∣crest−Kmin∣H∣troughKmax∣H∣crest+Kmin∣H∣trough|H(f_p, m)| = \dfrac{1}{\sqrt{1 + \left(\dfrac{f_p K(m)}{GBW}\right)^2}}, \qquad n_{eff} = \dfrac{K_{max}|H|_{crest} - K_{min}|H|_{trough}}{K_{max}|H|_{crest} + K_{min}|H|_{trough}}
rule: fpKmaxGBW≤0.2 ⇒ x≤0.2 GBW/fp−11+s ⇒ Rb≤rDS(VC) x,2πfpKmaxAc≤SR2\text{rule: } \dfrac{f_p K_{max}}{GBW} \le 0.2 \ \Rightarrow\ x \le \dfrac{0.2\,GBW/f_p - 1}{1+s} \ \Rightarrow\ R_b \le r_{DS}(V_C)\,x, \qquad 2\pi f_p K_{max} A_c \le \dfrac{SR}{2}

How to use: with a TL08x (3 MHz) at 55 kHz, K_max may not exceed about 11, so x stays near 5 and n near 0.75 for s = 0.9. When the design overshoots, the tool rounds R_b down to the largest stock value that satisfies the rule and reports the n it leaves.

Gate-drive summer

One inverting summer replaces a gain stage, a high-pass and a bias divider: the source through C and R_ac, the supply through R_bias, R_f as feedback. Every input ends on the virtual ground, so nothing loads anything: the gain, the bias and the high-pass corner are exactly the expressions below (a chained version loaded its divider to half the intended bias and moved the high-pass corner up tenfold). The minus sign turns +V_cc into the negative V_C the gate needs and merely inverts the message.

xmRac+VccRbias=−VoutRf ⇒ Vout=−RfRac xm−RfRbias Vcc\dfrac{x_m}{R_{ac}} + \dfrac{V_{cc}}{R_{bias}} = -\dfrac{V_{out}}{R_f} \ \Rightarrow\ V_{out} = -\dfrac{R_f}{R_{ac}}\,x_m - \dfrac{R_f}{R_{bias}}\,V_{cc}
Rac=Rf VsourceVswing,Rbias=Rf Vcc∣VC∣,fc=12πRacC=fm,min10R_{ac} = \dfrac{R_f\,V_{source}}{V_{swing}}, \qquad R_{bias} = \dfrac{R_f\,V_{cc}}{|V_C|}, \qquad f_c = \dfrac{1}{2\pi R_{ac} C} = \dfrac{f_{m,min}}{10}

How to use: R_f is picked between 4.7 k and 47 k so that R_ac and R_bias both round close to their targets; R_ac and R_bias are rounded to the parts in stock (E24 unless another stock is chosen) and the actual gain and bias recomputed; C from f_c and rounded to a stock value. Check that the most negative output, V_bias minus the full swing, fits the op-amp's swing on this supply: with a J111 (|V_P| up to 10 V) that is the check that bites first.

3

Diode + resonant-tank modulator

Nonlinear mixing

A curved component turns a sum of two frequencies into new ones. Written as a polynomial, the squared term holds the product of the carrier and the message, which is the pair of sidebands. That is the idea; with volt-sized signals the diode goes further and switches.

i≈a v+b v2,v=Acos⁡(ωpt)+ucos⁡(ωmt) ⇒ b v2∋b A u [cos⁡((ωp−ωm)t)+cos⁡((ωp+ωm)t)]i \approx a\,v + b\,v^2, \qquad v = A\cos(\omega_p t) + u\cos(\omega_m t) \ \Rightarrow\ b\,v^2 \ni b\,A\,u\,\big[\cos((\omega_p-\omega_m)t) + \cos((\omega_p+\omega_m)t)\big]

Switching modulator

The summer adds the carrier, the message and a small bias. Driven mostly by the carrier, the diode conducts for half of each carrier cycle: its current is the drive through R_s times a square wave at the carrier. The carrier times the square wave's constant half, and the message times its cosine at the carrier, are what land on the carrier.

vs(t)=Adcos⁡(ωpt)+um m(t)+VB,s(t)=12+2πcos⁡(ωpt)−23πcos⁡(3ωpt)+⋯v_s(t) = A_d\cos(\omega_p t) + u_m\,m(t) + V_B, \qquad s(t) = \dfrac{1}{2} + \dfrac{2}{\pi}\cos(\omega_p t) - \dfrac{2}{3\pi}\cos(3\omega_p t) + \cdots
ip(t)=Ad2Rs[1+4 umπAd m(t)]cos⁡(ωpt) ⇒ nideal=4 umπAdi_p(t) = \dfrac{A_d}{2R_s}\left[1 + \dfrac{4\,u_m}{\pi A_d}\,m(t)\right]\cos(\omega_p t) \ \Rightarrow\ n_{ideal} = \dfrac{4\,u_m}{\pi A_d}

How to use: a guide only. A real diode switches softly over its last few tenths of a volt, so the tool works one carrier cycle at a time with the diode law below, for each value of the message, and reads the index, the carrier and the distortion off the envelope that traces.

The diode, cycle by cycle

At each instant of a carrier cycle the drive is shared between R_s, the diode and the tank's own voltage, which is the tank's answer to the carrier component of the current. The carrier component of the current, over one message cycle, is the envelope.

i=IS(evD/(NVT)−1),vs(θ)=Rs i+vD+vtank(θ),vtank=Z(fp) I1i = I_S\left(e^{v_D/(N V_T)} - 1\right), \qquad v_s(\theta) = R_s\,i + v_D + v_{tank}(\theta), \qquad v_{tank} = Z(f_p)\,I_1
n=E1E0,THD=E22+E32+E42+E52E1n = \dfrac{E_1}{E_0}, \qquad \text{THD} = \dfrac{\sqrt{E_2^2 + E_3^2 + E_4^2 + E_5^2}}{E_1}

How to use: E_0 is the envelope's average (the carrier out) and E_k its k-th harmonic over the message cycle. The bias V_B is the one with the least distortion at the target index; the message gain u_m is then solved for that index. 1N4148: I_S = 2.52 nA, N = 1.752, the model the LTspice files carry.

Summer

One inverting op-amp: the carrier through R_p, the message through R_m, the bias from -V_cc through R_b, R_f as feedback. The minus sign only turns the carrier and the message over.

vs=−RfRp xp−RfRm xm+RfRb Vcc ⇒ Ad=RfRpAc,um=RfRmAm,VB=RfRbVccv_s = -\dfrac{R_f}{R_p}\,x_p - \dfrac{R_f}{R_m}\,x_m + \dfrac{R_f}{R_b}\,V_{cc} \ \Rightarrow\ A_d = \dfrac{R_f}{R_p}A_c, \qquad u_m = \dfrac{R_f}{R_m}A_m, \qquad V_B = \dfrac{R_f}{R_b}V_{cc}

Resonant tank (parallel RLC)

Parallel branches add as admittances. The imaginary part vanishes where the capacitor and the inductor cancel: that is the resonance, where the tank is just R. The impedance falls to R/sqrt(2) where the imaginary part equals 1/R; those two frequencies are 1/(RC) apart, which defines the bandwidth and Q.

Y=1R+j(ωC−1ωL) ⇒ ω0=1LC,f0=12πLCY = \dfrac{1}{R} + j\left(\omega C - \dfrac{1}{\omega L}\right) \ \Rightarrow\ \omega_0 = \dfrac{1}{\sqrt{LC}}, \qquad f_0 = \dfrac{1}{2\pi\sqrt{LC}}
ωC−1ωL=±1R ⇒ Δω=1RC,Q=ω0RC=RCL,BW=f0Q\omega C - \dfrac{1}{\omega L} = \pm\dfrac{1}{R} \ \Rightarrow\ \Delta\omega = \dfrac{1}{RC}, \qquad Q = \omega_0 R C = R\sqrt{\dfrac{C}{L}}, \qquad BW = \dfrac{f_0}{Q}

How to use: pick a practical L, then C = 1/(omega_0² L) as a stock pair in parallel, and recompute the actual f_0.

Loaded band and the sidebands

R in the tank's formulas is everything across it: R_t, and the source the conducting diode puts there, about 2 R_s since R_s is connected half of each cycle. R_t is sized so that the two in parallel give the band asked for. The sidebands sit f_m off the carrier, on the tank's slope.

Reff=Rt∥Rsrc,Rsrc≈2Rs,BW=12πReffC=2⋅margin⋅fm,maxR_{eff} = R_t \parallel R_{src}, \quad R_{src} \approx 2R_s, \qquad BW = \dfrac{1}{2\pi R_{eff} C} = 2 \cdot \text{margin} \cdot f_{m,max}
∣H(fm)∣=11+(2fm/BW)2,n(fm)=n ∣H(fm)∣,Aout,ideal=Ad Reff2Rs|H(f_m)| = \dfrac{1}{\sqrt{1 + (2f_m/BW)^2}}, \qquad n(f_m) = n\,|H(f_m)|, \qquad A_{out,ideal} = \dfrac{A_d\,R_{eff}}{2R_s}

How to use: R_s = 2 R_eff keeps R_t in charge of the band; a larger margin flattens the slope at f_m,max, a smaller one rejects the carrier's harmonics better.

4

Envelope demodulator

Absolute value keeps the envelope

The envelope is the size of the fast oscillation; the absolute value keeps the size and drops the sign. For n ≤ 1 the bracket is never negative, so it acts on the carrier only.

∣xAM(t)∣=Ap[1+n m(t)] ∣cos⁡(ωpt)∣\left|x_{AM}(t)\right| = A_p\big[1 + n\,m(t)\big]\,\left|\cos(\omega_p t)\right|

Fourier series of the rectified carrier

A rectified cosine is periodic, hence a sum of sinusoids. Full-wave: average 2/pi, first ripple at 2 f_p. Half-wave: average 1/pi and a ripple term at f_p itself, twice as close to the message. Multiplied by the envelope, the constant term is the message and the rest is ripple the low-pass filter removes.

∣cos⁡θ∣=2π+4π[cos⁡2θ3−cos⁡4θ15+cos⁡6θ35−⋯ ]\left|\cos\theta\right| = \dfrac{2}{\pi} + \dfrac{4}{\pi}\left[\dfrac{\cos 2\theta}{3} - \dfrac{\cos 4\theta}{15} + \dfrac{\cos 6\theta}{35} - \cdots\right]
max⁡(cos⁡θ,0)=1π+12cos⁡θ+2π[cos⁡2θ3−cos⁡4θ15+⋯ ]\max(\cos\theta, 0) = \dfrac{1}{\pi} + \dfrac{1}{2}\cos\theta + \dfrac{2}{\pi}\left[\dfrac{\cos 2\theta}{3} - \dfrac{\cos 4\theta}{15} + \cdots\right]
∣xAM(t)∣=2Apπ[1+n m(t)]⏟message + DC+4Ap3π[1+n m(t)]cos⁡(2ωpt)−⋯⏟ripple at 2fp and above\left|x_{AM}(t)\right| = \underbrace{\dfrac{2A_p}{\pi}\big[1 + n\,m(t)\big]}_{\text{message + DC}} + \underbrace{\dfrac{4A_p}{3\pi}\big[1 + n\,m(t)\big]\cos(2\omega_p t) - \cdots}_{\text{ripple at } 2f_p \text{ and above}}

How to use: the ripple frequency (2 f_p full-wave, f_p half-wave) is the stopband edge of the envelope filter; the message band f_m,max is its passband edge.

Precision full-wave rectifier

Two op-amps, two diodes, R1 = R2 = R3. D1 points from U1A's - input into its output, D2 from that output into U1B's + input, which R3 ties to ground. The diodes sit inside feedback loops, so their forward drop is corrected. Positive input: D2 conducts, D1 is off, no current in R1/R2, both op-amps are followers. Negative input: D1 conducts, D2 is off, U1B is an inverting amplifier fed through R1 with R2 as feedback.

Vout=Vin (Vin>0),Vout=−R2R1Vin=−Vin (Vin<0) ⇒ Vout=∣Vin∣V_{out} = V_{in}\ (V_{in} > 0), \qquad V_{out} = -\dfrac{R_2}{R_1}V_{in} = -V_{in}\ (V_{in} < 0) \ \Rightarrow\ V_{out} = |V_{in}|
VU1A,max=Ac(1+n)+VD≤VswingV_{U1A,max} = A_c(1 + n) + V_D \le V_{swing}

How to use: checked against Texas Instruments TIDU030 and in LTspice; 1 k, TI's value, keeps a switched-off diode's few pF from leaking through at a fast carrier. Use it whenever a single diode's ripple and 0.7 V loss are not acceptable. U1A runs one diode's drop past its input, so the wave's crest plus that drop has to stay inside the op-amps' swing.

Half-wave rectifier and what comes out

One diode, and R_L from its cathode to ground: a Sallen-Key envelope filter takes no DC, so without R_L the diode would charge it to the highest crest and hold it there. The precision rectifier hands the filter exactly 2/pi of the envelope; the bare diode loses its drop on every crest, so the tool works it out with the diode law, R_L for the DC and R_L in parallel with the filter's first resistor for the carrier's own swing. An MFB first stage takes DC through its R1 as well, so there R_L in parallel with R1 carries both.

v‾full=2π Ap[1+n m(t)] ⇒ tone=2π Ap n ∣H(fm)∣,v‾half<1π Ap[1+n m(t)]\overline{v}_{full} = \dfrac{2}{\pi}\,A_p\big[1 + n\,m(t)\big] \ \Rightarrow\ \text{tone} = \dfrac{2}{\pi}\,A_p\,n\,|H(f_m)|, \qquad \overline{v}_{half} < \dfrac{1}{\pi}\,A_p\big[1 + n\,m(t)\big]

Envelope low-pass filter

Same design as the Active Filter Design tool, reused directly: fp = f_m,max is the passband edge, fs = the ripple frequency the stopband edge. n is rounded up to the next even integer (every stage is a 2nd-order Sallen-Key or MFB, no leftover 1st-order stage). The full derivation of the response, the order formula, the poles and the cutoff factor is on the Active Filter Design formula sheet.

k=fpfs,n≥log⁡ ⁣[10Amin/10−110Amax/10−1]2log⁡(1/k) (Butterworth),n≥acosh⁡10Amin/10−110Amax/10−1acosh⁡(1/k) (Chebyshev)k = \dfrac{f_p}{f_s}, \qquad n \geq \dfrac{\log\!\left[\dfrac{10^{A_{min}/10}-1}{10^{A_{max}/10}-1}\right]}{2\log(1/k)}\ \text{(Butterworth)}, \qquad n \geq \dfrac{\operatorname{acosh}\sqrt{\dfrac{10^{A_{min}/10}-1}{10^{A_{max}/10}-1}}}{\operatorname{acosh}(1/k)}\ \text{(Chebyshev)}
∣H(jω)∣2=11+ε2(ωωp)2n,ε=10Amax/10−1\left|H(j\omega)\right|^2 = \dfrac{1}{1 + \varepsilon^2 \left(\dfrac{\omega}{\omega_p}\right)^{2n}}, \qquad \varepsilon = \sqrt{10^{A_{max}/10} - 1}
ε2(ω0ωp)2n=1 ⇒ ωc=ω0=2πfp ε−1/n (Butterworth),ωc=2πfp (Chebyshev)\varepsilon^2 \left(\dfrac{\omega_0}{\omega_p}\right)^{2n} = 1 \ \Rightarrow\ \omega_c = \omega_0 = 2\pi f_p\, \varepsilon^{-1/n}\ \text{(Butterworth)}, \qquad \omega_c = 2\pi f_p\ \text{(Chebyshev)}

How to use: Butterworth loses exactly Amax dB at fp only when its pole circle sits at fp times epsilon^(-1/n); that factor is 1 only for Amax = 3.0103 dB. Every stage is scaled by this omega_c.

Sallen-Key low-pass (unity gain)

Two equal resistors R in series to the + input, C_bottom from the + input to ground, C_top from the output back to the R-R junction X; the op-amp is a follower. Two current balances, at X and at the + input, give the transfer function.

at X: Vin−VXR=VX−VoutR+sCtop(VX−Vout),at (+): VX−VoutR=sCbottomVout\text{at X:}\ \dfrac{V_{in} - V_X}{R} = \dfrac{V_X - V_{out}}{R} + sC_{top}(V_X - V_{out}), \qquad \text{at (+):}\ \dfrac{V_X - V_{out}}{R} = sC_{bottom}V_{out}
H(s)=1s2R2CtopCbottom+2sRCbottom+1 ⇒ ωn=1RCtopCbottom,Q=12CtopCbottomH(s) = \dfrac{1}{s^2R^2C_{top}C_{bottom} + 2sRC_{bottom} + 1} \ \Rightarrow\ \omega_n = \dfrac{1}{R\sqrt{C_{top}C_{bottom}}}, \qquad Q = \dfrac{1}{2}\sqrt{\dfrac{C_{top}}{C_{bottom}}}

How to use: pick C_bottom from a preferred series or the capacitors on hand, round C_top = 4Q² C_bottom to E12 or to the nearest capacitor on hand, then solve R from omega_n with the two capacitor values actually used, and round R to the resistors in stock (E24 unless another stock is chosen).

MFB low-pass (gain -1)

R1 from the input to the summing node S, C1 from S to ground, R2 from S to the inverting input, R3 from the output back to S, C2 from the inverting input to the output; the + input is grounded, so the inverting input is a virtual ground. Two current balances, at S and at the inverting input, give the transfer function.

at S: Vin−VSR1=sC1VS+VSR2+VS−VoutR3,at (-): VSR2=−sC2Vout\text{at S:}\ \dfrac{V_{in} - V_S}{R_1} = sC_1V_S + \dfrac{V_S}{R_2} + \dfrac{V_S - V_{out}}{R_3}, \qquad \text{at (-):}\ \dfrac{V_S}{R_2} = -sC_2V_{out}
H(s)=cs2+as+b,a=1C1(1R1+1R2+1R3),b=ωn2=1R2R3C1C2,c=−1R1R2C1C2H(s) = \dfrac{c}{s^2 + as + b}, \quad a = \dfrac{1}{C_1}\left(\dfrac{1}{R_1} + \dfrac{1}{R_2} + \dfrac{1}{R_3}\right), \quad b = \omega_n^2 = \dfrac{1}{R_2R_3C_1C_2}, \quad c = -\dfrac{1}{R_1R_2C_1C_2}
R1=R3 ⇒ H(0)=cb=−R3R1=−1,x=1R1, y=1R2:  2x+y=aC1,  xy=bC1C2R_1 = R_3 \ \Rightarrow\ H(0) = \dfrac{c}{b} = -\dfrac{R_3}{R_1} = -1, \qquad x = \dfrac{1}{R_1},\ y = \dfrac{1}{R_2}:\ \ 2x + y = aC_1,\ \ xy = bC_1C_2
2x2−(aC1) x+bC1C2=0 ⇒ x=aC1±(aC1)2−8bC1C24,real only if C1C2≥8Q22x^2 - (aC_1)\,x + bC_1C_2 = 0 \ \Rightarrow\ x = \dfrac{aC_1 \pm \sqrt{(aC_1)^2 - 8bC_1C_2}}{4}, \quad \text{real only if } \dfrac{C_1}{C_2} \geq 8Q^2

How to use: with a = omega_n/Q, pick C1 and C2 from a preferred series or the capacitors on hand with C1/C2 at least 8Q², solve x, then R1 = R3 = 1/x and R2 = 1/(aC1 - 2x), and round them to the resistors in stock. Each stage inverts, so an odd count of stages hands the envelope back upside down, its DC level negative; the size of the response is the Sallen-Key's.

Output coupling capacitor

The filter hands the message back on a DC level, the rectifier's average of the carrier. A capacitor in series with the load blocks it; with the load R_L it is a first-order high-pass.

H(s)=sRLC1+sRLC,fc=12πRLC,∣H(f)∣=11+(fc/f)2H(s) = \dfrac{sR_LC}{1 + sR_LC}, \qquad f_c = \dfrac{1}{2\pi R_L C}, \qquad |H(f)| = \dfrac{1}{\sqrt{1 + (f_c/f)^2}}
fc≤fm,min10Amax/10−1 ⇒ C≥12πRLfc,Ipeak=VtoneRL,P=Vtone22RLf_c \le f_{m,min}\sqrt{10^{A_{max}/10} - 1} \ \Rightarrow\ C \ge \dfrac{1}{2\pi R_L f_c}, \qquad I_{peak} = \dfrac{V_{tone}}{R_L}, \qquad P = \dfrac{V_{tone}^2}{2R_L}

How to use: size C for at most Amax lost at the lowest message frequency, the same spec the low-pass meets at the highest, and round it up. At that size it is an electrolytic: its + plate goes to the side that sits higher in DC, the filter's output when its level is positive, the load (at 0 V) when an odd count of MFB stages made it negative. Earphones (16 to 32 Ω) draw tens of mA: past about 10 mA an audio amplifier goes between. Most of them already play loud from 1 mW, so a volume potentiometer goes before them.