6

I have constructed the buffer below. In this setup the output of the op-amp is stuck at whatever the voltage supplied to its power rails is. When I replace the diode with a resistor I am able to get the input signal at the op-amp's output. Why does the diode make this a steady voltage?

schematic

ocrdu
  • 8,705
  • 21
  • 30
  • 42
  • 5
    Diode will allow current only in the forward direction whereas resistor will allow current in both directions. Think on those lines and you will understand – sai Mar 10 '23 at 01:21
  • 3
    IMO, this is a case where the diagram would be easier to understand if you added the [_parasitic capacitance_](https://en.wikipedia.org/wiki/Parasitic_capacitance) between the op amp's `+` input and ground. There _effectively_ is miniscule capacitance between pretty much every conductor and every other conductor in any real circuit. In low frequency (sub-gigahertz) circuits, we often can ignore such small values, but in this case, the diode charges up the parasitic capacitor to the peak of V1's output, and the op-amp's input impedance is so high that there is no path for it to discharge. – Solomon Slow Mar 10 '23 at 01:30

3 Answers3

6

Real op-amps are not ideal, and there is typically a small amount of current going into or out of the input pins. Typically, this bias current is in the nano-amps or pico-amps range.

In this case, if the bias current is going out of the pin, then it can't flow through the diode, and the voltage is likely to go towards the positive power rail.

Try reversing the direction of the diode and see what happens.

Also, with the diode pointing towards the op-amp, try adding a large value resistor (like 100 kΩ) to ground. Even that should be able to overcome the bias current and allow the op-amp to track your V1 input.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
user4574
  • 11,816
  • 17
  • 30
6

This is a tough question to answer without referring to lots of stuff like Kirchhoff's laws, and Ohm's law, and impedance and wotnot, but I'll give it a shot. Forgive me if any of this seems obvious, I have no idea what you don't know.

Let's start with a few facts about the diode.

The diode does the trick of appearing to be one thing under certain circumstances, and another very different thing under other circumstances. What I am about to say is a very rough and approximate model, but it's close enough for this answer. If the cathode (negative) end of the diode has a higher potential (voltage level) than the anode, then the diode acts as if it's not there. There will be no connection inside the diode between its two terminals. It might as well be air.

If, however, the potential of the anode rises to equal, or tries to exceed its cathode's potential, it becomes a very low resistance between its two terminals, like a wire, like a short circuit (not strictly true, but close enough). This "wire" acts to join the two ends together, just like a wire, which brings the potentials together, to equalise them. In becoming a really good conductor, it is preventing the two ends from having different potentials.

Then, when something on the anode side tries to raise the anode potential above whatever's on the cathode side, or something on the cathode side tries to lower cathode potential below the anode, it becomes a tug-of-war between the systems on either side, because the diode literally joins the opposing systems together.

I'll redraw your circuit with some annotations to help with the explanation:

schematic

simulate this circuit – Schematic created using CircuitLab

What happens if the potential at A, \$V_A\$ is greater than the potential \$V_B\$ at B? In this state the diode's anode is higher in potential, and the tug of war is on. Who will win? The anode wins, because the purpose of a voltage source (in this case, V1) is to impose a potential difference no matter what. It can be likened an immovable object, firmly attached to immovable ground, with enough "strength" to overcome any attempt to alter that potential difference.

The diode's anode potential, \$V_A\$, is always going to win in any battle with something on the cathode side. If the team on the cathode side is trying to lower cathode potential \$V_B\$, to some value less than \$V_A\$, it will lose, and B is stuck at \$V_B = V_A\$.

You see that if \$V_A\$ rises, and circuitry on the B side is trying to "pull" or "set" \$V_B\$ to some lower value, then \$V_B\$ gets "dragged" upwards too, in spite of team-B's efforts. The circuit looks like this:

schematic

simulate this circuit

When team B is trying to raise \$V_B\$, though, things are different. With \$V_B > V_A\$ the diode's behaviour changes to that of literally disconnecting A-side from B-side, cutting the tug-of-war rope.

The circuit becomes:

schematic

simulate this circuit

In this situation team B is able to set whatever potential \$V_B\$ it likes, so long as it's not lower than \$V_A\$.

Now let's talk about the op-amp.

To the outside world, the inputs to an op-amp appear (ideally) to be unconnected to anything else inside that IC. From the outside, that pin on the IC is just a piece of metal. Clearly, that's not true, because the op-amp is somehow able to "know" the potential of that pin, but for all intents and purposes, it is safe for us to say the pin is "floating", all alone, with nothing to define ("set") its potential (voltage level).

Given that the non-inverting input, node B, isn't being pulled or pushed anywhere, because it's not even connected to anything except the diode, everything I've just said is moot! I mean, what even is the potential at B, considering no-one on team-B is in any control of it?

I would hazard a guess, that since your output C seems to be stuck near one of the supply rail potentials, and is unrelated to A, that rail must be the positive one, since that's the case when \$V_B > V_A\$. If it were the other way around, the diode would be "on", and you'd see some version of signal A at node C.

The problem you have is that in that last circuit above, there's nothing to set the potential of node B! Node B is literally free to set its own potential, as long as it's above A. Let me make another guess; if you touched that non-inverting pin with your finger, you'd see the output at C flapping up and down wildy, as your own body couples the noise of the entire universe onto that pin, because there's nobody else around to say otherwise! Read my answer to the question "Has anyone measured what a high-impedance pin looks like?", to understand this concept.

To answer your question directly, the reason the diode causes the behaviour you observed, is not really due to the diode, it's more a result of the idiosyncrasies of the particular op-amp you use under the condition where its non-inverting input is effectively floating.

We know that team B can win the battle for control of node B when it "pulls up" beyond A, but it never does this. In its current configuration, no member of team B ever pulls or pushes B anywhere. How do we prevent this state where node B is "floating"? One way:

schematic

simulate this circuit

A new member R1 is part of team B, now, gently tugging node B towards zero volts potential. Ultimately team B loses, if ever \$V_A\$ rises above zero, but wins otherwise. Node B is never floating, and will not suffer the fate described in that answer I linked to.

Now \$V_B=V_A\$ when \$V_A > 0\$, but \$V_B=0V\$ when \$V_A < 0\$.

If I put a sinusoidal source to control \$V_A\$, as you did, we can simulate this:

enter image description here

The input, \$V_A\$, is blue, and \$V_B\$ is shown in orange. This is a half-wave rectifier.

The moral of this whole story is: never create a situation in which an input may be "floating", unless you know that it's safe to do so. For an op-amp it is usually not safe to do so.

Simon Fitch
  • 27,759
  • 2
  • 16
  • 87
  • Very imaginatively written... I wonder what could make someone write like that, what is their motivation to do so? – Circuit fantasist Mar 11 '23 at 18:58
  • 1
    @Circuitfantasist The last 15 years of my career has been in teaching, and I spend a lot of time finding analogies. Sometimes, the maths can take a back seat. Thanks for the kind words. – Simon Fitch Mar 12 '23 at 05:04
  • Simon Fitch, Thanks for the reply; I was under the impression that for some reason you avoid contact (maybe because it is not tolerated here). I have worked for 40 years only as a teacher in the same technical university that I graduated from and all this time I have been doing what I am doing here... but I have been a hobbyist and inventor since my school years. I asked you because I saw a striking similarity in our way of thinking, explaining and illustrating circuits (for example, the humble R1-R2 network). I wish you continued success in this direction! – Circuit fantasist Mar 12 '23 at 09:15
  • 1
    @Circuitfantasist It's frustrating not being able to talk to others at a personal level, and I'm not sure how one would go about establishing contact within this "forum", or how one could do it without putting an email address in plain sight. If you have any ideas, I've no objection to talking to people here. In fact there are a couple I'd dearly like to chat with. – Simon Fitch Mar 12 '23 at 09:23
2

I tried it with two op-amps (081 and 741), with two diode directions and 1 V DC input voltage source.

Apparently the 081 input bias currents are outgoing and create a large drop across the so-connected (backward-biased) diode, hence the positive voltage at the output.

schematic

simulate this circuit – Schematic created using CircuitLab

schematic

simulate this circuit

Conversely, the 741's input bias currents are inbound and the output voltage is negative when the diode is reversed (backward-biased).

schematic

simulate this circuit

schematic

simulate this circuit

Circuit fantasist
  • 13,593
  • 1
  • 17
  • 48