Learn / Semiconductors / Op-amps

Designing with Op-Amps

ReviewedAdvanced ProAbout 6 min
In short

Designing with Op-Amps: the short answer

An op-amp with feedback tries to make its two inputs equal. That one rule explains the common circuits.

Level
Advanced
Time
About 6 min
Topic
Semiconductors
You will learn to

Design non-inverting and inverting amplifiers and choose an op-amp that works on your supply.

Before this: Transistors & MOSFET Switching, ADC Measurement & Reference Error

An op-amp with feedback tries to make its two inputs equal. That one rule explains the common circuits. In a non-inverting amplifier the signal goes to the + input, and a divider from the output feeds the − input; the gain is 1 + Rf ÷ Rg. In an inverting amplifier the signal goes through Rin to the − input with Rf back from the output, and the gain is −Rf ÷ Rin. A voltage follower (output tied to −) has a gain of 1 and is used to buffer a weak signal.

Real op-amps have limits, and they decide whether a design works. Output swing: an LM358's output can get close to ground but only to about 1.5 V below its positive supply, while a rail-to-rail part such as the MCP6002 swings almost to both rails. Input common-mode range: the voltages the inputs can work at, which for the LM358 includes ground but stops about 1.5 V below the supply. Gain-bandwidth product (GBW): gain × bandwidth is roughly constant, so a 1 MHz op-amp at a gain of 10 has about 100 kHz of bandwidth.

For 3.3 V microcontroller projects, pick a rail-to-rail input and output op-amp rated for 3.3 V. Put a 100 nF capacitor across its supply pins, keep resistor values between about 1 kΩ and 100 kΩ, and if you need gain above about 50, split it across two stages.

Gain, bandwidth and the product

A real op-amp has a gain-bandwidth product, so the more gain you ask for, the less bandwidth you get. With a gain-bandwidth of 1 MHz, a gain of 100 works only up to about 10 kHz. Choose the part by the bandwidth you need at the gain you use, not by the headline figure.

Slew rate limits how fast the output can change. A large, fast signal can be distorted by slew rate even when the small-signal bandwidth looks fine.

Offsets and noise matter at high gain

Input offset voltage appears at the output multiplied by the gain, so a 2 mV offset with a gain of 1000 gives a 2 V error. Choose a low-offset part, or use AC coupling or a trim when you amplify a tiny DC signal. Input bias current flows through the source resistance and adds more error, so keep the resistances modest or use a part with FET inputs.

Resistor tolerance sets the accuracy of the gain, and noise from large resistors adds to a small signal.

Stability and supplies

A capacitive load, such as a long cable, can make an op-amp oscillate. A small series resistor at the output often fixes it. On a single supply, bias the signal to a midpoint and check the input and output range against the rails, and decouple the supply pins close to the part.

Common mistakes
  • Ignoring the gain-bandwidth product at high gain.
  • Not allowing for input offset when amplifying a small DC signal.
  • Driving a capacitive load directly and getting oscillation.
Key formulas
G = 1 + Rf ÷ Rg
non-inverting gain
G = −Rf ÷ Rin
inverting gain
Try it: Gain until it clips

Output against input

0 V2 V4 V0 V2 V4 VInput

A non-inverting amplifier multiplies the input by 1 + Rf ÷ Rg, but the output cannot go past its supply rails.

Clips once the input passes 1 V

Output against input. The flat part is clipping: the op-amp has run out of supply.

Work it with your own numbers: Non-inverting amplifier · Inverting amplifier · Op-amp gain design

Advanced lesson · Pro plan

Practise this lesson with Pro

The explanation above is free for everyone. The practice for Advanced lessons in every domain are part of the Pro plan at ₹999 a month.

With Pro you also get: a worked example, a hands-on task, a 3-question check.

Common questions

What will I learn in "Designing with Op-Amps"?

Design non-inverting and inverting amplifiers and choose an op-amp that works on your supply.