Strange opamp issue - Page 1
Forum section: electronics / general

author: Eliminateur
author_rank: Regular Contributor
timestamp: February 03, 2011, 08:52:30 pm
content: Ok, maybo not an issue and it's complete idiocy on my part but i can't seem to figure around this problem...anyway:i have an opamp as comparator(tried TL081 and LF353), Vcc is +5V to 0V.circuit is as shows, Inverting input has 1V due to divider, idea is that when NI input is below 1V, output=0v and when it's above then output=Vcc (not taking output swing into account ofc). In theory, this should work....So i build the circuit all happy, turns out output is always at Vcc, so i rebuild the circuit this time with a LM353.... SAME!, what is going on?, i built the LM353 circuit in a breadboard with a LED to islate the rest of the larger circuit... and the same thing happens!, i simulate it in LTspice and as expected, it works perfectly..., i'm more baffled...If i invert the inputs, then the opamp works as expected!(with inverted output) in both the breadboard and the live device...I also tried to find simple comparator example circuits using any of said opamps and found several that work just like the comparator i'm building....so... ideas?, i'm baffled....edit: i've just simulated the test with Multisim that has the correct models, and it acts the same as with LTSpice and the "paper theory" i'm even more baffled now

author: scrat
author_rank: Frequent Contributor
timestamp: February 03, 2011, 11:23:21 pm
content: From the top of my head, the only thing that I can figure is to avoid both inputs being too much near ground.You could check it by putting a variable voltage (potentiometer, for example) on the positive input, and varying it from Vcc to GND.

author: johnmx
author_rank: Frequent Contributor
timestamp: February 03, 2011, 11:24:28 pm
content: I believe that none of those opamps work with only +5V.The minimum is +8V (single supply). Pay attention to the Input Common-Mode Voltage Range, see data sheets.

author: scrat
author_rank: Frequent Contributor
timestamp: February 03, 2011, 11:34:58 pm
content: You're right.Both TL081 and LF353 don't have a clear supply voltage minimum value, but figures show (at least on ST's TL081 datasheet) a minimum +-3V,which means at least 6V.

author: Eliminateur
author_rank: Regular Contributor
timestamp: February 03, 2011, 11:43:29 pm
content: john, i'm not using common mode AFAIK, or am i wrong?...i've used those opamps at 5v years ago with no problems, LF353 datasheet does not state minimum voltage(only max) and all the graphs include 5V as supplythe V limits for CM+ is ~5.1V and ~2.5V for negative common mode...TL081 datasheet also explicitly includes 5V in the performance graphs(albeit it says +-5V but nowhere else it mentions a minimum voltage)And that doesn't explains why the opamp works as intended when inverted (divider to NI input)Scrat, what would be the problem of the input being near gnd?, 1v is far from the offset, in the protoboard i tested with GND, Vcc and from the divider itself(common mode), no avail...If i only had other opamps at hand to do more testing :S, ah.. i have some 30year old weird-can packaged RCA ones, hmm i could try them as well...What other low voltage single rail general purpose opamp could there be... time to dig the datasheet(afaik LF353 and TL081 are as normal as they get)

author: johnmx
author_rank: Frequent Contributor
timestamp: February 03, 2011, 11:57:43 pm
content: I don't see any graph with only +5V single supply, at least in any of the three data sheets that I got.Even without AC signals you still have a commom mode voltage. It’s defined as: Vcm=(V+in + V-in)/2When the +in = 0V and –in=1V the Vcm is 0.5V. This value is outside of the specs if you supply the opamp with Vss=0V.

author: Eliminateur
author_rank: Regular Contributor
timestamp: February 04, 2011, 12:04:31 am
content: i see....oh well, if i use it backwards it works so for the time being i'll leave it that(or i'll have to go buy an LM10/LM392/LM358 or something of the sort), i'll have to make sure that the output swing is readable by the ATmega... checking datasheet now....thanks for the tips!

author: johnmx
author_rank: Frequent Contributor
timestamp: February 04, 2011, 12:05:54 am
content: Quote from: Eliminateur on February 03, 2011, 08:52:30 pmSimulators are a great tool, but don’t believe the results all the time. It’s very difficult to have a model 100% real.

author: johnmx
author_rank: Frequent Contributor
timestamp: February 04, 2011, 12:12:52 am
content: Quote from: Eliminateur on February 04, 2011, 12:04:31 amYou can use a microcontroller with internal comparators and even with an internal voltage reference as your reference input.

author: Eliminateur
author_rank: Regular Contributor
timestamp: February 04, 2011, 01:09:53 am
content: hmm yeah, looks like hte at328 has a comparator but arduino doesn't exposes it :/, besides i'd prefer to have some isolation between the HV circuit(25Vdc~) and the AVR itself