NPN Transistor Switch: Circuit, Measurements and Online Simulator
To build this NPN Transistor Switch circuit you need a 9 V battery, a toggle switch, a 10 kΩ resistor, a digital multimeter, a 2N2222 NPN transistor, a 330 Ω resistor and a green LED. A toggle switch feeds 10 kΩ into the base of a 2N2222; the transistor switches a 20 mA LED on the collector. The ammeter shows how little base current it takes. Make the 8 connections in the wiring table, press Run, and then flip the switch. The multimeter (in series with the base) reads ≈ 0.8 mA while the LED takes ≈ 20 mA: a current gain of ~25 in saturation.
Open this circuit in the free Electronics bench simulator
Parts list
| Qty | Part | What it does |
|---|---|---|
| 1 | 9 V battery | A DC source with a little internal resistance. + is the longer terminal. |
| 1 | Toggle Switch | An on/off switch between its two terminals. Flip it while the circuit runs. |
| 1 | 10 kΩ resistor | Limits current. 220 Ω in series with an LED; 10 kΩ as a pull-up or pull-down. |
| 1 | Digital Multimeter | Turn the dial: V (across a part, COM and V), A (in series, COM and A), Ω / continuity / diode (on an unpowered part), Hz. The A range has a 10 A fuse — put it across a supply and it blows. |
| 1 | 2N2222 NPN transistor | A small base current (B→E) lets a current β times larger flow C→E. Use a base resistor (1 kΩ from a pin) to switch loads. |
| 1 | 330 Ω resistor | Limits current. 220 Ω in series with an LED; 10 kΩ as a pull-up or pull-down. |
| 1 | green LED | Lights when A (anode, the bent leg) is high and C (cathode) is low. Use a resistor. |
Wiring
| # | From | To |
|---|---|---|
| 1 | 9 V battery + | Toggle Switch 1 |
| 2 | Toggle Switch 2 | 10 kΩ resistor leg 1 |
| 3 | 10 kΩ resistor leg 2 | Digital Multimeter A |
| 4 | Digital Multimeter COM | 2N2222 NPN transistor B |
| 5 | 9 V battery + | 330 Ω resistor leg 1 |
| 6 | 330 Ω resistor leg 2 | green LED anode (A, long leg) |
| 7 | green LED cathode (C, short leg) | 2N2222 NPN transistor C |
| 8 | 2N2222 NPN transistor E | 9 V battery - |
Step by step
- Open the electronics bench. Open the BitForBytes Embedded Lab in your browser. A circuit with no microcontroller runs on the analog bench: no install or account is needed.
- Add the parts. Add a 9 V battery, a toggle switch, a 10 kΩ resistor, a digital multimeter, a 2N2222 NPN transistor, a 330 Ω resistor and a green LED from the parts palette (Instruments, Power, Passive and Semiconductors).
- Wire 1. Connect 9 V battery + to Toggle Switch 1.
- Wire 2. Connect Toggle Switch 2 to 10 kΩ resistor leg 1.
- Wire 3. Connect 10 kΩ resistor leg 2 to Digital Multimeter A.
- Wire 4. Connect Digital Multimeter COM to 2N2222 NPN transistor B.
- Wire 5. Connect 9 V battery + to 330 Ω resistor leg 1.
- Wire 6. Connect 330 Ω resistor leg 2 to green LED anode (A, long leg).
- Wire 7. Connect green LED cathode (C, short leg) to 2N2222 NPN transistor C.
- Wire 8. Connect 2N2222 NPN transistor E to 9 V battery -.
- Run and measure. Press Run, then flip the switch. The multimeter (in series with the base) reads ≈ 0.8 mA while the LED takes ≈ 20 mA: a current gain of ~25 in saturation.
Lab sheet
// Electronics bench: NPN transistor as a switch
//
// Base current Ib = (9 V − 0.7 V) / 10 kΩ ≈ 0.83 mA.
// Collector: 9 V → 330 Ω → LED → C; emitter to 0 V.
// With Ib × β far more than the LED needs, the transistor saturates:
// Vce drops to ~0.1 V and the resistor alone sets the LED current.
What to try
Press Run, then flip the switch. The multimeter (in series with the base) reads ≈ 0.8 mA while the LED takes ≈ 20 mA: a current gain of ~25 in saturation.
Frequently asked questions
How do I wire the NPN Transistor Switch circuit?
Make 8 connections: 9 V battery + to Toggle Switch 1; Toggle Switch 2 to 10 kΩ resistor leg 1; 10 kΩ resistor leg 2 to Digital Multimeter A; Digital Multimeter COM to 2N2222 NPN transistor B; 9 V battery + to 330 Ω resistor leg 1; 330 Ω resistor leg 2 to green LED anode (A, long leg); green LED cathode (C, short leg) to 2N2222 NPN transistor C; 2N2222 NPN transistor E to 9 V battery -.
What parts do I need for the NPN Transistor Switch?
A 9 V battery, a toggle switch, a 10 kΩ resistor, a digital multimeter, a 2N2222 NPN transistor, a 330 Ω resistor and a green LED.
Can I simulate the NPN Transistor Switch online for free?
Yes. The BitForBytes Embedded Lab solves the circuit in time, the way SPICE does (nodal analysis with real diode, transistor and capacitor models), and gives you a bench power supply, function generator, oscilloscope and multimeter to measure it — free, in the browser.
What does this circuit show?
A toggle switch feeds 10 kΩ into the base of a 2N2222; the transistor switches a 20 mA LED on the collector. The ammeter shows how little base current it takes.
More Electronics bench projects
- RC Circuit Time Constant: Circuit, Measurements and Online Simulator
- Half-Wave Rectifier with Smoothing Capacitor: Circuit, Measurements and Online Simulator
- 555 Timer Astable LED Flasher: Circuit, Measurements and Online Simulator
- Op-Amp Inverting Amplifier: Circuit, Measurements and Online Simulator
- Zener Diode Voltage Regulator: Circuit, Measurements and Online Simulator
- Lissajous Figures (Oscilloscope X-Y): Circuit, Measurements and Online Simulator