Op-Amp Amplifier
An op-amp with two resistors in its feedback loop multiplies a small signal by a precise gain.
- Advanced
- Analog Electronics
- 7 parts
Opens in your browser with the parts, wiring and code already in place. Press Run to watch it work, then change anything you like.
How it works
An op-amp has a huge gain and two inputs. With feedback it behaves very simply: it adjusts its output until the two inputs are at the same voltage. Here the signal goes into the plus input, and the output is fed back to the minus input through a divider made of a 4 kilohm resistor Rf and a 1 kilohm resistor Rg. To keep the minus input at the signal voltage, the output has to be larger by the divider ratio, giving a gain of 1 plus Rf over Rg, which is 5.
The generator supplies a small 1 kilohertz sine wave of 0.2 volts above and below a 1 volt level, because this op-amp runs from a single 12 volt supply and cannot output below ground. The oscilloscope shows the input in yellow, swinging between 0.8 and 1.2 volts, and the output in blue swinging between 4 and 6 volts: five times as large. If the output tried to go past the supply, it would flatten at the top, which is called clipping.
Parts
- Function Generator
- DC Supply
- Op-Amp
- 2 × Resistor
- GND
- Oscilloscope
Wiring
- Function Generator OUT → Op-Amp IN+
- Op-Amp OUT → Resistor 1 A
- Resistor 1 B → Op-Amp IN-
- Op-Amp IN- → Resistor 2 A
- Resistor 2 B → GND
- DC Supply + → Op-Amp VCC
- DC Supply - → GND
- Op-Amp GND → GND
- Function Generator GND → GND
- Oscilloscope CH1 → Function Generator OUT
- Oscilloscope CH2 → Op-Amp OUT
- Oscilloscope GND → GND
Arduino code
// Op-Amp Amplifier
// Press Run: channel 2 (blue) is channel 1 (yellow) times the gain, 1 + Rf / Rg.
// There is no sketch to write: this is a circuit, so there is nothing for code to do.
void setup() {
}
void loop() {
}
Try changing it
- Change Rf to 9000 so the gain becomes 10, and the output now swings between 8 and 12 volts, flattening on top where it hits the supply limit.
- Change Rf to 1000 and the gain is 2, so the output is only twice the input.
- Select the generator and raise the amplitude to 1. Now the output tries to swing beyond what the supply allows and you can see it clip.
Next challenge
More projects in Analog Electronics
- Voltage DividerTwo resistors share a supply voltage in proportion to their values. Measure the middle…
- Voltage ReaderAn Arduino reads a two-resistor divider with analogRead and prints the voltage. Change a…
- Thermistor ThermometerA thermistor and a fixed resistor form a divider the Arduino reads. The sketch turns the…
- LED Current LimitingA resistor sets how much current an LED carries. Put a multimeter in series and see it.