Level 3 · Sense · project 17 of 17 · 30 min · ●●●○○
The Upside-Down Transistor
A PNP transistor switches the + side of a lamp and turns on when you pull its base DOWN. Same button, same LED, whole circuit flipped.
new here? Start with First Light — one battery, one resistor, one LED. It teaches the loop, LED direction, and why the 220 Ω resistor matters.
What you need
- 1× 3×AA battery pack (4.5 V) L1
- 1× Solderless breadboard L1
- 6× Jumper wires L1
- 1× PNP transistor (2N3906) flat face toward you: legs are E-B-C, same order as the 2N2222
- 2× 10 kΩ resistor one holds the base up, one lets the button pull it down L1
- 1× Push button (tactile) L1
- 1× Red LED (5 mm) L1
- 1× 220 Ω resistor L1
you'll learn: Transistor switching · Ohm's law
Circuit map
The circuit you'll build, running on the Workbench right now — shown with the switch closed.
simulating…
If it doesn't work
The boring ways this circuit actually breaks — check these first before you unwire everything.
- LED never lights, even with the button held. Flat face toward you, legs E-B-C left to right. The EMITTER goes to the + rail. Check the pull-down 10 kΩ actually reaches the − rail through the button.
- LED is always on, button or not. The pull-up 10 kΩ is missing or in the wrong row, so the base floats. It must run from the + rail to the base pin.
- Dim glow that barely changes with the button. E and C are swapped. A PNP wired backwards conducts weakly the wrong way. Turn it around.
- Lights with the button, but very dim. Wrong lamp resistor. 220 Ω is red-red-brown; a 10 kΩ (brown-black-orange) in the lamp makes a ghost.
- Transistor warm to the touch. Something is drawing far more than 11 mA. Usually the 220 Ω is missing from the lamp lane, or the collector is shorted to −.
What you're building
A push-button lamp, which you have built before. The difference is the switch in the middle. In the Automatic Night Light the NPN transistor sat below the LED, between the lamp and battery −. Here a PNP transistor sits above it, between battery + and the lamp. And it turns on backwards: you make the LED light by pulling the base down toward −, not up toward +.
That sounds like a party trick. It isn't. Every motor driver, every H-bridge, every chip that can push a signal both ways is built from an NPN and a PNP working as a pair. This is the other half of the transistor.
The NPN rule, flipped
Hold a 2N3906 with the flat face toward you, legs down. Left to right the legs are Emitter, Base, Collector, exactly like the 2N2222. Same package, same leg order, opposite insides.
The NPN turned on when its base sat about 0.7 V above its emitter. The PNP turns on when its base sits about 0.7 V below its emitter. Here the emitter is tied straight to battery +, which is 4.5 V. So:
- base at 4.5 V (same as the emitter): no difference, transistor off, lamp dark.
- base pulled down to about 3.8 V (0.7 V below): base current flows out of the base, the transistor turns on, and current pours from the emitter out through the collector into the lamp.
That is the whole idea. An NPN needs its base pushed up to turn on. A PNP needs its base pulled down. Think of the PNP as the NPN drawn upside down: emitter at the top, current flowing downward.
The two 10 kΩ resistors
The pull-up. One 10 kΩ runs from battery + to the base. With the button up, no current flows through it, so there is no voltage across it, so the base sits at the full 4.5 V, the same as the emitter. Transistor off. Without this resistor the base would be connected to nothing, and a transistor with a floating base picks up whatever stray voltage is around and flickers. Never leave a base floating.
The pull-down. The second 10 kΩ runs from the base, through the button, to battery −. Press the button and it tries to drag the base down toward 0 V. It can't get there: the base-emitter junction is a diode, and it clamps the base about 0.72 V below the emitter, at roughly 3.8 V. Now both resistors carry current:
pull-down: 3.8 V ÷ 10 000 Ω ≈ 0.38 mA (flowing down to −)
pull-up: (4.5 − 3.8) V ÷ 10 000 Ω ≈ 0.07 mA (flowing in from +)
The difference, about 0.31 mA, is what comes out of the base. That's the base current.
Is 0.31 mA enough?
The 2N3906's gain (hFE) is about 100 to 300; the simulation uses 200. 0.31 mA of base current could let 200 × 0.31 ≈ 62 mA flow through the collector. The lamp only wants about 11 mA (next section). So the transistor is asked for far less than it can supply, and it goes fully on, which engineers call saturated. A saturated transistor acts like a closed switch with about 0.1 V lost across it. The margin is about 5.6×, comfortably above the 5× floor that keeps a switch reliable when the gain drifts.
What the LED sees
With the transistor saturated, the collector sits only about 0.1 V below battery +, at about 4.4 V. The lamp is a 220 Ω resistor and a red LED to −, so Ohm's law with the LED's 2.0 V forward voltage:
(4.4 − 2.0) V ÷ 220 Ω ≈ 10.9 mA
Bright, and safely under the LED's 20 mA limit. The battery supplies the lamp's 10.9 mA plus the pull-down's 0.38 mA: about 11.3 mA in total.
Build it
- Rails: a + rail along the top, a − rail along the bottom, battery between them.
- The transistor: flat face toward you, E to the + rail, C free for now, B free for now.
- The pull-up: 10 kΩ from the + rail to B.
- The pull-down: 10 kΩ from B to one leg of the button; the button's other leg to the − rail.
- The lamp: C → 220 Ω → LED long leg; LED short leg → − rail.
- Power up. Dark. Press the button: lit. Let go: dark.
Try this before you move on: with the button up, measure (or just reason about) the base. It is at 4.5 V. Press the button and it drops to about 3.8 V. That 0.7 V step is the whole switch.
Debug like an engineer
If the lamp never lights, test the halves separately. First the lamp on its own: move the 220 Ω end from the collector straight to the + rail. Lit? Then the lamp is fine and the problem is the transistor half. Check E-B-C order next. A PNP wired with E and C swapped is weakly on backwards and gives a dim, confusing glow. Then confirm the pull-down really reaches the − rail through the button: with the button pressed the base should sit near 3.8 V, not 4.5 V.
🧠 Your challenge
No single right answer. That's the point.
- Swap the pull-down 10 kΩ for 1 kΩ. Work out the new base current (the base still clamps near 3.8 V). What changes at the LED? Build it and check. Then explain why the LED current didn't change.
- Make it a night light with no NPN. Replace the button and its 10 kΩ with an LDR from the base to −. Which room, bright or dark, pulls the base lower? Predict first, then cover the sensor.
- Put the LDR on the other side instead (LDR as the pull-up, 10 kΩ as the pull-down). Now which room lights the lamp? You've just built both the Night Light and the Sunrise Alarm with a PNP, and the only thing that moved was the sensor.
- Harder: wire the night light's NPN so its collector drives this PNP's base through a 10 kΩ. Two transistors, one sensor. Why would anyone want the extra stage? (Hint: the second one multiplies the first one's gain.)
For grown-ups: safety notes
- Battery power only: 4.5 V from three AA cells cannot shock you.
- The 2N3906 is rated for 200 mA, much less than the 2N2222's 600 mA. Keep an LED lane with its 220 Ω on the collector and it never gets warm. Don't ask it to drive a motor directly.
- Never wire the base straight to − with no resistor. The pull-down's 10 kΩ is what keeps the base current at a polite 0.3 mA.
- A transistor that gets hot is wired wrong. Pull the battery, re-check E-B-C, and make sure the emitter, not the collector, is on the + rail.
Checked against
Keep building
You might also like
shares ideas with this one