Help to understand an opamp problem - Page 1
Forum section: electronics / beginners

author: cravenhaven
author_rank: Contributor
timestamp: February 18, 2023, 10:05:33 am
content: I have built a fairly simple opamp based thermostat, but am having a problem understanding why it is acting in an odd manner.When cooling the thermistor, the voltage on pin 2 of the opamp rises but as it gets close to the voltage on pin3 set by the adjustable voltage divider, the pin3 voltage rises slightly. Why is this?, and what can I do to prevent it?. When the thermistor is warming and the voltage decreases, the pin3 volyage remains stable.The scope trace shows:blue=opamp1 outputyellow= opamp1 -input (pin2)purple= opamp1 +input (pin3)

author: cravenhaven
author_rank: Contributor
timestamp: February 18, 2023, 10:10:39 am
content: Opamp is a TLV24621D and the cct operates at 5 volts.

author: MasterT
author_rank: Frequent Contributor
timestamp: February 18, 2023, 02:49:45 pm
content: There is positive feedback , OPA acting as a comparator. Google for good tutorial

author: TimFox
author_rank: Super Contributor
timestamp: February 18, 2023, 02:55:44 pm
content: Also Google "Schmitt Trigger", or read Wikipedia's article:https://en.wikipedia.org/wiki/Schmitt_triggerThis is an ancient circuit, adaptable to modern ICs, to add hysteresis to such a control.Thermostats need hysteresis if the heater (such as a gas burner) is binary ON/OFF, to keep the temperature within a narrow but finite range.

author: mikerj
author_rank: Super Contributor
timestamp: February 18, 2023, 03:20:02 pm
content: Pretty sure the OP isn't asking about the hysteresis action, but instead why the voltage on the non-inverting gradually increases as the inverting output voltage approaches it. Note that the output voltage of the op-amp remains stable at this point, so does not appear to be driving this voltage change.One thing I would say is that this is a reasonably fast op-amp (6.4 MHz GBW) and the schematic shows absolutely no supply decoupling. Whilst the scope isn't showing any wild oscillation there is some fuzziness.

author: MasterT
author_rank: Frequent Contributor
timestamp: February 18, 2023, 03:43:22 pm
content: Right. Reading TI datasheethttps://www.ti.com/lit/ds/symlink/tlv2462.pdf?ts=1676665865929&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTLV2462"Differential input voltage, VID − 0.2 V to VDD + 0.2 V"that seems unusually asymmetrical, due to typo or other reason.I suspect, that diff. voltage range is just +-200 mV, likely two schotky diodes protection. Basically, it doesn't matter, since when 200 mV at the inputs, OPA is far away from linear range, and is only consequence - excess loading for external circuits.My advise, use microchip OP amps, mcp6022 or like that.

author: MasterT
author_rank: Frequent Contributor
timestamp: February 18, 2023, 05:57:16 pm
content: It happens I have tlv 2462, so I did some quick test. OPA configured as non-inverting gain 2, no positive feedback to simplify things. Whenever output "clips" reaching 3.3V power rail, input current at the positive (3) input also increases. Real OPA circuitry more complex than two schottky right at the inputs , rather somewhere else up in the chain, or just saturation somehow reflected back to input Diff pair. Nothing could I see on a model in the datasheet.Anyway here some pictures , comparing tlv-2462 with "normal" CMOS MCP6022

author: Zero999
author_rank: Super Contributor
timestamp: February 18, 2023, 06:11:27 pm
content: It's a comparator circuit. I presume the question is about the gradual change in voltage at the +input, when the output is already high, which shouldn't happen.

author: cravenhaven
author_rank: Contributor
timestamp: February 18, 2023, 10:29:57 pm
content: Thanks for your reply mikerj.I thought it was clear that I was asking about the non-inverting input rise rather than the schmidt trigger action, but thanks for helping to clear this up.I suspect the fuzziness is due to the way I have the scope leads earthed on only one lead rather than oscillation in the OpAmp, but I'll try your suggestion. The power supply is smoothed by a 30uf cap on the regulator, but no decoupling capacitor at the OpAmp, so I'll give it a try.

author: cravenhaven
author_rank: Contributor
timestamp: February 18, 2023, 11:09:25 pm
content: Thanks MasterT,I'm probably not quite understanding the significance of your tests, but I really appreciate you taking the time.In your first picture, the rise in the +ve input is 'after' the output has switched, whereas in mine it is before the output switches.I have some old MC34072 Opamps so I'll try with one of those this evening to see if it makes a difference.

author: Zero999
author_rank: Super Contributor
timestamp: February 19, 2023, 10:44:48 am
content: Quote from: MasterT on February 18, 2023, 05:57:16 pmThe circuit is a comparator, not a non-inverting amplifier, hence the positive feedback.Quote from: cravenhaven on February 18, 2023, 10:29:57 pmThe voltage on the non-inverting input should change. It's normal. Here's a simulation. What's odd on your oscillogram is the rise in the non-inverting input voltage, as the inverting input voltage approaches it.

author: cravenhaven
author_rank: Contributor
timestamp: February 19, 2023, 11:25:36 am
content: Thanks Zero999, I agree about the V+input voltages. What I didnt understand (and still dont) is why it changes with the V-input.I took the advice of MasterT and swapped in a different device, an MC34072, and it works as it should, as Zero999's simulation showed.Thanks everyone for the help. I had assumed my design was in error and would never have thought to suspect the OpAmp.

author: MrAl
author_rank: Super Contributor
timestamp: February 19, 2023, 12:27:29 pm
content: Quote from: cravenhaven on February 19, 2023, 11:25:36 amOne question i would have is did the circuit work before as expected except for the unusual rise in voltage at one of the inputs?That is, disregarding the rise in input voltage, did the output change when it was supposed to or not?

author: magic
author_rank: Super Contributor
timestamp: February 19, 2023, 01:15:40 pm
content: It looks like IN+ decreased when IN- went significantly lower and returned to normal when IN- approached it.Possibly something to do with internal protection circuit, although it isn't exactly the usual behavior of such circuits.Everything should still work as designed.

author: cravenhaven
author_rank: Contributor
timestamp: February 19, 2023, 10:27:07 pm
content: Yes the cct worked, but the cutoff temperature was lower than expected because the resulting 200mV change in threshold amounted to approximately 4 degrees.

author: cravenhaven
author_rank: Contributor
timestamp: February 19, 2023, 10:31:43 pm
content: Quote from: magic on February 19, 2023, 01:15:40 pmI dont think that is correct. I think you are implying that the IN+ was affected by the low IN-, but if that was the case you would expect the IN+ to follow the IN- from its low point, whereas it is only following near the point of equality.

author: magic
author_rank: Super Contributor
timestamp: February 20, 2023, 04:18:44 pm
content: There is only one way to know for sure: disconnect the chip, see what's the voltage coming from the divider.Connect the chip, see if the voltage gets too high when the other input is high or too low when the other input is low.