opamp non-inverting gain, wrong in spice sim

Thread Starter

spookydd

Joined Aug 12, 2013
45
I've just received my batch of mcp601, and I'll try something on bradboard to validate at least the design.
Now if it turns out its offset is a bit too much, then I'll have to look some more..
I looked up that opa197, but as I noticed it doesn't come at all in a PDIP8, only as SMD, I didn't need to look any further, SMD is just not an option.
The one other thing besides testing the concept with the opamp reading the 200mV off the shunt, is how to best handle the issue of driving the 128x64 SSD1306 I2C display from the PIC12F675, which doesn't have the built-in I2C stuff, so it'll have to be done by bitbanging, and I've been looking if someone put out some SSD1306 library to drive the OLED display from PICs without built-in I2C. Someone must've done this already. If I can find this ready made, that'll save me some time.
As far as precision goes with the opamps reading levels, the cost is important, and I want to avoid unnecessary complexity, so it's a compromise to make.
If I can get the current reading from the shunt done better than 1%, that shouldn't be too bad. And I also read a voltage, but that one seems easier to do with fair precision.
The PIC will have to do calculations derived from those voltage and current readings.
Then some results need to be displayed on the OLED module.
 

Thread Starter

spookydd

Joined Aug 12, 2013
45
And as I was just looking again at the datasheet for the mcp6041, it apparently wouldn't do any better than the mcp601, with +/-3mV of offset. It doesn't have that input range going beyond the rails, both, so that's appreciable, but the offset isn't a plus.
 

Jony130

Joined Feb 17, 2009
5,598
I used the tl071 model from the ltspice library.
but obviously this isn't the most appropriate opamp for the job.
This is a very good model because it shows the phase inversion phenomenon that occurs in opamp with JFET input. This phase inversion occurs when you exceed the allowed value of an input common-mode voltage range.

In circuit simulation, it will looks like this:


1b.PNG


And this is how it looks like in a real-world circuit.
1s.PNG
TL072--> Vcc = Vee = 5V, Vin = 10Vpp, F = 1KHz

RigolDS58.png


As you can see we got a clipping for Vin > (Vcc−0.6V) or so. And when the input signal approaches Vee−1.4V phase inversion phenomenon manifests itself.

And LM358 allows you to work with Vin close to Vee.

RigolDS56.png

Only clipping accrues for Vin > (Vcc−1.4V). Without the load resistance, we don't see clipping for the negative half.
 

Audioguru again

Joined Oct 21, 2019
6,826
1) The TL071 is low noise, the LM358 produces lots of noise.
2) The TL071 produces very low distortion, the LM358 produces crossover distortion.
3) The TL071 produces all frequencies to 100kHz. The LM358 has trouble (low slew rate) producing high levels above only 3kHz.

I have used thousands of TL072 and TL074 opamps at reasonable output levels and never heard one produce phase inversion.
 

Thread Starter

spookydd

Joined Aug 12, 2013
45
the noise isn't an issue with my current design, which isn't audio and no AC, just DC levels.
I have yet to select a single opamp like the lm358. I have 2 level sensing stages to make, one powered from the PIC's 5V single supply, for which I selected the mcp601, and for the second, I can't use the mcp601 because it needs to be powered from the main 12V supply (single/battery). The 12V could go well into the 13V and possibly over 14V, so it has to handle this just in case.
I put a safety 15V zener on the supply to limit issues in case of overvoltage.
So a single opamp, single supply should handle up to 16V, and it needs to be rail-to-rail I/O, and I just can't locate one.
I tried using that microchip selection system but their filters don't work, when I tune parameters, it just hangs there and never update, so totally useless so far.
I looked at a few possibilities, but none were suitable so far. Either they don't handle more than 5-6V supply, or they're not available in PDIP, so no candidate yet.
I couldn't get my hands on my lm358 from my stash, so I grabbed an lm324 to breadboard a quick validation test, which does work, but 1) I don't need 4 opamps, just one, and 2) there is no way to tweak for offset.
When I tried this with a tl081 on breadboard, it works, somewhat, but the offset can't be adjusted, and in extreme cases, the tl081 won't work, as it's not rail-to-rail and will likely end up doing the phase inversion thing in extreme cases.
I need a PDIP, single supply, single opamp, rail-to-rail I/O and that can handle up to 16V supply. What to choose? Can't locate any..
 

