Lab 5 - ECE 420L
Authored
by Silvestre Solano,
Email: Solanos3@unlv.nevada.edu
3-6-2015
This lab will utilize the LM324 op-amp (LM324.pdf).
For
the following questions and experiments assume VCC+ = +5V and VCC- = 0V.
Calculate the frequency response of the following
circuit. Ensure you show your clear hand calculations.
What can you neglect to simplify the calculation?
In
order to simplify the otherwise tedious calculation, the 100k resistor
named R2 may be ignored. The R2 resistor is choosen to be "big" so that
it can nullify the DC offset which could cause the op-amp to latch on
to either the positive or negative power supply rail. The transfer
function is derived as follows for the AC input and not the DC bias.
Does the circuit work if you remove the 100k? Why
or why not?
Yes,
the circuit still worked after I removed the 100k. I originally thought
it would drop down the output to the lower power supply rail of about 0 volts
because this happened in the previous lab. However, this was not case.
The removal of the 100k did not affect the circuit as far as I could
tell. This is probably because the DC offset was not large enough to
affect the DC bias.
Does the 100k have much of an effect on the
frequency response?
The
100k resistor did not affect the frequency response as far as I could
tell. This was exptected because the resistor was in place to allow
proper DC biasing.
Verify your calculations with experimental results.
In
the following table, I used 3 arbitrary frequencies and compared the
results with the expected (calculated) values generated by using the
previously derived transfer function for frequency response. Channel 1
was the input, while Channel 2 was the output.
100 Hz | 200 Hz | 500 Hz |
| | |
Experimental gain = 1.52 V / 1.04 V = 1.46 | Experimental gain = 800 mV / 1.04 V = 0.769 | Experimental gain = 400 mV / 1.04 V = 0.385 |
Calculated gain = 1.59 | Calculated gain = 0.796 | Calculated gain = 0.318 |
As
seen above, the calculated gains and experimental gains are reasonably
close in my opinion. Therefore, I conclude that the 100k resistor does
not seem to affect the frequency response of the circuit.
Show, at the unity-gain frequency of the
integrator, that the input and the output have the same peak values.
The unity-gain frequency is determined as follows:
In
the above equations, "fug" is the unity gain frequency, which is
determined to be about 159.2 Hz. This is confirmed in the below
picture, where it can be seen that the input (channel 1) and the output
(channel 2) are indeed the same at this frequency.
Is the phase shift between the input and the output
what you expect? Why or why not?
In
the above picture, the phase is recorded to be -96.16 degrees. The
expected value is 90 degrees, which is fairly close in magnitude to
what was measured, but not in sign. However, I later noticed that I
probably could have measured the phase from 2 to 1 instead of 1 to 2.
Doing so would have probably given me a positive 96.16 degrees. The
phase shift is not constant as can be seen in the table were gains were
compared. At 500 Hz, the phase was about -87.59 degrees. The phase
decreases with increasing frequency and increases with decreasing
frequency. Mathematically the phase should have stayed at a
constant 90 degrees as shown below.
The above equation is independant of frequency.
Next, design, simulate, and build a square-wave to triangle
wave generation circuit.
Assume the input/output frequency is 10 kHz and the output
ramp must swing from 1 to 4 V centered around 2.5 V.
Show all calculations and discuss the trade-offs (capacitor
and resistor values, input peak, min, and average, etc.)
For
the triangle wave generator, I picked a square wave of 3 volts
amplitude since the ramp had to change by 4-1=3 volts. Next, I
arbitrarily picked a 0.1 uF capacitor and used the equation provided by
professor Baker's video to determined the needed resistor as follows:
When
I tried to simulate the above integrator with R=500 Ohms and
C=0.1 uF, the simulation failed misearably. The pulse source that was
the square wave input was set to have an amplitude of (common mode
voltage) + Vin = 2.5 V + 3 V = 5.5 V. I eventually found that if I
changed the pulse source from an amplitude of 5.5 volts to an amplitude
of 5 volts, the simulation worked. This means that I effectively
changed the Vin to 2.5 volts, but I decided to leave the resistor value
unchanged since I was happy enough that it worked.
In
the actual lab implementation, the triangle wave does not look nearly
as good as the above simulation. The triangle wave output is shown
below. This output however, was obtained only after increasing the
resistor size to about 15k, which is 30 times larger than the
calculated value of 500 Ohms.
I
found out by tweaking the square wave that the generated triangle wave
looks alot better at a lower frequency of 1 KHz as shown below.
As
stated previously, the selection of the capacitor was arbitrary.
However, after I had simulated and tested the design, I realized that I
probably would have obtained better results if I had used a much
smaller capacitor in the nF range. This is because a larger capacitor
takes longer to charge and discharge than a smaller one. Since the
design criteria specifically said to use a frequency of 10 KHz, a large
capacitor probably would not have enough time to "integrate" the
incoming signal in such a small period. This probably explains why I
had to drastically increase the 500 Ohm resistor to 15k Ohms so that
the time delay was big enough to allow the triangle wave to form. So,
in retrospect, I wish that I had used a smaller capacitor. Another flaw
in my design is that the triangle wave only has a ramp of 2.5 volts,
and not the wanted value of 3 volts.
As always, I will back up my stuff as shown below.
Return to the main Lab directory.