Analog Electronics
Bipolar and MOS transistors, single-stage and multi-stage amplifiers, frequency response, feedback, and op-amp design.
Semiconductor Physics and the PN Junction
From Silicon to Transistor Silicon is a semiconductor: at absolute zero it is an insulator, at high temperature it conducts. Its four valence electrons form covalent bonds in a crystal lattice....
From Silicon to Transistor
Silicon is a semiconductor: at absolute zero it is an insulator, at high temperature it conducts. Its four valence electrons form covalent bonds in a crystal lattice. Doping introduces impurities:
- N-type: add phosphorus (5 valence electrons) β extra free electrons
- P-type: add boron (3 valence electrons) β holes (missing electrons)
When N-type and P-type silicon touch, electrons diffuse across the junction, leaving behind charged ions. The resulting depletion region has a built-in electric field that opposes further diffusion.
The Diode
A PN junction is a diode. Forward bias (P side +, N side -): the field is reduced, current flows. Reverse bias: the field grows, only leakage current flows.
The Shockley equation:
I = Is Γ (e^(V/Vt) - 1)
where Is is the saturation current (10^-12 to 10^-15 A) and Vt = kT/q β 26 mV at room temperature.
At 0.7 V forward, the exponential is enormous: e^(0.7/0.026) β 10^12. This is why diodes "turn on" at ~0.7 V and act as a nearly-constant voltage drop.
Real Diode Behavior
- Forward drop: 0.6-0.7 V (silicon), 0.2-0.3 V (Schottky), 1.8-3.4 V (LED)
- Reverse breakdown: 5-1000 V depending on design (Zener)
- Capacitance: junctions have parasitic capacitance, which limits high-frequency performance
Applications
Rectifier: convert AC to DC. A bridge rectifier uses 4 diodes.
Voltage reference: a Zener diode in reverse breakdown holds a stable voltage.
Protection: a diode across a relay coil absorbs the inductive kick.
Clamp: a diode limits a signal to a maximum voltage.
Small-Signal Model
For AC analysis, we linearize the diode around its DC operating point. The small-signal resistance is:
rd = Vt / Id
At Id = 1 mA, rd = 26 ohms. At Id = 10 mA, rd = 2.6 ohms.
This lets us treat the diode as a linear resistor for small AC signals β the key trick for analyzing amplifiers.
MOSFET Preview
A MOSFET is like a voltage-controlled resistor. The gate is separated from the channel by a thin oxide (insulator). Applying Vgs > Vth creates an inversion layer that conducts between source and drain.
Two modes:
- Triode: Vds < Vgs - Vth, acts like a resistor
- Saturation: Vds > Vgs - Vth, acts like a current source
The saturation current:
Id = (1/2) Γ kn Γ (W/L) Γ (Vgs - Vth)Β²
This is the foundation of all analog and digital IC design.
Key Takeaways
- Semiconductors are insulators until doped
- A PN junction is a diode with 0.7 V forward drop
- Shockley equation governs current-voltage relationship
- Small-signal linearization is the key analysis trick
- MOSFETs are voltage-controlled current sources
- All of modern electronics rests on this foundation
MOSFET Large-Signal and Small-Signal Models
The MOSFET Structure A MOSFET has four terminals: Gate (G) β controls the channel Source (S) β where carriers enter Drain (D) β where carriers exit Body (B) β usually tied to source ...
The MOSFET Structure
A MOSFET has four terminals:
- Gate (G) β controls the channel
- Source (S) β where carriers enter
- Drain (D) β where carriers exit
- Body (B) β usually tied to source
The gate is separated from the channel by a thin oxide layer (SiOβ, ~2 nm for modern nodes). This makes the input impedance essentially infinite.
Threshold Voltage
Vth is the gate-source voltage needed to create a conducting channel. For modern MOSFETs, Vth β 0.3-0.7 V.
Below Vth (subthreshold): tiny current flows exponentially. This is the leakage current.
Above Vth: inversion layer forms, channel conducts.
Large-Signal Model
Triode region (Vds < Vgs - Vth):
Id = kn Γ (W/L) Γ [(Vgs - Vth) Γ Vds - VdsΒ²/2]
This is a nonlinear resistor: for small Vds, it behaves like a resistor.
Saturation region (Vds > Vgs - Vth):
Id = (1/2) Γ kn Γ (W/L) Γ (Vgs - Vth)Β² Γ (1 + Ξ» Γ Vds)
The channel is "pinched off" near the drain. Current depends mainly on Vgs, with a small dependence on Vds through the channel-length modulation parameter Ξ».
Transconductance gm
The small-signal gain of a MOSFET is its transconductance:
gm = βId/βVgs = kn Γ (W/L) Γ (Vgs - Vth) = 2ΓId / (Vgs - Vth)
At 1 mA and Vov = 0.2 V, gm = 10 mA/V.
Small-Signal Model
For AC analysis, replace the MOSFET with:
- A resistor ro = 1/(Ξ» Γ Id) from drain to source (output resistance)
- A current source gm Γ Vgs from drain to source
- An open circuit from gate to source (infinite input impedance)
This gives the voltage gain of a common-source amplifier:
Av = -gm Γ (ro || RD)
Common Configurations
Common Source: highest voltage gain, inverting, moderate input/output impedance. Most common.
Common Gate: current buffer, low input impedance, non-inverting.
Common Drain (Source Follower): voltage buffer, gain β 1, low output impedance. Used to drive heavy loads.
Cascode: common-source + common-gate stacked. Very high output impedance, high gain, good bandwidth.
Bias and Operating Point
Every MOSFET amplifier must be biased into saturation. Common techniques:
- Fixed bias: resistor from VDD to gate. Simple, but sensitive to Vth variation.
- Self-bias: source resistor with gate returned to ground. More stable.
- Current-source bias: the workhorse of analog ICs. Stabilized by a current mirror.
Current Mirrors
The current mirror copies a reference current into multiple branches:
Iout = Iref Γ (W/L)out / (W/L)ref
This is the fundamental building block of analog IC design. It provides a stable bias current independent of VDD.
Key Takeaways
- MOSFET: voltage-controlled current source
- Two regions: triode (resistor-like) and saturation (current source)
- Small-signal model: gm and ro
- Common configurations: CS, CG, CD, cascode
- Current mirror is the universal bias building block
- Analog design = biasing + small-signal analysis
Bipolar Transistors and Current Mirrors
The BJT Structure A Bipolar Junction Transistor has three terminals: Base (B), Collector (C), Emitter (E). Two junctions: base-emitter and base-collector. Current is carried by both electrons and...
The BJT Structure
A Bipolar Junction Transistor has three terminals: Base (B), Collector (C), Emitter (E). Two junctions: base-emitter and base-collector.
Current is carried by both electrons and holes (hence "bipolar"). The base is very thin and lightly doped.
Active Region
In active mode (BE forward, BC reverse):
Ic = Is Γ e^(Vbe/Vt)
Ib = Ic / Ξ²
where Ξ² is the current gain, typically 100-300 for small-signal BJTs, 20-100 for power devices.
The base current is small but nonzero, unlike the MOSFET where gate current is essentially zero.
Transconductance
gm = Ic / Vt
At 1 mA, gm = 38 mA/V. This is the same transconductance formula as a MOSFET in weak inversion, and it's the maximum gm for a given current.
BJT vs MOSFET
| Property | BJT | MOSFET |
|----------|-----|--------|
| Control | Current (Ib) | Voltage (Vgs) |
| gm at 1 mA | 38 mA/V | 5-10 mA/V |
| Input impedance | Moderate (rΟ) | Infinite |
| Noise | Lower | Higher |
| Matching | Poor (process) | Excellent |
| Speed | High (fT > 100 GHz) | High |
BJT is still used for:
- High-speed circuits (RF, > 10 GHz)
- Low-noise amplifiers
- Bandgap voltage references
- Some high-voltage applications
Current Mirrors
The BJT current mirror:
Iout = Iref Γ exp((Vbe_out - Vbe_ref)/Vt)
If the two transistors are identical and at the same temperature:
Iout = Iref
Practical circuits add emitter resistors to reduce sensitivity to Vbe mismatch.
Differential Pair
The differential pair is the input stage of every op-amp. Two matched transistors with a shared tail current source.
Differential input: V+ - V-. Output: current difference.
Common-mode input: affects both equally β rejected by symmetry.
The tail current source is the key: it "steers" the tail current to one side or the other depending on the differential input.
Key Parameters
- gm: transconductance
- rΟ: small-signal input resistance = Ξ²/gm
- ro: output resistance = VA/Ic (VA is the Early voltage, typically 50-200 V)
- fT: transition frequency β where current gain drops to 1
Applications
Bandgap reference: combines a BJT's predictable Vbe (~600 mV, -2 mV/Β°C) with a PTAT current (proportional to absolute temperature) to produce a stable 1.2 V reference.
Gilbert cell: a mixer that multiplies two analog signals. Foundation of all RF receivers.
Current feedback amplifier: high slew rate, used in video and RF.
Key Takeaways
- BJTs are current-controlled, MOSFETs are voltage-controlled
- BJT has higher gm for the same current
- Current mirrors copy a reference current
- Differential pair is the input of every op-amp
- Modern analog ICs use both: BJT where speed/noise matters, MOS elsewhere
Operational Amplifiers and Feedback
The Ideal Op-Amp An op-amp is a differential amplifier with very high gain. Ideal properties: Infinite open-loop gain (A β β) Infinite input impedance (no current into inputs) Zero output impedance...
The Ideal Op-Amp
An op-amp is a differential amplifier with very high gain. Ideal properties:
- Infinite open-loop gain (A β β)
- Infinite input impedance (no current into inputs)
- Zero output impedance
- Infinite bandwidth
Real op-amps (e.g., LM741, TL071, OPA192) approximate these:
- A = 10^5 to 10^7
- Input impedance: 10^6 (bipolar) to 10^12 (CMOS)
- Output impedance: 10-100 ohms
- Unity-gain bandwidth: 1-100 MHz
The Golden Rules
For an op-amp in negative feedback:
- The output does whatever it takes to make the two inputs equal (virtual short)
- No current flows into the inputs
These two rules let you analyze any op-amp circuit.
Inverting Amplifier
Vin ββR1βββ¬ββ (β)
β
β
(β) op-amp
β
βββR2ββ Vout
(+): GND
Virtual ground at the (β) input (since + is at 0 V). Current through R1: I = Vin/R1. This current must flow through R2 (no current into op-amp input). So Vout = -I Γ R2 = -Vin Γ R2/R1.
Gain = -R2/R1
Non-Inverting Amplifier
Vin ββ (+)
op-amp
(β)ββR1ββGND
β
βββR2ββ Vout
Virtual short: V(-) = V(+). So V(-) = Vin. Voltage divider from Vout to GND through R1 and R2:
Vin = Vout Γ R1/(R1+R2)
Gain = 1 + R2/R1
Buffer (Voltage Follower)
Vin ββ (+)
op-amp
(β)βββ
βββ Vout
Gain = 1. Used to convert a high-impedance source to a low-impedance output. Perfect for driving heavy loads.
Integrator
Vin ββR1βββ¬ββ (β)
β
C
β
βββ Vout
Vout = -(1/(R1ΓC)) Γ β«Vin dt
Applications: analog filters, charge amplifiers, ADCs.
Differentiator
Capacitor at input, resistor at feedback. Vout = -RC Γ dVin/dt.
Filters
Combine R, C, and op-amp to build:
- Low-pass: gain drops above cutoff
- High-pass: gain drops below cutoff
- Band-pass: combination
- Notch: rejects one frequency
The Sallen-Key topology gives a 2nd-order filter with one op-amp.
Real Op-Amp Limitations
Input offset voltage: a few Β΅V to a few mV. Limits DC precision.
Input bias current: nA (bipolar) to pA (CMOS). Causes offsets through source resistance.
Gain-bandwidth product (GBW): the closed-loop bandwidth is GBW / |Gain|. At 100 MHz GBW, a gain of 10 gives 10 MHz bandwidth.
Slew rate: max dVout/dt. Typically 1-20 V/Β΅s. Limits large-signal bandwidth.
Common-mode range: inputs must stay within a range near the rails. Rail-to-rail op-amps extend this.
Output swing: how close Vout can get to the rails. Rail-to-rail output is 50 mV from each rail.
Key Takeaways
- Ideal op-amp: infinite gain, infinite Zin, zero Zout
- Golden rules: virtual short, no input current
- Inverting: -R2/R1, Non-inverting: 1+R2/R1
- Integrator and differentiator are workhorses
- Real op-amps have offset, bias current, finite GBW, slew rate
- Choose op-amp based on: speed, precision, power, cost
Analog Filter Design
Why Filters? Every real signal has noise. Filters separate signal from noise based on frequency content: Low-pass: keeps low frequencies, removes high (smoothing, anti-aliasing) High-pass: keeps h...
Why Filters?
Every real signal has noise. Filters separate signal from noise based on frequency content:
- Low-pass: keeps low frequencies, removes high (smoothing, anti-aliasing)
- High-pass: keeps high, removes low (AC coupling, removing DC offset)
- Band-pass: keeps a band (radio receivers, audio equalizers)
- Notch: removes a narrow band (60 Hz hum rejection)
First-Order RC Low-Pass
Vin ββRβββ¬ββ Vout
β
C
β
GND
Transfer function:
H(jΟ) = 1 / (1 + jΟRC)
Cutoff frequency (where |H| = 0.707):
fc = 1 / (2ΟRC)
Roll-off: -20 dB/decade. At 10x fc, gain is -20 dB; at 100x fc, gain is -40 dB.
Second-Order Filters
Two RC sections in series don't work well β they load each other. Use an active filter (Sallen-Key):
Vin ββR1βββ¬ββR2βββ¬ββ (+)
C1 β op-amp
β C2 β
GND GND βββ Vout
β
(β)ββR3ββR4ββGND
The op-amp buffers and provides the feedback that creates the sharp roll-off.
Roll-off: -40 dB/decade (10x better than first-order).
Butterworth Response
Maximally flat passband. No ripple. The standard "textbook" response.
For 2nd order:
H(s) = ΟcΒ² / (sΒ² + β2 Οc s + ΟcΒ²)
The Q factor is 0.707.
Chebyshev Response
Ripple in the passband, but sharper roll-off than Butterworth.
For 0.5 dB ripple, Q = 1.4 for 2nd order.
Trade-off: more ripple = sharper roll-off = worse transient response.
Bessel Response
Linear phase (constant group delay) β important for pulses and digital signals.
Roll-off is gentler than Butterworth.
Higher-Order Filters
Cascade multiple 2nd-order sections. A 4th-order filter is two 2nd-order sections in series. A 6th-order is three.
Real components have tolerance, so higher-order filters are harder to build.
Active Filter Design Example
Design a 2nd-order Butterworth low-pass at 1 kHz.
Given: fc = 1 kHz, Q = 0.707, C = 10 nF
R = 1 / (2Ο Γ 1000 Γ 10 nF) = 15.9 kΞ©
Use standard values: R = 16 kΞ©, C = 10 nF, and a second stage with R = 16 kΞ©, C = 4.7 nF for the Sallen-Key topology.
Filter Order and Roll-off
| Order | Roll-off | Components |
|-------|----------|------------|
| 1st | -20 dB/dec | 1 R, 1 C |
| 2nd | -40 dB/dec | 2 R, 2 C, op-amp |
| 4th | -80 dB/dec | 4 R, 4 C, 2 op-amps |
| 6th | -120 dB/dec | 6 R, 6 C, 3 op-amps |
For each additional 20 dB of stopband attenuation, add one order.
Anti-Aliasing Filters
Before sampling an analog signal, you must low-pass filter it to remove frequencies above Nyquist (fs/2). Otherwise, aliasing folds high frequencies into the baseband, corrupting the signal.
Rule: cutoff at 0.4 Γ fs, sharp enough that fs/2 is attenuated by >60 dB.
Key Takeaways
- Filters separate signal from noise by frequency
- First-order: -20 dB/dec, simple RC
- Second-order: -40 dB/dec, needs op-amp
- Butterworth (flat), Chebyshev (ripple), Bessel (linear phase)
- Higher order = cascaded 2nd-order sections
- Anti-aliasing filter is mandatory before ADC
π Problem Set 1: MOSFETs, BJTs, Amplifiers
Q1. A MOSFET has kn' = 100 Β΅A/VΒ², W/L = 20, Vth = 1V, Vgs = 2V, Ξ» = 0. Find Id and gm in saturation.
Show Solution
Vov = Vgs - Vth = 1V. Id = 0.5 Γ 100e-6 Γ 20 Γ 1Β² = 1 mA. gm = 100e-6 Γ 20 Γ 1 = 2 mA/V.
Q2. Design a common-source amplifier with gain -20 using a MOSFET with gm = 5 mA/V, ro = 100 kΞ©. Choose RD.
Show Solution
Want -20 = -5m Γ (RD || 100k). RD || 100k = 4 kΞ©. Solve: RD = 4k Γ 100k / (100k - 4k) = 4.17 kΞ©. Choose RD = 4.3 kΞ© standard value.
Q3. For a BJT current mirror with Iref = 1 mA, Ξ² = 100, and identical transistors, what is Iout? What happens if Ξ² drops to 50?
Show Solution
Iout = 1mA Γ 1/(1+2/100) = 0.98 mA. For Ξ²=50: Iout = 1 Γ 1/(1+2/50) = 0.96 mA. Difference is small β current mirrors are robust to Ξ² variation.
π― Midterm 1: MOSFET, BJT, Amplifiers
Q1. Explain the difference between triode and saturation regions of a MOSFET. Which is used for amplification?
Show Solution
Triode (Vds < Vov): acts like a voltage-controlled resistor, Id depends on both Vgs and Vds. Saturation (Vds > Vov): Id depends mainly on Vgs, channel is pinched off at drain. Saturation is used for amplification because it gives high gain (Id independent of Vds β high ro).
Q2. Design a differential pair with tail current 1 mA and gain 20. Assume gm = 2 mA/V per transistor and ro = 50 kΞ©.
Show Solution
Differential gain = gm Γ (ro || RD). Want 20 = 2m Γ (50k || RD). 50k || RD = 10 kΞ©. RD = 12.5 kΞ©. Choose 12 kΞ© standard.
Q3. For a common-emitter amplifier with Rc = 5 kΞ©, gm = 40 mA/V, ro = 100 kΞ©, Ξ² = 200, find the voltage gain.
Show Solution
Av = -gm Γ (Rc || ro) = -0.04 Γ (5k || 100k) = -0.04 Γ 4.76k = -190. Very high gain.