====== Operational Amplifier Basics ====== An operational amplifier, commonly referred to as an op-amp, is a high-gain differential voltage amplifier designed to amplify the difference between two input signals. Op-amps are among the most widely used building blocks in analog electronics due to their versatility, simplicity, and excellent performance. By using external feedback components such as resistors and capacitors, an op-amp can be configured to perform a wide range of functions including voltage amplification, filtering, buffering, integration, differentiation, oscillation, and signal conditioning. Modern operational amplifiers are capable of providing high input impedance, low output impedance, low distortion, and stable operation, making them suitable for audio, instrumentation, control, and general-purpose electronic applications. ===== The two rules of op-amps ===== When analysing op-amp circuits, engineers often use two ideal op-amp rules, sometimes called the **golden rules**: **1. The inputs draw no current.** The input impedance of an ideal op-amp is infinite, so no current flows into either the non-inverting (+) or inverting (−) input terminals. **I+ = I- = 0** **2. The op-amp will drive its output to make the two input voltages equal.** When negative feedback is present and the op-amp is operating in its linear region, the voltage difference between the inputs is essentially zero. **V+ ≈ V−​** This is often called a virtual short or virtual earth (when one input is grounded). For example, in a non-inverting amplifier with the + input connected to a signal source, the op-amp adjusts its output voltage until the − input is at the same voltage as the + input. Because no current enters the inputs, all current calculations can be performed using only the external resistors. These two rules are approximations, but for most practical op-amp circuits they produce answers that are extremely close to reality and greatly simplify circuit analysis. ===== Non-Inverting configuration ===== {{:opamps:fig1.png}} **Fig. 1: basic non-inverting op-amp configuration** This circuit is a voltage follower, also known as a unity-gain buffer. The NE5534 operational amplifier has its output connected directly to its inverting (−) input, creating 100% negative feedback. The input signal is applied to the non-inverting (+) input. Because of the op-amp's very high open-loop gain and the presence of negative feedback, the op-amp drives its output until the voltage at the inverting input equals the voltage at the non-inverting input. Since the inverting input is connected directly to the output, the output voltage becomes essentially equal to the input voltage. Applying the two ideal op-amp rules: **I+ = I− = 0** and **V+ = V−** Since the non-inverting input is connected to the input signal, **V+ = Vin** and because the output is connected to the inverting input, **V− = Vout** Therefore, **Vout = Vin** The circuit provides a voltage gain of: **Av = 1** or 0 dB. Although there is no voltage amplification, the circuit is extremely useful because it provides current gain and impedance transformation. The NE5534 has a very high input impedance, so it places almost no load on the signal source, while its low output impedance allows it to drive heavier loads than the source could drive directly. For example, if a signal source has a relatively high output impedance and is connected directly to a low-impedance load, the signal level may drop due to loading effects. By inserting a voltage follower between them, the source only sees the op-amp's high input impedance, while the load is driven from the op-amp's low-impedance output. In audio circuits, voltage followers are commonly used as buffers between filter stages, tone controls, active crossovers, volume controls, and power amplifiers. They prevent one stage from affecting the operation of the previous stage while maintaining the same signal voltage. The +/-V supply rails shown on the schematic provide the operating power for the op-amp and allow the output signal to swing both positive and negative around ground. ===== Inverting configuration ===== {{:opamps:fig2.png}} **Fig. 2: inverting operational amplifier configuration** This circuit is an **inverting** amplifier using an NE5534 operational amplifier. Unlike the voltage follower above, the signal is applied to the inverting (−) input through resistor R1, while the non-inverting (+) input is connected to ground. Negative feedback is provided by resistor R2 from the output back to the inverting input. Because the non-inverting input is grounded, the op-amp will use its output voltage to force the inverting input to sit at virtually the same voltage. Applying the ideal op-amp rule: **V+ ≈ V-** Since: **V+ = 0V** then: **V− ≈ 0V** This point is known as a virtual earth or virtual ground. It behaves as though it is connected to ground, even though there is no direct connection. The second ideal op-amp rule states that no current flows into the op-amp inputs, so all of the current flowing through R1 must also flow through R2. The current through R1 is: **I = Vin / R1** Since the same current flows through R2: **I = -Vout / R2** Equating the two currents gives: **Vin / R1 = -Vout / R2** which rearranges to the familiar gain equation: **Av = Vout / Vin = -R2 / R1** In this circuit: **R1 = 10k\\ R2 = 10k** therefore: **Av = -10 / 10\\ Av = -1** The voltage gain is therefore unity, but with inversion. The output has the same amplitude as the input but is shifted by 180° in phase. For example, a +1 V input produces a −1 V output, while a −1 V input produces a +1 V output. The purpose of this circuit is often not voltage amplification but signal inversion. It can be used wherever an inverted version of a signal is required, such as balanced audio circuits, active filters, summing amplifiers, phase-correction circuits, and instrumentation systems. Because the gain is precisely determined by the resistor ratio, changing either R1 or R2 allows the circuit to provide any desired inverting gain while maintaining the same basic operating principle. ===== Practical Non-Inverting amplifier ===== Below (Fig. 3) shows a typical non-inverting op-amp stage providing a gain of 2. {{:opamps:fig3.png}} **Fig. 3: practical non-inverting op-amp gain stage** You'll notice we have resistive divider R2 (10k) and R1 (10k) from output pin 6 back to pin 2 (-V) which sets the overall gain of the stage: **Av = 1 + R2 / R1\\ Av = 2** at AC signals. But, you'll also notice capacitor C1; which, apart from its value varying, is seen on many other schematics. But what does it do? C1 (22uF) is placed in series with R1 to ground. It serves two distinct and vital functions depending on whether you look at DC (0Hz) or AC (audio/signal frequencies). **1. DC Block and Unity Gain for DC Offsets (The Primary Role):**\\ Op-amps are not perfect; they suffer from internal imperfections like input offset voltage and input bias currents. If C1 was replaced with a straight wire to ground, the DC voltage gain (Av) of this non-inverting amplifier would be: **Av = 1 + R2 / R1 = 1 + 10k / 10k = 2** With a DC gain of 2, any tiny millivolt DC offset present at the input or generated internally by the op-amp would be amplified by 2. In high-gain systems, this can cause the output to drift dangerously close to the power rails, reducing headroom and causing clipping. **How C1 fixes this:**\\ - A capacitor acts as an open circuit to DC (0Hz).\\ - Because no DC current can flow through C1, the resistance of that lower branch effectively becomes infinite (R1 + ∞ = ∞). Plugging this into the gain formula: **Av(DC) = 1 + R2 / ∞ = 1** By reducing the DC gain to exactly 1 (unity gain), the circuit ensures that DC offsets are not amplified. The DC voltage at the output simply mirrors the tiny DC offset at the input, keeping the output stably centered around 0V. **2. Setting the Low-Frequency Cutoff (High-Pass Filter)**\\ For AC audio signals, the capacitor allows current to pass. However, its capacitive reactance (Xc) changes with frequency: **Xc = 1 / 2πƒC1** As the signal frequency (ƒ) drops, Xc increases, which increases the total impedance of the feedback path to ground and reduces the amplifier's gain. This forms a high-pass filter. The circuit will achieve its full AC voltage gain of 2 (1 + R2/R1) only for frequencies comfortably above the cutoff frequency (ƒc). The cutoff frequency is determined by R1 and C1: **ƒc = 2π ⋅ R1 ⋅ C1** Putting in the schematic's values: **ƒc = 2π ⋅ 10,000 ⋅ 22 * 10^-6 F ≈ 0.72Hz** **Design Impact:** A cutoff frequency of $0.72Hz is exceptionally low. It ensures that the entire audible frequency spectrum (typically 20Hz to 20kHz) passes through the amplifier with a perfectly flat, uniform gain of 2 (6dB).