Op amp negative feedback gain - Page 1
Forum section: electronics / beginners

author: GreyArea
author_rank: Contributor
timestamp: August 23, 2020, 08:49:05 pm
content: 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 formulaAv = 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.3vNot 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.

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: August 23, 2020, 08:52:28 pm
content: your circuit is wrong47k from o/p to -4k7 from - to zero volts.

author: GreyArea
author_rank: Contributor
timestamp: August 24, 2020, 08:12:24 am
content: Ah crap, thanks - I corrected the error, I think it looks right now.I'm still seeing the same gain though :|

author: magic
author_rank: Super Contributor
timestamp: August 24, 2020, 08:27:24 am
content: 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-.

author: Zero999
author_rank: Super Contributor
timestamp: August 24, 2020, 08:32:38 am
content: 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.

author: Ian.M
author_rank: Super Contributor
timestamp: August 24, 2020, 08:40:40 am
content: 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 1nis 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 109which is patently ridiculous as industry flagship fast OPAMPs typically have an order of magnitude lower GBW.Try:.tran 1m.oppresents 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 1Edit: corrected suggested source for .dc sweep

author: magic
author_rank: Super Contributor
timestamp: August 24, 2020, 08:44:25 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: August 24, 2020, 08:48:31 am
content: Quote from: magic on August 24, 2020, 08:44:25 amYou're right. I suppose it's preference. I like the table. If you use labels, it makes life much easier.

author: GreyArea
author_rank: Contributor
timestamp: August 24, 2020, 09:22:32 am
content: 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.