Source: https://fullstackelectronics.com/experiments/06-the-active-load

# Experiment 6: The Active Load

Replace the pair's collector resistors with a PNP current mirror, and narrow the comparator's switching band from a quarter of a volt to a few millivolts.

The comparator has one flaw still open from the list in Experiment 3: its output needs too much input to switch. Figure 6-1 is its transfer curve from the end of [Experiment 5](https://fullstackelectronics.com/experiments/05-the-current-mirror.html.md), the output plotted against V+ with V− at 1.67 V. The output climbed from about 1 V to 5 V while V+ rose from 1.61 V to 1.88 V. A comparator should switch as soon as V+ passes V−, and inside the 555 the timing capacitor charges slowly past each threshold. With a band a quarter of a volt wide, the capacitor voltage spends part of every cycle inside the band. There the output sits between its two levels.

![X-Y oscilloscope capture of the transfer curve with the mirror as the tail: a low shelf, a steep rise, and a high shelf. Input across on channel 1 at 500 millivolts per division, output up on channel 2 at 1 volt per division. Cursors read X1 1.88 volts, X2 1.61 volts, 0.27 volts apart, and Y1 1.06 volts, Y2 5.02 volts, 3.96 volts apart.](https://fullstackelectronics.com/experiments/img/05-transfer-curve-mirror.png)

**Figure 6-1:** Where Experiment 5 left the comparator, with V− at 1.67 V. The output needs 0.27 V of input, from 1.61 V to 1.88 V, to climb 3.96 V from its low shelf at 1.06 V.

The band is wide because the pair's gain is low. Gain is how far the output moves for each volt of difference between the inputs. Across the step, the rising part of the curve in Figure 6-1, the gain averages about 15: 3.96 V of output for 0.27 V of input. The two 4.7 kΩ collector resistors set that gain, so a narrower band needs a change to them.

A larger resistor is the first idea, and the next section shows what it does to the threshold. The better choice is a second current mirror in place of the two resistors. It uses a new kind of transistor, the PNP. A load made of transistors in this way is called an [active load](https://fullstackelectronics.com/reference/glossary.html.md#active-load). This experiment introduces the PNP, builds the new mirror onto the board and measures the band again.

On the board, the pair, its mirror tail and the ground and probe leads stay as Experiment 5 left them. You remove two resistors and two jumpers, and you insert two transistors and six short jumpers.

### You will need

- [ ] 2×2N3906 PNP transistors, for Q5 and Q6
- [ ] The comparator from Experiment 5, still on the board and wired for the transfer curve as in Figure 5-11
- [ ] Jumper wire
- [ ] Bench power supply with two independently adjustable outputs: output 1 at 5.00 V with a 50 mA current limit to power the board, output 2 at 1.67 V for V−
- [ ] Two-channel oscilloscope with one probe
- [ ] Function generator
- [ ] BNC cable, BNC T-piece and a BNC lead ending in mini-hook clips

## A larger resistor moves the threshold

The lead traced the low gain to the two 4.7 kΩ collector resistors. A larger collector resistor would raise the gain, because the same change in Q2's current would make a larger change in the output voltage. On paper, a 100 kΩ in place of the 4.7 kΩ multiplies the gain by twenty. In the circuit, the threshold moves away from V−, and the average gain across the step stays near 40.

Look at the bottom of the step in Figure 6-1. There Q2 carries the whole tail current, about 0.95 mA. Experiment 5's flat output at 2.77 V put 0.47 mA in each side. Through 4.7 kΩ, 0.95 mA would drop 4.5 V and take Q2's collector to 0.5 V, below its emitters at about 1 V. Q2 saturates first, so the low shelf sits at 1.06 V.

A 100 kΩ would need 95 V to pass 0.95 mA. With Q2's emitters near 1 V, the 100 kΩ has about 4 V to drop, so Q2 can pass at most 40 µA before it saturates. With the inputs equal, Q2 takes half the tail, 0.47 mA, so Q2 saturates and the output sits on its low shelf. Q2's current falls to 40 µA only when V+ is about 80 mV above V−. The output leaves the low shelf there and reaches 5 V when V+ is about 180 mV above V−. The theory box below works out these numbers.

So a 100 kΩ still gives a step about 0.1 V wide, but the step sits 80 mV to 180 mV above V−. The resistor and the tail current set that threshold, and V− no longer does. Across the step the gain averages about 4 V ÷ 0.1 V, near 40, the same as before.

A resistor has one number, and it sets two things at once. It sets how far the output moves for a change in current, and how much voltage the steady current drops. The first needs to be large and the second small. No resistor does both. The theory box puts a number on that limit, and the next section describes a load that does both.

#### Where a resistor's gain runs out

The gain of the pair with resistor loads depends on the tail current and the collector resistance only through their product. That product is the voltage the resistor drops when one transistor carries the whole tail current. Double the resistance and halve the current, and the gain stays the same. For the step to stay on V−, that product has to fit between the 5 V supply and the emitters, about 4 V on this board. So the gain at the centre of the step has a cap of about 40, whatever resistor you choose. Experiment 5 worked out a gain near 42 at the centre, so with 4.7 kΩ and 0.95 mA the board is already at the cap.

Where the cap and the moved threshold come from optional

How steeply one transistor responds. Experiment 5's theory box used the Ebers–Moll model, $I_C=I_S\,e^{V_{\mathrm{BE}}/V_T}$. The change in collector current per volt of change in base-emitter voltage is the slope of that curve, the [transconductance](https://fullstackelectronics.com/reference/glossary.html.md#transconductance) $g_m$. Differentiate with respect to $V_{\mathrm{BE}}$. The derivative of an exponential is the same exponential, multiplied by the derivative of what is in the exponent, here $1/V_T$:

$$g_m=\frac{dI_C}{dV_{\mathrm{BE}}}=\frac{I_S\,e^{V_{\mathrm{BE}}/V_T}}{V_T}$$

The numerator is $I_C$ itself, so

$$g_m=\frac{I_C}{V_T}$$

With 0.47 mA in each transistor and $V_T\approx 26$ mV, that is about 18 mA/V.

The pair with resistor loads. Let the inputs differ by a small voltage $v_d$. The current Q1 gains is the current Q2 loses, so the tail node holds still for a difference signal. Q1's base-emitter voltage rises by half of $v_d$, and Q2's falls by half. Q2's current falls by

$$\Delta I_{C2}=-g_m\,\frac{v_d}{2}$$

The output is 5 V minus the drop across Q2's collector resistor $R_C$. So less current gives a higher output:

$$\Delta V_{\mathrm{OUT}}=-R_C\,\Delta I_{C2}=g_m R_C\,\frac{v_d}{2}$$

The gain is the change in output divided by the change in input that caused it:

$$A=\frac{\Delta V_{\mathrm{OUT}}}{v_d}=\frac{g_m R_C}{2}$$

With 18 mA/V and 4.7 kΩ this is about 42.

The cap. Each transistor carries half the tail current $I_T$ at the centre of the step, so put $g_m=I_T/(2V_T)$ into the gain:

$$A=\frac{I_T}{2V_T}\cdot\frac{R_C}{2}=\frac{I_T R_C}{4V_T}$$

The product $I_T R_C$ is the drop across Q2's resistor when Q2 carries the whole tail, at the bottom of the step. It has to fit between 5 V and the emitters at about 1 V, so it can be at most about 4 V:

$$A\le\frac{4\ \mathrm{V}}{4\times 26\ \mathrm{mV}}\approx 38$$

With 4.7 kΩ and 0.95 mA the product is 4.5 V, slightly more than fits, which is why Q2 saturates on the low shelf. The current and the resistance appear only as their product, so no choice of resistor raises the cap. A larger gain needs a load that drops little voltage for its steady current and still resists any change in that current.

A larger resistor. The tail current divides between Q1 and Q2 by the 60 mV rule. Q1's base-emitter voltage is higher than Q2's by $v_d$, so Q1 carries $e^{v_d/V_T}$ times Q2's current. The two currents add up to the tail current. Solve for $v_d$:

$$I_T=I_{C2}\left(1+e^{v_d/V_T}\right)\quad\Rightarrow\quad v_d=V_T\ln\left(\frac{I_T}{I_{C2}}-1\right)$$

A 100 kΩ with about 4 V to drop lets Q2 leave saturation at $I_{C2}=40\ \mu\mathrm{A}$:

$$v_d\approx 26\ \mathrm{mV}\times\ln\left(\frac{0.95\ \mathrm{mA}}{40\ \mu\mathrm{A}}-1\right)=26\ \mathrm{mV}\times\ln 22.8\approx 81\ \mathrm{mV}$$

The output comes within 0.1 V of 5 V when the 100 kΩ drops only 0.1 V, at $I_{C2}=1\ \mu\mathrm{A}$:

$$v_d\approx 26\ \mathrm{mV}\times\ln\left(\frac{0.95\ \mathrm{mA}}{1\ \mu\mathrm{A}}-1\right)=26\ \mathrm{mV}\times\ln 949\approx 178\ \mathrm{mV}$$

The step runs from about 80 mV to about 180 mV above V−. The output moves about 3.9 V across those 0.1 V of input, an average gain near 40.

## A current source as the load

The last section showed that one resistor cannot both drop little steady voltage and resist a change in current. Experiment 5 built a circuit that does both: a current source. A current source passes a set current and lets the voltage across itself settle where the circuit needs it. It needs only a few tenths of a volt to work, and a change in its voltage hardly changes its current. So the plan is to feed each of the pair's collectors from a current source connected to +5 V, in place of the resistor.

Two separate current sources would fail. Their currents would never quite match the pair's, and the mismatch would push the output against a rail. The load current has to follow the pair's current, and a current mirror does that. Its diode-connected side connects to Q1's collector and carries the current Q1 draws. Its other side copies that current into Q2's collector, which remains the output.

Experiment 5's mirror sat on the ground rail and pulled current down. This one sits on the +5 V rail and has to push current down into the pair. That needs transistors of the opposite type, the PNP.

#### Meet the PNP

The 2N3906 is the PNP partner of the 2N3904. It comes in the same TO-92 package. With the flat face towards you, its legs read emitter, base, collector from left to right, the same as the 2N3904. Side by side, only the printing tells them apart. Inside, its three layers are stacked in the opposite order, so its voltages and currents run the opposite way.

An NPN switches on when its base is about 0.65 V above its emitter, and current flows into its collector and out of its emitter. A PNP switches on when its base is about 0.65 V below its emitter, and current flows into its emitter and out of its collector. So a PNP usually has its emitter on the positive supply and its load below it, towards ground.

Figure 6-2 draws one of each, switched on. The arrow on the emitter shows the direction of the current: out of an NPN, into a PNP. What you learned about the NPN in Experiments 3 to 5 applies to the PNP with the signs reversed. That includes the rule of ten times the current for every 60 mV and the way two of them make a mirror.

![Two schematics side by side. Left, an NPN 2N3904: a resistor from +5 volts to its collector, its emitter on ground, its base at 0.65 volts, and a green arrow showing current flowing down through the resistor. Right, a PNP 2N3906: its emitter on +5 volts, its base at 4.35 volts, a resistor from its collector to ground, and a green arrow showing current flowing down through the resistor. The PNP's emitter arrow points in towards the base.](https://fullstackelectronics.com/experiments/img/06-npn-pnp.svg)

**Figure 6-2:** An NPN and a PNP, each switched on. The NPN's base sits 0.65 V above its emitter on ground. The PNP's base sits 0.65 V below its emitter on +5 V.

## Build the active load

With the PNP introduced, Figure 6-3 shows the whole comparator with the new load. The pair and its mirror tail are drawn faded, as Experiment 5 left them. Q5 and Q6 are the two 2N3906s, with their emitters on +5 V and their bases joined. Q5 is drawn above Q1, with its collector wired to its base. It carries Q1's current, as Q3 carried the reference current in Experiment 5. Q6 is drawn above Q2 and copies that current into Q2's collector, which is still the output.

![Schematic of the comparator with the active load. The pair Q1 and Q2 and the tail mirror Q3 and Q4 below them are drawn faded. In full ink above the pair, two PNP transistors: Q5 over Q1 and Q6 over Q2, both emitters on the +5 volt line, their bases joined by one wire. Q5's collector is wired to its base and to Q1's collector. Q6's collector joins Q2's collector, which is the OUT terminal.](https://fullstackelectronics.com/experiments/img/06-schematic-active-load.svg)

**Figure 6-3:** The comparator with the active load. Q5 and Q6 take the place of the two 4.7 kΩ collector resistors.

To get from the Experiment 5 board to the circuit of Figure 6-3, first remove the two 4.7 kΩ collector resistors. Figure 6-4 shows them crossed out in red, and the PNP mirror replaces them. I forgot them on my first try, and the circuit still switched, but badly. The caution box below gives the numbers.

Then the two inputs move. The generator's red lead and the positive lead of power supply output 2 go directly onto the base columns, at 10j and 13j. The two jumpers that carried the bases into the upper block are then removed, which clears the centre channel. The PNPs stand in the upper block from column 3, above the tail mirror, both the same way round, with the emitter on the left. Two jumpers run diagonally across the centre channel from the pair's collectors to the PNP collectors.

The whole comparator stays within columns 3 to 14, and the upper block above the pair stays empty. The finished 555 has to fit on this one board, and the space to the right is for the parts still to come. Figure 6-4 shows the board, with everything already built drawn faded.

[![The breadboard with the pair, the tail mirror and the ground and probe connections drawn faded, and the two base jumpers gone. The two 4.7 kilohm collector resistors, from 11j and 14j to the bottom +5 volt rail, are drawn faded and crossed out in red, for removal. Red rings mark the inputs in their new holes: V+ from the generator at 10j and V− from power supply output 2 at 13j. In colour: Q5, a 2N3906, stands at 3d, 4d and 5d, above Q3, and Q6, a 2N3906, at 6d, 7d and 8d, above Q4. Both have their flat faces towards the near edge, so their legs read emitter, base, collector. Two yellow jumpers run diagonally across the centre channel, from 11f to 5e and from 14f to 8e, and connect the pair's collectors to the PNP collectors. A red jumper takes 3a straight up to the +5 volt rail, and a short red diagonal takes 6a to the rail at column 7. A short yellow jumper joins 4a to 5a, Q5's base to its collector, and a green jumper joins 4b to 7b, the two bases. The upper block above the pair is empty.](https://fullstackelectronics.com/experiments/img/06-breadboard-active-load.svg)](https://fullstackelectronics.com/experiments/img/06-breadboard-active-load.svg)

**Figure 6-4:** The active load on the board. The two crossed-out collector resistors are removed, and V+ and V− move down onto the base columns. Q5 and Q6 stand in columns 3 to 8, above the tail mirror, and two diagonal jumpers bring the pair's collectors up to them. Everything stays within columns 3 to 14.

1.  **Switch everything off.** Switch off the 5 V supply, power supply output 2 and the generator.
2.  **Remove both collector resistors.** Remove the two 4.7 kΩ resistors that run from 11j and 14j to the bottom +5 V rail. Check that 11j and 14j are empty.
3.  **Move the inputs.** Move the generator's red lead from 10c to 10j. Move the positive lead of power supply output 2 from 13c to 13j. The ground leads stay where they are. Remove the base jumpers from 10f to 10e and from 13f to 13e.
4.  **Connect the collectors to the upper block.** Connect a jumper from 11f to 5e for Q1's collector. Connect a jumper from 14f to 8e for Q2's collector. Both jumpers cross the centre channel on a diagonal.
5.  **Fit Q5 and Q6.** Insert Q5 into 3d, 4d and 5d. Insert Q6 into 6d, 7d and 8d. Turn both flat faces towards the near edge, so the legs read emitter, base, collector from left to right. Each collector now shares a column with the upper end of a collector jumper.
6.  **Connect the emitters to +5 V.** Connect a jumper from 3a to the +5 V rail directly above it. Column 6 has no rail hole. Connect a short jumper from 6a to the +5 V rail hole at column 7.
7.  **Wire the mirror.** Connect a short jumper from 4a to 5a to join Q5's base to its own collector. Connect a jumper from 4b to 7b to join the two bases.

A 2N3906 looks the same as a 2N3904 and fits the same holes. Read the marking before you insert it. An NPN in Q5's or Q6's place, or a PNP inserted the wrong way round, gives no heat and no smell. The output then stays at one level whatever the input does. If that happens, switch off and check three things: the part number on Q5 and Q6, that both flat faces point towards the near edge, and that both red jumpers reach the +5 V rail.

If the output switches but the step measures tens of millivolts wide, check 11j and 14j first. I left the collector resistors in on my first try. The comparator still worked, which makes the mistake easy to miss, but the step came out about 60 mV wide, a gain of about 65. A 4.7 kΩ left on Q2's collector sits in parallel with Q2 and Q6. Q2 and Q6 together act as about 36 kΩ at the output, so the 4.7 kΩ sets most of the resistance there.

## Measure the step

With the mirror built, measure the step again to see how much narrower it is. The measurement is the one from Experiments 4 and 5, with a narrower sweep, so that the ramp passes slowly through the threshold. The generator's red lead is now in 10j. Power supply output 2 holds V− at 1.67 V in 13j. The oscilloscope channel 2 probe is still on the output at 14i.

1.  **Set the generator** to a triangle from 1 V to 2 V at 100 Hz. Keep its load setting at HiZ. The ramp passes through 1.67 V on the way up and on the way down.
2.  **Set the oscilloscope** to show time across the screen. Set oscilloscope channels 1 and 2 to 1 V/div. Set the timebase to 1 ms/div. Trigger on oscilloscope channel 1, rising edge. About one and a half cycles of the triangle fill the screen.
3.  **Switch on** the 5 V supply, power supply output 2 and the generator.

![Oscilloscope at 1 volt per division and 1 millisecond per division, about one and a half cycles of the 100 hertz triangle across the screen. The yellow input climbs from 1 to 2 volts and back. The magenta output jumps from about 1 volt to about 5 volts where the rising input passes the threshold, and drops back where the falling input passes it. Both edges look vertical. A cursor readout left over from an earlier measurement is still on the screen.](https://fullstackelectronics.com/experiments/img/06-edge-vertical.png)

**Figure 6-5:** The input triangle in yellow and the output in magenta, at 1 ms/div. The output jumps between its two levels each time the input crosses the threshold.

Figure 6-5 is the capture. In Experiment 5 the output ramped between its levels while the input climbed about a quarter of a volt. That ramp has gone. Each edge is now a vertical line at this timebase. The output leaves 1 V and arrives at 5 V while the input barely moves.

The time view shows that the edges are steep, but it does not give their width in input volts. Switch to X-Y mode to see the transfer curve, with input across and output up. Set oscilloscope channel 1 to 200 mV/div with its offset near −1.7 V, so the step sits in the middle of the screen. Place the X cursors on each side of the step and the Y cursors on the two shelves, as in Figure 6-1.

![X-Y oscilloscope capture of the transfer curve, input across on channel 1 at 200 millivolts per division, output up on channel 2 at 1 volt per division: a low shelf near 1 volt, a vertical line, and a high shelf near 5 volts. Cursors read X1 1.656 volts, X2 1.704 volts, 48 millivolts apart, on either side of the line, and Y1 1.12 volts, Y2 5.04 volts, 3.92 volts apart.](https://fullstackelectronics.com/experiments/img/06-transfer-cliff.png)

**Figure 6-6:** The transfer curve with the active load. The step is a vertical line. The cursors read 3.92 V of output within 48 mV of input.

On my board the cursors in Figure 6-6 read 3.92 V of output, from 1.12 V to 5.04 V. On the input axis they sit 48 mV apart, one on each side of the line. So this capture shows only that the step is narrower than 48 mV. Even that means a gain of at least 80, twice the cap of about 40 for any resistor load. To measure the step, return to time across the screen and spread the edge over the whole screen.

1.  **Leave X-Y mode.** Set the timebase to 100 µs/div. Turn the horizontal position knob until the output's rising edge is in the middle of the screen.
2.  **Place the time cursors** where the output starts to rise and where it reaches the top. Place the Y cursors on the two levels.

![Oscilloscope at 100 microseconds per division: the yellow input is an almost flat line rising slowly, and the magenta output rises from its low level to its high level in a narrow, almost vertical edge. Time cursors 36 microseconds apart bracket the rise, and Y cursors read 1.04 and 5.04 volts, 4.00 volts apart.](https://fullstackelectronics.com/experiments/img/06-band-zoom.png)

**Figure 6-7:** The rising edge at 100 µs/div. The time cursors bracket the rise: 36 µs for 4.00 V of output.

The output takes 36 µs to cross from one level to the other. The input triangle climbs 1 V in 5 ms, which is 0.2 mV every microsecond. So in those 36 µs the input moved about 7.2 mV, and the step is about 7 mV wide. 4.00 V of output for 7.2 mV of input is a gain of about 550. That is nearly forty times the 15 of Experiment 5.

Between them, Experiments 4 and 5 took the step from 0.45 V to about a quarter of a volt. The two PNPs make it about forty times narrower again. The table lists the step at each stage so far.

| Stage | Input step | Output swing | Gain |
|----|----|----|----|
| Experiment 3 · one transistor (Figure 3-6) | 0.45 V | 4.82 V | about 11 |
| Experiment 4 · differential pair (Figure 4-5) | 0.25 V | 3.98 V | about 16 |
| Experiment 5 · mirror tail (Figure 6-1) | 0.27 V | 3.96 V | about 15 |
| Experiment 6 · active load (Figure 6-7) | about 0.007 V | 4.00 V | about 550 |

Figure 6-8 draws the last two rows of the table on one set of axes, from the cursor readings.

![Graph of output voltage against input voltage from 1.2 to 2.2 volts. A grey curve, Experiment 5, has a low shelf near 1 volt, a slope from 1.61 to 1.88 volts of input, and a high shelf near 5 volts. A dark curve, Experiment 6, has the same shelves joined by an almost vertical line at about 1.68 volts, about 0.007 volts wide.](https://fullstackelectronics.com/experiments/img/06-transfer-compare.svg)

**Figure 6-8:** The transfer curve before and after the active load, drawn from the cursor readings of Figures 6-1, 6-6 and 6-7.

## What just happened?

The measurements show the step about forty times narrower, and the cause is in how the new load handles current. The active load does two things the resistors could not do. It brings Q1's half of the signal to the output. It also makes the output voltage the only thing that can change to balance any difference in current. Figure 6-9 marks the steps on the circuit. It draws the tail mirror as a single current-source symbol, a circle with an arrow.

![The pair with the PNP mirror above it and the tail drawn as a current-source symbol, with five numbered markers matching the steps below. Marker 1: 0.47 milliamps flowing down from Q5 into Q1. Marker 2: the wire joining Q5's and Q6's bases. Marker 3: current flowing down from Q6 into the output wire. Marker 4: current flowing down from the output wire into Q2. Marker 5: the OUT terminal.](https://fullstackelectronics.com/experiments/img/06-load-how.svg)

**Figure 6-9:** The active load, with the five steps marked. The numbers match the list below.

1.  **Q1's current comes through Q5.** With the inputs equal, Q1 carries half the tail current, about 0.47 mA. All of it comes down from +5 V through Q5.
2.  **Q5 sets the voltage on the base wire.** Q5's collector is wired to its base. So Q5 settles at the base voltage that passes Q1's current, as Q3 did in Experiment 5. That voltage is about 0.65 V below its emitter, near 4.35 V. Q6's base is on the same wire, and its emitter is on the same +5 V.
3.  **Q6 copies Q1's current into the output.** With the same voltage between base and emitter, Q6 passes the same current as Q5. It pushes that current down into the output wire, where Q6's and Q2's collectors meet.
4.  **Q2 takes its own current out of the output.** With the inputs equal, Q2 carries the same 0.47 mA as Q1. So the current Q2 takes out of the output wire equals the current Q6 pushes in.
5.  **Any difference moves the output.** Raise V+ by a millivolt. Q1 takes a little more of the tail current and Q2 a little less, because the tail holds the total. Q6's copy follows Q1 up, and Q2 takes less out. More current now arrives at the output wire than leaves it, and the extra charges the output. The output voltage rises, by about half a volt for that millivolt on this board, until the tilt described below absorbs the extra current. A few millivolts more takes the output to +5 V, where Q6 saturates. Lower V+ and the output falls the same way, down to about 1 V, where Q2 saturates near its emitters.

With the resistors, step 5 differed in two ways. First, only Q2's change in current reached the output. Q1's change went into its own 4.7 kΩ and stopped there. Now it comes across through Q5 and Q6, so the output gets twice the change in current. Second, the extra current at the output went into a 4.7 kΩ, which turned each microamp into 4.7 mV.

Now only Q2 and Q6 themselves can absorb extra current at the output. Each of them passes slightly more current as the voltage between its collector and emitter grows. Experiment 5 called this the Early effect. The output voltage has to move tens of millivolts before that tilt absorbs one extra microamp. In Experiment 5 the same tilt made the mirror's copy a few per cent high, a small error in a current. Here it sets the gain of the whole comparator.

#### How much gain the active load gives

The two effects multiply. Bringing Q1's half across doubles the change in current at the output. The resistance that current meets at the output depends on how much Q2's and Q6's currents tilt with their collector voltages. On this board it works out at about 36 kΩ, in place of 4.7 kΩ. Together the two effects raise the gain at the centre of the step from about 42 to about 640, a factor of fifteen.

The board gives about 550 in Figure 6-7, close to that estimate and about 14 % below it. At that gain the full 4 V of output needs only about 7 mV of input. The derivation below works through the numbers.

Where the 640 comes from optional

The current arriving at the output. Let the inputs differ by a small voltage $v_d$. As in the theory box on resistor loads, the tail node holds still. Q1's current rises by $g_m v_d/2$, and Q2's falls by the same amount. Q5 carries Q1's current and Q6 copies it, so Q6 pushes $g_m v_d/2$ more into the output wire. Q2 takes $g_m v_d/2$ less out of it. The extra current arriving at the output is the sum:

$$\Delta I=g_m\,\frac{v_d}{2}+g_m\,\frac{v_d}{2}=g_m v_d$$

The tilt of a transistor's current. Experiment 5's derivation added the Early effect to the model, $I_C=I_S\,e^{V_{\mathrm{BE}}/V_T}\left(1+V_{\mathrm{CE}}/V_A\right)$. Hold the base-emitter voltage steady and change only the collector-emitter voltage. The current changes by

$$\frac{dI_C}{dV_{\mathrm{CE}}}=\frac{I_S\,e^{V_{\mathrm{BE}}/V_T}}{V_A}\approx\frac{I_C}{V_A}$$

The approximation drops the small factor $1+V_{\mathrm{CE}}/V_A$. The inverse of this slope is a resistance, the transistor's output resistance:

$$r_o=\frac{V_A}{I_C}$$

Where the output settles. Let the output rise by $\Delta V$. Q2's collector-emitter voltage rises by $\Delta V$, so Q2 takes $\Delta V/r_{o2}$ more current out of the output wire. Q6's emitter is on +5 V and its collector on the output, so its collector-emitter voltage shrinks by $\Delta V$. Q6 then pushes $\Delta V/r_{o6}$ less in. The output stops moving when these two changes together cancel the extra current:

$$g_m v_d=\frac{\Delta V}{r_{o2}}+\frac{\Delta V}{r_{o6}}=\Delta V\left(\frac{1}{r_{o2}}+\frac{1}{r_{o6}}\right)$$

The bracket is the conductance of the two output resistances in parallel, $1/(r_{o2}\parallel r_{o6})$. Solve for $\Delta V$:

$$\Delta V=\frac{g_m v_d}{1/r_{o2}+1/r_{o6}}=g_m v_d\left(r_{o2}\parallel r_{o6}\right)$$

The gain is $\Delta V$ divided by $v_d$:

$$A=\frac{\Delta V}{v_d}=g_m\,\left(r_{o2}\parallel r_{o6}\right)$$

The numbers. Experiment 5 took the Early voltage of a 2N3904 to be of the order of 100 V. The 2N3906's is lower. Widely used simulation models put it near 20 V. With 0.47 mA in each transistor:

$$r_{o2}=\frac{100\ \mathrm{V}}{0.47\ \mathrm{mA}}\approx 210\ \mathrm{k\Omega},\qquad r_{o6}=\frac{20\ \mathrm{V}}{0.47\ \mathrm{mA}}\approx 43\ \mathrm{k\Omega}$$

Two resistances in parallel combine as their product over their sum:

$$r_{o2}\parallel r_{o6}=\frac{210\times 43}{210+43}\ \mathrm{k\Omega}\approx 36\ \mathrm{k\Omega}$$

$$A\approx 18\ \mathrm{mA/V}\times 36\ \mathrm{k\Omega}\approx 640$$

With resistor loads the gain was $g_m R_C/2\approx 42$. The ratio of the two is $2\times 36/4.7\approx 15$. The 2 comes from bringing Q1's half across, and the rest from the higher resistance at the output.

The Early voltages vary from one transistor to the next. The 100 V for the 2N3904 is an order of magnitude. The 20 V for the 2N3906 comes from simulation models, so 640 is only an estimate. The board's 550 is about 14 % below it.

#### The same front end, inside the 741

The circuit now on the board is a differential pair with a mirror as its tail and a second mirror as its load. It is the input stage of many op-amps and comparators. The µA741, the op-amp Dave Fullagar designed at Fairchild in 1968, is still one of the best known. Its input stage has a current-mirror load, which does the same two jobs there. It carries both halves of the pair's signal onto one wire, and it gives far more gain than a resistor that fits on the supply. On a chip, matched transistors take little area, and a large resistor takes a lot.

At this gain the output sits between its two levels only while V+ and V− are within a few millivolts of each other. Everywhere else it rests at about 1 V or about 5 V, which is the comparator working. A difference between Q5 and Q6, or between Q1 and Q2, moves the threshold a few millivolts away from V−. Keep each matched pair touching, so the two transistors share a temperature. That keeps the shift small.

## The flaw list

The flaw list opened in Experiment 3 with three flaws. Experiment 4 added a fourth, and Experiment 5 fixed it. The active load fixes the wide transition, the last flaw from Experiment 3 still open. One flaw joins the list here: the output's low level sits about a diode drop below V−. It stays open until Experiment 7.

| \# | Flaw | What it means | Found | Status |
|----|----|----|----|----|
| 1 | No reference input | The threshold is the transistor's own 0.6 V. Nothing outside the circuit sets it. | [Experiment 3](https://fullstackelectronics.com/experiments/03-the-almost-comparator.html.md) | Fixed in [Experiment 4](https://fullstackelectronics.com/experiments/04-the-differential-pair.html.md): the differential pair |
| 2 | Wide transition | The output needs a band of input to travel from high to low: about half a volt with one transistor, about a quarter of a volt with the pair. | [Experiment 3](https://fullstackelectronics.com/experiments/03-the-almost-comparator.html.md) | Fixed here the active load |
| 3 | Thermal drift | The base-emitter voltage falls about 2 mV per degree, and the threshold falls with it. | [Experiment 3](https://fullstackelectronics.com/experiments/03-the-almost-comparator.html.md) | Reduced in [Experiment 4](https://fullstackelectronics.com/experiments/04-the-differential-pair.html.md): two matched transistors drifting together |
| 4 | Tail current follows the common-mode level | A resistor tail passes more current as both inputs rise, and the output moves with it. | [Experiment 4](https://fullstackelectronics.com/experiments/04-the-differential-pair.html.md) | Fixed in [Experiment 5](https://fullstackelectronics.com/experiments/05-the-current-mirror.html.md): the current mirror tail |
| 5 | Output low trapped a diode drop below the reference | The output's low level sits a diode drop below the reference instead of at ground. | Found here | Open until [Experiment 7](https://fullstackelectronics.com/experiments/07-the-output-stage.html.md) |

The low level in Figure 6-6 is still about 1.1 V, a volt above ground, the same as with the resistors in Figure 6-1. Q2 cannot pull its collector below its emitters, and the emitters sit about 0.65 V below V−. The logic this comparator drives in the 555 needs a low level near 0 V. Experiment 7 adds an output stage for that.

## Going further

Set V− to 3.33 V, the 555's upper threshold. Move the generator's triangle up so that it crosses 3.33 V, from 2.8 V to 3.8 V for example. In X-Y mode, set oscilloscope channel 1's offset near −3.3 V. The low level should sit about 0.65 V below V−, near 2.7 V, because Q2 cannot pull its collector below its emitters. Note the reading, because Experiment 7 starts from it.

## Quick check

1\. A 100 kΩ collector resistor in place of the 4.7 kΩ would not make a better comparator because…

it lets Q2 pass only about 40 µA before Q2 saturates, so the step moves to 80 mV to 180 mV above V−

a large resistor adds too much noise to the output

the pair's transistors cannot pass current through more than 10 kΩ

A resistor's value sets both its gain and its steady voltage drop. With about 4 V to drop, a 100 kΩ passes at most 40 µA. Q2 stays saturated until V+ is about 80 mV above V−, so the threshold moves away from V−. The average gain across the step stays near 40.

2\. With the active load, a millivolt of extra input moves the output much further because…

the PNP transistors have more current gain than the NPNs

the extra current at the output can go only into the slight tilt of Q2's and Q6's currents, so the voltage has to move a long way

the tail current is larger than it was with the resistors

The mirror holds its current, and so does Q2. Neither absorbs extra current at the output except through the small change of current with collector voltage. That acts as tens of kilohms in place of 4.7 kΩ.

3\. With resistor loads, Q1's change in current was lost. With the active load it…

passes through Q5, is copied by Q6 and arrives at the output, doubling the change there

flows into the tail and changes the tail current

sets the threshold in place of V−

Q5 carries Q1's current, and Q6 copies it onto Q2's collector. When Q1 takes more and Q2 less, both changes push the output the same way.

## Before moving on

You removed two resistors and inserted two PNP transistors and six jumpers, and the step went from 0.27 V wide to about 7 mV. The comparing part of the comparator is now done. Six loose transistors tell which of two voltages is higher to within a few millivolts. They form a differential pair with a mirror for its tail and a mirror for its load. For the 555 that is enough. The timing capacitor travels 1.67 V between the two thresholds, and 7 mV is under half a per cent of that.

The resistors could not reach this because their value set both the gain and the voltage they dropped. The PNP mirror drops only the voltage it needs and holds its current. So any imbalance between the pair's two halves can only change the output voltage. The mirror also brings Q1's half of the signal across to the output, which the resistors wasted.

The output stage is still missing. The output's low level sits a volt above ground and follows V−, and the logic it drives needs a low level near 0 V. [Experiment 7: The Output Stage](https://fullstackelectronics.com/experiments/07-the-output-stage.html.md) adds one transistor that takes the output down to ground, and with it the comparator is complete. The 555 also needs a second comparator, the trigger comparator. [Experiment 8: The PNP Twin](https://fullstackelectronics.com/experiments/08-the-pnp-twin.html.md) builds it and measures where the NPN pair stops working.
