Skip to main content
//Let's learn Something New.ROBOTICS · EMBEDDED SYSTEMS · RESEARCH
Preferences
PERSONALIZE YOUR VIEW
Appearance & reading

Choose how you explore the notebook.

QUICK THEMES

How Amplifiers Work : (Part 1) Build a Non-Inverting Op-Amp with an Interactive Simulator

Share
Share this article Facebook
Electronics lab · Amplifiers · Part 01

A sensor produces 200 mV, but you need a signal ten times larger. How do you amplify it without changing its shape? Start with an operational amplifier, two resistors and a feedback loop. Then discover what happens when the output runs out of room.

This is the first article in our amplifier series. We will build the idea of voltage gain using a non-inverting op-amp: a circuit whose output moves in the same direction as its input. Change the components in the laboratory below, watch the waveforms respond, and then follow the equations that explain the result.

Beginner electronicsInteractive circuitInstant calculationsNo installation required
01 / Try the circuit

Two resistors. One adjustable gain.

The default circuit doubles a 0.20 V peak sine wave into a 0.40 V peak output. Choose 10× clean for a larger signal, then Push into clipping to find the limit. Select a component in the diagram to see its role. All calculated voltages share the ground shown in the circuit.

Static worked example: Rf = 10 kΩ and Rg = 10 kΩ give Av = 2 V/V. A 0.20 V peak input becomes 0.40 V peak, or 0.80 V peak-to-peak. Enable JavaScript for the interactive circuit and waveform laboratory.

On a small screen, swipe across the circuit to inspect its connections. The input and output waveforms use the same voltage scale.

Experiment 1 · Make the gain ten

Keep Rg at 10 kΩ and set Rf to 90 kΩ. Predict the output peak before reading the result. Why does a resistor ratio of nine give a gain of ten?

Experiment 2 · Find the flat tops

With gain ten and ±5 V supplies, raise the input peak above 0.45 V. The requested output exceeds this model’s ±4.5 V swing. Increasing gain further will not recover the missing peaks.

Experiment 3 · Move the centre

Choose 10× clean and add +0.30 V input DC offset. The output centre moves to +3.0 V. Raise the sine amplitude: which side clips first, and why?

Experiment 4 · Trade gain for bandwidth

Choose Bandwidth corner. The one-pole model is enabled at its −3 dB frequency: amplitude falls to about 70.7% of the low-frequency prediction and the output lags by 45°.

02 / What is being amplified?

Gain is a ratio, not a voltage

For a linear amplifier, voltage gain compares a change in output voltage with the corresponding change at the input. A gain of 10 V/V means that a 1 mV input change produces a 10 mV output change, within the circuit’s operating limits. The units cancel, but writing V/V makes the meaning clear.

Av = ΔVout / ΔVin

For this ground-referenced ideal circuit, Vout = Av Vin. The DC offset is amplified along with the varying signal.

Keep three measurements separate. Peak amplitude is the distance from the waveform’s centre to a peak. Peak-to-peak voltage spans its minimum to maximum. For an unclipped sine with peak amplitude Vp, Vpp = 2Vp, and its AC RMS value is Vp/√2. That RMS formula stops applying when the sine is clipped.

Voltage gain in decibels is 20 log10|Av|. Gains of 2 and 10 correspond to approximately 6.02 dB and 20 dB. This describes a voltage ratio; converting it into a power ratio also requires the input and output impedances.

The signal controls energy supplied by the power rails

An amplifier does not create energy. Its supply provides the energy delivered at the output. A voltage amplifier also has finite output-current capability: a larger voltage on a graph does not mean it can drive a loudspeaker or motor.

03 / Follow the wires

Why negative feedback sets the gain

An op-amp has a non-inverting input (+), an inverting input (−), an output and two supply connections. Its open-loop relation is Vout = AOL(V+ − V−). Here V+ and V− label the signal input nodes; the diagram labels the power rails separately as VCC and VEE.

