Author Topic: Op amp negative feedback gain  (Read 1385 times)

0 Members and 1 Guest are viewing this topic.

Offline GreyAreaTopic starter

  • Contributor
  • Posts: 39
  • Country: gb
Op amp negative feedback gain
« on: August 23, 2020, 08:49:05 pm »
I've begun to take a look at Op amps and while following a few documents and watching daves #600 Opamp video I put together an LTSpice simulation of a TL071 Op amp.  I chose this one after reading a few beginner forum posts here that suggest it maybe a better fit for my ultimate need.

Anyway, with the attached schematic.  I was expecting to get a Gain of 11 with the configuration using a 47k & 4.7k resistor with with formula

Av = 1+ (R2/R1)

However when I run the spice simulation with 300mv input I seem to get Vout saturated to the positive rail (10v) instead of the expected 3.3v

Not sure whether the mistake is in the choice of Opamp or elsewhere, In fact I tried an LM741 first  with the same configuration and that gave me an output a few mV above the input.  Where am I going wrong?  Thanks.




 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: gb
    • Electronic controls
Re: Op amp negative feedback gain
« Reply #1 on: August 23, 2020, 08:52:28 pm »
your circuit is wrong
47k from o/p to -
4k7 from - to zero volts.
 

Offline GreyAreaTopic starter

  • Contributor
  • Posts: 39
  • Country: gb
Re: Op amp negative feedback gain
« Reply #2 on: August 24, 2020, 08:12:24 am »
Ah crap, thanks - I corrected the error, I think it looks right now.

I'm still seeing the same gain though :|

 

Online magic

  • Super Contributor
  • ***
  • Posts: 7245
  • Country: pl
Re: Op amp negative feedback gain
« Reply #3 on: August 24, 2020, 08:27:24 am »
Negative supply is wrong.

And remember that this particular chip will not work well if IN+ is <3V above the negative supply. It will also output maximum voltage if IN+ is brought too close to V-.
« Last Edit: August 24, 2020, 08:30:25 am by magic »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19995
  • Country: gb
  • 0999
Re: Op amp negative feedback gain
« Reply #4 on: August 24, 2020, 08:32:38 am »
Yes, the negative supply is also +10V, rather than 10V.

Using .tran 1ns for the simulation command is incorrect. The TL071 is useless at such high frequencies, so simulating it over 1ns makes no sense. If you're only interested in DC, use ".op" without the quotation marks of course.
« Last Edit: August 24, 2020, 08:47:27 am by Zero999 »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13132
Re: Op amp negative feedback gain
« Reply #5 on: August 24, 2020, 08:40:40 am »
Post your .asc file.  Then we can poke and prod it till we find out what's wrong.

However (as Zero999 has already pointed out) .tran 1n is deeply suspicious - to reach a steady state in only 1 nanosecond, all time constants inside your OPAMP model would need to be less than a fifth of that, i.e. 0.2ns, and the OPAMPs gain bandwidth product (GBW) would need to be greater than 50 x 109 which is patently ridiculous as industry flagship fast OPAMPs typically have an order of magnitude lower GBW.

Try: .tran 1m

.op presents its results as a fairly unfriendly table of node voltages and currents.  Its great for serious engineering, but rather intimidating if you are just prodding around in a circuit.   Instead, why not try a dc sweep, which will give you the input to output transfer function of your circuit - great for checking if you've got enough headroom for your application's input range without railing the output.  You've got to pick the source to sweep, and the sweep limits.  You can also pick the step size, but unless you are sweeping multiple sources, just leave LTspice to determine that.

Try: .dc V3 0 1

Edit: corrected suggested source for .dc sweep
« Last Edit: August 24, 2020, 09:01:47 am by Ian.M »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7245
  • Country: pl
Re: Op amp negative feedback gain
« Reply #6 on: August 24, 2020, 08:44:25 am »
There is nothing wrong with .tran. You don't need to wait 1ms for anything to settle because .tran starts with running .op internally. The only difference is you get the plot instead of the table.

To read steady state voltages, it's more convenient to hover mouse cursor over circuit nodes than to use either the plot or the table.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19995
  • Country: gb
  • 0999
Re: Op amp negative feedback gain
« Reply #7 on: August 24, 2020, 08:48:31 am »
There is nothing wrong with .tran. You don't need to wait 1ms for anything to settle because .tran starts with running .op internally. The only difference is you get the plot instead of the table.

To read steady state voltages, it's more convenient to hover mouse cursor over circuit nodes than to use either the plot or the table.
You're right. I suppose it's preference. I like the table. If you use labels, it makes life much easier.
 

Offline GreyAreaTopic starter

  • Contributor
  • Posts: 39
  • Country: gb
Re: Op amp negative feedback gain
« Reply #8 on: August 24, 2020, 09:22:32 am »
Thanks a lot for the patience and replices.  Vp was correct in one iteration I must have typo'ed when changing it.  Unsuprisingly, works perfectly now.

Interesting reading the comments on .tran and sweep, I hadn't got that far and initially just wanted to see what it looked like with a fixed input voltage, the easiest way I could see to do that was put a .tran statement in.  I'll have a play with dc sweep though, the input will be driven from a DAC eventually but I haven't got that far yet.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf