Maker Pro
Maker Pro

beginner struggling with a opamp

I tried to design a schematic with opamp to add and select through a pot, the dc-offset at a sine wave. I would like to have unity gain in exit but my schematic has a lot of gain. Why? I can't figure out , which is the formula for gain in this schematic? Thank you

schermata-2017-03-02-alle-02-36-01-png.32374

[mod note: added full image to post]
 

Attachments

  • Schermata 2017-03-02 alle 02.36.01.png
    Schermata 2017-03-02 alle 02.36.01.png
    114.1 KB · Views: 193

davenn

Moderator
I tried to design a schematic with opamp to add and select through a pot, the dc-offset at a sine wave. I would like to have unity gain in exit but my schematic has a lot of gain. Why? I can't figure out , which is the formula for gain in this schematic? Thank you

to provide unit gain ( another term for this in op-amps is a buffer) the output is connected directly to the input NO resistors between input and ground nor to the output ... any resistors in those positions will provide gain that is above unity

have a look at this video ... op-amp operation is explained well



cheers
Dave
 
thanks for the answers. The output diode is a forget of the rest of the circuit, but it works. Even removing the diode, when i do a simulation with spice, for a input sine wave of 1 volt I find on output a 4 volts wave (the gain is not the relationship between r7 and r8, should not be 1?). if I remove r7 and r8 and put the output in feedback (buffer, in figure) with the inverting input and then to ground, spice does not make the simulation, as there was an error. Is it a spice error ? thanks

Schermata 2017-03-02 alle 09.12.38.png
 
Last edited by a moderator:
ok, sorry
I figure out the spice simulation , there is a bad ground connection in feedback. But why with r7 and r8 it gain so much?
 
ok, sorry
I figure out the spice simulation , there is a bad ground connection in feedback. But why with r7 and r8 it gain so much?

What is the meaning of "so much"? Theoretically, the maximum gain will be (1+R7/R8).
 

Harald Kapp

Moderator
Moderator
The '-' input of the opamp and the output of the opamp are connected to ground. This is wrong. Connect the output of the opamp to the '-" input without ground connection.
R1 is not necessary, remove it. Input current will flow through the potentiometer (modeled by R4, R5 and R7).
 

davenn

Moderator
when i do a simulation with spice, for a input sine wave of 1 volt I find on output a 4 volts wave (the gain is not the relationship between r7 and r8, should not be 1?).

no, if you had watched the video, you would have learnt that the gain is related to your R7 and R8

Gain = R7 / R8 + 1 = 100,000 / 100,000 + 1 = 100,000 / 100,000 = 1, and 1 + 1 = 2 so that configuration will give a gain of 2
that is likely to vary a little bit because your resistors will not be exactly 100k each

in the unity mode circuit, you should NOT be grounding the feedback loop as all that is doing is grounding your signal
and that is why the simulator did what it did
 

Harald Kapp

Moderator
Moderator
The issue with R7/R8 is that your DC offset will also be amplified.
Put a capacitor (e.g. 1µF) in series with R8. This will block DC. You then have DC gain = 1, AC gain = (1+R7/R8) (see LVW's post #6).
 
Sorry,
I don't understand: gain = r7 / r8 + 1 = 1 + 1 = 2 wave input is 1 volt. 1Volt 2 * gain = + 2 volts + DCOffset (I need a variable dc offset). Why i have a wave of 4 volts (+ dc offset) in output? thank you vary much
 

Harald Kapp

Moderator
Moderator
Why i have a wave of 4 volts (+ dc offset) in output? thank you vary much
Are these measured values or simulated values? If measured: did you check the circuit and the components, especially R7=R8?

A quick simulation in LTSPICE shows the expected behavior:
upload_2017-3-2_10-10-11.png
Note the 10 µF capacitor to make DC gain =1. The offset is part of the voltage surce's definition (1 V). DC part of the output voltage is 1 V -> DC gain = 1
AC part of the input voltaeg is 0.5 V (peak), AC part of the output voltage is 1 V (peak) -> AC gain = 2.
 
With 10 mf capacitor it is improved but i still read 4 volts in output
 

Attachments

  • Schermata 2017-03-02 alle 16.50.19.png
    Schermata 2017-03-02 alle 16.50.19.png
    294 KB · Views: 140
Top