Common-Emitter Amplifier
Common-Emitter Amplifier is a runnable microcontroller simulation example on SensBench — open the wired circuit, inspect the code, and compile real firmware in your browser, no install needed. Last updated Aug 14, 2026.
FREE SIMULATOR EXAMPLE · ADVANCED
Common-Emitter Amplifier
This example samples a common-emitter amplifier on the Arduino Uno — an NPN BJT biased at Vcc/2 with a gain of about -4.7. Open the Serial Plotter and watch a small input signal come out amplified and inverted.
| Board | Arduino Uno (ATmega328P) + analog SPICE circuit |
|---|---|
| Difficulty | advanced |
| Category | circuits |
| Libraries | None — just the Arduino core |
| Runs in | Sensbench browser simulator — free, no account |

The exact circuit you get when you open this example — already wired, ready to run.
The sketch
// Common-emitter amplifier
// Biased at Vcc/2, gain ~ -Rc/Re = -4.7
void setup() { Serial.begin(115200); }
void loop() {
int raw = analogRead(A0);
Serial.println(raw);
delay(1);
}
How it works
The circuit is a 2N2222-class NPN with an emitter resistor (Re) and collector resistor (Rc), biased so the collector rests at Vcc/2. A small AC signal on the base gets amplified: the gain is roughly -Rc/Re, about -4.7 with the example’s values. The sketch samples the output on A0 at 115200 baud with only 1 ms between reads — fast enough to trace the waveform on the Serial Plotter.
The output swings around the 2.5 V bias point: an input wobble of ±0.1 V becomes an output wobble of ±0.47 V, inverted. The Serial Plotter shows the amplified, flipped waveform riding on the DC bias. Reading the plotter is the exercise — the amplifier’s behavior is in the shape, not a single number.
Before you build it for real
The common-emitter stage’s gain formula ignores temperature: the BJT’s behavior shifts with heat, so a real amplifier drifts unless the bias network includes thermal compensation. The emitter resistor provides negative feedback that stabilizes gain at the cost of reduced maximum swing — remove Re and the gain jumps toward beta, but the amplifier becomes unpredictable. And the input impedance is moderate (a few kOhm): connecting a high-impedance source sags the signal before it reaches the base. The simulator’s transistor is ideal; real BJTs vary ±50% in gain between parts, which is why textbook circuits are designed to be gain-tolerant.
Get the parts
Related examples
FAQ
Why is the gain negative?
The common-emitter stage inverts: as the input voltage rises, the transistor conducts more, pulling the collector voltage down. Gain = -Rc/Re with the minus sign meaning the output is 180 degrees out of phase with the input. For audio that inversion is inaudible; for control loops it matters.
What does "biased at Vcc/2" mean?
The transistor is held in its linear region with the collector sitting at half the supply, so the signal can swing both up and down without clipping. The bias is set by the resistor network around the base; without it, an AC signal would only get the transistor to conduct during positive halves — turning the amplifier into a rectifier.