| Tutorial: Op Amps |
|
Need to amplify a small input voltage? Need to mix several voltage sources? Maybe you want to make an audio equalizer or signal generator? The Operational Amplifier is your man. We learned a lot about the Op Amp when building our iPod Preamplifier, and we thought it would be useful to share. What is an Op Amp?First, the symbol for an OpAmp:
There are 5 terminals:
Simple, right? Let's take a few examples:
It's probably obvious that we need to reduce the gain to make the Op Amp more useful. We do that by feeding some of the output back into the input through a resistor. By changing the resistor values, we can control the gain level. Let's examine some basic Op Amp circuits used for audio and signal generation. Using Op AmpsNon Inverting AmplifierLet's say we have an audio source that swings 300mV, peak-to-peak, Let's amplify that signal with an Op Amp – first, connect the signal source to the + input. Then connect the – input to ground. The Op Amp will take the difference between the two terminals, multiply it by the gain (1,000,000), and output it.
Probably too much gain, so we limit the gain by feeding part of the signal to the – terminal. Using a voltage divider, we keep the – terminal just a tiny bit lower than our + terminal. The gain is set by the ratio of (Rf / Rg) + 1. Increase Rf or lower Rg and you'll increase the gain. Inverting AmplifierThe Inverting Amplifier works nearly the same was as a 'regular' amplifier, except the signal is inverted. When our source is going up 100mV, our output is going down 100mV * the gain. This might sound like a big difference, but for applications like audio we're really interested in the frequency, not the direction. In the Inverting Amp, we ground the + terminal, and connect the input to the – terminal. By using a resistor to connect the Amp input and for feedback, we can control the gain. The gain is the ratio Rf / Rg.
Practical considerationsChoosing Resistor Values Inverting or Non-Inverting For audio, it's not so important whether we use Inverting or Non-Inverting, but we should use the same on every speaker. If we reverse the phase on one speaker, it will make the final output sound scattered and off. You can try it with any stereo just by reversing the cables connected to one of the speakers. Stability Other UsesThe amplifer is probably the most common application of Op Amps, but having two inputs opens up a lot of doors. ADCRemember that if we don't limit the gain on our Op Amp, When the + input is higher voltage than the – input, the amp outputs V+. Also, most microcontrollers can vary the voltage output of a pin through a 'duty cycle' mode and a capacitor to smooth the output. Connect you duty cycle microcontroller output to the Op Amp's – input, then connect the microcontroller input pin to the Op Amp output. As you duty cycle the – input, watch the Op Amp output. As soon as it goes low, you know what voltage the + input of the Op Amp is at. Signal GenerationOur Amplifier circuits take an input signal and magnify it, but an Op Amp can also be used to generate very high quality waveforms. First is a sine wave:
Or a square wave:
Other waveforms are also possible. There are a ton of circuits that use Op Amps, the examples above are just a few. Supply VoltageMost example circuits use three reference voltages: V+, V-, and Ground. They're assuming a 'Split' power supply, which means your circuit can provide a voltage that's above ground (V+) and below ground (V-). But most power supplies are 'single supply', meaning they only provide ground and V+. The easiest way to use an Op Amp with a single supply is to split the power source. If you have a 5V power supply, you'll use 2.5V as your 'virtual' ground, the 5V from the supply as V+, and the ground from the power supply as V-. This way, V+ is 2.5V above 'ground', and V- is 2.5V below 'ground'. To split the power supply, you can use a voltage divider or a rail splitter IC like the TLE2426. Choosing an Op AmpNot all Op Amps are created equal! Datasheets provide a lot of measurements of the device, here are a few to keep an eye on; 1 – Bandwidth 2 – Supply Range More ReadingThere's a lot to Op Amps, and here are a few more resources to help you out;
Comments (0)
![]() |









