Lab

Transistor: NPN vs PNP, how it works, with live circuits

A transistor lets a small current control a much larger one. Learn its symbol, pins and NPN vs PNP, then flip two live transistor switches in the DCACLab simulator.

Open the lab

On a computer or tablet the full lab is limited without an account; a free account lets you try it in full first. NGSpice charts need an account; saving needs a plan. Create a free account

What is a transistor?

A transistor is a three-pin part in which a small current controls a larger one. This page covers the bipolar junction transistor, or BJT: collector (C), base (B) and emitter (E). A base current lets about beta times as much flow from collector to emitter: fully on or off it is a switch, in between an amplifier. The lab has both kinds, NPN and PNP.

The transistor symbol and its three pins

These are the symbols the lab draws in its Symbols view. The arrow on the emitter points out on an NPN transistor and in on a PNP one. On the lab's part the pins run E, B, C from left to right (real parts vary; check the datasheet); Swap E/C swaps collector and emitter.

NPN transistor symbol, pins E, B and C E B C
NPN transistor
PNP transistor symbol, pins E, B and C E B C
PNP transistor

NPN vs PNP

Both turn on in opposite ways:

The transistor as a switch

How a transistor works

Three states, with Ib the base current, Ic the collector current and β (beta) the gain:

The lab's model is for learning, not for picking a real part: no part numbers, no heating, and no Early effect in the offline engine. The Beta/hFE slider stops at 100; type larger values in its box. With NGSpice on, the model settings also take the forward beta, the Early voltage and the base, collector and emitter resistances.

Transistor vs MOSFET

How a MOSFET works, with live circuits

Use it in class

Setting up a class needs a free account. Your free classroom gets a 7-day full-class trial, counted from when the first student joins; after that the classroom stays open for a smaller class.

Try it with your class

Frequently asked questions

What does a transistor do?

It lets a small current control a larger one: a small base current switches a load on and off, or amplifies a signal.

Which is better for switching, NPN or PNP?

NPN on the low side, turned on by pulling its base up; PNP on the high side, turned on by pulling its base down.

Why does the base need a resistor?

The base-emitter junction acts like a diode: past about 0.6 V its current rises steeply. The resistor sets the base current, here (9 V − 0.6 V) / 10 kΩ, about 0.84 mA.

What is the difference between a transistor and a MOSFET?

A MOSFET is also a transistor: a BJT is controlled by base current, a MOSFET by gate voltage.

Can I simulate a transistor free online?

Yes. The circuits on this page run free in your browser, no account needed. A free account lets you try the full lab, then it switches to a limited mode.

Build your own transistor circuit

Open the lab and wire the NPN low-side switch yourself.

Open the lab