===== Related Reading =====
Hayes and Horowitz: Pages 131 - 137
[[https://www.physics.dcu.ie/~bl/anacont.html|Lawless]]: Chapters 1 - 4
[[https://doctor-pasquale.com/books/|Pasquale]]: Pages 163 - 169
[[https://docs.google.com/document/d/1-ssoXEl1S0AhXGtfHQBPYI3RbcmAqRT37fwkOEDjH44/copy|Lab Template]]
====== RLC resonant circuit ======
----
== To start, we'll backtrack to frequency-dependent circuits. Last week, we built filters that could either pass only low or high frequencies. Today, we'll make a filter that is designed to only pass a specific (band) of frequencies, known as a bandpass filter. ==
To start, build the RLC circuit shown in the figure below:
| {{ :phylabs:lab_courses:phys-226-wiki-home:lab_3_diode_circuits:rlc.png?600 |}} |
Inductors are contained in the same cabinet as the capacitors, in the bottom row of drawers.
In this circuit, the impedance of the parallel capacitor and inductor approaches infinite as the signal's frequency approaches resonance.
The resonant frequency is given by $f_{resonance} = \dfrac{1}{2\pi \sqrt{LC}}$ (see page 114 of the Horowitz and Hill lab book for details, or [[https://www.allaboutcircuits.com/textbook/alternating-current/chpt-6/parallel-tank-circuit-resonance/|All About Circuits' Tank circuit page]])
Predict what the resonant frequency should be for the circuit you built.
You'd expect it to be $f_{resonance} = \dfrac{1}{2\pi \sqrt{10 mH * .1 \mu F}} \approx \dfrac{1}{2*10^{-4} s} = 5 kHz$. Again, components have pretty high uncertainties on their values, and inductors are infamous for having unwanted resistive / capacitive behavior, so quite a bit of variation can be expected.
One way we can try to identify resonance is by identifying when the circuit's **[[phylabs:lab_courses:phys-226-wiki-home:electronics_vocabulary#gain| gain]]** $\left(g = \dfrac{V_{out}}{V_{in}}\right)$ is maximized. While it would theoretically be equal to 1, there are second-order effects that will reduce the gain at resonance fairly significantly here.
**Unless otherwise stated, when testing the frequency behavior of a circuit you should use sine waves for your input signals.**
Experimentally determine the resonant frequency $f_{resonance}$ for this circuit by finding the frequency where $V_{out}$ is maximized
** Future self **: wrap these together into one question. It is annoying on the student end of things to have it split like this.
An alternate method is to find the frequency where the input and output are in phase (i.e. there is no shift in time between $V_{in}$ and $V_{out}$ signals
Experimentally determine the resonant frequency $f_{resonance}$ for this circuit by finding the frequency where the input and outputs have the same phase.
The first method tends to be problematic if there's much noise in the system, as determining a maximum can be a bit haphazard. The phase shift method might be more robust, but might not be generalizable to all kinds of resonance circuits. Either way, hopefully the results will be pretty commensurate here.
===== Q factor =====
In addition to the resonant frequency, bandpass filters are also defined by a quality factor $Q$ . There are several ways to define Q, but for our purposes we'll use $Q \equiv \dfrac{f_{resonance} }{\Delta f}$, where $\Delta f$ characterizes the full-width half-power frequency for the wave.
In practice, finding $\Delta f$ means finding the frequencies above/below the resonant frequency where $V_{out}$ is reduced to $V_{out,max}/\sqrt{2} \approx .7V_{out,max}$
Why square root 2?
The reason we're looking for the voltage do drop by a factor of $\sqrt2$ is because when people were creating terminology for such circuits, they were focused on **power** transfer rather than voltages. Since power is proportional to voltage squared, then when voltage drops by a factor of $\sqrt{2}$, power drops by a factor of 2.
Determine the quality factor $Q$ for your circuit
Modify your circuit by replacing $R$ with a $10k\Omega$ resistor.
Comment on the effect this has on the resonant frequency and $Q$ factor
If students set $V_{in}$ to something nice like 10V, then using the cursors on amplitude mode, setting them to 7V, and adjusting the frequency is an easy way to finding $\Delta f$. The full-width half-power frequencies might not be symmetric about the resonant frequency, but we're not trying to dive into that nuance at the moment.
In this circuit, increasing $R$ will mean that for the same off-resonant frequency, more voltage is dropped across the resistor than the $LC$ network. This in turn means that the Q factor should increase as a function of $R$. This is also another instance where voltage division is really useful for figuring out what should happen in a new circuit.
Bonus activity: Frequency Sweeps and FFTs
This isn't a required part of the lab, and you won't be graded on it.
You may have noticed that there is a ''F''ast ''F''ourier ''T''ransform (''FFT'') button between the channel 1 and 2 buttons. If you press this, your scope will show you a Fourier transform of the signal, which breaks the signal down by the amplitudes of its component sine waves. For a pure sine wave, this would show up as a single sharp spike at one frequency. For triangle/square waves, there will be a series of peaks corresponding to the higher order harmonics (see [[https://en.wikipedia.org/wiki/Square_wave_(waveform)#Fourier_analysis|Wikipedia's entry on square waves]] for more details).
Your function generator has a sweep function, that will let you sweep through a range of frequencies over a specified period of time. You can either set a central frequency and a range (the default option), or you can set a minimum and maximum by toggling the control on those settings.
If you set your function generator to sweep well below and well above $f_{resonant}$, and then view your signal in FFT mode, you will essentially get a plot of the gain of your circuit as a function of frequency!
Note that the vertical scale is logarithmic in FFT mode.
===== Application: Fourier components of square waves =====
Every periodic signal can be decomposed into a combination of sine waves of various amplitudes and frequencies. Since we've built a sensitive frequency detector, we can use it to determine some of the component frequencies of a square wave.
To do this, start with a square wave at the resonant frequency of our filter (with the 10k resistor still in place!) and record the amplitude. Then, slowly //decrease// the input wave's frequency until you locate another peak. This should happen when the output synchs up such that there are exactly two periods between each change in the input. This will be at roughly 1/3 of the resonant frequency, indicating that square waves have a sine wave component whose frequency is three times higher than the base frequency. By continuing to decrease the frequency of the input and recording relative amplitudes where you see resonance, you can reconstruct the Fourier components of a square wave to a degree.
| {{:phylabs:lab_courses:phys-226-wiki-home:lab_3_diode_circuits:zero.png?300|}} | {{:phylabs:lab_courses:phys-226-wiki-home:lab_3_diode_circuits:firstdestructive.png?300|}} | {{:phylabs:lab_courses:phys-226-wiki-home:lab_3_diode_circuits:firstconstructive.png?300|}} |
| An example of the output of the filter at resonance. Note the amplitude of around 1.2V | At half the resonant frequency, there is massive destructive interference that makes the output amplitude quite small | At a third of the resonant frequency, there is constructive interference, and the output's amplitude is around 1/3 of what it was at resonance. |
> Find the first 4 frequencies and amplitudes that make up the Fourier components of a square wave. Note that the expected values can be found on [[https://en.wikipedia.org/wiki/Square_wave_(waveform)#Fourier_analysis|Wikipedia's entry on square waves]], but do remember that we're living in real space and not ideal circuit land; your milage may vary.
Odd divisors of the fundamental frequency should be what shows up here (i.e. if $f_0$ were 1000 Hz, $f_1$ should be around $330$, $f_2$ around $200$, $f_3$ around 143, and $f_4$ around 111). The amplitudes will be noticeably smaller than the fundamental one, so folks may need to turn up the gain on their scope to get them all. Also, if you're using a 1k resistor here, you'll dampen out your signal too quickly and won't be able to catch anything past the second frequency component $f_2$.
Isn't there an easier way?
Yes, many modern oscilloscopes can perform a Fourier transform. Similarly, a digitized signal can be analyzed to find its Fourier components.
====== Diodes ======
Now we'll introduce a new component, the diode! Diodes are directional circuit elements, so the way we orient them a circuit is critical. For typical usages, there can be current from the diode's anode to cathode when the anode's voltage $V_a$ is ~$0.6 V$ higher than the cathode voltage$V_c$. In such a case, the diode's voltage (also referred to as the //"knee voltage"//) will be nearly constant at $0.6 V$ and the current will be determined by the rest of the circuit. If this condition isn't met, then there will be no current through the diode, and the voltage across the diode will be determined by the rest of the circuit.
* If $V_a - V_c \approx 0.6 V$, the diode allows (nearly) any amount of current to pass through it
* This can vary by a few hundred mV in either direction for different special purpose diodes
* Otherwise, the diode will have no current through it
| {{:phylabs:lab_courses:phys-226-wiki-home:spring2020-lab-3-diode-circuits:diodesymbol.gif?200|}} | {{:phylabs:lab_courses:phys-226-wiki-home:spring2020-lab-3-diode-circuits:diodeactual.gif?300|}} |
| Schematic symbol for a diode. The 'a' and 'c' indicate the anode and cathode, respectively. Anode is from the Greek word for "ascent" while cathode is from the word for "descent". We can blame [[https://en.wikipedia.org/wiki/William_Whewell| William Whewell]] for this, he was thinking of currents moving like the sun across the sky. | Photograph of a 1N914
{{page>phylabs:lab_courses:phys-226-wiki-home:component_library:1n914&noreadmore&firstseconly&inline&noheader&nouser&nodate&noeditbtn}}
fast switching diode, which we'll be using. Note that the dark band on one side of the packaging indicates the cathode.
|
Note that this is the first circuit element we've seen whose behavior depends on voltages in the circuit. This feature allows us to:
* Create digital logic
* Create circuits that can protect other components from excessive voltages
* Reshape signals
We'll explore the last two uses in the following lab exercises.
==== Testing diodes with a multimeter ====
If you aren't sure which side of a diode is which, you can use your multimeter to determine this:
| {{:phylabs:lab_courses:phys-226-wiki-home:spring2020-lab-3-diode-circuits:mw_multimeter_dial_diode_highlight.png|}} |
|
* Turn the dial to the yellow setting with an omega, diode, and sound (dot with arcs) symbol on it.
* Press the yellow **select** button once to switch the meter to diode testing mode.
* There will be a diode symbol above the last digit on the meter, and a "V" in the lower right corner
|
After getting the settings correct, connect your meter such that the **red V/$\Omega$ /Hz** terminal is connected to the **anode** and the **COM** terminal is connected to the **cathode**. On doing so, the meter will display the diode's voltage for a current of 1mA. If your diode is backwards, you'll instead see your meter read **.OL** for overload; in this instance there's no reading because there's no current through the diode.
===== Half-wave Rectifiers =====
We can use diodes to restrict the output voltage in a circuit. This is a common way to protect sensitive components. Let's make a rectifier circuit as shown in the figure below:
| {{:phylabs:lab_courses:phys-226-wiki-home:spring2020-lab-3-diode-circuits:3_half_waverectifier.gif|}} |
Using a ''1kHz'' sine wave with a ''14V pk-pk amplitude (7V amplitude)'':
> Predict what $V_{out}$ and $\Delta V_{diode}$ will look like as a function of $V_{in}$, including a quick picture or sketch. Note that $\Delta V_{diode}$ is the voltage difference across the two terminals of the diode, not a measurement with respect to ground.
Whenever the input is less than 0.6 V, the diode won't conduct any meaningful amount of current. No current through the diode means no current through the resistor, which means no voltage change across it. Hence, $V_{out} = 0$ when $V_{in} < 0.6V$. Note that there //will// be a voltage across the diode when this happens; Kirchoff's laws still apply.
If $V_{in}$ is above 0.6V, then the diode will have a current in it, plus it will drop a fixed 0.6V. The rest of the voltage in the loop then must drop over the resistor. Thus, $V_{out} = V_{in} - 0.6V$ when $V_{in} > 0.6V$.
There will be some deviation from this ideal case; the peak output will differ by a bit more than 0.6V since the voltage across the diode does change with current, albeit slowly. There may also be a bit of a bend when the voltage is under 0.6V. This is due to what's called ``leakage current``, as diodes do conduct just a bit even when reverse biased.
Test your prediction, and resolve any discrepancies.
Note that to measure $\Delta V_{diode}$, you'll need to find the difference between $V_{in}$ and $V_{out}$. If you place the scope's grounding probe at $V_{out}$, you'll instead alter your circuit to behave in odd ways. Instead, you should attach the oscilloscope probe connectors to $V_{in}$ and $V_{out}$, and then use the **MATH** button to find the difference between the two signals.
> Predict what would happen if you reversed the orientation
Test your prediction.
With a reversed diode, there won't be any current passing until the cathode is 0.6V lower than ground. At that point, the diode will conduct and $V_{out}$ will be $V_{in} + 0.6V$. Basically we're getting only the bottom half of our sine wave input.
===== Diode Clamps =====
Consider the circuit below, where we use our fixed ''5V'' terminals to build our circuit:
| {{:phylabs:lab_courses:phys-226-wiki-home:lab_3_diode_circuits:226_diode_clamp_3x.png?400|}} |
| One variant of a diode clamp circuit. Here, the +5V symbol indicates hooking the cathode of the diode up to your DC supply, set to 5V. As a shortcut, the two terminals on the far right of your supply are permanently set to 0V and 5V for black and red, respectively. |
Use a ''14V pk-pk (7V amplitude)'' sine wave as input again.
> Predict what $V_{out}$ and $\Delta V_{diode}$ will look like as a function of $V_{in}$, including a quick picture or sketch
> Test your prediction, and resolve any discrepancies.
Here the diode won't conduct unless the anode is 0.6V higher than the cathode, which is held at +5V due to the power supply. Thus, $V_{out}$ will be equal to $V_{in}$; there's no current in the resistor and thus no voltage drop. When $V_{in}$ is greater than 5.6V, then the diode will conduct and the output will be fixed at 5.6V. It can help to show students what happens when you change the DC part here by switching to the adjustable part of the power supply and adjusting the voltage.
Now suppose $V_{in}$ is a 1 kHz sinusoidal signal with a //peak-to-peak// amplitude of approximately ''6 V'' (or amplitude of ''3V'')
> How, if at all, do you think $V_{out}$ will change? Check your prediction, take a photo or screenshot of what you see, and resolve any discrepancies.
In this instance, the maximum of $V_{in}$ is 3V. This will never forward bias the diode, so we'll always have $V_{in}$ equal to $V_{out}$.
This circuit effectively limits (clamps) the output to be no higher than 5.6V.
Modern semiconductor based devices can often be damaged by being connected to too high of voltages. You'll frequently find clamp circuits like this being used to protect the inputs to Arduino or Raspberry Pi circuits where the maximum input signal isn't known. They may use more specialized sorts of diodes, but the intent is the same. Interconnecting cables in particular are a point of vulnerability, and frequently include [[https://toshiba.semicon-storage.com/us/semiconductor/knowledge/faq/diode_tvs-diodes/where-are-tvs-diodes-esd-protection-diodes-used.html|Transient Voltage Surpression]](TVS) diodes in their design. Even relatively simple devices may have [[https://www.ti.com/document-viewer/lit/html/SSZTBV4|more than a dozen protection diodes]].
Now suppose that the diode in the clamp circuit has been reversed, as shown in Fig. 5.
| {{:phylabs:lab_courses:phys-226-wiki-home:lab_3_diode_circuits:226_diode_clamp_reverse_3x.png?400|}} |
> For the ''same input signal'' as the previous portion //predict// what $V_{out}$ will look like and sketch/describe your prediction.
>
> Check your prediction, take a screenshot of what you see, and resolve any discrepancies.
In this instance, the diode will always be forward biased. It isn't until $V_{in}$ is at least 4.6V that we violate this condition. The result is that the output now has a //minimum// value of 4.6V.
{{page>phylabs:lab_courses:phys-226-wiki-home#Assignments&nodate&nouser&noheader&inline&nofooter}}
====== Lab Recap ======
In this lab, we walked you though:
* How to make a bandpass filter
* How to use the frequency selectivity of a bandpass filter to find Fourier components of a signal
* How to use a diode to [[https://en.wikipedia.org/wiki/Rectifier|rectify]] a signal
* How to use a diode to clamp the maximum voltage from an input
* This is extremely common (and sometimes built-in) as a means of protecting complex electronic devices from high voltages that could damage the internal semiconductors.
* How to use a diode to clamp the minimum voltage from an input
* This sort of circuit is useful for running a device off of battery power only when another higher voltage power supply is disconnected.