electronics engineering
Course handbook · Fourth year
Applied Electronics
Applied electronics: amplifiers, operational amplifiers, feedback, oscillators, power supplies and analog circuit design, with exercises.
- 12Topics
- 25Solved exercises
- 47Formula sheet
Free handbook generated from the lessons of the site and updated often, every time a lesson or an exercise changes: the latest version is always at www.electronics-engineering.com/handbook/applied-electronic. Links work in the PDF too.
1Transistor biasing
Before amplifying a signal, a transistor must be biased: the DC voltages and currents must bring it to a precise operating point, in the region where it behaves as an amplifier (active region for the BJT, saturation for the FET), and keep it there. The problem is that real transistors differ greatly from one another: the current gain
of two BJTs of the same type can vary from 100 to 400, the threshold voltage of a discrete MOSFET by a volt, the current of a JFET by a factor of two and a half. On top of that, everything changes with temperature. This lesson shows the bias circuits of the BJT (npn and pnp), of the JFET and of the MOSFET (n- and p-channel, enhancement and depletion), proves why some are stable and others are not, and checks it with a Monte Carlo simulation and with SPICE.
The idea in simple words
The transistor is like a controlled tap: a small quantity at the input (the base current, or the gate voltage) decides how much current flows. To amplify a signal you must open the tap “halfway”, so that the signal can make it swing up and down without ever closing it completely or opening it completely. Biasing means choosing this half-open setting. The delicate point is that every tap is different: if you set the knob to the same position, one unit gives little water and another gives too much. Good bias circuits do not fix the knob, but measure the current that flows and correct it: this is feedback, and thanks to it the current depends almost only on the resistors, which are precise, and not on the transistor.
The operating point and the load line
In the npn BJT in the active region three simple DC relations hold:
V,
and
; moreover
V is required, otherwise the transistor is saturated and no longer amplifies.
The operating point (or quiescent point, Q) is the pair
in the absence of signal. On the output circuit Kirchhoff’s law gives
, that is, with
,
![]()
This is the static load line: all the possible operating points with those resistors lie on it; which one is the actual point is decided by the base current, that is, by the input circuit. To obtain the maximum symmetrical swing of the signal, the point Q is placed roughly halfway along the useful stretch of the line.

The example for the whole lesson:
V, desired collector current
mA, transistor with a nominal
of 200 which in reality can lie between 100 and 400 (a normal spread for small-signal transistors).

Fixed bias (circuit 1)
A resistor
from the supply to the base fixes the base current:
![]()
With
MΩ and
kΩ one obtains 2 mA with
. But the collector current is proportional to
: with
it becomes 1 mA, with
it should become 4 mA, but above 3.93 mA the drop across
uses up the whole supply and the transistor saturates. The same circuit, built with different transistors from the same box, has completely different operating points. It is the circuit of textbooks, almost never that of real designs.
Voltage divider and emitter resistor (circuit 2)
This is the standard bias of discrete-component circuits. The divider
,
fixes the base voltage; the resistor
on the emitter provides the feedback. To compute it, the divider is replaced by its Thévenin equivalent:
![]()
On the base-emitter loop,
, and with
:
![]()
Theorem. In the divider circuit the relative sensitivity of the emitter current to
is
![]()
and it is smaller the more
holds. In fixed bias the same sensitivity is 1.
Proof. Setting
,
. Differentiating with respect to
, that is, multiplying the derivative with respect to
by
:
. In fixed bias
is proportional to
, and the logarithmic derivative is 1. ∎
The physical meaning: if the current tends to grow, the voltage across
grows, that is, the emitter rises, and for the same base voltage the
decreases and pushes the current back. It is a negative current feedback.
The design rules that follow:
- give
a drop of about one tenth or one fifth of the supply (more drop means more stability, but less swing for the signal); - choose
, so that the term
is at most one tenth of
; - derive
and
from
and
, and
from the desired collector voltage.
In the example:
kΩ (about 2.5 V on the emitter),
kΩ,
kΩ,
kΩ. Then
V,
kΩ, and with
:
mA,
V,
V,
V,
V. The sensitivity to
is
: twenty times less than fixed bias. With
from 100 to 400 the current goes from 1.95 to 2.12 mA. (Here
kΩ is just above the limit
kΩ of the rule: with commercial values it is an acceptable compromise, and the variation stays below 9 %.)
Collector feedback (circuit 3)
The base resistor is connected to the collector instead of the supply. If the collector current grows, the collector voltage falls and with it the base current: this too is a negative feedback. From the loop supply,
,
, base:
![]()
It is stable if
, but to have a reasonable operating point
cannot be too small: with
kΩ and
kΩ one obtains 2.03 mA with
, but from 1.39 to 2.64 mA with
between 100 and 400. It lies halfway between the other two circuits; it has the advantage of using only two resistors and of never being able to saturate (the collector cannot fall below the base). It does, however, reduce the gain for the signal, because the feedback acts on it too.
The pnp (circuit 4)
In the pnp all currents and voltages change sign: the current enters from the emitter and exits from the collector and the base, and in the active region
V. With a positive supply the emitter goes towards
through
and the collector towards ground through
. The formulas are the same read “from above”:
is measured from
downwards. The same operating point as the example is obtained by swapping the divider resistors (
kΩ towards the supply,
kΩ towards ground): the base sits 3.32 V below
and the current is again 2.06 mA. The pnp is used when the load must sit towards ground, in complementary output stages and in current sources towards the supply.
Temperature
Two effects shift the operating point when the transistor heats up:
- the
at constant current decreases by about 2 mV per degree: between 25 and 75 °C it falls by 0.1 V;
increases by a few tenths of a percent per degree: in the example from 200 to 260.
(The collector reverse current
, which doubles every 10 °C, was important in germanium transistors; in silicon ones it is negligible.)
Between 25 and 75 °C fixed bias goes from 2.00 to 2.62 mA (+31 %), collector feedback from 2.03 to 2.29 mA (+13 %), the divider from 2.06 to 2.17 mA (+5 %). In the divider the effect of the
weighs
: once again, a large emitter resistor makes the circuit insensitive.
In power transistors temperature can trigger thermal runaway: more current heats the transistor, the
needed decreases, the current grows again. The same emitter resistor (or a diode mounted on the same heatsink that compensates the
) prevents it.
The test: Monte Carlo and SPICE
A Monte Carlo simulation draws 100 000 transistors with
uniform between 100 and 400 and computes the collector current in the three circuits:
| circuit | mean current | standard deviation | range |
|---|---|---|---|
| 1, fixed | 2.50 mA | 0.87 mA | from 1.00 to 3.93 mA (saturates) |
| 2, divider | 2.07 mA | 0.04 mA | from 1.95 to 2.12 mA |
| 3, collector feedback | 2.17 mA | 0.35 mA | from 1.39 to 2.64 mA |

