Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Op-amp with variable gain

Status
Not open for further replies.

Emil09

New Member
I know that with the circuit shown below, I can vary the gain from -1 to +1 with the potentiometer.

**broken link removed**

If I change the resistor directly above the op-amp from 10k to 20k, would that make the gain variable from -2 to +1 ? Is there a convenient formula for this kind of circuit (variable gain op-amp)?
 
No you can't. With the wiper all the way to the bottom, the gain is -1. As the wiper is moved up toward the mid point, the gain gets progressively higher, but is always negative. With the wiper at the mid point or higher, the gain is -∞, so the opamp works like a comparator. The gain is independent of the value of the pot.
 

Attachments

  • DF44b.png
    DF44b.png
    41.3 KB · Views: 545
Last edited:
No you can't. With the wiper all the way to the bottom, the gain is -1. As the wiper is moved up toward the mid point, the gain gets progressively higher, but is always negative. With the wiper at the mid point or higher, the gain is -∞, so the opamp works like a comparator. The gain is independent of the value of the pot.


Hi Mike,


Sorry, but i have to disagree. With the wiper all the way up the gain is equal to 1, and as it moves toward center the gain progressively increases until it reaches center where the gain is infinite, then as it just passes though center the gain goes highly negative and then progressively gets less negative until at the bottom end the gain reaches -1. Thus, the gain varies from -1 to 1, but it goes to very high extremes as the pot is turned toward center. This is with the other two resistors equal to 10k each and the pot is 10k too.

Here is the gain formula:
A=(R2*R4+R2*R3)/(R2*R4-R1*R3)

where
R1 is the input resistor,
R2 is the upper negative feedback resistor,
R3 is the upper part of the pot,
R4 is the lower part of the pot.

and note that when R2*R4=R1*R3 the gain is infinite, but with R2*R4>R1*R3 the gain is positive, and with R2*R4<R1*R3 the gain is negative.

If we keep the pot value at 10k we can simplify the formula (working in K ohms):
A=(10*R2)/(10*R2-(R2+R1)*R3)

and note the restriction 10*R2=(R2+R1)*R3 can not be allowed or the gain is infinite.


What this means is with R1=10k and R2=10k and the pot=10k, the gain never gets between -1 and +1, but it gets to every other possible value. Of course in real life the output will be limited.

With all resistors equal to 10k the formula simplifies to:
A=5/(R4-5)

where R4 is again the bottom part of the pot and from this we can see that the gain goes to infinity when R4=5.

We can also express the gain as:
A=R2/(R2-x*R2-x*R1)

where x is the ratio of R3 to the total pot resistance, so x=1/2 means the pot is at the center.
 
Last edited:
If you connect the wiper of the pot to the (+) input, one end of the pot to ground and the other end to the input source, then you can vary the gain from +1 through 0 to -1.
 
Hi Carl,


Yes not a bad idea. You mean keep R1 connected to the input too right?
 
Mr Al,

Practical considerations collide with theory. With the wiper at the end of the pot nearest the opamp output, the opamp output latches (acts as a Schmit trigger), and will not amplify the input signal by +1. Look at the sim.

Here is a Synchronous Modulator/Demodulator circuit which multiplies an input signal by +1 or -1 upon control of an external signal. Look at the sim.
 

Attachments

  • DF44c.png
    DF44c.png
    44.2 KB · Views: 442
Last edited:
You"ve got a positieve feedback , VO will be +Vcc or -Vcc. if Vo is positive and Vin rises V i will get higher and VO will collapse if its higher then V+ , defined by the pot.
 
If you connect the wiper of the pot to the (+) input, one end of the pot to ground and the other end to the input source, then you can vary the gain from +1 through 0 to -1.

Here is a sim
 

Attachments

  • DF44d.png
    DF44d.png
    63 KB · Views: 407
Here is a sim
If you plotted the input versus the output, you would seen the gain inversion (180 degrees phase-shift) as you change the gain from +1 to -1.
 
Last edited:
Below is the graph for 10% increments in the pot. The plots were offset plus and minus 1V for better clarity.
Gain Change.gif
 
If node 7 were grounded, it would be the bogus circuit that I simulated which latches. If you ground node7, and then move the bottom of the pot to ground, you will have the circuit suggested by Crutschow.
 
Last edited:
If node 7 were grounded, it would be the bogus circuit that I simulated which latches. If you ground node7, and then move the bottom of the pot to ground, you will have the circuit suggested by Crutschow.
I believe you mean if you ground node 7 and move the top of the pot to the V3 output, you will have the same circuit I simulated.
 
Last edited:
I believe you mean if you ground node 7 and move the top of the pot to the V3 output, you will have the same circuit I simulated.

Fantastic! It works.

**broken link removed**

**broken link removed**

**broken link removed**

**broken link removed**

**broken link removed**

**broken link removed**
 
So it turns out that changing the resistor above the op-amp from 10k to 20k gives a gain of -1 to +2 (or maybe +1 to -2, having problems with the polarity). Just simulated this in Multisim.

Thanks so much to everyone who contributed to this thread!
 
Last edited:
To observe the polarity, plot two channels at once, one of the input and one of the output.
 
I know that with the circuit shown below, I can vary the gain from -1 to +1 with the potentiometer.

**broken link removed**

If I change the resistor directly above the op-amp from 10k to 20k, would that make the gain variable from -2 to +1 ? Is there a convenient formula for this kind of circuit (variable gain op-amp)?


Hi Mike,


I took a quick look at this again and noticed that yes, when the op amp is made a real life op amp rather than a theoretically 'perfect' op amp the output will always latch if R3<R4 (upper pot and lower pot respectively). I assumed that the OP had already tried this and it worked as he said:
"I know that with the circuit shown below, I can vary the gain from -1 to +1 with the potentiometer"
so i didnt think twice to check it with a real life op amp.

The gain seems to work up to the point where R3=R4 where the gain goes infinite, and then as R3 goes lower the output latches.

This means that with the gain formula i posted earlier:
A=(R2*R4+R2*R3)/(R2*R4-R1*R3)

we'll have to add and additional constraint that:
R3>R4

as well as not allowing the denominator to reach exactly zero, and of course that means the gain can only be negative.

I think the other circuit is better though anyway.
 
Last edited:
hi MikeMI,
Duplicating the LTS circuit/plot you posted earlier in this thread,[post #2] for some reason I cannot reproduce your plot.??

I would appreciate your comment on what I maybe doing wrong.

Eric
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    30.1 KB · Views: 311
Last edited:
hi MikeMI,
Duplicating the LTS circuit/plot you posted earlier in this thread,[post #2] for some reason I cannot reproduce your plot.??

I would appreciate your comment on what I maybe doing wrong.

Eric

Eric, your pot is flipped with respect to mine. You are effectively testing the region from POS=0 to 0.5 instead of my 0.5 to 1.

Try stepping POS from 0 to 1 in steps of 0.05.
 
Last edited:
Eric, your pot is flipped with respect to mine. You are effectively testing the region from POS=0 to 0.5 instead of my 0.5 to 1.

Try stepping POS from 0 to 1 in steps of 0.05.

Mike,
Many thanks...
Re-run is OK...:)
 

Attachments

  • AAesp04.gif
    AAesp04.gif
    29.3 KB · Views: 298
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top