Lab tutorials

How to Use the Op-Amp Simulator on ECExplain

Learn to configure inverting and non-inverting op-amp circuits in the ECExplain simulator, set resistor values, and observe output voltage and gain.

Visual

InputsVin (V)Rin / RfVccOp-AmpInverting configAv = -(Rf/Rin)OutputsVout (V)Gain AvWaveform

Lab intro

The op-amp simulator on ECExplain models an ideal operational amplifier in inverting and non-inverting configurations. You enter values for the input voltage and feedback resistors, and the simulator computes the output voltage, the closed-loop gain, and draws the output waveform. This tutorial uses the inverting amplifier configuration to show how gain depends on the ratio of feedback resistor to input resistor.

What you will learn

  • How to set Rin and Rf values to produce a specific closed-loop gain
  • Why the output voltage is negative relative to the input in the inverting configuration
  • How the simulator plots input and output waveforms side by side
  • What happens to the output when the calculated output exceeds the supply rail voltage

Prerequisites

  • Understanding of voltage divider and Ohm's law
  • Familiarity with the concept of negative feedback in amplifier circuits
  • Knowledge of the ideal op-amp assumptions: infinite input impedance, zero output impedance

Step-by-step

  1. Step 1: Select inverting configuration
    Open the Op-Amp Simulator from the Labs menu. Click the 'Inverting' tab at the top of the configuration panel. The circuit diagram updates to show Rin connected from the input terminal to the inverting input, and Rf connected from the inverting input to the output.
    Tip: The non-inverting input is connected directly to ground in this configuration. The simulator draws this connection as a short to the ground symbol at the bottom of the diagram.
  2. Step 2: Set supply voltage
    In the Supply Voltage field, enter 15 for a +/-15V supply. This sets the output saturation limits to +15V and -15V. The waveform panel on the right shows horizontal dashed lines at these limits.
    Tip: The supply voltage field accepts values between 5 and 30. Using a low supply like 5V makes clipping easy to observe when gain is high.
  3. Step 3: Set resistor values
    Set Rin to 10 (kOhm) and Rf to 50 (kOhm) using the sliders or by typing directly into the fields. The gain display updates to show Av = -5. The negative sign indicates phase inversion in the inverting configuration.
    Tip: Gain in the inverting configuration is -(Rf/Rin). Here, -(50/10) = -5. To get a gain of -10, set Rf to 100 while keeping Rin at 10.
  4. Step 4: Set input signal
    In the Input Signal panel, set the waveform type to Sine, the amplitude to 2V, and the frequency to 1kHz. Click Apply. The waveform panel shows the input sine wave in blue with a peak of 2V.
    Tip: Keep the input amplitude low enough that Av x Vin does not exceed the supply rail. For Av = -5 and Vcc = 15V, the maximum undistorted input amplitude is 3V (5 x 3 = 15).
  5. Step 5: Observe the output waveform
    The output waveform appears in orange on the same waveform panel. It is a sine wave with a peak of 10V (5 times the input) and inverted: where the input goes positive, the output goes negative. Verify that the peak-to-peak output voltage reads 20V in the measurements panel.
    Tip: Use the zoom controls on the waveform panel to expand the time axis and confirm the phase is exactly 180 degrees offset from the input.
  6. Step 6: Test output clipping
    Increase the input amplitude to 5V and observe the output. The calculated output would be 25V, which exceeds the 15V supply. The waveform shows the sine wave flattened at +15V and -15V, producing a clipped waveform. The measurements panel flags this as 'Saturated'.
    Tip: Clipping is a non-linear distortion. The op-amp output cannot exceed the supply rail regardless of the input magnitude. This is why supply voltage selection matters for amplifier design.

Expected output

With Rin = 10 kOhm, Rf = 50 kOhm, Vin = 2V sine at 1kHz, and supply = +/-15V, the output waveform is an inverted sine wave with 10V peak amplitude, 180 degrees out of phase with the input. The gain display reads -5. No clipping occurs. The waveform panel shows both input and output traces without any flat sections.

Troubleshooting tips

  • Output gain magnitude is correct but the sign is positive: The configuration tab is set to Non-Inverting instead of Inverting. Switch to the Inverting tab and re-enter the resistor values.
  • Output waveform is a flat line at 0V: The input signal amplitude may be set to 0 or the Apply button was not clicked after changing the signal parameters.
  • Gain display shows infinity or a very large number: Rin is set to 0 or near 0. The formula Rf/Rin requires Rin to be greater than 0. Set Rin to at least 1 kOhm.
  • Waveform shows clipping even at low input amplitude: The supply voltage field may be set to a very low value such as 1V. Increase the supply voltage to match the intended operating range.