Built-in project · no microcontroller

Op-amp amplifier, gain of 10

An inverting op-amp amplifier on a single 5 V supply: a 0.2 V sine in, a 2 V sine out, upside down, with clipping and a frequency response to explore. There is no microcontroller in it: the simulator solves the 7 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.

Teaching? Assign it to your class in one click.

Intermediate Runs in your browser. Free, and no account needed.

Op-amp amplifier, gain of 10live0.000 s 0.00x
Click to open it in the editor
The circuit itself, running here on the simulator. Press what can be pressed; click anything else to open it in the editor.

How it works

There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.

sketch.ino
// An inverting op-amp amplifier with a gain of 10.
//
// Rin = 1 k into the inverting input, Rf = 10 k from the output back to it,
// so the gain is -Rf / Rin = -10. The non-inverting input sits at 2.5 V,
// half the single 5 V supply, from two 10 k resistors, so the output swings
// around 2.5 V instead of trying to go below ground.
//
// The generator puts a 100 Hz sine of 0.2 V amplitude on top of 2.5 V. The
// scope shows it on channel 1 and the output on channel 2: 2 V of
// amplitude, ten times bigger and upside down.
//
// Things to try:
//
//   - Turn the generator's amplitude up to 0.3 V. The output wants 3 V of
//     swing around 2.5 V, which is more than the 5 V supply allows, and the
//     tops and bottoms flatten. That is clipping, at the op-amp's real
//     headroom rather than at a number somebody typed.
//   - Analysis... in the more menu, then Frequency response: drive gen1,
//     watch the output, sweep 10 Hz to 10 MHz. The gain is 20 dB (ten times)
//     and flat until the op-amp's gain-bandwidth product runs out: the
//     default model has 10 MHz of it, and an inverting gain of 10 spends it
//     as a noise gain of 11, so the corner is near 10 MHz / 11 = 909 kHz.
//     Switch the op-amp's model to 741 (1 MHz) and the corner moves down
//     tenfold, to about 91 kHz. On a 5 V supply a 741 also stops 1.5 V short
//     of each rail, so its output clips at 1.5 V and 3.5 V: watch the scope.
//   - Change Rf to 22 k and the gain becomes 22.

Parts list

9 parts, plus the jumper wires. Every one is in the editor's parts bin.

How it is wired

6 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.

  • 5 V: Resistor, 10k Ω (2) pin 1; Op-amp pin V+
  • Ground: Function generator pin GND; Resistor, 10k Ω (3) pin 2; Op-amp pin GND; Oscilloscope pin GND
  • Function generator pin OUT; Resistor, 1k Ω pin 1; Oscilloscope pin CH1
  • Resistor, 1k Ω pin 2; Resistor, 10k Ω (1) pin 1; Op-amp pin IN-
  • Resistor, 10k Ω (1) pin 2; Op-amp pin OUT; Oscilloscope pin CH2
  • Resistor, 10k Ω (2) pin 2; Resistor, 10k Ω (3) pin 1; Op-amp pin IN+

Change it and keep it

Open it in the editor, change the circuit or the code, and keep your version in a free account.