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 About 20 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $5.60. On Mokxi they're free.
What you'll learn
- Inverting amplifier gain from two resistors
- Biasing at half the supply on a single supply
- Clipping when the output runs out of headroom
- Gain bandwidth limits
- Difficulty: Intermediate
- Time: About 20 minutes
- Parts: 7
How it works
This is an inverting amplifier with a gain of 10. A 1k resistor feeds the inverting input and a 10k resistor feeds the output back to it, so the gain is minus 10k over 1k.
The supply is a single 5 V. The non-inverting input sits at 2.5 V, half the supply, from two 10k resistors. That lets the output swing around 2.5 V instead of trying to go below ground.
A function generator puts a 100 Hz sine of 0.2 V amplitude on top of 2.5 V. The scope shows the input on channel 1 and the output on channel 2: a 2 V amplitude sine, ten times bigger and upside down.
Parts list
7 parts, plus the jumper wires and 2 bench instruments. The parts retail for about $5.60; on Mokxi they're free, and so are the instruments.
- 1 × Full-size breadboard
- 1 × Power, 5 V
- 1 × Function generator
- 1 × Resistor, 1k ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 3 × Resistor, 10k ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 1 × Op-amp
- 1 × Oscilloscope
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| Resistor, 10k Ω (2) pin 1 | 5 V |
| Op-amp pin V+ | 5 V |
| Function generator pin GND | Ground |
| Resistor, 10k Ω (3) pin 2 | Ground |
| Op-amp pin GND | Ground |
| Oscilloscope pin GND | Ground |
| Resistor, 1k Ω pin 1 | Function generator pin OUT |
| Oscilloscope pin CH1 | Function generator pin OUT |
| Resistor, 10k Ω (1) pin 1 | Resistor, 1k Ω pin 2 |
| Op-amp pin IN- | Resistor, 1k Ω pin 2 |
| Op-amp pin OUT | Resistor, 10k Ω (1) pin 2 |
| Oscilloscope pin CH2 | Resistor, 10k Ω (1) pin 2 |
| Resistor, 10k Ω (3) pin 1 | Resistor, 10k Ω (2) pin 2 |
| Op-amp pin IN+ | Resistor, 10k Ω (2) pin 2 |
The notes that come with it
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.
// 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.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- The output looks flat on top and bottom This project
The output has run out of headroom and clips. Lower the generator's amplitude. - The output is not centered This project
Check the two 10k resistors make 2.5 V on the non-inverting input, one to 5 V and one to ground. - The signal is smaller than the knob says when connected to a circuit. Function generator
The output has a 50 ohm source resistance, so a low-resistance load pulls the level down. Use a high-impedance load, or buffer the signal with an op-amp. - The reading on a pin is wrong or the wave is clipped. Function generator
Keep the amplitude and offset within what the input can take. A microcontroller pin wants 0 to 5 V, never negative. Add a DC offset or a series resistor. - The LED is dim, burns out, or the pin reads wrong because the resistor value is off. Resistor
Read the color bands again. A 220 ohm to 330 ohm resistor suits a typical LED on 5 V. 10k is a common pull-up or pull-down value. Check with a multimeter if unsure. - A pull-up or pull-down resistor is missing, so the input floats and reads random values. Resistor
Tie the input to 5 V or ground through about 10k. Or use INPUT_PULLUP and wire the switch to ground. - The output sticks at the supply or at ground. Op-amp
Without negative feedback an op-amp acts as a comparator. For an amplifier, send part of the output back to the inverting input (minus). - The output never reaches the full supply or goes below ground. Op-amp
On a single supply the output cannot go below ground, and many op-amps stop about 1 V to 1.5 V short of the top. Check the pinout and the supply pins too.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.