EE 420L – Engineering Electronics II Lab – Lab 5 

Authored by James Skelly

Email: skellj1@unlv.nevada.edu

Due: March 13, 2019

  

Lab Description

·        Experimentation and design using op-amp integrator topology.

 

 

Pre-Lab

·        Watch the op-amps III discussion video.

·        Simulate the op-amp circuits found in the op-amps III zip file.

·        Read the lab write-up before coming to lab.

 

 

Lab Tasks

 

This lab will utilize the LM324 op-amp (LM324.pdf).

For this lab, VCC+ = 5V and VCC- = 0V.

 

Figure 1

 

------------------------------------------------------------------------------------------------------------

 

Part 1: Op-Amp Integrator Frequency Response, Unity Gain Frequency

 

 

 

For Non-Inverting Op-Amp:

              R2 in the equation above represents the resistance between the inverting terminal of the op-amp and the output.

                      Removing R2 leaves the capacitor as the lone impedance between the inverting terminal of the op-amp and the output.

                      In real life, op-amps have an internal offset voltage (DC) that will be amplified by the op-amp and will show up as a DC

   offset on the output. For DC, frequency is zero, and impedance of a capacitor (1/(j*2*pi*f*C)) is infinite. From the formula,

   we see that DC gain would be infinite. This infinite DC gain would cause the output to go straight to the rail voltages (VDD

   or ground depending on direction of current flow). Connecting a large resistor will create a second path for current to flow

   through to the output and the impedance will no longer be infinite.

 

 

The 100k resistor does not have much of an effect on the frequency response. The impedance of the capacitor is much less than that of the large resistor, so the majority of AC current will flow through   the capacitor, and Rbig is negligible.

 

 

Simulation Results for Frequency Response, Unity Gain

 

 

From the AC Analysis above and the cursor information below, we see that the unity gain frequency of the op-amp integrator is around 147 Hz.

 

From calculations:  

 

 

Simulations for Output at Unity Gain Frequency

·         This simulation shows the output and input at the same magnitude for the calculated unity gain frequency.

  

·         Note that the output is out of phase by roughly 90 degrees (leading the input) as is expected from the frequency response.

·         Note also that the output is offset by about 300 mV from the input. This is due to the offset voltage of the LM324 being amplified.

·         The 100k resistor in spice simulations is large enough that the DC gain is noticeable, and there is a DC offset on the output

 

 

·         R2 was adjusted all the way down to 8k in order for the offset voltage to go unnoticed in the output of the op-amp (for spice sims only).

 

·         Below, we see pictures of the breadboard implementation of the op-amp integrator at unity gain frequency.

 

·         At the calculated unity gain frequency of 159 Hz, the experimental gain was less than one. The unity gain frequency in the experiment was adjusted until a gain of one was visible on the scope.

·         Two 2.1 uF capacitors in series were used to create the 1 uF capacitor necessary to implement the given circuit, as can be seen on the breadboard.

·         The phase of the output was bouncing between 78 degrees and 83 degrees. We expect a value of 90 degrees, but for non-ideal op-amps, the phase is not going to be exact.

 

------------------------------------------------------------------------------

 

Part 2: Square-Wave to Triangle-Wave Generation Circuit

 

Hand Calculations for Design

Hand calcs yield the following variables to be used:

 

      f = 10 kHz

      C = 0.95 nF

      R = 43.8 kΩ

      ∆V = 3V

      T = 0.1 ms

 

 

Simulation Results Using Calculated Values for R and C

 

 

 

·         In spice, the calculated values yield a perfect picture of the expected output waveform, shown above.

 

 

 

Breadboard Implementation and Scope Output Signals

 

 

 

·         For changes in the sign of the slope of the output signal, we see some odd noise: a small voltage spike. This small voltage spike does not come up in simulation, but only in experimentation. In calculus, “sharp points” are points at which a function is not differentiable. For the sharp point created in a triangle wave, the function is not differentiable, which means it is not integrable either. The oscilloscope outputs a strange spike for every sharp point generated in the triangle waveform simply because the function at that point is not integrable as the current flow in the circuit changes direction.

·         Disregarding the small spikes at sharp points, the ramp waveform has a ∆V of 2.84V, which is close to the target value of 3V, and swings from 880 mV (roughly 1V) up to 3.72 V (roughly 4V).

 

 

 

Tradeoffs in Design

 

·         Capacitor and Resistor Values

o    When designing the triangle-wave generator, the capacitor and resistor values need to be selected carefully in order for the output signal to actually swing around 2.5V.

o    The equation below, as was mentioned previously, is the equation for the gain of the non-inverting op-amp topology. It was mentioned that the DC offset voltage of the op-amp will be amplified based on this equation and will cause there to be a DC offset on the triangle-wave output. For the design of the generator, assuming R2 is fixed at 100k, R1 and C are the values being chosen.

 

 

o    If C is chosen to be large, say 1uF or larger, R1 will be quite small (100 Ohms or less). This small R1 value becomes the divisor of R2 in the DC gain equation, and the offset voltage is amplified greatly.

o    If C is chosen to be small, R1 will need to be much larger, and the quotient given by R2/R1 becomes very small. Therefore, a smaller C can be chosen to minimize the DC offset of the output waveform.

o    In our design, we chose C to be small (1nF) and R1 was calculated to be large (43.8k) in order to minimize the DC offset of the triangle wave.  

 

 

 

·         Input Peak, Min, and Average

o    Using a square-wave input signal (Vin):

 

 

o    The average value of Vin must be equal to the VCM in order for the circuit to operate correctly. This is because the high voltage needs to be the same magnitude above VCM as the low voltage needs to be below VCM in order for the same magnitude current to flow in both directions in the circuit. Selecting the wrong peak and minimum Vin values for the square wave input signal will result in the average input voltage differing from VCM, and a number of things can go wrong, including, but not limited to:

§  Output not centered around VCM

§  Edges of ramp output have different magnitudes of slope due to different magnitudes of current flow in the circuit

o    In our design, we chose the peak input voltage to be 5 and the minimum input voltage to be 0 in order for our average Vin (2.5V) to match or common mode voltage (2.5V).

 

 

 

 

Return to EE 420L Labs