Connect the signal to (+). Connect Rf from the output back to (−), then Rg from (−) to ground. The resistor divider feeds a fraction of the output back to the inverting input. If the output rises too far, that feedback reduces the input difference and pushes the output back toward balance.

For a stable circuit with strong negative feedback, sufficiently low frequency and no saturation, two ideal approximations simplify the calculation: the input currents are zero and V− ≈ V+. The input pins are still physically separate. In this circuit the inverting node follows Vin; it is not a virtual ground unless Vin itself is zero.

β = Rg / (Rf + Rg)
V− = βVout ≈ Vin
Av = 1/β = 1 + Rf/Rg

The divider relation assumes negligible op-amp input current. The input-voltage equality additionally requires linear operation with adequate feedback.

You can obtain the same result from current balance at the inverting node: (Vout − V−)/Rf = V−/Rg. Substitute V− ≈ Vin, multiply through, and collect the two terms containing Vin. The “+1” comes from that algebra, rather than from an extra gain hidden inside a resistor.

What happened to the op-amp’s enormous open-loop gain?

Keep AOL finite and substitute V− = βVout into its input relation. Rearranging gives the closed-loop result below. When AOLβ is much greater than one, the resistor ratio dominates. The lab’s low-frequency mode uses that ideal limit.

ACL = AOL / (1 + AOLβ) ≈ 1/β

A very large open-loop gain is useful because feedback can exchange it for a predictable, smaller closed-loop gain.

04 / Choose the resistors

A worked design: 200 mV becomes 2 V

Suppose a ground-centred sensor signal has a 0.20 V peak amplitude and you want 2.0 V peak. The required gain is 2.0/0.20 = 10. Choose Rg = 10 kΩ. Solving the gain equation for the feedback resistor gives:

Rf = (Av − 1)Rg
Rf = (10 − 1) × 10 kΩ = 90 kΩ

At the positive input peak, V− ≈ 0.20 V. Both divider resistors carry about 20 μA: 0.20 V/10 kΩ = (2.0 − 0.20) V/90 kΩ.

If your resistor selection includes 91 kΩ rather than 90 kΩ, use it and recalculate: the gain becomes 10.1 and the predicted output peak becomes 2.02 V. Exact resistor values in the lab help explain the equations; real parts have preferred values and tolerances.

RgRfIdeal gainOutput peak for 0.20 V input
10 kΩ10 kΩ2 V/V0.40 V
10 kΩ47 kΩ5.7 V/V1.14 V
10 kΩ90 kΩ10 V/V2.00 V
10 kΩ91 kΩ10.1 V/V2.02 V

Scaling both resistors by the same factor preserves the ideal gain. It changes divider current, however, and real circuits also care about resistor noise, input bias currents and stray capacitance. The non-inverting input has high impedance; the sensor does not simply see Rg connected across its output. Neither impedance nor loading is fully represented by this teaching model.

05 / Find the boundary

The gain equation cannot overrule the power supply

For the default ±5 V rails, this simulator deliberately reserves 0.5 V of output headroom on each side. The available output range is therefore −4.5 V to +4.5 V. That headroom is a fixed teaching assumption, not a specification for every op-amp. A real output swing depends on the device, load and supply.

Vout = clip(AvVin, −Vlim, +Vlim)
Vlim = Vsupply − 0.5 V

This static expression describes the lab with bandwidth filtering disabled. The output is limited after the linear response is calculated.

At gain ten, a 0.60 V peak input requests a 6.0 V peak output. The model can supply only 4.5 V peak, so its crests flatten. This is clipping: the output no longer preserves the shape of the input. During clipping, the approximation V− ≈ V+ fails. At the positive crest, the feedback node reaches only 4.5/10 = 0.45 V while the input reaches 0.60 V.

For an unclipped sine, both the centre and the amplitude must fit. At low frequency, the condition is |AvVoffset| + AvVin,peak ≤ Vlim. With no offset, our gain-ten example accepts at most 0.45 V peak. With a +0.30 V input offset, the output centre is +3.0 V, leaving only 1.5 V above it: the largest symmetrical input sine is then 0.15 V peak.

