Incomprehensible behavior of TL062
I'm a beginer when it comes to electronics.
Few weeks ago I became interesting Op-Amps so Bill's video appeared at the right time and help me
understand thiese ICs.
When I played with TL062 I found something I can't undestand.
I connected invering and non-inverting input togeder and then to the ground and I expected output
voltage will be close to ground (bacause difference between inputs is almost to 0V) but when I check
it was close to Vcc.
When I connected both inputs to Vcc output was close to ground.
I thought maybe I bought damaged one so I took another.
Any time results was the same.
TL062 is connected to single positive supply voltage.
Could someone can explain me why output voltage is "inverted"?
Why are you connecting the two inputs together and then to the ground or Vcc?
To understand better you might like to make your own op amp using discrete components and then you can "see" how it works if you understand transistor operations. Do you understand how an input voltage is inverted in a common emitter circuit?
A search for you question on the internet,
"A perfect op-amp would output exactly zero volts with both its inputs shorted together and grounded. However, most op-amps off the shelf will drive their outputs to a saturated level, either negative or positive."
I'm very much of a beginner noob in electronics too, but I see you say " because difference between inputs is almost to 0V ". My understanding is 'almost' is not zero so any difference will cause to output to max out (one way or another) unless there is a feedback mechanism.
I find its often handy to peruse several educational sources when trying to understand this stuff. I link to a video where using op-amps is spread over a series of 8 or so video and is well explained for us noobs. Give it a look and see if it helps. I found it pitched at the right level for me.
As the above replies already indicate, using an op-amp without a negative feedback connection (often a resistor or even a direct connection between the output and the inverting input, although more complex alternate circuits are also common) is an 'unrealistic' circuit for most purposes, as the very high gain of this configuration means that any tiny voltage difference, including offset voltages within the op-amp itself will be enough to drive the output to one of the supply rail voltages.
Note that the first few sections of Bill's (dronebot-workshop) article ( https://dronebotworkshop.com/op-amps/) is only introducing the subject, not explaining practical circuits.
I suggest you start by doing some experiments with an op-amp in realistic circuit configurations. I am sure if you follow Bill's entire article then the entire subject will become clearer.
Please note Bill is covering a huge range of information in just one video + blog, so be prepared to take it slowly and patiently if this is new to you - it may be quite hard to understand at first, but it will be worth it.
If you get stuck on a particular point, then please post another question.
Best wishes, Dave
@byron thanks for link to a video. It is very helpful.
Story of TL062 started from building current source for drive power LED (op-amp in realistic circuit). When non-inverting input was connected to reference voltage current on LED was very close to the target (everything works as expected).
I thnked to find how turn off this LED. The simplest way seemed to connect non-inverting input to ground - op-amp turns off transistor to get 0V on invering inut.
But when I connected non-inverting input to ground very strange thing hapened. The LED was still lit and current was only few mA less than before. I swaped TL062 to LM358 and everythings back to works as expected so I blamed TL062 and focus on test it.
At that time probably I suffered brainstorm 😀 because I start testing op-amp without feedback loop.
When I rethink this after all yours replays I realized how irrational idea it was.
I suggest you start by doing some experiments with an op-amp in realistic circuit configurations.
As DaveE suggest I start again with more realistic circuit with only TL062 and couple resistors (non-inverting amplifier with gain equal 2).
When Input is 5V, inverting input also is 5V and Output is 10V - perfect
But when Input is 0V (GND), inverting input is 5V and Output 10V - OK, 5 times 2 gets 10 but difference between inputs is 5V. I suspected voltages on inputs will be the same (0v in this case).
Could you explain why inputs voltages aren't not the same?
Could you explain why inputs voltages aren't not the same?
I haven't used the TL062 op-amp, but a quick glance at the data sheet shows the following table (click on the picture to enlarge it) from:
This shows that the power supply should have both a negative rail and a positive rail, with 'Ground' in the 'middle' as 'zero' voltage.
So instead of (say) 12V and 0V, it expects +6V and -6V, to be connected to the power supply pins, and the input and output to be referenced to the 0V (ground line)
You may wonder how this differs from the arrangement you have, since the 0V ground does not actually connect to the chip itself,with the +6V and -6V...
The clue is in the same table ... the 'Common Mode ... ' line in particular, which says the minimum voltage on an input pin should be (Vcc- + 4) and the maximum voltage on an input pin should be (Vcc+ - 4)
If Vcc- is -6V, and Vcc+ is +6V, then these limits would be (-6 +4) = -2V and (+6 -4) = +2V
That is, when the supply pins are -6V and +6V respectively, then the input pins should be kept in the range -2V to + 2V.
When you use the 0V and +12V supply rails shown in your sketch, then the same rules apply, but you have to do some 'maths' to figure out the equivalent voltages if you measure with respect to the 0V line.
Namely, the allowed input pin voltage range becomes (-2 +6V) = 4V through to (+2 +6V) = 8V
So connecting the input pin to 0V, is connecting it to a voltage 4V below the minimum voltage that it is expected to work, so it will not work correctly.
Note, if you ensure the input voltage supplied to both input pins is kept within this range, it should work correctly, but you may find it confusing.
Remember, it is the difference in the voltage applied to the amplifier inputs that determines the output voltage, and this only applies to input voltages in a certain range ... if either or both input pin voltages is/are outside of that range, the output voltage can be very 'unexpected'.
Some op-amps are 'designed' to be powered by dual rail voltages, with '0V' being in the centre. e.g. the TL062 requires dual rail supply in the range +5V & -5V through to +15V & 15V.
It is possible to use these devices with a single rail, but they may not work properly when the input voltage goes below a certain value, such as +4V, which may not be compatible with the driving circuitry.
(There is likely to be maximum input voltage as well ... for the TL062 this limit is 4V below the positive supply voltage.)
If you wish to do some experiments with your TL062, but don't have a suitable power supply, consider using two small alkaline 9V batteries to give you +9V & -9V supply.
Alternatively, choose another op-amp whose input common mode extends over the full supply range (including 0V).
Note also, supply pin(s) should have a decoupling capacitor(s) to minimise problems. You will probably be able to do some simple experiments without them, but their absence can cause circuits to fail to work properly without warning. This subject is a whole 'lesson' in its own right, so I'll leave you to research it separately!
Best wishes, Dave