Monday, November 7, 2011

Voltage divider and Op Amps

My first blog post! I thought I'll write about this topic, after a friend of mine got a question in his interview. The interviewer asked him to find the output voltage of a particular op amp configuration without using any mathematics but by intuition alone! This can be done by a different(practical) perspective on how op amps work. (I really admire that interviewer, btw :))

An ideal Op amp theoretically has infinite gain and infinite input impedance. Modern devices have very high gain (6 digit numbers) and are very close to ideal. Op amps have little to no use when used without feedback, which should be obvious. Even a few microVolts at the input terminals can drive it to saturation. An Op Amp was designed in the first place, to be used with feedback, negative feedback that is. Why this huge gain? Well, the Op Amp should be able to drive the output to (theoretically) any voltage to satisfy a condition at the input terminals through feedback. What exactly is that condition? Zero input difference voltage at its input terminals: The voltage at both, inverting and non-inverting terminals should be equal.

Take a non-inverting amplifier for example,
The Op Amp input terminals draw virtually no current. Now keeping this in mind, observe that the output acts like a voltage source.(It is in fact a (input)voltage controlled voltage source). Now the Resistors R1 and R2 form a voltage divider and (virtually) all the current from the source(Vout) flows to the ground through Resistors R1 and R2.
Now, consider a voltage Vin at the non-inverting terminal. As noted earlier, the Op amp tries to make the voltage at node 'A' equal to Vin, by changing the output Voltage. Which means, the voltage drop across R1 must be equal to Vin.
Voltage drop across R1 is given by Vout*(R1/(R1+R2)), (Voltage divider principle) which must be equal to Vin.

ie, Vout*(R1/(R1+R2)) = Vin
rearranging, Vout = Vin*((R1+R2)/R1)

Thus the expression for output voltage is obtained, by using the voltage divider principle.
This simple method can be used to find the output voltage of the Op Amp without using any mathematical gain equations. I derived the equation just to demonstrate the correctness of this approach.

Lets consider an inverting amplifier,


The non inverting input is grounded, which means the voltage at node 'A' should be 'zero volt' . Assuming Vin to be positive, the voltage at node 'A' will be zero, only if Vout is negative! The voltage difference across the voltage divider(R1 and R2) is 'Vin - Vout' .So, the voltage at node 'A' is "((Vin - Vout)*(R2/(R1+R2))+Vout" which should equal 'zero' volt.

ie, ((Vin - Vout)*(R2/(R1+R2))+Vout = 0;
Simplifying , Vout = -(R2/R1)*Vin

This method can be extended for non zero input voltages at both the input terminals
Lets look at an example,
The Voltage at Node 'B' is 2V, which means the voltage at node 'A' must also be 2V. The drop across the '10k' resistor should be 3V. This implies that the drop across the '20k' resistor should be 6V (basic circuit theory), which is possible only if the voltage at the output is -4V.
The output voltage can be verified using the gain equations and superposition theorem. The non inverting input can also contain a voltage divider. Just find the voltage at the non-inverting terminal(ie, the input not connected to the output, node 'B') and find what the output voltage should be for a suitable voltage at the other node.
Remember, the key word(or phrase or whatever) here is 'Voltage divider principle'. :)