Electronic – Opamp: current flow in supply legs


Can somebody enlighten me on when and how much current flows in/out of the supply and/or ground leg of an opamp?

What happens if there are resistors in those legs?

Update 1:
Here is the circuit that sparked my curiosity: (from the opamp's datasheet)
enter image description here

Thanks to Jason's answer I understand how the circuit works to create the output but I am not clear on how the clipping voltage can be found.

Also: why does clipping occur at all – rather than the opamp just switching off due to a supply range that is too small?

I.e. The max sink current is 500µA. Assuming a very large Isense, this means max(Vout) = RB*500µA: this can easily be 5V. Assuming Vsupply = 3V, this should push the supply range quickly below its required minimum and switch off the opamp. – Resulting in a on/off oscillation, no?

Best Answer

Good question!

There is no ground leg of an opamp: there's a positive and a negative supply rail, and the current through each of them is roughly as follows:

$$\begin{aligned} I_{s+} &= I_q + \max(I_{out}, 0) = \max(I_q, I_q+I_{out})\\ I_{s-} &= I_q + \max(-I_{out}, 0) = \max(I_q, I_q-I_{out}) \end{aligned}$$

where Is+ is the current into the + supply terminal, Is- is the current out of the - supply terminal, Iq is the quiescent current specified in the datasheet, and Iout is the current flowing out of the output.

So, for example, if Iq = 1mA and Iout = 3mA, then Is+ = 4mA and Is- = 1mA; if Iq = 1mA and Iout = -3mA then Is+ = 1mA and Is- = 4mA.

This is because opamps are linear and use pass transistors in their output stages: positive output current = sourced current has to come from the + supply terminal, and negative output current = sink current has to go into the - supply terminal.

I say "roughly" because there are two other factors:

  1. Input currents are never exactly zero -- if they're picoamps or nanoamps you can probably ignore them, but if the opamp is a bipolar opamp and the output is saturated (inputs are unequal) then the input current could potentially be larger than the specified input bias current, and could be significant enough that you can't neglect it. You'd have to know which polarity the input currents are: with PNP input stages, input current would be negative (current coming out of the inputs) and therefore add to the current from the positive power supply terminal; with NPN input stages, input current would be positive (current going into the inputs) and therefore add to the current exiting the negative power supply terminal.

  2. Quiescent current isn't exactly constant, and can vary somewhat with operating point (especially if the opamp is in saturation, or if the output load is large).

What happens if there are resistors in those legs?

Then your supply voltage will vary somewhat due to the IR drops, depending on load current. Don't do this without two things:

  1. You must understand completely what the load current is, and make sure it doesn't cause enough IR drops to make a significant difference in the circuit capability (e.g. op-amp saturation range contracting, or worse yet, opamp failing to work at all because supply voltage range drops below that for which it's guaranteed to work).

  2. For goodness sake, put bypass capacitors between the supply voltage pins to your signal ground, so that AC supply current variation won't cause AC supply voltage variation that couples into your circuit.