Source: https://fullstackelectronics.com/experiments/07-the-output-stage

# Experiment 7: The Output Stage

Add one PNP transistor and one resistor after the comparator. Its low level then reaches ground at either of the 555's thresholds.

The comparator from [Experiment 6](https://fullstackelectronics.com/experiments/06-the-active-load.html.md) switches within a few millivolts, but its output never gets near ground. Figure 7-1 is its transfer curve from the end of Experiment 6, with V− at 1.67 V. The high level is 5.04 V, and the low level is 1.12 V. In the 555 this comparator watches the upper threshold, 3.33 V, and there the low level is higher again. That matters because the comparator's output goes to logic.

![X-Y oscilloscope capture of the transfer curve with the active load. The input runs across on channel 1 at 200 millivolts per division, and the output runs up on channel 2 at 1 volt per division. The trace shows a low shelf near 1 volt, a vertical line, and a high shelf near 5 volts. Cursors read Y1 1.12 volts and Y2 5.04 volts.](https://fullstackelectronics.com/experiments/img/06-transfer-cliff.png)

**Figure 7-1:** Where Experiment 6 left the comparator, with V− at 1.67 V. The step is a vertical line, and the low shelf sits at 1.12 V.

The NOR gates of Experiment 10 take each input through a 10 kΩ resistor to the base of an NPN transistor. That transistor switches on when its input rises above about 0.65 V. So a low level of 1.12 V would switch it on, the same as a high level.

The low level sits about a volt above ground because of the pair itself. Q2 cannot pull its collector below its own emitter. Its emitter sits one base-emitter drop, about 0.65 V, below V−. So the low level follows the reference: when V− rises, the low level rises with it.

Because the low level moves with the reference, this experiment first measures it at 3.33 V. Then it adds an [output stage](https://fullstackelectronics.com/reference/glossary.html.md#output-stage): one PNP transistor, Q7, and one 4.7 kΩ resistor. Q7's emitter is on the +5 V rail, and its base reads the comparator's output. The resistor connects Q7's collector to ground. The comparator's output node, Q2's collector, still decides which input is higher. This page calls that node node A, and the new output is Q7's collector.

### You will need

- [ ] 1×2N3906 PNP transistor, for Q7
- [ ] 1×4.7 kΩ resistor
- [ ] 2×1 kΩ resistor, one in series with each input
- [ ] The comparator from Experiment 6, still on the board as in Figure 6-4
- [ ] Jumper wire
- [ ] Bench power supply with two independently adjustable outputs: one at 5.00 V with a 50 mA current limit to power the board (the 5 V supply in the steps), and power supply output 2 for V−
- [ ] Two-channel oscilloscope with one probe
- [ ] Function generator
- [ ] BNC cable, BNC T-piece and a BNC lead ending in mini-hook clips

## Measure the low level at 3.33 V

Figure 7-1 gives the low level with V− at 1.67 V. The 555 uses this comparator at 3.33 V, so first measure the low level there, before you add anything to the board. The board stays as Experiment 6 left it. V+ comes from the generator at 10j, V− comes from power supply output 2 at 13j, and the probe is on node A at 14i. Only the settings change, so that the comparator works at the 555's upper threshold. Figure 7-2 shows the connections.

[![The breadboard with the whole Experiment 6 comparator. Coloured rings and labels mark the connections. V+ from the generator is at 10j, a triangle from 2.8 to 3.8 volts at 100 hertz. V− from power supply output 2 is at 13j, set to 3.33 volts. The generator's black lead and the negative lead of power supply output 2 are on the top ground rail at columns 7 and 16. The tip of the oscilloscope channel 2 probe is on node A at 14i, and its ground is on the bottom ground rail at column 20.](https://fullstackelectronics.com/experiments/img/07-breadboard-trap.svg)](https://fullstackelectronics.com/experiments/img/07-breadboard-trap.svg)

**Figure 7-2:** The board as Experiment 6 left it, with the new settings on the input leads. Nothing moves on the board.

With the leads where Figure 7-2 shows them, change three settings:

1.  **Set power supply output 2** to 3.33 V.
2.  **Set the generator** to a triangle from 2.8 V to 3.8 V at 100 Hz. Keep its load setting at HiZ. The ramp crosses 3.33 V on the way up and on the way down.
3.  **Set the oscilloscope** to show time across, as in Experiment 6. Set both channels to 1 V/div and the timebase to 2 ms/div. Trigger on channel 1, rising. Put the Y cursors on node A's two levels.

![Oscilloscope at 1 volt per division and 2 milliseconds per division, V− at 3.33 volts. The yellow input triangle rises and falls between 2.8 and 3.8 volts. The magenta trace, node A, jumps between a high level near 5 volts while the input is above the reference and a low level while it is below. Y cursors read Y1 2.64 volts and Y2 5.02 volts, 2.38 volts apart.](https://fullstackelectronics.com/experiments/img/07-floor-3v33.png)

**Figure 7-3:** V+ in yellow and node A in magenta, with V− at 3.33 V. The cursors read 5.02 V on the high level and 2.64 V on the low.

Figure 7-3 is the result. Node A still jumps between its two levels each time V+ crosses 3.33 V. The high level is 5.02 V, close to the 5.04 V at 1.67 V. The low level is now 2.64 V. The reference rose by 1.66 V, and the low level rose by 1.52 V, from 1.12 V in Figure 7-1 to 2.64 V. So the low level follows the reference, and at 3.33 V it is even further from the 0 V that the logic needs.

## Why the low level cannot reach ground

Figure 7-3 showed that the low level rises with V−. The cause is in the pair, while V+ is below V−. Figure 7-4 shows the comparator with V− at 3.33 V. The tail mirror Q3 and Q4 is drawn as one current-source symbol, labelled tail.

![The comparator with the PNP mirror Q5 and Q6 on top, the pair Q1 and Q2 below, and the tail as a current-source symbol. Q2's collector is node A. Voltage tags: V− 3.33 volts on Q2's base, about 2.7 volts on the joined emitters, and 2.7 volts to 5 volts on node A.](https://fullstackelectronics.com/experiments/img/07-trap.svg)

**Figure 7-4:** The comparator at the upper threshold. With V− at 3.33 V the emitters sit near 2.7 V, and node A can swing only between there and +5 V.

Follow the currents in Figure 7-4 with V+ below V−. Q2 carries the whole tail current and pulls node A down as far as it can. A transistor pulls its collector down only as far as its emitter, within about a tenth of a volt. There it saturates, and the collector stops falling. Q2's emitter is joined to Q1's, and the pair holds that junction one base-emitter drop below the higher input.

With V+ below V−, the higher input is V−. So the emitters sit at 3.33 V minus 0.65 V, about 2.7 V. Node A stops near 2.7 V, and Figure 7-3 reads 2.64 V. At 1.67 V the same sum gives about 1 V, and Figure 7-1 reads 1.12 V.

So Q2's emitter sets the floor, and no change to the load can move it. The output needs a second transistor with its emitter on a fixed rail. That transistor reads node A and drives an output of its own. It can be an NPN or a PNP, and the next section compares the two.

## Why an NPN after it would stay on

The last section asked for a second transistor. The NPN is the first choice to try, because it is the switch from Experiment 3. Its emitter goes to ground, its base to node A, and a resistor connects its collector to +5 V. Its collector can reach ground. But it switches when its base rises about 0.65 V above its emitter, and node A never falls that far. Figure 7-5 shows the two ranges side by side.

![A voltage scale from 0 to 5 volts. Two bars show where node A can go: from 1.12 volts to 5 volts with V− at 1.67 volts, and from 2.64 volts to 5 volts with V− at 3.33 volts. A dashed line at 4.35 volts is labelled PNP, emitter on +5 V, switches. A dashed line at 0.65 volts is labelled NPN, emitter on ground, switches.](https://fullstackelectronics.com/experiments/img/07-ranges.svg)

**Figure 7-5:** Where node A can go, and where each kind of transistor switches. The NPN's switching point lies below both bars. The PNP's lies inside both.

Figure 7-5 shows the problem. The lowest point of node A is 1.12 V or 2.64 V, so the NPN's base would never fall below its switching point. The NPN would be on in both states of the comparator. Its output would stay low whatever the inputs did.

The PNP works the other way round. A PNP with its emitter on +5 V switches when its base falls about 0.65 V below +5 V, near 4.35 V. That point is inside node A's swing at either reference. Experiment 6 already has two PNPs on this rail. A third PNP, Q7, can read node A from the top rail, and its collector can fall to 0 V through a resistor to ground. That PNP and its resistor are the output stage that this experiment builds.

## Build the output stage

The last section chose the parts. Q7 is a 2N3906 with its emitter on +5 V and its base on node A. A 4.7 kΩ resistor connects its collector to ground. Figure 7-6 shows where they join the comparator, with the parts from Experiment 6 faded. Q7's collector is the new OUT. The 4.7 kΩ resistor is a pull-down: when Q7 is off, it holds OUT at 0 V.

![Schematic of the comparator with the output stage. The pair Q1 and Q2, the tail mirror Q3 and Q4 and the PNP mirror Q5 and Q6 are drawn faded. In full ink, the +5 volt line reaches right to the emitter of Q7, a PNP. A wire runs from node A, the junction of Q6's and Q2's collectors, to Q7's base. Q7's collector goes to the OUT terminal and through a 4.7 kilohm resistor to ground.](https://fullstackelectronics.com/experiments/img/07-schematic-output.svg)

**Figure 7-6:** The comparator with the output stage. Q7 reads node A from the +5 V rail, and OUT is now Q7's collector.

Figure 7-7 puts the same connections on the board. Q7 continues the row of PNPs in the upper block, at 9d to 11d, right after Q6. It stands the same way round as Q5 and Q6, with its emitter on the left. The diagonal jumper from 14f to 8e already brings node A to the upper block, into Q6's collector column, and a short jumper in row b carries it on to Q7's base. The pull-down connects Q7's collector column at 11a to the top ground rail. The probe moves from node A to the same column at 11e.

The whole output stage stays in the upper block. The comparator still spans columns 3 to 14, and both blocks right of column 14 are still free.

[![The breadboard with the whole Experiment 6 comparator drawn faded. Coloured rings and labels mark the leads. V+ from the generator is at 10j, a triangle from 2.8 to 3.8 volts at 100 hertz. V− from power supply output 2 is at 13j, 3.33 volts. The generator's black lead and the negative lead of power supply output 2 are on the top ground rail. The ground of the oscilloscope channel 2 probe is on the bottom ground rail. In colour: Q7, a 2N3906, at 9d, 10d and 11d, beside Q6, with its flat face towards the near edge, so its legs read emitter, base, collector. A red jumper connects 9a to the +5 volt rail. A yellow jumper joins 8b to 10b, node A to Q7's base. A 4.7 kilohm resistor stands from 11a, in Q7's collector column, over the +5 volt rail to the top ground rail. A magenta ring at 11e marks the new place for the probe tip.](https://fullstackelectronics.com/experiments/img/07-breadboard-output.svg)](https://fullstackelectronics.com/experiments/img/07-breadboard-output.svg)

**Figure 7-7:** The output stage on the board. Q7 stands beside Q6, and the probe moves to Q7's collector at 11e.

The steps below follow Figure 7-7. Start with the power off.

1.  **Switch everything off:** the 5 V supply, power supply output 2 and the generator.
2.  **Fit Q7.** Put the 2N3906 into 9d, 10d and 11d, with its flat face towards the near edge of the board. Its legs then read emitter, base, collector from left to right.
3.  **Connect its emitter to +5 V.** Fit a jumper from 9a straight up to the top +5 V rail, the inner one.
4.  **Connect its base to node A.** Fit a jumper from 8b to 10b. Column 8 of the upper block already carries Q6's collector and the diagonal jumper from Q2's collector.
5.  **Fit the pull-down.** Fit the 4.7 kΩ resistor from 11a to the top ground rail, the outer one. It reaches over the +5 V rail.
6.  **Move the probe.** Move the tip of the oscilloscope channel 2 probe from 14i to 11e, in Q7's collector column. Leave its ground clip where it is.

The next section switches the power on again with the probe at 11e. If OUT then stays at about 5 V whatever the input does, Q7 conducts all the time. Check that Q7 is a 2N3906 and that its flat face points towards the near edge. If OUT stays at 0 V, check the jumper from 9a to the rail and the jumper from 8b to 10b. The pull-down must go to the outer ground rail. On the inner +5 V rail, it would hold OUT high.

## Measure the output

Figure 7-3 showed node A stopping at 2.64 V. Now repeat that measurement with the probe on OUT. If the output stage works, OUT falls to 0 V. After that, the same check follows at the lower threshold.

1.  **Keep V−** at 3.33 V. Keep the generator's triangle from 2.8 V to 3.8 V at 100 Hz.
2.  **Keep the oscilloscope** as for Figure 7-3: both channels at 1 V/div, the timebase at 2 ms/div. Move the trigger to channel 2, rising, so that the oscilloscope triggers on the edge of OUT. Put the Y cursors on OUT's two levels.
3.  **Switch on** the 5 V supply, power supply output 2 and the generator.

![Oscilloscope at 1 volt per division and 2 milliseconds per division, triggered on channel 2, V− at 3.33 volts. The yellow input triangle rises and falls between 2.8 and 3.8 volts. The magenta trace, OUT, sits near 5 volts while the input is below the reference and near 0 volts while it is above. While OUT is high, both traces are thick, and the yellow trace has short thick bursts where OUT switches. Y cursors read Y1 0.02 volts and Y2 5.00 volts.](https://fullstackelectronics.com/experiments/img/07-out-3v33.png)

**Figure 7-8:** V+ in yellow and OUT in magenta, with V− at 3.33 V. The cursors read 0.02 V on the low level and 5.00 V on the high.

Figure 7-8 is the result. OUT's low level is now 0.02 V, at ground. At the same reference, node A could not fall below 2.64 V in Figure 7-3. OUT is also inverted: it is high while V+ is below V−, and low while V+ is above V−. Experiment 9 uses that when it feeds the signal to V− in place of V+.

Figure 7-8 also shows something that Figure 7-3 did not. While OUT is high, both traces are thick. A fast wobble, much faster than the 100 Hz ramp, appears on OUT's high level and on the ramp. The ramp also has short bursts where OUT switches. In Figure 7-3, before Q7 was fitted, both traces were thin, so the wobble appears while Q7 is on. The cursors still read 0.02 V and 5.00 V through it.

## Stop the inputs from oscillating

The last section found thick traces while OUT is high. The thick band is an oscillation, far too fast for the 2 ms/div timebase to draw, and the pair makes it itself. While OUT is high, V+ is below V−, so Q2 carries the tail current and its emitters follow its base. Its base connects to power supply output 2 through about a metre of lead.

At tens of megahertz, that lead acts as a small coil. Together with the few picofarads at the emitters, it forms a tuned circuit: a coil and a capacitance that exchange energy at one frequency. A transistor whose emitter follows its base, at the end of such a lead, adds energy to that circuit faster than the wire loses it. So the circuit oscillates. Near the switching points Q1 conducts too, from the generator's lead, and that gives the short bursts on the ramp.

I did not measure the frequency. Figure 7-3 had the same leads and thin traces, so Q7 conducting plays a part too, in a way I did not measure.

A 1 kΩ resistor in series with each base stops it. The oscillating current has to pass through the resistor, which turns more of its energy into heat than the transistor adds, so no oscillation starts. The resistor goes in the base's own column, so that no lead lies between it and the base. Each base draws only a few microamps, so each 1 kΩ moves its input by a few millivolts. From here on, every base that takes a signal from an instrument's lead gets one. Figure 7-9 shows the two on the board.

[![The breadboard with the comparator and Q7 drawn faded, and grey rings on the two ground leads, the probe tip at 11e and the probe ground. In colour: a 1 kilohm resistor stands in 10j, Q1's base column, and leans out over the bottom rails. The generator's red lead clips onto its free leg below the board. A second 1 kilohm resistor stands in 13j, Q2's base column, with the positive lead of power supply output 2, at 3.33 volts, clipped onto its free leg.](https://fullstackelectronics.com/experiments/img/07-breadboard-stoppers.svg)](https://fullstackelectronics.com/experiments/img/07-breadboard-stoppers.svg)

**Figure 7-9:** A 1 kΩ in series with each input, in the base's own column. The instrument leads clip onto the free legs.

1.  **Switch everything off:** the 5 V supply, power supply output 2 and the generator.
2.  **Fit the 1 kΩ on V+.** Take the generator's red lead off 10j. Push one leg of a 1 kΩ resistor into 10j, in Q1's base column, and let it stand. Clip the red lead onto its free leg.
3.  **Fit the 1 kΩ on V−.** Take the positive lead of power supply output 2 off 13j. Push one leg of the second 1 kΩ into 13j, in Q2's base column, and clip the lead onto its free leg.
4.  **Switch on** the 5 V supply, power supply output 2 and the generator. Keep the oscilloscope settings of Figure 7-8.

![Oscilloscope at 1 volt per division and 2 milliseconds per division, triggered on channel 2, V− at 3.33 volts, with a 1 kilohm resistor in series with each input. The yellow input triangle rises and falls between 2.8 and 3.8 volts. The magenta trace, OUT, sits near 5 volts while the input is below the reference and near 0 volts while it is above. Both traces are thin. Y cursors read Y1 0.0 volts and Y2 5.00 volts.](https://fullstackelectronics.com/experiments/img/07-out-3v33-stoppers.png)

**Figure 7-10:** The measurement of Figure 7-8 again, with a 1 kΩ on each input. The cursors read 0.0 V and 5.00 V, and both traces are thin.

Figure 7-10 is the result. OUT switches at the same place, between the same two levels, and the thick band has gone from both traces.

## The lower threshold

With the traces clean, the output stage must also work at the 555's lower threshold. There, Figure 7-1 showed a low level of 1.12 V. The reference, the generator and the trigger change.

1.  **Set power supply output 2** to 1.67 V.
2.  **Set the generator** to a triangle from 1 V to 2 V at 100 Hz, as in Experiment 6.
3.  **Keep the oscilloscope** settings of Figure 7-10, but trigger on channel 1, rising, at 1.68 V.

![Oscilloscope at 1 volt per division and 2 milliseconds per division, triggered on channel 1 rising at 1.68 volts, V− at 1.67 volts, with a 1 kilohm resistor in series with each input. The yellow input triangle rises and falls between 1 and 2 volts. The magenta trace, OUT, sits near 5 volts while the input is below about 1.7 volts and near 0 volts while it is above. Both traces are thin. Y cursors read Y1 0.0 volts and Y2 5.00 volts.](https://fullstackelectronics.com/experiments/img/07-out-1v67-stoppers.png)

**Figure 7-11:** The same measurement with V− at 1.67 V. The cursors read 0.0 V and 5.00 V.

Figure 7-11 shows the same two levels as at 3.33 V. OUT switches where the triangle crosses about 1.7 V, near the new reference. The reference now sets only where OUT switches. The output stage sets how high and how low OUT goes. The table shows the readings before and after Q7 side by side.

| Reference V− | Low level at node A, before Q7 | OUT low | OUT high |
|----|----|----|----|
| 1.67 V | 1.12 V (Figure 7-1) | 0.0 V (Figure 7-11) | 5.00 V (Figure 7-11) |
| 3.33 V | 2.64 V (Figure 7-3) | 0.02 V (Figure 7-8) | 5.00 V (Figure 7-8) |

## What just happened?

The table shows what Q7 does to the output. Q2 still cannot pull node A below its floor, yet OUT now reaches 0 V. The reason is that Q7 switches near the top of node A's range, and it stops node A from falling any further. Figure 7-12 marks the steps on the circuit.

![The comparator with the tail drawn as a current-source symbol and Q7 added at the right. Q7's emitter is on +5 volts, its base on node A, and its collector goes to OUT and through a 4.7 kilohm resistor to ground. Five numbered markers match the steps below. Marker 1: node A. Marker 2: between Q7's emitter and base. Marker 3: the 4.7 kilohm resistor. Marker 4: the wire from node A to Q7's base. Marker 5: a current arrow down from Q7's collector towards OUT.](https://fullstackelectronics.com/experiments/img/07-output-how.svg)

**Figure 7-12:** The output stage, with the five steps marked. The numbers match the list below.

1.  **V+ above V−: node A rises.** Q1 takes the tail current, and Q6 copies it into node A. Q2 takes almost nothing out. Node A rises until Q6 saturates, within a few hundredths of a volt of +5 V.
2.  **Q7 is off.** Its base, on node A, is within a few hundredths of a volt of its emitter on +5 V. A PNP needs about 0.65 V there to conduct.
3.  **The pull-down holds OUT at 0 V.** Q7 passes no current, so no current flows through the 4.7 kΩ, and OUT sits at ground.
4.  **V+ below V−: node A falls, and Q7 holds it near 4.3 V.** Now Q2 takes the tail current, about 0.93 mA, out of node A, and Q6 puts almost nothing in. Node A falls until it is about 0.65 V below +5 V. There Q7's base-emitter junction conducts, and the current that Q2 takes comes out of Q7's base. Node A stops falling near 4.3 V, and Figure 7-13 measures it. That is far above the 2.7 V limit of Figure 7-4, so Q2's emitter no longer matters.
5.  **Q7 lifts OUT.** With close to 1 mA in its base, Q7 could pass far more than that from its collector. The 4.7 kΩ lets only about 1 mA through before OUT reaches the rail. So Q7 saturates, and OUT sits within a few hundredths of a volt of +5 V: 5.00 V in Figure 7-8.

Step 4 says that node A now stops near 4.3 V. You can check that on the board, back at the upper threshold.

1.  **Set power supply output 2** back to 3.33 V.
2.  **Set the generator** to a triangle from 2.8 V to 3.8 V at 100 Hz again.
3.  **Set the trigger level** to 3.24 V, still on channel 1, rising.
4.  **Move the probe tip** from 11e to node A at 14i.
5.  **Put the Y cursors** on node A's two levels.

![Oscilloscope at 1 volt per division and 2 milliseconds per division, triggered on channel 1 rising at 3.24 volts, V− at 3.33 volts, with a 1 kilohm resistor in series with each input. The yellow input triangle rises and falls between 2.8 and 3.8 volts. The magenta trace is node A at 14i. It sits at 5.00 volts while the input is above the reference and at 4.30 volts while it is below. Both traces are thin. Y cursors read Y1 4.30 volts and Y2 5.00 volts, a difference of 0.70 volts.](https://fullstackelectronics.com/experiments/img/07-nodeA-q7-stoppers.png)

**Figure 7-13:** Node A with Q7 in place. The cursors read 4.30 V and 5.00 V.

Compare Figure 7-13 with Figure 7-3. Without Q7, node A swung from 2.64 V to 5.02 V. With Q7's base on it, node A swings only between 4.30 V and 5.00 V, a range of 0.70 V. That is Q7's base-emitter drop. Q7 turns that small swing into the full swing of OUT.

#### Both kinds of transistor in the NE555

This experiment chose a PNP to read a node near the top rail, and the NE555 makes the same kind of choice. In Ken Shirriff's analysis of the chip's die, the threshold comparator works near 2/3 V_(CC). It has NPN input transistors and a PNP current-mirror load, like the circuit on this board. The trigger comparator works near 1/3 V_(CC), closer to ground, and it has PNP input transistors. Each stage uses the polarity that suits its voltages. [Experiment 8](https://fullstackelectronics.com/experiments/08-the-pnp-twin.html.md) builds the trigger comparator the other way up.

## The flaw list

Flaw 5, the trapped low level, is fixed. Figure 7-3 measured it, and Q7 removed it in Figure 7-8. No flaw joins the list. Power supply output 2 gives V− for now, so that each comparator can be tested on its own. Experiment 9 makes both references on the board, from the 5 V rail.

| \# | 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 in [Experiment 6](https://fullstackelectronics.com/experiments/06-the-active-load.html.md): 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. | [Experiment 6](https://fullstackelectronics.com/experiments/06-the-active-load.html.md) | Fixed here the PNP output stage |

## Quick check

Three questions on this experiment: why the low level stays above ground, why an NPN output stage would stay on, and how Q7 brings OUT to ground.

1\. With V− at 3.33 V and no output stage, node A cannot fall below about 2.7 V because…

Q2 cannot pull its collector below its emitter, which sits about 0.65 V below V−

the PNP mirror stops passing current below 2.7 V

the generator cannot drive V+ low enough

Q2 saturates when its collector reaches its emitter. The emitters sit one base-emitter drop below the higher input, so the floor rises with V−.

2\. An NPN with its emitter on ground and its base on node A would fail as the output stage because…

an NPN is too slow for a 100 Hz signal

node A never falls near 0.65 V, so the NPN would be on in both states

its collector cannot reach ground

The NPN switches when its base rises above about 0.65 V. Node A's lowest point is 1.12 V or 2.64 V, depending on the reference, so the NPN never turns off.

3\. With Q7 in place and V+ below V−, node A stops near 4.3 V because…

Q7's base-emitter junction conducts there, and the current Q2 takes comes out of Q7's base

the pull-down resistor holds node A up

Q6 passes more current when Q7 is fitted

When node A is about 0.65 V below +5 V, Q7's base supplies Q2's current. Node A stays there, and Q7 switches on hard and lifts OUT.

## Before moving on

One transistor and one resistor moved the output's low level from a diode drop below the reference to ground. The comparator is now complete, with seven transistors. The input pair and its tail mirror are NPN, and the active load and the output stage are PNP. It decides within a few millivolts which input is higher. Its output then shows the result at 0 V or 5 V, at either reference. The output is inverted: it is high while V+ is below V−.

This seven-transistor circuit is the 555's threshold comparator, the one that watches 2/3 V_(CC). The 555 also needs a trigger comparator, which works at 1/3 V_(CC), nearer ground. [Experiment 8: The PNP Twin](https://fullstackelectronics.com/experiments/08-the-pnp-twin.html.md) builds it from the other kind of transistor. It also measures how close to ground this NPN pair keeps working.
