ELEC 240 Lab

Introduction

This week we are going to look at some more types of op amp circuits. Using these op amp circuits, we will build our own function generator.

The first type of op amp circuit is a square-wave generator, or also called an RC relaxation oscillator. We do this by operating the op amp as a comparator. A comparator's output toggles between +Vcc and -Vcc at a frequency dependent on the charge/discharge rate of a capacitor through a feedback resistor. When the output is high the capacitor charges. Once the voltage across the capacitor reaches a certain positive reference voltage, the output is driven negative. Once the capacitor charges to the negative reference voltage, the output is driven high. With positive feedback, this cycle continues and we see a square wave oscillation on the output. The frequency of the oscillation is f = 1/(2RC).

Next we will create an integrator, which performs the mathematical operation of integration with respect to time. How could we use an integrator to create different waveform shapes for our function generator?

The integrator works by passing a current that charges or discharges a capacitor in the negative feedback loop. To analyze an integrator, first assume that the opamp is ideal. The integrator looks like this:

Use the ideal constraints of:

We can define the currents as:

Substituting into the first ideal constraint equation:

Now multiply both sides by dt and integrate:

The equation states that the output voltage of an integrator equals the initial value of the voltage plus an inverted, scaled, replica of the integral of the input voltage. If the initial voltage is zero, then the output reduces to:

Finally we will amplify our output with an inverting amplifier like we built last time.