The same circuit simulated with SPICE (Gummel-Poon model with
A and Early voltage of 100 V) gives, with
, 200, 400: 1.09, 2.11 and 3.91 mA for fixed bias; 1.98, 2.09 and 2.15 mA for the divider; 1.45, 2.08 and 2.67 mA for collector feedback. The differences of a few percent with respect to the hand calculations come from the real
(0.67 V instead of 0.7) and from the Early effect: the simple model is enough for design.
The JFET
The n-channel JFET conducts when
and turns off when the gate voltage falls to the pinch-off voltage
(negative). In saturation the Shockley law holds:
![Rendered by QuickLaTeX.com \[ I_D = I_{DSS}\left(1 - \frac{V_{GS}}{V_P}\right)^2,\qquad V_P < V_{GS} \le 0 \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-27a46af244b438363aedadecbbfaf258_l3.png)
The gate is a junction biased in reverse: it draws no current, so the gate voltage is fixed only by the resistors. The spread is huge: for the same type of JFET
and
can vary by a factor of two or three. In the example two extreme specimens are considered:
mA with
V, and
mA with
V.

Self-bias of the JFET (circuit 1)
The gate is connected to ground through
(which only serves as a reference, because no current flows into the gate); the drain current creates across
a drop that makes the source positive, that is, the gate negative with respect to the source:
. The operating point is the intersection of the Shockley curve with this line. Solving, with
Ω: 1.58 mA (
V) for the first specimen and 3.49 mA (
V) for the second, a ratio of 2.2.
JFET with the divider
If the gate is brought to a positive voltage
with a divider (as in circuit 2, with
MΩ and
MΩ one has
V) and
is increased, the line becomes
, much less steep. With
kΩ: 2.07 and 2.69 mA, a ratio of 1.3. It is the same principle as the BJT: a large voltage on a large resistor makes the current almost independent of the device.

Theorem. With the divider, the difference between the currents of two specimens is at most
, where
is the difference between their gate voltages at the operating point.
Proof. In both cases
with the same
and the same
; subtracting,
. Since the gate voltages in any case lie between
and 0, their difference is bounded, and by increasing
(together with
, so as not to change the mean current) the current difference shrinks as much as desired. ∎
In the example the two gate voltages differ by 1.36 V, and 1.36 V / 2.2 kΩ = 0.62 mA, exactly the difference between 2.69 and 2.07 mA.
The MOSFET
The n-channel enhancement MOSFET conducts only if
exceeds the threshold voltage
(positive); in saturation (that is, with
)
![]()
In discrete MOSFETs the threshold is very spread: for one type the manufacturer often guarantees only a range of a volt or more. In the example
mA/V² and
between 1.5 and 2.5 V.
MOSFET with fixed gate voltage
With
V the current is 1.13, 0.50 or 0.12 mA for
= 1.5, 2 or 2.5 V: a factor 9. It is the equivalent of fixed bias of the BJT, and for the same reason it is not used.
Divider and source resistor (circuit 2)
With
MΩ and
MΩ the gate sits at
V; with
kΩ one has
. Substituting into the quadratic law and setting
:
![]()
(the positive root, because the transistor must conduct). The currents become 1.54, 1.23 and 0.93 mA: the spread falls from a factor 9 to less than 1.7. With
V and
kΩ:
V,
V, and the saturation condition is amply satisfied (
V against
V). SPICE gives the same value, 1.23 mA.
Drain feedback (circuit 3)
A resistor
connects the drain to the gate. No current flows into the gate, so there is no drop across
and
.
Theorem. With drain feedback, a conducting enhancement MOSFET is always in saturation.
Proof. Saturation requires
. Since
, the condition becomes
, that is
, which is true for every n-channel enhancement MOSFET. ∎
With
V and
kΩ the current is 1.83, 1.73 and 1.64 mA for the three thresholds: it is the most stable of the three circuits, because the whole supply (minus the
) falls on the resistor that provides the feedback. The same connection (gate joined to drain) is the “diode-connected transistor” of current mirrors.
The depletion MOSFET
The depletion MOSFET has the channel already formed: the threshold is negative and the transistor conducts even with
, with current
. It behaves like a JFET, and it is biased with the same circuits (self-bias or divider), with the difference that the insulated gate also accepts positive voltages. Connecting gate and source gives the simplest possible current generator.
The p-channel MOSFET (circuit 4)
As for the pnp, everything changes sign: it conducts when the gate is lower than the source by at least
, with
. The source goes towards the supply through
, the drain towards ground through
, and the divider fixes the gate voltage with respect to
. The formulas are those of the n-channel read “from above”.
How to choose
| circuit | stability | when it is used |
|---|---|---|
| BJT, fixed bias | very poor (proportional to β) | almost never; as a saturated switch |
| BJT, divider + R_E | excellent | standard in discrete stages |
| BJT, collector feedback | fair | simple stages, cannot saturate |
| JFET, self-bias | fair | high-impedance input stages |
| FET, divider + R_S | good | standard with discrete FETs |
| MOSFET, drain feedback | excellent | simple stages, current mirrors |
In integrated circuits things go differently: all the transistors are made together and are equal to one another, so biasing is done with current mirrors, which copy a reference current from one transistor to another (lesson on current mirrors). The same criterion still holds: the current must depend on resistors and size ratios, not on the absolute parameters of the transistors.
In summary
- Biasing means fixing the operating point on the load line, far from saturation and cut-off.
- The transistor parameters (
,
,
,
) are widely spread and change with temperature: the circuit must make them irrelevant. - It is obtained with negative feedback: an emitter or source resistor (with the divider on the base or gate), or a collector or drain resistor connected to the input.
- In the BJT divider the sensitivity to
is
: with
the current changes by a few percent with
from 100 to 400. - pnp and p-channel use the same circuits with the polarities inverted.
The code
import math
import numpy as np
VCC, VBE = 12.0, 0.7
# BJT NPN: tre circuiti progettati per IC = 2 mA con beta nominale 200
def fixed(beta, RB=1.13e6, RC=3.0e3, vbe=VBE): # polarizzazione fissa
IC = beta * (VCC - vbe) / RB
return min(IC, (VCC - 0.2) / RC) # oltre: saturazione
def divider(beta, R1=47e3, R2=18e3, RC=2.2e3, RE=1.2e3, vbe=VBE): # partitore + resistenza di emettitore
VTH, RTH = VCC * R2 / (R1 + R2), R1 * R2 / (R1 + R2)
IE = (VTH - vbe) / (RE + RTH / (beta + 1))
return beta / (beta + 1) * IE
def coll_fb(beta, RB=510e3, RC=3.0e3, vbe=VBE): # retroazione di collettore (RB tra collettore e base)
IB = (VCC - vbe) / (RB + (beta + 1) * RC)
return beta * IB
print("IC in mA per beta = 100, 200, 400")
for name, f in (("fissa", fixed), ("partitore", divider), ("retroazione di collettore", coll_fb)):
print(f" {name:26s}", " ".join(f"{1e3 * f(b):.2f}" for b in (100, 200, 400)))
R1, R2, RC, RE = 47e3, 18e3, 2.2e3, 1.2e3
VTH, RTH = VCC * R2 / (R1 + R2), R1 * R2 / (R1 + R2)
IC = divider(200); IE = IC * 201 / 200
print(f"partitore: VTH {VTH:.3f} V, RTH {RTH / 1e3:.2f} kOhm, VB {VTH - IC / 200 * RTH:.2f} V, VE {IE * RE:.2f} V, VC {VCC - IC * RC:.2f} V, VCE {VCC - IC * RC - IE * RE:.2f} V")
# temperatura: da 25 a 75 gradi VBE scende di 2 mV/grado e beta sale da 200 a 260
for name, f in (("fissa", fixed), ("partitore", divider), ("retroazione di collettore", coll_fb)):
a, b = f(200), f(260, vbe=VBE - 0.1)
print(f" {name:26s} da 25 a 75 gradi: {1e3 * a:.2f} -> {1e3 * b:.2f} mA ({100 * (b / a - 1):+.0f} %)")
# Monte Carlo: beta uniforme tra 100 e 400
rng = np.random.default_rng(1)
beta = rng.uniform(100, 400, 100_000)
for name, f in (("fissa", fixed), ("partitore", divider), ("retroazione di collettore", coll_fb)):
ic = 1e3 * np.vectorize(f)(beta)
print(f" Monte Carlo {name:26s} media {ic.mean():.2f} mA, deviazione {ic.std():.2f} mA, tra {ic.min():.2f} e {ic.max():.2f}")
# JFET a canale n: ID = IDSS (1 - VGS/VP)^2, due esemplari agli estremi della dispersione
def bisect(f, a, b):
for _ in range(100):
m = (a + b) / 2
a, b = (m, b) if f(a) * f(m) > 0 else (a, m)
return (a + b) / 2
def jfet(IDSS, VP, VG, RS):
# VGS = VG - ID RS deve stare tra VP e 0: si cerca ID in quell'intervallo
f = lambda ID: ID - IDSS * (1 - (VG - ID * RS) / VP) ** 2
ID = bisect(f, max(VG / RS, 0), (VG - VP) / RS)
return ID, VG - ID * RS
for VG, RS in ((0, 470.0), (4.0, 2.2e3)):
r = [jfet(I, V, VG, RS) for I, V in ((4e-3, -2.0), (10e-3, -4.0))]
print(f"JFET VG = {VG} V, RS = {RS:.0f}: ID {1e3 * r[0][0]:.2f} mA (VGS {r[0][1]:.2f}) / {1e3 * r[1][0]:.2f} mA (VGS {r[1][1]:.2f})")
# MOSFET ad arricchimento a canale n: ID = K (VGS - Vt)^2, K = 0.5 mA/V^2, Vt tra 1.5 e 2.5 V
K = 0.5e-3
def mos_div(Vt, VG=4.8, RS=1e3):
# VGS = VG - K (VGS - Vt)^2 RS -> radice con VGS > Vt
u = (-1 + math.sqrt(1 + 4 * K * RS * (VG - Vt))) / (2 * K * RS) # u = VGS - Vt
return K * u * u
def mos_fixed(Vt, VGS=3.0):
return K * (VGS - Vt) ** 2
def mos_drainfb(Vt, RD=4.7e3, VDD=12.0):
# VGS = VDS = VDD - ID RD
u = (-1 + math.sqrt(1 + 4 * K * RD * (VDD - Vt))) / (2 * K * RD)
return K * u * u
for name, f in (("VGS fissa 3 V", mos_fixed), ("partitore 4.8 V + RS 1 k", mos_div), ("retroazione di drain", mos_drainfb)):
print(f"MOSFET {name:26s}: ID con Vt = 1.5 / 2 / 2.5 V: " + " / ".join(f"{1e3 * f(v):.2f}" for v in (1.5, 2.0, 2.5)) + " mA")
print(f"MOSFET partitore, Vt = 2 V: VGS {4.8 - mos_div(2.0) * 1e3:.2f} V, VD {12 - mos_div(2.0) * 2.2e3:.2f} V con RD = 2.2 k")The program prints the collector currents of the three circuits for
= 100, 200, 400 (fixed 1.00, 2.00, 3.93 mA; divider 1.95, 2.06, 2.12 mA; collector feedback 1.39, 2.03, 2.64 mA), the divider voltages, the temperature effects (+31 %, +5 %, +13 %), the Monte Carlo statistics of the table, the currents of the two JFETs (1.58 and 3.49 mA self-biased, 2.07 and 2.69 mA with the divider) and those of the MOSFETs with the three thresholds.
2Small-signal amplifiers
Once biased, the transistor amplifies small variations around its operating point. For small enough variations its exponential or square-law relations can be replaced by straight lines, and the transistor becomes a linear circuit made of resistors and controlled sources: the small-signal model. This lesson derives the π and T models of the BJT and the model of the FET, computes the gain, input resistance and output resistance of the three basic configurations (common emitter, common base and common collector, and the corresponding common source, common gate and common drain), studies the effect of the capacitors at low frequencies and of the transistor capacitances at high frequencies (the Miller effect), and puts everything together in a two-stage amplifier, computed by hand and checked with SPICE.
The idea in simple words
A transistor’s characteristic is curved, but every curve, looked at closely enough, looks like a straight line. If the signal is small, the transistor always works on a small piece of its curve around the operating point, and on that piece it behaves as a linear device: each extra millivolt at the input always gives the same increase in output current. The ratio between the two is the transconductance
, and almost everything depends on it. The problem is then split in two: first the DC part (biasing, previous lesson), which sets the operating point and therefore
; then the signal, on a circuit in which the transistor is replaced by its linear model.
From the curve to the line: transconductance
In a BJT in the active region
, with
mV at room temperature.
Theorem. For small variations around the operating point
, the collector current changes by
with
![]()
and the second-harmonic distortion, with a sinusoidal signal of amplitude
, is
.
Proof. Let
; then
. The linear term is
. With
the quadratic term is
: the amplitude of the second harmonic, divided by that of the fundamental
, is
. ∎
At 2 mA the transconductance is 77 mS: one extra millivolt on the base lets 77 µA more flow in the collector. “Small signal” has a precise meaning: for 1 % distortion the amplitude across the junction must stay below about 1 mV; with 10 mV the distortion is already 10 %. We will see that an unbypassed emitter resistor reduces the part of the signal that actually reaches the junction, and therefore the distortion.
In a MOSFET in saturation
, and differentiating:
![]()
At the same current the MOSFET has a much lower transconductance than the BJT: with 2 mA and
V,
mS against 77 mS. The second-harmonic distortion, by the same reasoning, is
: the MOSFET accepts larger signals.
The π and T models

The π model (figure, 1) places between base and emitter the resistance seen from the base,
(because
), and between collector and emitter the source
. The Early effect adds
in parallel, usually tens of kΩ.
The T model (figure, 2) looks at the transistor from the emitter: the emitter current is
with
(about 13 Ω at 2 mA), and the collector collects
.
Theorem. The two models are equivalent.
Proof. In the T model, with
applied,
; the collector current is
, equal to that of the π model. The base current is
, because
: the resistance seen from the base is
, equal again. ∎
The more convenient model is used: the π model when the emitter is grounded, the T model when there is a resistor in the emitter or the signal enters at the emitter. A rule that comes from the T model and is used all the time: a resistance in the emitter, seen from the base, appears multiplied by
, and a resistance in the base, seen from the emitter, appears divided by
.
The FET has the same π model without
(the gate draws no current, the input resistance is infinite) and with
.
The method
- DC analysis: find the operating point (capacitors are open circuits).
- Parameters:
,
,
from the operating point. - Signal circuit: DC supplies become grounds (a constant voltage source has no variation), coupling and bypass capacitors become short circuits (at the operating frequencies their impedance is negligible), transistors are replaced by their model.
- Calculation of gain and resistances with Kirchhoff’s laws.
The three BJT configurations
denotes the total resistance seen from the collector (or the emitter) towards the load, and
is neglected, since it is usually much larger than the external resistances.
Common emitter. The signal enters the base and leaves from the collector; a resistor
may remain unbypassed in the emitter (degeneration).
Theorem. In a common-emitter stage with emitter resistor ![]()
![]()
Proof. With the π model: the base current
flows through
and, together with the collector current
, through
as well. Hence
, which gives
. The output voltage is
; dividing gives
. The approximation comes from
. Seen from the collector, the current source has infinite resistance, and
remains. ∎
Without
(bypassed emitter) the gain is
, large but dependent on current and temperature; with
it becomes
, a ratio of resistors: less gain, but stable, more linear (only the fraction
of the signal reaches the junction) and with a much higher input resistance. It is negative feedback once again.
Common base. The signal enters the emitter, the base is grounded for the signal. From the T model:
(a few ohms),
(non-inverting), current gain
, very high
. It is a current follower: it takes a current from a low-impedance source and delivers it unchanged into a high impedance. It is used in wideband amplifiers and in the cascode, because it does not suffer from the Miller effect.
Common collector (emitter follower). The signal enters the base and leaves from the emitter; the collector is at the supply.
Theorem. In an emitter follower with total resistance
on the emitter and source resistance
seen from the base
![Rendered by QuickLaTeX.com \[ A_v = \frac{(\beta + 1) R_L'}{r_\pi + (\beta + 1) R_L'} \approx 1,\qquad R_{in} = r_\pi + (\beta + 1) R_L',\qquad R_{out} = \frac{r_\pi + R_s'}{\beta + 1} \approx r_e + \frac{R_s'}{\beta + 1} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-615adb494183503080cb3cf0a5d8c3f0_l3.png)
Proof. The base current flows through
and the emitter current
through
:
and
, which give
and
. For the output resistance the signal is set to zero and a voltage
is applied to the emitter: the resulting base current is
, the emitter current
times as much, and the ratio is
. ∎
The gain is almost 1, but the input resistance is
times the load and the output resistance
times smaller than the source: it is an impedance converter (buffer), which lets a stage with high output resistance drive a low load.
The FET configurations
The same formulas hold for the FET with
(that is,
) and
:
| configuration | voltage gain | input resistance | output resistance |
|---|---|---|---|
| common emitter | |||
| common source | infinite (the gate resistors) | ||
| common base | high ( | ||
| common gate | high ( | ||
| common collector | |||
| common drain | infinite |
The FET follower (common drain) has a practically infinite input resistance but a gain noticeably less than 1 and an output resistance
, that is, 100 Ω with 10 mS: much higher than that of the bipolar follower.
A complete example: two stages

Data:
V,
,
V; first stage with the divider of the biasing lesson (
kΩ,
kΩ,
kΩ,
Ω,
kΩ); second stage with
kΩ,
kΩ,
kΩ; load
kΩ, source with
kΩ.
DC.
mA (
V),
mA (
V).
Parameters.
mS,
kΩ;
mS,
kΩ;
kΩ (negligible).
Second stage. On the emitter
Ω;
kΩ,
.
First stage. The collector sees
kΩ;
kΩ,
.
Overall. The source sees the divider
, so
![]()
and the output resistance is
Ω.
What the follower is for. Without the second stage the 1 kΩ load would sit directly on the collector:
Ω,
and the overall gain would drop to
. The follower gains nothing in voltage, but it almost triples the gain of the whole amplifier because it takes the load off the first stage.
SPICE, with the complete model, gives 14.65 at mid-band (against 14.69) and an input resistance of 8.27 kΩ (against 8.26).
Low frequencies: the capacitors
The coupling capacitors (C1, C2, C3) and the bypass capacitor (C_E) are short circuits only at high enough frequencies. Each forms a high-pass filter with the resistances it sees. The short-circuit time constant method estimates the lower cut-off frequency as follows: for each capacitor, compute the resistance it sees across its terminals with all the other capacitors shorted, and add up the poles:
![Rendered by QuickLaTeX.com \[ f_L \approx \sum_i \frac{1}{2\pi R_i C_i} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-d0831a9332f4d2d46416f5e294b77478_l3.png)
| capacitor | resistance seen | pole |
|---|---|---|
| C1 = 10 µF | 1.72 Hz | |
| C2 = 10 µF | 1.01 Hz | |
| C3 = 100 µF | 1.56 Hz | |
| C_E = 100 µF | 15.0 Hz |
The sum gives 19.3 Hz; SPICE finds 15.8 Hz. The method overestimates a little because it adds the poles as if they were all dominant, and it neglects the zero that
creates together with
; but it immediately points to the critical capacitor: the emitter bypass, because it sees the very small resistance of the emitter (about
plus the base resistances divided by
). To lower
it is
that should be increased, not the others.
High frequencies: the transistor capacitances and the Miller effect
A transistor has two capacitances:
between base and emitter (the junction capacitance plus the charge stored in the base, proportional to the current) and
between base and collector (the reverse-biased junction, small). In the example, at the operating point, SPICE computes
pF and
pF. The transition frequency, at which the current gain falls to 1, is
MHz.
Theorem (Miller). An impedance
connected between the input and the output of an amplifier with gain
is equivalent, seen from the input, to an impedance
to ground. For a capacitor
with negative
, the capacitance seen from the input is
.
Proof. The current in
is
, the same that an impedance
between the input and ground would draw. For a capacitor
and
. ∎
In the first stage the gain from base to collector is about
(with
reduced by degeneration), and the small
appears multiplied by 17.8: 37 pF in parallel with the input, almost as much as
. This is why high-gain common-emitter stages are slow, and why the cascode (a common base on top of a common emitter) is so widespread: it keeps the gain at the collector of the first transistor low.
The open-circuit time constant method estimates the upper cut-off frequency by adding, for each capacitance, its product with the resistance it sees with the other capacitances disconnected:
![]()
In the example:
sees 108 Ω (4.8 ns),
sees 17.8 kΩ, the Miller effect (37.3 ns),
4.0 ns and
1.9 ns. The total, 48 ns, gives
MHz; SPICE finds 3.41 MHz. The dominant term is precisely
of the first stage.

Summary
- For small signals the transistor is linear:
for the BJT,
for the FET; “small” means a few millivolts across the BJT junction. - The π model (
,
,
) and the T model (
,
) are equivalent; a resistance in the emitter seen from the base is multiplied by
. - Common emitter: high, inverting gain,
; common base: low-impedance input, no Miller effect; common collector: unity gain, impedance converter. - The band goes from
, set mainly by the emitter bypass, to
, set mainly by
multiplied by the Miller effect. - In the example: gain 14.7 (23.3 dB), band from 16 Hz to 3.4 MHz, checked with SPICE.
The code
import math
VT, beta, VA, VBE, VCC = 0.02585, 200, 100.0, 0.7, 12.0
par = lambda *r: 1 / sum(1 / x for x in r)
# first stage: common emitter with 47k/18k divider, RC 2.2k, RE1 100 ohm unbypassed and RE2 1.1k bypassed
R1, R2, RC, RE1, RE2 = 47e3, 18e3, 2.2e3, 100.0, 1.1e3
# second stage: common collector with 27k/33k divider, RE3 2.7k, load RL 1k; source with RS 1k
R3, R4, RE3, RL, RS = 27e3, 33e3, 2.7e3, 1e3, 1e3
# DC analysis
VTH1, RTH1 = VCC * R2 / (R1 + R2), par(R1, R2)
IC1 = beta / (beta + 1) * (VTH1 - VBE) / (RE1 + RE2 + RTH1 / (beta + 1))
VTH2, RTH2 = VCC * R4 / (R3 + R4), par(R3, R4)
IC2 = beta / (beta + 1) * (VTH2 - VBE) / (RE3 + RTH2 / (beta + 1))
print(f"operating point: IC1 = {1e3 * IC1:.2f} mA, VC1 = {VCC - IC1 * RC:.2f} V; IC2 = {1e3 * IC2:.2f} mA, VE2 = {VTH2 - IC2 / beta * RTH2 - VBE:.2f} V")
# small-signal parameters
gm1, gm2 = IC1 / VT, IC2 / VT
rpi1, rpi2 = beta / gm1, beta / gm2
print(f"gm1 = {1e3 * gm1:.1f} mS, rpi1 = {rpi1 / 1e3:.2f} k; gm2 = {1e3 * gm2:.1f} mS, rpi2 = {rpi2 / 1e3:.2f} k; ro1 = {VA / IC1 / 1e3:.0f} k")
# second stage (follower)
RLe = par(RE3, RL)
Rin2 = par(RTH2, rpi2 + (beta + 1) * RLe)
A2 = (beta + 1) * RLe / (rpi2 + (beta + 1) * RLe)
# first stage with emitter degeneration
RL1 = par(RC, Rin2)
Rin1 = par(RTH1, rpi1 + (beta + 1) * RE1)
A1 = -beta * RL1 / (rpi1 + (beta + 1) * RE1)
As = Rin1 / (Rin1 + RS)
Rout = par(RE3, (rpi2 + par(RC, RTH2)) / (beta + 1))
print(f"Rin1 = {Rin1 / 1e3:.2f} k, Rin2 = {Rin2 / 1e3:.1f} k, A1 = {A1:.2f}, A2 = {A2:.3f}, input divider {As:.3f}")
print(f"overall gain vout/vs = {As * A1 * A2:.2f} ({20 * math.log10(abs(As * A1 * A2)):.1f} dB), output resistance {Rout:.1f} ohm")
# lower cut-off frequency: short-circuit time constants
C1, C2, C3, CE = 10e-6, 10e-6, 100e-6, 100e-6
RsTH = par(RS, RTH1)
taus = {
"C1": C1 * (RS + Rin1),
"C2": C2 * (RC + Rin2),
"C3": C3 * (Rout + RL),
"CE": CE * par(RE2, RE1 + (rpi1 + RsTH) / (beta + 1)),
}
for k, tau in taus.items():
print(f" {k}: resistance seen {tau / {'C1': C1, 'C2': C2, 'C3': C3, 'CE': CE}[k]:8.1f} ohm, pole at {1 / (2 * math.pi * tau):5.2f} Hz")
print(f"estimated fL = sum of the poles = {sum(1 / (2 * math.pi * t) for t in taus.values()):.1f} Hz")
# upper cut-off frequency: open-circuit time constants (Cpi and Cmu from the SPICE operating point)
Cpi, Cmu = 44e-12, 2.1e-12
gm1e = gm1 / (1 + gm1 * RE1) # transconductance reduced by degeneration
Rpi = par(rpi1, (RsTH + RE1) / (1 + gm1 * RE1))
Rsb = par(RsTH, rpi1 + (beta + 1) * RE1)
Rmu = Rsb * (1 + gm1e * RL1) + RL1 # Miller effect
Rs2 = par(RC, RTH2)
Rmu2 = par(Rs2, rpi2 + (beta + 1) * RLe)
Rpi2 = (Rs2 + RLe) / (1 + gm2 * RLe)
tau = Cpi * Rpi + Cmu * Rmu + Cmu * Rmu2 + Cpi * Rpi2
print(f"time constants: Cpi1 {1e9 * Cpi * Rpi:.2f} ns, Cmu1 {1e9 * Cmu * Rmu:.1f} ns (Miller, x{1 + gm1e * RL1:.1f}), Cmu2 {1e9 * Cmu * Rmu2:.2f} ns, Cpi2 {1e9 * Cpi * Rpi2:.2f} ns")
print(f"estimated fH = {1 / (2 * math.pi * tau) / 1e6:.2f} MHz")The program prints the operating point, the small-signal parameters, the input resistances (8.26 and 13.5 kΩ), the gains of the two stages (−16.74 and 0.984), the overall gain −14.69 (23.3 dB) with the output resistance of 21.5 Ω, the four low-frequency poles with the 19.3 Hz estimate and the high-frequency time constants with the 3.31 MHz estimate.
For those who want to repeat the check, this is the netlist for ngspice (run it with ngspice -b amp2.cir):
* two-stage amplifier: common emitter + common collector
VCC vcc 0 12
VS in 0 dc 0 ac 1
RS in a 1k
C1 a b1 10u
R1 vcc b1 47k
R2 b1 0 18k
RC1 vcc c1 2.2k
Q1 c1 b1 e1 QN
RE1 e1 x 100
RE2 x 0 1.1k
CE x 0 100u
C2 c1 b2 10u
R3 vcc b2 27k
R4 b2 0 33k
Q2 vcc b2 e2 QN
RE3 e2 0 2.7k
C3 e2 out 100u
RL out 0 1k
.model QN NPN(IS=1e-14 BF=200 VAF=100 CJE=10p CJC=4p TF=0.35n)
.control
op
print @q1[ic] @q2[ic] @q1[cpi] @q1[cmu]
ac dec 50 0.1 1e9
let g = mag(v(out))
meas ac gmid max g
let g3 = gmid/sqrt(2)
meas ac fl when g=g3 rise=1
meas ac fh when g=g3 fall=1
let zin = mag(v(a)/(-i(vs)))
meas ac rin find zin at=10k
.endc
.endIt prints the collector currents (2.09 and 2.13 mA), the capacitances
and
(44 and 2.1 pF), the maximum gain 14.65,
= 15.8 Hz,
= 3.41 MHz and the input resistance 8.27 kΩ.
Exercises
Transistor exercises of the kind found in electronics exams, at three levels: basic, with the calculation of the operating point (npn and pnp BJT, JFET, MOSFET); intermediate, with small-signal amplifiers; exam, with frequency response and logic gates. Unless stated otherwise
V and
mV are used. The result is given straight away; the complete step-by-step solution opens with a click. The proofs of the formulas are in the lessons on biasing, on small-signal amplifiers and on BJT logic gates.
Basic level
Exercise 1. Designing a divider bias
An npn BJT with
between 80 and 300 (mean value 150) must work with
mA, a 15 V supply, 1.5 V on the emitter and 9 V on the collector. Size
,
,
and
with the rule
, choose standard values and check the current with
= 80, 150 and 300.
Exercise 2. A pnp
A pnp with
is powered from 9 V. The emitter goes to the supply through
kΩ, the collector to ground through
kΩ; the base is on a divider with 10 kΩ towards the supply and 33 kΩ towards ground. Find
, the emitter and collector voltages and
.
Exercise 3. Sensitivity to beta
In the divider circuit of the lesson (
kΩ,
kΩ,
) compute the relative sensitivity of the current to
and use it to estimate the change in current when
goes from 200 to 220. Compare with the exact calculation.
Exercise 4. Self-biased JFET
An n-channel JFET with
mA and
V must work at
mA with self-bias. Find
,
and the transconductance. What current is obtained with the same
by fitting a unit with
mA and
V?
Exercise 5. MOSFET with drain feedback
An n-channel MOSFET with
mA/V² and
V has a 1 MΩ resistor between drain and gate and
kΩ to the 10 V supply; the source is grounded. Find
,
and
, and check that the transistor is in saturation.
Intermediate level
Exercise 6. Common emitter with and without degeneration
A common-emitter stage has
mA,
,
kΩ and load
kΩ. Compute the voltage gain and the input resistance seen from the base with the emitter fully bypassed, and then with 220 Ω unbypassed.
Exercise 7. The follower as an impedance converter
A source with an internal resistance of 10 kΩ must drive a 100 Ω load. Compute the signal reaching the load when connected directly, and through an emitter follower with
,
mA and
kΩ (ignore the bias divider). Also find the output resistance of the follower.
Exercise 8. Common source
A MOSFET with
mA/V² works at
mA, with
kΩ and a 20 kΩ load. Compute
, the overdrive voltage and the gain with the source bypassed and with 500 Ω unbypassed. Compare with a BJT at the same current.
3The ideal operational amplifier
The operational amplifier is the most widely used analogue component: a differential amplifier with enormous gain that, on its own, is almost unusable, but with two feedback resistors becomes a precise amplifier, an adder, a filter, an integrator. Its behaviour is computed with two very simple rules. In this lesson we derive them and apply them to the fundamental configurations.
The ideal op-amp
An op-amp has two inputs, inverting (−) and non-inverting (+), and one output:
![]()
The ideal op-amp has infinite gain
, infinite input impedance (it draws no current from its inputs), zero output impedance and infinite bandwidth. Real ones come close:
between
and
, input currents of nanoamperes or picoamperes.
The virtual short
The two rules. If the op-amp is connected with negative feedback (part of the output returns to the inverting input) and is not saturated:
- the input currents are zero;
: there is a virtual short between the two inputs.
Why. The first is the definition of infinite input impedance. For the second: the output is finite (limited by the supply), so
tends to zero as
. Negative feedback is what sets the output at exactly the value that makes the difference zero: if
exceeds
, the output falls and brings
back down. Without negative feedback the rule does not hold: the output goes to one of its two extremes (comparator operation).

The inverting amplifier
Theorem.
, and the input impedance is
.
Proof. The non-inverting input is grounded, so by the virtual short
(a virtual ground). The current in
is
; since it cannot enter the op-amp, it all flows on through
:
. The gain follows. The input source sees
towards a point at zero potential, so the input impedance is
. ∎
The gain depends only on the ratio of two resistors, not on the op-amp: with 1% resistors the gain is accurate to 1 to 2%, whatever the value of
and its drift with temperature.
The non-inverting amplifier
Theorem.
, with (ideally) infinite input impedance.
Proof. By the virtual short
. The inverting input is connected to the output through the
–
divider:
. Equating gives the gain. The signal goes straight into the input, which draws no current. ∎
The voltage follower. With
(output connected directly to the inverting input) and no
, the gain is 1. It looks useless, but it is invaluable: it copies the voltage of a source that cannot supply current (a sensor, a high-impedance divider) onto any load. It is a buffer.
Adder and difference amplifier
Inverting adder. Several inputs, each with its own resistor
, into the same virtual-ground node: the currents add up in
, and
![]()
With equal resistors it is a sum, with different weights a weighted sum: the principle of audio mixers and digital-to-analogue converters.
Difference amplifier. With four resistors (
and
on the inverting input as in the inverting amplifier, and an
–
divider on the non-inverting input), by superposition
![]()
It amplifies the difference between two voltages and ignores what they have in common. It is the basis of bridge-sensor measurements and of instrumentation amplifiers, which we will see in the lesson on linear circuits.
Example. A sensor produces 0 to 100 mV and the analogue-to-digital converter accepts 0 to 3.3 V. A gain of 33 is needed: a non-inverting amplifier with
kΩ and
kΩ, or, with standard values,
kΩ (gain 34, full scale at 3.4 V, slightly beyond: one picks 31.6 kΩ from the 1% series).
The limits
The two rules are excellent approximations as long as the required gain is much smaller than
at the operating frequency, the output stays within the supplies and the current drawn from the output is within the component’s limits. The next lesson says what happens when these conditions fail.
4Real op-amp limits
The ideal op-amp is an excellent model, but real components have finite gain, limited bandwidth, a maximum rate of change of the output and small DC errors. Choosing the right op-amp for an application means knowing which of these limits matters. In this lesson we cover the effect of finite gain, the gain-bandwidth product, slew rate and offset errors, with the numbers found on datasheets.
Finite gain
With finite gain
and a fraction
of the output fed back to the input, the gain of the non-inverting amplifier is
![]()
(we derive it in the lesson on feedback). For
the ideal value
is recovered. The product
, the loop gain, measures how close we are to the ideal: the relative error is about
.
Example.
, desired gain 10 (
):
, an error of 0.01%, far less than the resistor tolerance.
The gain-bandwidth product
The gain
is very high only at very low frequencies. Almost all op-amps are internally compensated: they have a dominant pole at a few hertz, after which the gain falls by 20 dB per decade:
![]()
For
,
: the product of gain and frequency is constant. It is the gain-bandwidth product (GBW), the frequency at which the open-loop gain equals 1.

Theorem. An amplifier with ideal gain
built with an op-amp of gain-bandwidth product GBW has bandwidth
![]()
Proof. Substituting
(valid above
) into
:
![]()
a first-order system with gain
and cut-off frequency
. ∎
Example. With GBW = 1 MHz, an amplifier with gain 10 reaches 100 kHz, with gain 100 only 10 kHz. If gain 100 and 100 kHz bandwidth are needed, either a 10 MHz op-amp is chosen or two gain-of-10 stages are cascaded.
Slew rate
The output cannot change faster than a maximum value, the slew rate
(in V/µs), set by the current with which the internal stages charge the compensation capacitance. A sinusoid
has a maximum slope of
, so it passes undistorted only if
![]()
Example. A cheap op-amp with
V/µs, with a 10 V peak output, already distorts above
kHz, even though its GBW would allow much more. Large-signal audio needs a few V/µs; video signals hundreds.
DC errors
- Offset voltage
: even with both inputs at the same voltage the output is not zero, as if a small source were in series with the input (from microvolts to a few millivolts). It is amplified by the gain
: 2 mV of offset with a gain of 100 gives 200 mV at the output. - Bias currents
: the inputs draw a small current (nanoamperes for bipolar op-amps, picoamperes for MOSFET or JFET ones), which flowing through the resistors produces further error voltages. It is partly compensated by placing on the non-inverting input a resistor equal to the parallel combination of those on the inverting input. - Drift with temperature, in µV/°C: often more important than the offset itself, which can be trimmed.
For precision measurements on small signals there are chopper or zero-drift op-amps, which continuously correct their own offset down to a few microvolts.
Other parameters
| Parameter | Meaning | Typical values |
|---|---|---|
| CMRR | how much a voltage common to both inputs is rejected | 80-120 dB |
| PSRR | how much supply variations reach the output | 80-110 dB |
| noise | input-referred noise voltage | 1-50 nV/√Hz |
| output swing | how close the output gets to the supplies | from 1-2 V to a few mV (rail-to-rail) |
| output current | maximum current that can be delivered | 10-50 mA |
Rail-to-rail op-amps get within a few millivolts of the supplies, essential with the low supplies (3.3 V or less) of modern circuits. There is no single best op-amp: fast ones often have more offset and draw more current, precise ones are slow. The choice always starts from the parameter that limits the application.
5Linear op-amp circuits and active filters
With an op-amp and a few passive components almost every function of analogue electronics can be built. In this lesson we cover the integrator and differentiator, the instrumentation amplifier for sensors, the transimpedance amplifier for photodiodes, and active filters.
The integrator
Replacing the feedback resistor of the inverting amplifier with a capacitor
: the current
reaching the virtual-ground node charges the capacitor, and
![]()
Proof. The capacitor current is
with
; it must equal
:
. Integrating gives the formula. ∎
In frequency the gain is
: it falls by 20 dB per decade. The practical problem is that at DC the gain is infinite: even a small offset is integrated until the output saturates. So a large resistor is placed in parallel with the capacitor, limiting the DC gain (lossy integrator), or the capacitor is periodically reset with a switch. Integrators are used in waveform generators, dual-slope analogue-to-digital converters and analogue PI controllers.
The differentiator (capacitor at the input, resistor in feedback),
, has the opposite flaw: its gain grows with frequency and amplifies noise. It is rarely used, and always with a resistor in series with the capacitor limiting its high-frequency gain.
The instrumentation amplifier
A bridge sensor (strain gauge, load cell, resistance thermometer) produces a few millivolts of difference on top of a common voltage of a few volts. It needs an amplifier with very high input impedance on both inputs, a precise differential gain adjustable with a single resistor, and very high common-mode rejection.

Theorem. The gain of the three-op-amp instrumentation amplifier is
![]()
Proof. By the virtual short of the input op-amps, the voltage across
is exactly
, so the current
flows in
. The same current flows through the two resistors
, since it cannot enter the op-amps. The outputs of the first two op-amps therefore differ by
. The third op-amp, a unity-gain difference amplifier, brings this difference to the output (with a sign depending on which input is called
). The voltage common to both inputs, instead, passes unchanged through the first stage and is removed by the second. ∎
Example. With
kΩ and
kΩ the gain is
. In integrated form (the INA and AD620 parts of datasheets) the internal resistors are laser-trimmed and common-mode rejection exceeds 100 dB: an input of 1 V common to both wires appears at the output as less than 10 µV equivalent.
The transimpedance amplifier
A photodiode produces a current proportional to the light, of nanoamperes or microamperes. Connecting it to the inverting input of an op-amp with a feedback resistor
, the whole current flows in
and
![]()
The photodiode works at zero voltage (virtual ground), which makes it linear and fast. With
MΩ, 1 µA of photocurrent gives 1 V. A small capacitor in parallel with
is almost always needed for stability, because the photodiode capacitance at the input tends to make the circuit oscillate. It is the input stage of optical fibre receivers, remote controls, lidars and pulse oximeters.
Active filters
With resistors, capacitors and an op-amp, filters can be built without inductors, which are bulky and expensive at low frequencies. The most used cell is the Sallen-Key: two resistors and two capacitors around an op-amp in non-inverting configuration form a second-order filter (40 dB per decade). With equal resistors
, equal capacitors
and unity gain, the cut-off frequency is
and the quality factor is 0.5; to get the flattest response (Butterworth,
) the capacitor ratio or the stage gain is changed. Cascading several cells gives high-order filters: for example the anti-aliasing filter in front of a converter (Signal Theory lesson on sampling).
6Negative feedback
Negative feedback is the most important idea in analogue electronics. Invented by Harold Black in 1927 for telephone line amplifiers, it makes it possible to build precise, linear circuits from imprecise, nonlinear components, in exchange for part of the gain. In this lesson we derive the fundamental equation and its effects on gain, bandwidth, impedances and distortion, and we look at the price to pay: the risk of instability.
The fundamental equation

Theorem. The gain of the feedback amplifier is
![]()
Proof. From the diagram
,
,
. Substituting,
, that is
. ∎
The product
is the loop gain. If
,
: the gain depends only on the feedback network, made of precise, stable passive components.
Effects of feedback
Desensitisation. Differentiating,
: a 20% change in transistor gain (from temperature, or from one device to another) becomes, with
, a 0.02% change in the overall gain. It is the same result seen for sensitivity in Automatic Control.
Bandwidth. If
has one pole,
, the feedback gain is
![]()
The in-band gain is reduced by
, but the bandwidth widens by the same factor: the gain-bandwidth product stays constant (lesson on the real op-amp).
Distortion and noise. A real amplifier is not linear: its output contains harmonics that were not at the input. Feedback returns them to the input with the opposite sign and reduces them by
. The same holds for disturbances arising inside the loop (supply hum, load variations), but not for noise entering together with the signal, which is amplified exactly like the signal.
Impedances. It depends on how the feedback samples the output and compares at the input:
| Sampling at output | Comparison at input | Output impedance | Input impedance | Example |
|---|---|---|---|---|
| voltage (shunt) | voltage (series) | divided by | multiplied by | non-inverting |
| voltage (shunt) | current (shunt) | divided by | divided by | inverting, transimpedance |
| current (series) | voltage (series) | multiplied by | multiplied by | current source |
| current (series) | current (shunt) | multiplied by | divided by | current amplifier |
The rule: sampling a voltage, feedback stabilises it, that is it lowers the output impedance (approaching an ideal voltage source); sampling a current it raises the output impedance (approaching an ideal current source). For example the non-inverting amplifier has gigaohms of input impedance and milliohms of output impedance, even though the op-amp alone has far less extreme values.
The price: stability
All the benefits require the feedback to be negative. But
has poles, and at high frequencies it introduces phase shift: if at some frequency the loop phase shift reaches 180° while
, feedback turns positive and the circuit oscillates. It is the Nyquist criterion of the Automatic Control lesson, applied to an amplifier. The robustness measures are the same: the phase margin, usually at least 45 to 60°.
The worst case is the follower, with
: the loop gain is the highest possible, and the frequency where
is the highest. That is why op-amps are internally compensated with a dominant pole at a very low frequency (a few hertz): the gain falls by 20 dB per decade and reaches 1 before the other internal poles add phase shift, so the op-amp is stable in any configuration with
. The price is the limited gain-bandwidth product. There are “decompensated” op-amps, faster, stable only for gains above a minimum value given in the datasheet.
A practical trap. A capacitive load at the output (a long cable, a converter input) adds a pole in the loop and reduces the phase margin: a follower directly driving a capacitor may oscillate. The remedy is a small resistor (10 to 100 Ω) in series with the output, outside the loop.
7Oscillators and comparators
Every digital circuit needs a clock, every radio a local oscillator, every switching power supply a reference waveform. Oscillators are amplifiers with deliberate positive feedback. In this lesson we cover the Barkhausen criterion, the Wien bridge oscillator, the Schmitt trigger and the relaxation oscillator, and we touch on quartz crystals.
The Barkhausen criterion
An amplifier
with a feedback network
returning the output to the input in phase (positive feedback) can sustain a sinusoidal oscillation with no input at all if, at frequency
,
![]()
that is a loop gain of magnitude 1 and phase 0° (or a multiple of 360°). The signal goes round the loop and comes back identical: it sustains itself. It is the same critical point as the Nyquist criterion seen from the other side: there it was to be avoided, here it is sought.
In practice the oscillation starts from noise, so at switch-on the loop gain must be slightly greater than 1: the amplitude grows until some nonlinearity (amplifier saturation, a limiter, automatic gain control) brings the average gain back to exactly 1.
The Wien bridge oscillator
The feedback network is a band-pass made of a series RC and a parallel RC.
Theorem. The Wien network with equal resistors
and capacitors
has, at frequency
, zero phase and attenuation
.
Proof. With
and
,
. Multiplying numerator and denominator by
:
![]()
For
the real term in the denominator vanishes and
, real. ∎
The amplifier must therefore have a gain of exactly 3: a non-inverting stage with
. With
kΩ and
nF one gets about 995 Hz. To stabilise the amplitude, Hewlett and Packard in their first product (1939) used an incandescent lamp in place of
: as it heats up its resistance rises and reduces the gain just enough. Today diodes or a FET used as a variable resistor do the job.
The Schmitt trigger
A simple comparator changes state when the input crosses a threshold: if the input is noisy and slow, around the threshold the output toggles back and forth dozens of times. The Schmitt trigger solves the problem with positive feedback that creates two different thresholds.

With the output saturated at
and a divider feeding the fraction
back to the non-inverting input, the thresholds are
: the signal must cross the whole hysteresis
to make the output switch again. With
V,
kΩ and
kΩ,
and the thresholds are ±2.4 V. Schmitt triggers clean up the signals of push-buttons, sensors and long communication lines; many microcontroller inputs have them built in.
The relaxation oscillator
Adding to the (inverting) Schmitt trigger a resistor
from the output to the inverting input and a capacitor
to ground gives a square-wave generator.
Theorem. The period of oscillation is
![]()
Proof. With the output at
, the capacitor charges towards
starting from
:
. When it reaches
the output switches:
, that is
. By symmetry the discharge lasts the same time, and the period is twice that. ∎
Example.
kΩ,
nF,
:
ms, about 1.23 kHz. The same principle, with thresholds at 1/3 and 2/3 of the supply, is that of the NE555 timer in its astable configuration.
Quartz crystals
RC oscillators have a frequency that depends on component tolerance and temperature: 1% accuracy at best. For the clocks of microprocessors, watches and radios a quartz crystal is used: a thin plate that, through the piezoelectric effect, vibrates mechanically at a very precise frequency and behaves electrically as a resonant circuit with a quality factor of tens of thousands. A common crystal is accurate to 20 parts per million; the 32 768 Hz (
) one in watches gives, by halving fifteen times, exactly one pulse per second.
8Differential amplifiers
Inside every operational amplifier, at the input, there is a differential amplifier: two identical transistors that amplify the difference between two voltages and reject what they have in common. There are many variants, differing in transistor type, linearity, gain and signal swing. In this lesson we analyse the bipolar and MOS differential pair, including large signals, degeneration, the different kinds of load (resistive, active, cascode), the telescopic, folded cascode and fully differential configurations, and the offset due to mismatch.
Differential mode and common mode
Two input voltages
and
can always be written as
![]()
the differential signal and the common-mode signal, with
and
. The useful signal is almost always in the difference; the common mode is a disturbance: 50 Hz hum picked up equally by both wires of a cable, the DC voltage of a measurement bridge, differences between the grounds of two instruments.
The differential pair with resistive load

Two identical transistors with their sources (or emitters) tied together to a tail current source. The sum of the two currents is fixed: a difference between the inputs shifts current from one branch to the other, and the two outputs move in opposite directions.
Theorem (small-signal differential gain). The differential output between the two drains is
![]()
with
the transconductance of each transistor at half the tail current.
Proof. With a purely differential input,
on one gate and
on the other, by symmetry the current in one branch increases by exactly as much as the other decreases; the common source node does not change voltage and is, for small signals, a virtual ground. Each half is a common-source amplifier:
,
. The difference is
. ∎
With the output taken from one drain the gain is halved. For the common mode, a real tail source with output resistance
gives a gain (at one output) of
, and quality is measured by the CMRR
: with
and
, 100 dB.
Large-signal behaviour
Theorem (bipolar pair). With tail current
, the difference between the collector currents is
![]()
Proof. The emitters are at the same potential, so
. With
(neglecting base currents) we get
,
, and the difference is
. ∎

The bipolar pair is linear (within 1%) only for
about 9 mV, and beyond ±76 mV it has already moved 90% of the current to one side: it is an excellent current switch (it is the heart of ECL logic and of analogue multipliers, such as the Gilbert cell in radio mixers), but a linear amplifier only for very small signals.
The MOS pair. With the square law,
, and all the current goes to one side at
. Increasing the overdrive voltage (narrower transistors or more current) widens the linear range, but lowers
: a trade-off between linearity and gain.
Degeneration
Inserting a resistor
(or
) in series with each emitter, the effective transconductance becomes
![]()
Example. A bipolar pair with 1 mA of tail current (0.5 mA per side,
mA/V),
kΩ: without degeneration the gain is about 190; with
Ω,
and the gain drops to about 18, but the linear range widens by the same factor and the gain depends little on the transistor. It is the local feedback seen in the lesson on amplifiers.
The active load

With a current mirror (next lesson) in place of the resistors, the left branch current is copied into the right branch. For a differential signal the left branch carries
and the right
; the copy of
arrives at the output node and
leaves it, so a net current
flows in. This current flows through the parallel combination of the output resistances of the pair transistor and the mirror transistor:
![]()
Example. A bipolar pair with 0.5 mA per side and a 100 V Early voltage:
kΩ, the parallel is 100 kΩ and the gain is about
in a single stage, with a single-ended output and without losing half of the signal. With short-channel MOSFETs (
mA/V,
kΩ) one gets about 50.
Cascode, telescopic and folded cascode
Higher gain requires higher output resistance. A common-gate transistor (cascode) on top of each pair transistor multiplies the output resistance by about
, and the same is done with the load mirror: this is the telescopic amplifier, with gain of the order of
, thousands even with short MOSFETs, and excellent frequency response. The price is swing: four transistors stacked between the supplies leave little room for the signal, a serious problem with 1 to 1.8 V supplies.
The folded cascode solves the problem: the input pair current is “folded” into cascode transistors of the opposite type, connected to the other supply. Input and output swing improve a lot (with a pMOS input pair the common mode can reach ground), at the cost of a little more power and noise. It is the structure of very many integrated op-amps.
The fully differential amplifier
In high-performance integrated circuits (converters, filters, radio interfaces) the output is differential too: two outputs in antiphase, with twice the swing for the same supply and excellent rejection of common disturbances (supply, substrate). An extra circuit is needed, however, the common-mode feedback (CMFB), which measures the average of the two outputs and holds it at the desired value: differential feedback controls the difference but says nothing about the average, which would otherwise drift until it saturates.
Offset
Two “identical” transistors never quite are. In the bipolar pair a relative difference
between the saturation currents produces an offset voltage
: with 1% mismatch, about 0.26 mV. In MOSFETs the difference between threshold voltages weighs most, a few millivolts, decreasing with transistor area. Designers reduce offset by laying out the pair with common-centroid geometries (each transistor split into interleaved parts, so that process gradients cancel) and, in the most demanding cases, with trimming or chopper techniques.
Inside an op-amp
A classic two-stage op-amp is made of a differential pair with active load (input, first gain, common-mode rejection), a common-emitter or common-source gain stage with the compensation capacitor that creates the dominant pole, and a class AB output stage. All the current sources biasing these stages are current mirrors fed from a single reference.
9Current mirrors and current sources
In analogue integrated circuits almost every transistor is biased by a current source, and almost every current source is a current mirror: a circuit that copies a reference current, possibly multiplied by a fixed ratio, into one or more branches. Mirrors also serve as high-gain active loads. In this lesson we look at the simple bipolar and MOS mirror and its errors, the variants that correct them (beta helper, Wilson, Widlar, cascode) and how to choose between them.
The simple mirror

Two identical transistors with their bases tied together and their emitters grounded; the first is diode-connected (base and collector joined). The reference current
sets in the first the
needed to carry it; the second, with the same
, carries the same current:
![]()
independently (to first order) of the voltage on its collector, as long as it stays in the active region. With transistors of different area (or several transistors in parallel) the currents are in the ratio of the areas:
.
The MOS mirror works the same way with the square law: same
, so
. There are no gate currents, so no error of that kind, and the ratio is set precisely by drawing the widths.
Errors of the simple mirror
Base currents. The reference current must also supply the two base currents.
Theorem. In the simple bipolar mirror with identical transistors of gain
,
![]()
Proof. The two transistors have the same
and therefore the same collector current
, and the same base current
. At the collector node of the first transistor,
. ∎
With
the output is 98% of the reference, a 2% error that varies with
and temperature.
The Early effect. The two transistors have different
: the first
V, the second whatever the load imposes. Because of the Early effect (Electronic Devices lesson on the BJT) the output current grows with
: the mirror has a finite output resistance
, about 100 kΩ at 1 mA with
V. In short-channel MOSFETs the error is larger: with
V⁻¹, 0.7 V on the reference transistor and 3 V on the output one, the output current is 11% higher than expected.
Variants
Beta helper. A third transistor, as an emitter follower, supplies the base currents instead of the reference: the error drops to
, 0.02% with
.
Wilson mirror. Three transistors in which current feedback corrects both the base error (which becomes
) and the output resistance, which rises to about
. For decades it was the precision mirror of bipolar circuits.
Widlar mirror. To get very small currents (microamperes) from a reasonable reference, a resistor
is placed in the emitter of the output transistor.
Theorem. In the Widlar mirror
![]()
Proof. The bases are tied together, so
(neglecting base currents). With
for both,
. ∎
Example. From 1 mA to 10 µA:
kΩ. A simple mirror would need a 100 to 1 area ratio, or a 10 µA reference made with a resistor of about 1 MΩ: both would take a huge area on the chip. The emitter resistor also raises the output resistance.
Cascode mirror. Two stacked mirrors: the upper transistor of the output branch, with its base (or gate) at a fixed voltage, holds the voltage on the lower transistor constant, so it no longer feels load variations. The output resistance is multiplied by the intrinsic gain of the upper transistor: about
for bipolars and
for MOS. With
mA/V and
kΩ it goes from 100 kΩ to about 10 MΩ. The price is the minimum voltage across the mirror, which doubles (about two
, or
in the simple MOS version): with low supplies “wide-swing” versions are used, which cut this loss to
.
| Mirror | Ratio error (bipolar) | Output resistance | Minimum voltage |
|---|---|---|---|
| simple | |||
| beta helper | about | ||
| Wilson | about | about | |
| Widlar | depends on | greater than | |
| cascode |
Where the reference current comes from
A mirror copies, but does not create: the current
must come from somewhere. A simple resistor to the supply gives a current that varies with the supply itself. Integrated circuits therefore use self-biased references, in which two transistors at different current densities produce a
difference equal to
, proportional to absolute temperature (PTAT) and independent of the supply. Combining this voltage, which grows with temperature, with a
, which falls, gives the bandgap reference of about 1.2 V, stable over temperature, found in almost every analogue and mixed-signal chip.
Where they are used
- Biasing: a single reference and a multi-output mirror feed all the stages of an op-amp, with currents in precise ratios.
- Tail sources of differential pairs, where high output resistance improves CMRR.
- Active loads, as seen in the lesson on differential amplifiers.
- Current-steering digital-to-analogue converters: dozens or thousands of identical mirrors whose currents are steered to the output according to the digital code. It is the architecture of the fastest DACs, for radio and video signals.
All these circuits rely on transistor matching, which on the chip is cared for with the same techniques seen for the differential pair: large transistors, close together, with the same orientation and arranged in common-centroid fashion.
Current mirrors in depth: Early effect, Wilson, cascode and Widlar proved
This page goes deeper into the lesson on current mirrors: it derives step by step the formulas that the lesson only states, namely the error of the mirror with a helper transistor and of the Wilson mirror, the output resistance of the Wilson mirror and of the cascode with the small-signal model, the Early effect on the copy ratio, and shows how to solve the Widlar mirror equation, which has no closed-form solution. The quantities are those of the lesson:
current gain,
mV at 300 K,
Early voltage,
,
.
The simple mirror with the Early effect
In the lesson the error due to base currents was computed assuming equal collector currents. With the Early effect they are not: for the same
, the collector current grows with
:
![]()
The reference transistor, diode-connected, has
; the output one has the
imposed by the load. The bases are connected, so the exponential factor is the same and cancels in the ratio:
![]()

Bringing in the base currents: at the reference node
. With
, where
is the ratio just found,
![]()
For
the lesson’s formula is recovered. Example.
V,
V,
V,
:
, and
. The two errors have opposite signs and here the Early effect prevails: the output current is 2.2 % higher than the reference.
The mirror with a helper transistor
A third transistor Q3, an emitter follower, has its base on the collector of Q1 and its emitter on the bases of Q1 and Q2: it supplies the two base currents.

Theorem. With identical transistors,
, i.e. a relative error of about
.
Proof. Q1 and Q2 have the same
, so
and base currents
each. These two currents,
, come out of the emitter of Q3; its base current is
, because the emitter current is
times the base current. At the collector node of Q1, the reference splits between the collector of Q1 and the base of Q3:
![]()
hence the formula. ∎
With
the error drops from 2 % to 0.02 %. The price is that the reference branch now has two
in series, about 1.4 V, which reduce the headroom with low supplies.
The Wilson mirror
In the Wilson mirror the reference current enters the collector of Q1, which drives the base of Q3, the output transistor; the emitter of Q3 goes to the collector of Q2, diode-connected, whose base is joined to that of Q1. Q1 and Q2 thus form a simple mirror that “copies” the emitter current of Q3 into the reference branch.

Theorem. With identical transistors,
, i.e. a relative error of about
.
Proof. Let
be the collector current of Q1 and Q2, equal because they have the same
(neglecting the Early effect). The collector node of Q2 receives the emitter current of Q3 and distributes it between the collector of Q2 and the two bases:
. The output current is the collector current of Q3:
. At the input node the reference splits between the collector of Q1 and the base of Q3:
. Obtaining
and substituting:
![Rendered by QuickLaTeX.com \[ I_{REF} = I_{OUT}\left(\frac{\beta + 1}{\beta + 2} + \frac{1}{\beta}\right) = I_{OUT}\,\frac{\beta^2 + 2\beta + 2}{\beta(\beta + 2)} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-3d1899f04b99fdf3e18bc0654bbf8dab_l3.png)
So
. ∎
The output resistance. If the voltage on the collector of Q3 rises, the output current tends to grow because of the Early effect. But that current, through Q2 and the Q2-Q1 mirror, increases the collector current of Q1, which takes current away from the base of Q3 and pulls it back: it is negative current feedback. Small-signal analysis (model with
,
,
, lesson on transistor amplifiers) gives
![]()
The factor 2 arises because half of the change in Q3’s collector current is returned as base current through the mirror, while the other half flows in Q3’s resistance
: the feedback multiplies the resistance by about
rather than
.
The output resistance of the cascode
The MOS cascode consists of two transistors in series: M1 at the bottom, with its gate at a fixed voltage, behaves as a current source with resistance
; M2 above, with its gate at a fixed voltage, carries the current to the output.

Theorem. The output resistance of the MOS cascode is
![]()
Proof. Apply to the output (the drain of M2) a small test current
, with all constant sources turned off: the gates are at fixed voltage, i.e. grounded for small signals. In M1 gate and source are grounded, so its
source carries nothing, and M1 reduces to the resistance
: the voltage at the source of M2 is
. In M2 the gate is grounded, so
, and its source carries the current
from drain to source. By Kirchhoff’s current law at the drain node, the current in
is
, and the output voltage is
![]()
Dividing by
gives the formula. ∎
The physical meaning: M2 holds its own source almost still, because any attempt to raise it reduces its
and hence the current. The resistance of M1 is “multiplied” by the intrinsic gain
of M2, typically 20-100. The same calculation for the bipolar cascode gives
: here the multiplication is limited by the base current of Q2, which escapes towards the fixed base.
The minimum voltage of the cascode
For all transistors to stay in saturation (in MOS,
) the cascode needs a minimum voltage across it. In the “simple” cascode mirror the gates of the two diode-connected reference transistors, one above the other, fix the gate of M2 at
. The source of M2 is therefore at
, and the output drain must be at least
above it:
. M1 works with
, more than necessary: one
is wasted. The wide-swing cascode mirror biases the gate of M2 at
with a dedicated branch, so that M1 works at the edge of saturation with
, and the minimum voltage drops to
. Example. With
V and
V: 0.9 V against 0.4 V, a decisive difference with a 1.2 V supply.
The Widlar mirror equation
For design, i.e. finding
given the current, the lesson’s formula applies directly. For analysis, i.e. finding
given
, the equation
![]()
is transcendental: the unknown appears both inside the logarithm and outside, and cannot be isolated with algebra. It is solved by iteration. Rewritten as
, one starts from a trial value, puts it on the right and computes a new value, until it settles. Convergence is guaranteed because the right-hand side varies slowly: its derivative with respect to
is
, which at the solution equals
, less than 1 in magnitude when the current ratio exceeds
, i.e. always in the Widlar’s use cases (for a function with derivative less than 1 in magnitude the iteration is a contraction and converges, Numerical Calculus lesson on roots of functions). A complete example is in the exercises.

MOS mirrors and channel-length modulation
For the MOS mirror with channel-length modulation
, the same reasoning as for the Early effect gives
![]()
with
for the diode-connected transistor. Since
is inversely proportional to the channel length, precision mirrors use long transistors (L several times the process minimum), or make
equal to
with a cascode or with an amplifier regulating the output voltage.
The output characteristic: what output resistance means
An ideal mirror would give the same current whatever the voltage on its collector. The graph shows what really happens.

Two facts can be read directly from the figure:
- below a certain voltage the mirror does not work: the output transistor leaves the active region and the current collapses. This is the minimum voltage of the table in the lesson, about 0.2 V for the simple mirror and about 0.9 V for the bipolar cascode;
- above that voltage the current is not constant, but grows with slope
. This slope is the inverse of the output resistance: the flatter the curve, the better the mirror as a current source.
How much it matters in practice. With
kΩ, a 5 V change on the load changes the current by
µA, 5% of 1 mA. With a cascode (
MΩ) the change drops to 0.5 µA, 0.05%. This is why the active loads of high-gain amplifiers are almost always cascodes.
Common mistakes
- Forgetting that the mirror must stay in the active region: if the load pulls the output collector below the minimum voltage, the mirror stops copying, whatever its type.
- Using the Widlar formula the other way round without iterating: given
, the current cannot be found by “isolating”
, because it also appears in the logarithm. - Neglecting the Early effect because it is “small”: with a few volts of difference between the two collectors it produces errors of several percent, often larger than the base error.
- Miscounting the base currents when one reference feeds several outputs: every transistor tied to the common bases takes away
. - Confusing
and
: the first is the output resistance of the bipolar cascode, the second of the MOS one; they are not interchangeable.
Exercises on the topic, with exam-style design and analysis problems, are on the exercise page linked at the top.
Exercises
Exercises on current mirrors of the kind set in Applied Electronics and Analogue Electronics courses, in three levels: basic, for direct use of the formulas; intermediate, with design and errors; exam, with complete circuits as in written exams. The result is given straight away; the full solution opens with a click. The proofs of the formulas are in the lesson and the in-depth study linked at the top.
Unless stated:
V,
mV, identical transistors.
Basic level
Exercise 1. The simple bipolar mirror
A simple mirror is supplied from
V; the reference current is set by a resistor
kΩ between the supply and the collector of the diode-connected transistor. With
, what are
and
?
Exercise 2. Mirror with an area ratio
An output of about 3 mA is wanted from a 1 mA reference using transistors with emitter areas in the ratio 3 to 1. With
, what exactly is
?
Exercise 3. The MOS mirror
A MOS mirror has
,
and
µA. Compute
neglecting channel-length modulation, and then with
V
,
V and
V.
Exercise 4. Output resistance
A simple bipolar mirror supplies 0.5 mA, with
V. By how much does the current change if the voltage on the output collector goes from 1 V to 5 V?
Intermediate level
Exercise 5. Design of a Widlar mirror
From a 1 mA reference an output of 20 µA is wanted with a Widlar mirror. What must the emitter resistor be? Compare with the alternative of a simple mirror with a 20 µA reference obtained with a resistor from
V.
Exercise 6. Analysis of a Widlar mirror
A Widlar mirror has
mA and
kΩ. Find
.

Exercise 7. The helper transistor
With transistors of
and
mA, compare the output current of the simple mirror and of the one with a helper transistor.

Exercise 8. The Wilson mirror
A Wilson mirror with transistors of
and
kΩ. Compute the error in the copy ratio and the output resistance, and compare them with those of the simple mirror.

Exercise 9. The MOS cascode
A MOS cascode mirror uses transistors with
mA/V and
kΩ,
V and
V. Compute the output resistance and the minimum output voltage in the simple and wide-swing versions.

10Power output stages
The last stage of an amplifier must deliver power to a load: an 8 Ω loudspeaker, a motor, a line. Here gain alone no longer matters, but efficiency: all the power drawn from the supply and not delivered to the load becomes heat in the transistors. In this lesson we compare classes A, B, AB and D, derive the maximum efficiency of class B and look at crossover distortion.
Class A
The transistor conducts over the whole signal period, biased at the middle of its swing: the quiescent current is at least equal to the peak load current. It is the most linear stage, but it consumes power even with no signal. With a resistive load and resistor biasing the maximum efficiency is 25%, with a transformer or a current source 50%: a 10 W class A amplifier heats up like a 30 to 40 W heater.
Class B
Two complementary transistors, an npn conducting the positive half-waves and a pnp conducting the negative ones (push-pull), each as an emitter follower. At rest neither conducts, and the power drawn is proportional to the signal.

Theorem. With supplies
, load
and a sinusoidal output of amplitude
, the efficiency of ideal class B is
![]()
and at most
.
Proof. The load power is
. Each supply delivers current only for half the period, a sinusoidal half-wave of peak
, whose average over the whole period is
. The two supplies together provide
. The ratio is
![Rendered by QuickLaTeX.com \[ \eta = \frac{V_p^2/(2R_L)}{2V_{CC}V_p/(\pi R_L)} = \frac{\pi V_p}{4V_{CC}} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-d6c3ad495bede44ea5f8a989a9317a5c_l3.png)
largest for
. ∎
Example. With
V into 8 Ω, the maximum power is
W, with about 3.9 W dissipated in the transistors. Curiously, maximum dissipation does not occur at full power, but at
, about 64% of the swing: that is what the heat sink must be sized for.
Crossover distortion and class AB
A bipolar transistor conducts only when
exceeds about 0.6 V. With the bases tied directly to the input, for signals between −0.6 and +0.6 V neither transistor conducts, and the output stays still: this is crossover distortion, particularly annoying because it weighs most on weak signals.
The solution is class AB: the two bases are biased with a difference of about 1.2 V (two diodes in series, or a
multiplier), so both transistors carry a small quiescent current and the handover from one to the other is gradual. Efficiency stays close to class B. Two details matter: the bias diodes are mounted on the same heat sink as the transistors, so that their voltage tracks the thermal drift of
(−2 mV/°C) and prevents thermal runaway; and small emitter resistors (fractions of an ohm) further stabilise the quiescent current. Almost all linear audio amplifiers and op-amp output stages are class AB.
Class D
The transistors no longer work in the active region but as switches: the output toggles between the two supplies at hundreds of kilohertz, with a duty cycle proportional to the signal (pulse width modulation, PWM). An LC low-pass filter reconstructs the audio signal. An ideal switch dissipates nothing (either the current through it or the voltage across it is zero), and real efficiencies exceed 90%. It is the technology of the amplifiers in phones, Bluetooth speakers, televisions and professional systems: no huge heat sinks, longer battery life. The price is careful design of the filter and the layout, so as not to radiate interference.
| Class | Conduction | Maximum efficiency | Typical use |
|---|---|---|---|
| A | whole period | 25-50% | preamplifiers, high-end audio |
| B | half period per transistor | 78.5% | rare on its own (crossover distortion) |
| AB | slightly more than half period | about 70% | linear audio, op-amp outputs |
| D | switching | over 90% | portable and power audio, motor drives |
11Power supplies and DC-DC converters
Every electronic circuit needs stable DC voltages: 3.3 V for the microcontroller, 1 V for the processor, 5 V for USB, 12 V for a motor. They are derived from a battery or the mains with regulators, linear or switching. In this lesson we see how a linear regulator works and why it wastes energy, and how buck and boost switching converters achieve efficiencies above 90%.
The linear regulator
A transistor (the pass element) in series between input and output acts as a variable resistance; an error amplifier compares a fraction of the output with a stable reference voltage (a 1.2 V bandgap reference) and adjusts the transistor so that the output stays constant. It is a non-inverting feedback amplifier, with the reference as its input.
The flaw is efficiency. The load current flows through the transistor, which has the difference between input and output across it:
![]()
Example. From 12 V to 3.3 V at 1 A: the load receives 3.3 W and the regulator dissipates 8.7 W, an efficiency of 27.5%. A heat sink is needed, and a battery would last a quarter of what it could.
Linear regulators remain very valuable, though, when the difference is small or the current low: they are simple, cheap and above all quiet, with no switching noise. LDO (low dropout) regulators work with a difference between input and output of a few hundred millivolts, and are often used after a switching converter to clean up the supply of sensitive analogue circuits.
The buck converter
The buck (step-down) converter uses a switch, a diode (or a second switch), an inductor and a capacitor.

The switch closes for a fraction
of the period
(the duty cycle) and opens for the rest. When it is closed, the inductor sits between
and the output and its current rises; when it is open, the current keeps flowing through the diode and falls.
Theorem. In steady state and continuous conduction,
![]()
Proof. In steady state the inductor current at the start and end of each period is the same, so the average voltage across it is zero (
, integrated over a period, gives zero): this is the volt-second balance. During
the voltage across the inductor is
; during
, with the diode conducting,
. So
, that is
. ∎
The converter is a DC transformer with an electronically adjustable ratio. Ideally it dissipates nothing: the switch has either zero voltage or zero current, the inductor and capacitor store energy without consuming it. Real converters reach 90 to 95%.
Current ripple. During
the current rises by
![]()
Example. From 12 V to 3.3 V:
. With
kHz and
µH,
A. A higher frequency allows smaller inductors and capacitors, but increases switching losses: modern converters run between a few hundred kilohertz and a few megahertz, and with gallium nitride transistors even higher.
The boost converter
Swapping the positions of switch and inductor gives the boost (step-up) converter. With the switch closed the inductor charges from the input; when open, its voltage adds to the input voltage and pushes current to the output through the diode. The same volt-second balance (
) gives
![]()
From 5 V to 12 V needs
. It is the converter that raises the voltage of a lithium cell (3.7 V) to the 5 V of a USB port in power banks, and the one that drives backlight LEDs.
In practice
Switching converters are everywhere, but they must be designed carefully: fast switching produces electromagnetic interference, contained with current loops kept as short as possible on the printed circuit board, ceramic capacitors close to the components and input filters. Finally, the pulsed currents of the rectifier feeding them from the mains cause the low power factor of power supplies, corrected with a PFC stage (Electrical Engineering lesson on power): that stage is itself a boost converter.
12Data converters
The physical world is analogue, processing is digital: converters are the bridge. A digital-to-analogue converter (DAC) turns a number into a voltage; an analogue-to-digital converter (ADC) does the reverse. In Signal Theory we saw what sampling and quantisation imply; in this lesson we see how converters are built inside, with the R-2R ladder DAC and the main ADC architectures, and how to read their specifications.
The R-2R ladder DAC
An
-bit DAC must produce a voltage proportional to the number
, that is a weighted sum with weights 1/2, 1/4, 1/8… An adder with resistors of values
would work, but 12 bits would need resistors in a ratio of 2048 to 1, impossible to make accurately. The R-2R ladder uses only two values.

Theorem. At each node of the ladder the incoming current splits into two equal parts; the branch currents are
and the output, with feedback resistor
, is
![]()
Proof. The switches connect each 2R branch either to ground or to virtual ground: in both cases the branch ends at zero potential, so the currents do not depend on the switch positions. Starting from the end, the last bit’s node sees to its right the
termination and below it its own
branch: in parallel they make
. Adding the connecting
gives
, and the previous node again sees two
in parallel. Repeating, every node sees exactly
to its right, equal to its own branch: the incoming current splits into two equal halves. The first node receives
and sends
into the most significant bit’s branch, the next
, and so on. The currents of the bits at 1 enter the virtual ground and flow through the feedback resistor
. ∎
Only the ratios between equal resistors matter, which an integrated circuit achieves with very high precision. With
V and 8 bits the step (LSB) is
mV.
ADCs
Flash.
comparators compare the input with as many thresholds, in parallel: conversion takes a single cycle. Very fast (gigasamples per second), but the number of comparators doubles with every bit: it is used up to 6 to 8 bits, in oscilloscopes and radio receivers.
Successive approximation (SAR). A binary search: the converter tries the most significant bit with an internal DAC, compares with the input, keeps or discards the bit, then moves to the next.
bits take
comparisons. It is the most common compromise: 10 to 18 bits, from thousands to tens of millions of samples per second, low power. It is the ADC of almost every microcontroller.
A SAR conversion example. 8 bits, 5 V full scale, 3.1 V input. First step: 2.5 V (bit 7 = 1), the input is higher, the bit stays. Second: 2.5 + 1.25 = 3.75 V, too much, bit 6 goes back to 0. Third: 2.5 + 0.625 = 3.125 V, still too much, 0. Fourth: 2.5 + 0.3125 = 2.8125 V, bit 4 stays 1. Continuing down to bit 0 gives 158, that is
V, the last level below 3.1 V.
Sigma-delta. A quantiser of a few bits at a very high rate, with noise pushed to high frequencies and then filtered digitally (Signal Theory lesson on quantisation): 16 to 32 bits for audio and precision measurement, at moderate speeds.
Dual slope. The input is integrated for a fixed time, then a known reference voltage until back to zero, counting the time. Slow but very accurate and immune to 50 Hz interference if the integration time is a multiple of 20 ms: it is the converter of multimeters.
Specifications
- Resolution: the number of bits, and hence the LSB step.
- Integral nonlinearity (INL): the maximum deviation of the real characteristic from the ideal straight line, in LSB.
- Differential nonlinearity (DNL): how much each step differs from the ideal value of 1 LSB. With DNL worse than −1 LSB a code may be missing altogether; a DAC with DNL greater than −1 LSB is guaranteed monotonic (the output never falls as the code increases), an essential property in control systems.
- Effective number of bits (ENOB), derived from the measured signal-to-noise ratio (lesson on quantisation).
- Sampling rate and, for ADCs, the sample-and-hold circuit, which freezes the input during conversion: a SAR ADC needs the input to stay still for all
comparisons.
A 16-bit converter with a noisy voltage reference or a disturbed ground gives fewer useful bits than a well-designed 12-bit one: accuracy depends as much on the quality of the reference, the supply and the printed circuit board as on the converter itself.
✎Exam exercises
2. Small-signal amplifiers
Exam level
Exercise 9. The Miller effect
A common-emitter stage has
pF,
pF, a base-to-collector gain of
and an equivalent source resistance seen from the base of 1 kΩ. Estimate the upper cut-off frequency with the Miller approximation, and compare it with that of a cascode stage, in which the gain at the collector of the input transistor is about −1.
Exercise 10. The bypass capacitor
In a common-emitter stage with
kΩ fully bypassed,
kΩ,
, and a source resistance in parallel with the divider of 900 Ω, what must
be for its pole to be at 20 Hz?
Exercise 11. Fan-out between TTL families
A standard 74 TTL output (
mA,
µA) drives 74LS inputs (
mA,
µA). How many can it drive? And how many standard 74 inputs (
mA,
µA) can a 74LS output (
mA,
µA) drive?
Exercise 12. RTL fan-out
An RTL gate has
V,
Ω,
Ω and
V. How many gates can it drive if the high level must not fall below 1 V?
9. Current mirrors and current sources
Exam level
Exercise 10. Biasing a circuit with a multiple-output mirror
A multiple-output bipolar mirror is supplied at 5 V; the reference is set by a resistor. The outputs must have currents in the ratios 1, 2 and 4 relative to the reference transistor, which must conduct 0.5 mA. With
:
- size the reference resistor neglecting base currents;
- compute the actual currents taking base currents into account;
- compute the error that would result from adding a helper transistor.

Exercise 11. The stage with an active load
A common-emitter amplifier is biased at
mA and has as its load a PNP mirror supplying the same current. Both transistors have
V. Compute the open-circuit voltage gain and compare it with that obtained with a 5 kΩ load resistor.
Exercise 12. Supply sensitivity
The reference of a mirror is obtained with a resistor from the supply
V. Compute the sensitivity of the current to the supply,
, and the change in current if the supply rises by 10 %. What solution is used in integrated circuits?
Exercise 13. Overall error of the simple mirror
Bipolar mirror with
,
V,
mA, output at 6 V. Compute
including base currents and the Early effect.
✓Solutions
2. Small-signal amplifiers · Exercise 1. Designing a divider bias
Result:
kΩ,
kΩ,
kΩ,
kΩ;
= 0.966, 1.016 and 1.047 mA.
1. From the desired voltages:
kΩ and
kΩ (standard values: 5.6 or 6.2 kΩ; 6 kΩ is kept here to follow the calculations).
2. Stability rule:
kΩ. The Thévenin voltage must provide the drop across
,
and the drop of the base current across
(computed with the mean
):
V.
3. From the divider:
kΩ and
kΩ. Choosing 82 kΩ and 15 kΩ gives
V and
kΩ.
4. Check with
: with
, 0.966 mA (
V); with 150, 1.016 mA (7.37 V); with 300, 1.047 mA (7.14 V). A change of almost four times in
moves the current by 8 %.
2. Small-signal amplifiers · Exercise 2. A pnp
Result:
mA,
V,
V,
V.
1. With a pnp it is convenient to measure voltages downwards from the supply. The divider brings the base
V below the supply, with
kΩ.
2. The loop supply,
, emitter-base junction,
gives the same formula as the npn:
mA, and
mA.
3. The emitter sits
V below the supply:
V. The collector sits
V above ground.
V: the transistor is in the active region, with a wide margin.
2. Small-signal amplifiers · Exercise 3. Sensitivity to beta
Result:
; estimate +0.51 %, exact value +0.47 %.
1.
Ω, and
.
2. A 10 % increase in
(about 10 % in
too) produces a relative change in the current of
%.
3. The exact calculation, with
for 200 and 220, gives +0.47 %. The first-order estimate is slightly pessimistic because the sensitivity decreases as
grows. With fixed bias the current would rise by 10 %.
2. Small-signal amplifiers · Exercise 4. Self-biased JFET
Result:
V,
Ω,
mS; with the other unit 2.77 mA.
1. From Shockley’s law:
, hence
V.
2. With self-bias
:
Ω.
3. Differentiating Shockley’s law:
mS (which is also
).
4. With the other unit one solves
, looking for the root with
between −4 V and 0:
mA. The current changes by 39 % for a 50 % change in
: self-bias helps little.
2. Small-signal amplifiers · Exercise 5. MOSFET with drain feedback
Result:
V,
mA,
mS.
1. No current flows in the gate:
.
2. Letting
:
(with
in mA and
), that is,
, whose positive root is
V. Hence
V and
mA.
3.
mS.
4. Saturation:
V >
V. As proved in the lesson, with this connection it is always true.
2. Small-signal amplifiers · Exercise 6. Common emitter with and without degeneration
Result: bypassed:
,
kΩ; with 220 Ω:
,
kΩ.
1.
mS,
kΩ,
kΩ.
2. Bypassed emitter:
,
kΩ.
3. With
Ω:
; the approximate formula
is almost identical.
kΩ.
4. Degeneration divides the gain by about 10, multiplies the input resistance by 10 and makes the gain independent of
(and therefore of current and temperature):
if
is neglected too.
2. Small-signal amplifiers · Exercise 7. The follower as an impedance converter
Result: directly 0.99 %; with the follower 46.7 %;
Ω.
1. Direct connection:
. The signal arrives reduced a hundredfold.
2. Follower:
Ω; on the emitter
Ω.
kΩ and
.
3. With the source:
. The signal on the load is 47 times larger than with the direct connection.
4.
Ω: the source resistance, seen from the load, is divided by
.
2. Small-signal amplifiers · Exercise 8. Common source
Result:
mS,
V;
and
; the BJT would have
mS and
.
1.
mS
mS;
V.
2.
kΩ. Bypassed:
. With
Ω:
.
3. A BJT at 1 mA has
mS, fourteen times more, and
. The ratio between the transconductances is
: at the same current the BJT always wins, the MOSFET wins on input resistance and linearity.
2. Small-signal amplifiers · Exercise 9. The Miller effect
Result:
pF,
MHz; with the cascode
pF and about 6.1 MHz.
1. Miller’s theorem brings
to the input multiplied by
: 303 pF. With
,
pF.
2. The input pole:
MHz.
3. In the cascode the collector of the input transistor is connected to the emitter of a common-base transistor, which has resistance
: the base-to-collector gain is about −1, and
is multiplied only by 2. The input capacitance becomes
pF and the bandwidth
MHz: twelve times more, with the same overall gain. A 3 pF capacitance, the smallest in the transistor, alone decides the bandwidth of the common-emitter stage.
2. Small-signal amplifiers · Exercise 10. The bypass capacitor
Result: resistance seen 32.6 Ω;
µF (270 µF is chosen).
1. The capacitor sees
in parallel with the resistance looking into the transistor’s emitter:
Ω. In parallel with 1 kΩ: 32.6 Ω.
2.
µF; the next standard value is 270 µF.
3. Coupling capacitors see resistances of kΩ and a few µF are enough; the bypass capacitor sees a few tens of ohms and must be a hundred times larger. This is why part of
is often left unbypassed: it raises the resistance seen and reduces
.
2. Small-signal amplifiers · Exercise 11. Fan-out between TTL families
Result: 20 in the first case; 5 in the second.
1. The fan-out is the minimum of the low-level and the high-level fan-outs. 74 → 74LS:
at the low level and
at the high level: 20.
2. 74LS → 74:
at the low level,
at the high level: 5. The limit is the current flowing out of the low standard inputs, which the LS output must sink.
3. Mixing families is possible because the voltage levels are compatible, but the fan-out must be recomputed with the currents of each.
2. Small-signal amplifiers · Exercise 12. RTL fan-out
Result:
: at most 7 gates.
1. From the formula of the lesson,
V.
2. Isolating
:
, that is,
, and
.
3. With 7 loads
V, with 8 it drops to 0.98 V. Even with 7 loads the margin above the conduction threshold (0.75 V) is only 0.25 V: this is why RTL was replaced by DTL and TTL.
9. Current mirrors and current sources · Exercise 1. The simple bipolar mirror
Result:
mA;
mA.
The collector of the diode-connected transistor sits at
: the drop across the resistor is
V, so
mA.
Base-current error (lesson):
mA.
9. Current mirrors and current sources · Exercise 2. Mirror with an area ratio
Result: 2.885 mA.
With areas in the ratio
, at the same
the currents are
and
, and the base currents
and
.
Reference node:
. So
mA and
mA.
In general
: the error grows with the copy ratio, because the large transistor needs more base current.
9. Current mirrors and current sources · Exercise 3. The MOS mirror
Result: 400 µA; with channel-length modulation 431 µA.
Without modulation:
µA.
With modulation (in-depth study):
µA, an 8 % error, due solely to the difference in
between the two transistors.
9. Current mirrors and current sources · Exercise 4. Output resistance
Result: about 25 µA, 5 %.
kΩ. A 4 V change produces
µA, i.e. 5 % of 0.5 mA. For an ideal current source it would be zero: the output resistance is the parameter measuring how close the mirror comes to ideal.
9. Current mirrors and current sources · Exercise 5. Design of a Widlar mirror
Result:
kΩ; the alternative would need about 465 kΩ.
From the lesson’s formula:
kΩ.
Simple mirror with a 20 µA reference:
kΩ. On an integrated circuit a resistor of that value takes up an enormous area compared with a 5 kΩ one: this is the reason for the Widlar mirror.
9. Current mirrors and current sources · Exercise 6. Analysis of a Widlar mirror
Result: about 41 µA.
The equation
is transcendental and is solved by iteration (in-depth study), written as
, with
µA.
Starting from 50 µA:
µA. Then
µA. Then
µA. Then
µA. Then 41.3 µA: the solution is about 41.3 µA.
Check:
V and
V. The iterates oscillate around the solution, narrowing, as expected from a negative derivative less than 1 in magnitude.
9. Current mirrors and current sources · Exercise 7. The helper transistor
Result: simple 0.962 mA (3.8 % error); with helper 0.999 22 mA (0.078 % error).
Simple mirror:
mA.
With a helper transistor (in-depth study):
mA.
The error is reduced by a factor of about
: with low-
transistors, such as the lateral PNPs of integrated circuits, the helper transistor is almost indispensable.
9. Current mirrors and current sources · Exercise 8. The Wilson mirror
Result: error 0.0196 % (simple 2 %);
MΩ (simple 100 kΩ).
Error (in-depth study):
, i.e. 0.0196 %, against
, about 2 %, for the simple mirror.
Output resistance:
MΩ, fifty times that of the simple mirror (
kΩ).
9. Current mirrors and current sources · Exercise 9. The MOS cascode
Result:
MΩ; minimum voltage 0.9 V (simple) and 0.4 V (wide-swing).
Resistance (in-depth study):
MΩ, fifty times that of a single transistor.
Minimum voltage: simple
V; wide-swing
V.
9. Current mirrors and current sources · Exercise 10. Biasing a circuit with a multiple-output mirror
Result:
kΩ; outputs 0.463, 0.926, 1.852 mA (7.4 % error); with the helper transistor an error of about 0.08 %.
1.
kΩ, giving
mA.
2. The transistors have areas in the ratio 1 (reference), 1, 2, 4. The collector currents are
,
,
,
, and the base currents total
. At the reference node
, so
mA. Outputs: 0.463, 0.926 and 1.852 mA, all 7.4 % below the intended value.
3. With the helper transistor the base currents
are supplied by its emitter, and only
is drawn from the reference:
, error
, about 0.08 %. Mirrors with many outputs almost always need the helper transistor.
9. Current mirrors and current sources · Exercise 11. The stage with an active load
Result: about
(66 dB) with the active load;
(46 dB) with the resistor.
mA/V. The two output resistances are
kΩ each.
With the active load the collector sees
and
in parallel: 50 kΩ. Gain
, i.e. 66 dB.
With a 5 kΩ resistor (in parallel with
, almost negligible):
, 46 dB. To get the same gain with a resistor 50 kΩ would be needed, with a 50 V drop at 1 mA: impossible with normal supplies. The mirror gives a high resistance for small signals and a small DC drop.
9. Current mirrors and current sources · Exercise 12. Supply sensitivity
Result:
; the current rises by about 11.6 %.
, so
and
![]()
A 10 % increase (0.5 V) takes the current from
to
: +11.6 %, more than the supply itself.
Integrated circuits use self-biased references, in which the current is set by a
difference across a resistor,
, independent of the supply (lesson, last section); combined with a
they give the bandgap reference.
9. Current mirrors and current sources · Exercise 13. Overall error of the simple mirror
Result:
mA, 6% above the reference.
The bases:
mA in the reference transistor, with
V.
The Early effect: the collector current is proportional to
; the output transistor has
V instead of 0.7 V, so
![]()
The result is 6% above the reference: the Early effect (+8.7%) outweighs the base error (−2.4%). The two errors have opposite signs and neither can be neglected a priori.
∑Formula sheet
Transistor biasing
The operating point and the load line
![]()
Fixed bias (circuit 1)
![]()
Voltage divider and emitter resistor (circuit 2)
![]()
![]()
![]()
Collector feedback (circuit 3)
![]()
The JFET
![Rendered by QuickLaTeX.com \[ I_D = I_{DSS}\left(1 - \frac{V_{GS}}{V_P}\right)^2,\qquad V_P \mathchar"313C V_{GS} \le 0 \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-27a46af244b438363aedadecbbfaf258_l3.png)
The MOSFET
![]()
Divider and source resistor (circuit 2)
![]()
Small-signal amplifiers
From the curve to the line: transconductance
![]()
![]()
The three BJT configurations
![]()
![Rendered by QuickLaTeX.com \[ A_v = \frac{(\beta + 1) R_L'}{r_\pi + (\beta + 1) R_L'} \approx 1,\qquad R_{in} = r_\pi + (\beta + 1) R_L',\qquad R_{out} = \frac{r_\pi + R_s'}{\beta + 1} \approx r_e + \frac{R_s'}{\beta + 1} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-615adb494183503080cb3cf0a5d8c3f0_l3.png)
A complete example: two stages
![]()
Low frequencies: the capacitors
![Rendered by QuickLaTeX.com \[ f_L \approx \sum_i \frac{1}{2\pi R_i C_i} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-d0831a9332f4d2d46416f5e294b77478_l3.png)
High frequencies: the transistor capacitances and the Miller effect
![]()
The ideal operational amplifier
The ideal op-amp
![]()
Adder and difference amplifier
![]()
![]()
Real op-amp limits
Finite gain
![]()
The gain-bandwidth product
![]()
![]()
![]()
Slew rate
![]()
Linear op-amp circuits and active filters
The integrator
![]()
The instrumentation amplifier
![]()
The transimpedance amplifier
![]()
Negative feedback
The fundamental equation
![]()
Effects of feedback
![]()
Oscillators and comparators
The Barkhausen criterion
![]()
The Wien bridge oscillator
![]()
The relaxation oscillator
![]()
Differential amplifiers
Differential mode and common mode
![]()
The differential pair with resistive load
![]()
Large-signal behaviour
![]()
Degeneration
![]()
The active load
![]()
Current mirrors and current sources
The simple mirror
![]()
Errors of the simple mirror
![]()
Variants
![]()
Power output stages
Class B
![]()
![Rendered by QuickLaTeX.com \[ \eta = \frac{V_p^2/(2R_L)}{2V_{CC}V_p/(\pi R_L)} = \frac{\pi V_p}{4V_{CC}} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-d6c3ad495bede44ea5f8a989a9317a5c_l3.png)
Power supplies and DC-DC converters
The linear regulator
![]()
The buck converter
![]()
![]()
The boost converter
![]()
Data converters
The R-2R ladder DAC
![]()