EE3300/EE5300 Electronics Applications Week 3 Practical
Pre-Lab Preparation
In this lab, we explore the concepts of feedback and system stability by analysing op-amp gain and loading, as well as the Colpitts oscillator.
Before the scheduled lab session, perform the following design calculations and simulation tasks.
Part 1: Designing for stability
Recall the requirement for stability: if the loop gain contains sufficient poles to induce a -180° phase shift, the corresponding magnitude must be below 0 dB at this critical frequency. Today we explore how new circuit elements can introduce poles and zeroes and affect stability.
How to measure loop gain in a circuit simulation
Consider the unity gain, non-inverting amplifier configuration in Figure 1. As discussed in the lecture notes, the unity gain case is one of the most difficult to keep stable.
This simple op-amp circuit is surprisingly troublesome for stability.
Zoom:To measure the loop gain in circuit simulation, we must employ some tricks, as shown in Figure 2. We cannot “cut” the loop (as we would in a hand calculation) because then the DC operating point would be lost. Instead, a simple trick is to use a large inductor to effectively cut the loop at AC frequencies while keeping the DC operating point intact.
How to measure the loop gain of the circuit from Figure 1 in LTspice. The AC test signal is capacitively coupled through C1. The enormous inductor L1 isolates the test signal from Vout while permitting DC to pass through.
Zoom:Show more details on loop gain simulations
This simulation is not exact but will give us a close approximation of the loop gain Bode plots. If you would like more information on alternative loop gain simulation methods then please see this video: https://www.youtube.com/watch?v=bXbDa9nglZI.
Draw the circuit of Figure 2 in LTSpice or another simulation program of your choice. Use a generic op-amp model (such as the Universal Op-Amp 5 in LTSpice).
Perform an AC analysis over a large frequency range (e.g. 1 Hz to 1 GHz, with 100 points per decade).
Plot the magnitude and phase of
(this is the equation for the loop-gain in this simulation).Hint: In LTSpice, you can customise the equation that is plotted by right clicking on a curve’s title in the plot window. Change the equation to
-V(Vout)/V(Vtest)
(adjust as needed based on the node names you have set).Save this plot for later comparison.
What do you notice about the gain and phase response? What is the phase margin?
Typical coaxial cable has a capacitance of around 100 pF/m. Suppose you connect approximately 2 m of cable to the output of your circuit.
Draw the circuit in Figure 3 and repeat steps 2-3.
The modified circuit including a capacitive load.
Zoom:What do you notice about the loop gain response now? Is this circuit stable? Why/Why not?
Based on the Bode plot, estimate the frequencies of the poles.
From the loop gain Bode plot, predict the frequency of oscillation by finding the frequency where the phase is -180°. Then perform a transient simulation to check. Save your work to a new circuit file then set it up for transient simulation (as per Figure 4).
Hint: you can determine the frequency of oscillation from the time domain plot by zooming into a region of oscillation, right clicking, selecting View -> FFT, then setting the FFT to be calculated based on the current zoom extent.
The transient simulation setup. The resistor Rf
is set to zero to replicate the voltage follower circuit, but in the next section, you’ll increase this value to see the effect of raising the closed-loop gain.
Stability by increasing closed-loop gain
Recall that the closed-loop gain is given by
where
Since the decibel scale is logarithmic (and
The loop gain is the distance between the open-loop gain and the closed-loop gain on a magnitude plot. Raising the closed-loop gain has the effect of decreasing the loop gain.
Zoom:Consider what would happen if we increase our closed-loop gain. This reduces the magnitude of the feedback signal, and hence reduces the magnitude of our loop gain. In this way, by increasing the closed-loop gain of our amplifier circuit, we reduce the loop gain magnitude and effectively force our 0 dB point to occur at a lower frequency. Introducing sufficient closed-loop gain therefore enables us to stabilise our circuit for capacitive loads.
This also explains why the unity-gain case is the most troublesome in terms of stability. We can illustrate this effect in simulation.
Increase the value of
Rf
in the circuit from Figure 4 until the circuit is stable.
Stability by manipulating the phase margin
A second technique to introduce an isolating series resistor, as we discussed in the lecture notes.
Return the value of
Rf
to 0 (so that the circuit again has unity gain).Add a series resistor to the output of the op-amp. Make sure you take the feedback from the correct node, as per the lecture notes.
Adjust the value of the series resistor until the circuit is stable.
Part 2: Designing for oscillation
Sometimes we want a circuit to oscillate! The Colpitts oscillator is a classic example of a circuit that generates a sinusoidal output.
Figure 6 shows a convenient biasing scheme that is ideal for bench prototyping. Here, we use a negative voltage Vee to set the bias point for the transistor. Recall that a BJT’s transconductance is given by
where
Therefore, in a lab setting, adjusting Vee will adjust the bias current, and hence the transconductance of the transistor.
A biasing scheme where a variable voltage supply
Assuming
and , calculate the value of to yield a bias current of 1 mA. This is merely a starting point. You will be able to adjust this value during the experiments.
The Colpitts oscillator circuit.
Zoom:Figure 7 shows a Colpitts oscillator design. Calculate the expected oscillation frequency using the given component values.
Use circuit simulation software (e.g. LTSpice) to perform a transient analysis on this circuit.
Hint: Oscillators are sometimes tricky to get working in simulation because the simulation lacks the thermal noise that would normally kick-start oscillation. One way around this is tell our simulation to skip the initial operating point of the circuit, allowing the simulation to progress into the oscillatory state. Figure 8 illustrates this parameter in a typical LTSpice transient analysis.
Additionally, oscillation can take many cycles to get underway, so you may need to adjust the output start setting to skip over the start-up phase.

How to tell LTSpice to skip the initial operating point calculation.
Zoom:Experiment with varying the value of
. You should see varying levels of distortion in the sine wave depending upon the transistor gain.Now plot the emitter voltage
. Does this help you to understand the distortion?Swap the component values of C1 and C2 (i.e. put the 330 pF capacitor “on top” of the voltage divider and the 1nF capacitor “on the bottom” of the voltage divider). What happens to the distortion? Can you explain why?
How much load can you apply before the oscillator runs into problems?
Hint: How low can
Rload
andRloadE
be? These resistors represent the input impedance of the next stage of your circuit, which in real applications may be something like a filter or amplifier circuit (to manipulate your generated sinusoidal wave).
Equipment
- 1x LF411 JFET Input Op-Amp.
- 2x Female BNC Breadboard connectors.
- 1x 2m Coaxial male-to-male cable.
- 2x Breadboards (one for the main circuit and one for the downstream ‘load’ stage).
- 1x 10k Potentiometer.
- 1x SFH 2505 Photodiode.
- 1x 2N3904 NPN BJT.
- 1x 33uH inductor.
- 1x LED (any colour).
- Various capacitors.
- Various resistors.
Instructions to students
These activities require you to compare step responses of various circuits. You should save oscilloscope screenshots as you go, making note of exactly what circuit you were testing at the time. You will need this to be able to explain your findings to your tutor at the end of the session.
- Work individually on these activities.
- Focus on neat circuit breadboarding.
- Include power supply decoupling capacitors.
- Use ceramic (non-polar) capacitors for the Colpitts oscillator circuit.
Exercise 1: Putting a signal into a coax cable: what could possibly go wrong?
In this exercise, we will see that introducing even a small, seemingly benign capacitance to a closed feedback loop can be enough to push an otherwise stable circuit into instability.
Your task is to observe the stability and signal quality effects of driving a load through a relatively short length of coaxial cable.
Construct the left side of the circuit in Figure 9.
The circuit to be constructed in the lab.
Zoom:Test that your follower (not yet connected to any load) is working. Drive your circuit with a 1 kHz 3 Vp square wave and measure the output. Make sure that your driver circuit is behaving as expected?
Construct a second breadboard with a small load resistor (150 Ω) as per the right side of Figure 9. This will represent our external system. You might think of this as an external sensor or actuator we are trying to control with our central processor. Use BNC connectors to connect the coaxial cable to your breadboards.
Connect your two circuit boards with 2-3 m of coaxial cable. You’re only sending your signal just across the room, what could possibly go wrong?
Measure the output waveform of your amplifier (it may be useful to setup a second channel to compare to your input waveform). What do you notice about the output?
Save your oscilloscope traces for later comparison.
Exercise 2: Exploring stability compensation
Your task is to experimentally demonstrate the stability compensation techniques we explored in the pre-lab simulations, first by adjusting the closed-loop gain (magnitude manipulation), then by introducing an isolating resistor (phase manipulation).
Modify your circuit from Exercise 1 to include a 10 kΩ potentiometer as shown in Figure 10.
Coax driver with variable gain using a potentiometer.
Zoom:What effect does the introduction of this potentiometer have on your circuit? What do you notice as you vary the potentiometer value? Are you able to affect the stability of the circuit?
Save your oscilloscope traces for later comparison.
Try disconnecting the load resistor (so that the coax end is open-circuit) and repeating this process. Explain your findings to your tutor.
Coax driver with isolating resistor.
Zoom:Replace the potentiometer with a series resistor, as per Figure 11.
Do you notice any stability improvements? Try some higher resistance values.
Save your oscilloscope traces so you can compare the different compensation strategies when you’re getting marked off.
Exercise 3: Constructing a transimpedance amplifier
We’ve explored the stability effects of capacitive loads in the seemingly straightforward case of a coaxial cable. What happens if the capacitance is introduced on the input side instead?
Your task is to construct a transimpedance amplifier to interface with a photodiode light sensor. You will then modify the circuit to ensure stability.
The transimpedance amplifier circuit.
Zoom:Construct the transimpedance amplifier circuit as shown in Figure 12.
Hint: You can use the diode test mode on your multimeter to help you orient the photodiode. The datasheet may not be particularly helpful here. Alternatively, looking into the diode head, the cathode (flat part of the diode schematic) is usually the larger side (connected to the main diode body). If you orient your diode incorrectly, your output voltage polarity will be reversed.
Observe the output of your op-amp with an oscilloscope as you cover the photodiode and/or shine a torch light over it.
Use an LED to test the step response of the photodiode. Use a function generator to drive the LED with a square wave. Experiment to find the correct voltage to drive the LED (start low and gradually increase it).
Position the LED close to the photodiode. You should see some oscillatory behaviour in the output of the amplifier.
Save your oscilloscope traces for later comparison.
The transimpedance amplifier with a compensating capacitor.
Zoom:Review the circuit in Figure 13. C1 is an unwanted parasitic capacitance due to the photodiode. A typical value for this capacitance can be found in the photodiode’s datasheet.
It should be clear to you that the parasitic capacitance will introduce a pole into the circuit. Determine an expression for the pole frequency in terms of
, and .Hint: draw the circuit with the input stimulus turned off, notice that the output of the op-amp becomes 0 V, simplify the circuit, and use the technique from the week 2 lecture notes to find the pole frequency.
Now calculate the frequency of the zero. Notice that the response through the feedback network is zero at the frequency where
. Write an expression for and set the denominator to zero. Hence, find an expression for the zero frequency in terms of the circuit component values.Using Figure 11 in the lecture notes as a guide, choose an appropriate value for
to compensate for the pole introduced by the parasitic capacitance.
Show optional step: how to use Matlab for more accurate analysis
Figure 11 in the notes has limited options for the pole and zero frequency.
You can use the Matlab script below to generate plots for arbitrary pole and zero frequencies.
Rf = 100e3;
Ci = % insert your value here
Cf = % insert your value here
f_pole = 1/(2*pi*...); % insert your expression here
f_zero = 1/(2*pi*...); % insert your expression here
% op-amp transfer function
s = tf('s');
A_OL = 1e5; % open loop gain at low frequencies
f_op_amp_pole = 50; % read this from its datasheet plot of open-loop gain
A = A_OL / (1 + s/(2*pi*f_op_amp_pole));
% feedback network transfer function
B = (1 + s/(2*pi*f_zero)) / (1 + s/(2*pi*f_pole));
% plot the loop gain and step response
figure();
bodeplot(A*B);
figure();
step(A / (1 + A*B));
Add your chosen value of
to the circuit and test its behaviour.Save your oscilloscope traces so that you can compare against the case without the compensation capacitor.
Exercise 4: Constructing a Colpitts oscillator
Your final activity this week is to build a circuit that is deliberately designed to oscillate.
The Colpitts oscillator circuit (Figure 7 repeated here for convenience).
Zoom:Construct the Colpitts oscillator circuit as shown in Figure 14.
Use an oscilloscope to observe
and . Is your circuit successfully oscillating? At what frequency? What differences do you notice between these two waveforms? Record your findings to demonstrate to your tutor.Calculate new values for the Colpitts tank circuit to increase the oscillating frequency above 3 MHz.
Hint: There are multiple ways to achieve this outcome. Consider which of the components will physically be easiest to change. Ensure you consider the relative magnitudes of your capacitors to avoid the effects highlighted in your pre-lab simulations.
Modify the circuit to change the oscillation frequency and test your new design. Have you achieved your aim of oscillation above 3 MHz frequency? Demonstrate your final design to your tutor.
Conclusion
Your tutor will mark you off for completing this activity and being able to discuss the results. If you do not finish on time, you have one week to complete it. Bring your completed circuits or evidence of your work to a subsequent lab session for marking. When you leave, make sure that the lab is just as neat or even neater than when you arrived.
References
This activity was adapted from Lab 9 in Learning the Art of Electronics by Hayes and Horowitz. Some other material was derived from Solving Op Amp Stability Issues by Green and Wells of Texas Instruments.