Why the circuit uses a negative supply

A zero-centred waveform needs an output that can go below ground. A circuit powered from 0 V and +5 V cannot generally reproduce this bipolar waveform directly. A single-supply version needs suitable input/output ranges and often a mid-supply reference. We will treat that as its own circuit later in the series.

06 / Make the signal faster

Higher gain leaves less bandwidth

Enable Include bandwidth to introduce a generic dominant-pole, voltage-feedback approximation. Let G be the resistor-set gain and GBW the gain-bandwidth product. The lab sets the closed-loop corner frequency to fc ≈ GBW/G and applies a first-order low-pass response to the sine wave.

|H(f)| = G / √(1 + (f/fc)²)
φ(f) = −arctan(f/fc)

The DC offset still receives gain G. Only the sine amplitude and phase use the frequency-dependent response.

With GBW = 1 MHz and gain ten, the model has a 100 kHz corner. At 1 kHz it behaves almost like the ideal resistor-set circuit. At 100 kHz its linear sine gain is about 7.07 V/V, with a 45° lag. Doubling the closed-loop gain halves the approximate corner frequency when GBW stays fixed.

Once the calculated sine is clipped, the output contains harmonics and cannot be described by one sine-wave gain and phase. The lab therefore labels its displayed frequency gain as linear gain at f. It does not claim that the clipped waveform is a linear system response.

Bandwidth and slew rate are different limits

The steepest slope of a sine with output peak Vp is 2πfVp. The lab reports this as a required slew rate in V/μs using the linear output amplitude. A 2 V peak sine at 100 kHz needs about 1.26 V/μs. A real op-amp must support enough slew rate as well as adequate bandwidth. Slew limiting is not applied to this lab’s waveforms.

The simulator is a settled sine-wave calculation with an optional one-pole filter followed by a hard limiter. It is not a transistor-level or SPICE model. It does not predict start-up transients, saturation recovery, common-mode violations, current limiting, capacitive-load stability, noise or component tolerances. The bandwidth approximation is intended for a suitable stable, dominant-pole voltage-feedback op-amp.

07 / From model to bench

What to check before building it

Choose an op-amp whose recommended supply range includes your rails. Check its input common-mode range, output swing at the intended load, gain stability requirements, GBW and slew rate. Use the actual package pinout: the triangle in the lab describes function, not physical pin numbers. Follow the manufacturer’s recommendations for supply decoupling and layout.

For the gain-ten experiment, begin with a small sine wave, verify the DC operating point, and compare input and output on the same scope ground reference. Raise the amplitude gradually to observe clipping. Check your function generator’s load setting: its displayed amplitude can depend on whether it expects a 50 Ω load or a high-impedance input.

A useful sequence is to predict the output, calculate the supply margin, simulate, then measure. If the bench result disagrees, compare the assumptions before changing resistors. A wrong reference voltage, unavailable output current or insufficient input range cannot be fixed by the ideal gain equation.

08 / Continue the series

The next amplifier starts with a different question

We now have a circuit whose gain comes from a resistor ratio, a feedback explanation for that equation, and two reasons the output can depart from the ideal prediction: limited swing and limited bandwidth.

In the next part, we will explore the inverting amplifier: why its gain is negative, why its input resistance matters, and how it can add signals. Later posts can build on this foundation with single-supply biasing, transistor stages, differential and instrumentation amplifiers, active filters, and output stages that deliver useful power. These are planned topics; this first circuit gives us a common starting point.

References and further reading

Try one final prediction: Rf = 47 kΩ, Rg = 10 kΩ, input peak = 0.50 V, zero offset, ±5 V rails. What are the ideal gain and output peak? Enter the values in the lab, then increase the offset until the positive side clips.
THE DISCUSSION

Comments

Ask a question, share a result, or add something useful.

0

Be the first to comment.Start the conversation below.