Voltage Follower (Buffer) 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 · BEGINNER

Voltage Follower (Buffer)

This example demonstrates a voltage follower on the Arduino Uno — an op-amp with 100% negative feedback whose output tracks its input exactly. The sketch prints both voltages to three decimals, making the tracking — and the tiny offset error — visible.

Board Arduino Uno (ATmega328P) + analog SPICE circuit
Difficulty beginner
Category circuits
Libraries None — just the Arduino core
Runs in Sensbench browser simulator — free, no account
Arduino Uno measuring a voltage follower buffer with matched input and output in the Sensbench simulator

The exact circuit you get when you open this example — already wired, ready to run.

The sketch

// Voltage follower — Vout tracks Vin exactly
void setup() { Serial.begin(9600); }
void loop() {
  float vin = analogRead(A0) * 5.0 / 1023.0;
  float vout = analogRead(A1) * 5.0 / 1023.0;
  Serial.print("Vin="); Serial.print(vin,3);
  Serial.print(" Vout="); Serial.println(vout,3);
  delay(500);
}

How it works

The op-amp’s output is wired straight back to its inverting input, with the signal on the non-inverting input. The result: Vout tracks Vin at unity gain. The sketch reads both sides on A0 and A1 and prints them with three decimals — the two numbers should match to within the op-amp’s offset, a millivolt or two.

The 500 ms polling shows the follower’s tracking in near-real-time. Change the input and the output follows; the tiny residual difference between the printed values is the op-amp’s input offset voltage made visible — a real non-ideality hiding in the third decimal.

Before you build it for real

The follower’s output cannot exceed the op-amp’s swing limits: an LM358 clips well below the rail, so inputs near 5 V come out short of the rail — the tracking looks broken at the extremes. The input offset voltage (up to several millivolts on a cheap LM358) is a constant error the three-decimal printout exposes. And the follower does not fix noisy sources — it faithfully reproduces whatever the input carries, noise included; people expect it to clean the signal and it does not.

Get the parts

Related examples

FAQ

Why is Vout equal to Vin — what is the point?

The follower does not amplify voltage; it amplifies capability. A high-impedance source can deliver almost no current — the follower presents it with a near-infinite input impedance while providing a low-impedance, high-current copy of the same voltage. It is an impedance transformer, and it is the glue circuit between weak sources and hungry loads.

Why 100% feedback?

The output connects directly to the inverting input — full negative feedback. The op-amp drives its output until the inverting input equals the non-inverting input, which means Vout = Vin exactly, within the op-amp’s offset error. No resistors, no gain, just unity.