Thread Starter

spookydd

Joined Aug 12, 2013
45
I zeroed in on the Ti TLV2371, since I can't get the microchip selection tools to work, this is the only option I could find.
Seems to be checking the main boxes:
1) it's available in PDIP
2) single opamp in a PDIP8
3) single supply up to 16V
4) RRIO
a bit pricier than the jelly bean, but not as extreme as others like the LT1006 for example.
Unfortunately, no possibility to tweak for offset
 

sarahMCML

Joined May 11, 2019
697
the noise isn't an issue with my current design, which isn't audio and no AC, just DC levels.
I have yet to select a single opamp like the lm358. I have 2 level sensing stages to make, one powered from the PIC's 5V single supply, for which I selected the mcp601, and for the second, I can't use the mcp601 because it needs to be powered from the main 12V supply (single/battery). The 12V could go well into the 13V and possibly over 14V, so it has to handle this just in case.
I put a safety 15V zener on the supply to limit issues in case of overvoltage.
So a single opamp, single supply should handle up to 16V, and it needs to be rail-to-rail I/O, and I just can't locate one.
I tried using that microchip selection system but their filters don't work, when I tune parameters, it just hangs there and never update, so totally useless so far.
I looked at a few possibilities, but none were suitable so far. Either they don't handle more than 5-6V supply, or they're not available in PDIP, so no candidate yet.
I couldn't get my hands on my lm358 from my stash, so I grabbed an lm324 to breadboard a quick validation test, which does work, but 1) I don't need 4 opamps, just one, and 2) there is no way to tweak for offset.
When I tried this with a tl081 on breadboard, it works, somewhat, but the offset can't be adjusted, and in extreme cases, the tl081 won't work, as it's not rail-to-rail and will likely end up doing the phase inversion thing in extreme cases.
I need a PDIP, single supply, single opamp, rail-to-rail I/O and that can handle up to 16V supply. What to choose? Can't locate any..
TLC271's are still available in DIP packages.
 

Thread Starter

spookydd

Joined Aug 12, 2013
45
I was just thinking about one detail about the offset in opamps: it's not necessarily constant with the levels.
So, even if compensated by the trimpot (if any) to null out offset, it may not remain the same with varying levels, so the offset nulling may not be that much help after all. And the gain would still be wrong, at least some of the time..
I noticed while doing some sims, that the offset caused change in output level beyond what the resistor values set as the gain, changes with the signal levels, so the model used goes apply some offset like real parts would, but maybe it's applying some fixed rule for how much of it is induced...
 

eetech00

Joined Jun 8, 2013
4,705
I was just thinking about one detail about the offset in opamps: it's not necessarily constant with the levels.
So, even if compensated by the trimpot (if any) to null out offset, it may not remain the same with varying levels, so the offset nulling may not be that much help after all. And the gain would still be wrong, at least some of the time..
I noticed while doing some sims, that the offset caused change in output level beyond what the resistor values set as the gain, changes with the signal levels, so the model used goes apply some offset like real parts would, but maybe it's applying some fixed rule for how much of it is induced...
Your probably gonna want to use an "auto-zero" type opamp.

https://www.analog.com/en/analog-dialogue/articles/demystifying-auto-zero-amplifiers-part-1.html
 

Thread Starter

spookydd

Joined Aug 12, 2013
45
Tried looking at this, and I see their few options, and among them, none are through hole. So, not those. Anything else?
 

Thread Starter

spookydd

Joined Aug 12, 2013
45
Looks like the tlc271 could be one alternative to the tlv2371, with the added bonus of the offset adjust, and it's slightly cheaper than the tlv2371, although about to become obsolete. I'm going to order some of those, in PDIP8 while they're still available. I wonder how long they'll remain available. CMOS throughout. I'll see when I do some testing how the offset adjust is a plus or not.
 
Top