# How is a diode used to regulate voltage? Hi all, I was wondering how a diode is used to control the voltage here? Assuming the voltage coming in from the left is greater than the reference voltage provided by the potentiometer, the diode is somehow acting to ensure the voltage going out is equal to the reference voltage. How does it do this, and if I tried to create this in real life what should I watch out for when choosing a diode part? Thanks simulate this circuit – Schematic created using CircuitLab

Figure 1. (a) The basic voltage follower. (b) Still a voltage follower. (c) The modified follower.

• (a) Vout = VR1. It's just a voltage follower.

• (b) Vout = VR3. It's still just a voltage follower but with the added work of fighting whatever VIN and R4 are providing.

• (c) If VIN ≤ VR5 then the op-amp output will swing high and D1 will be reverse biased. The op-amp will have no affect on VOUT.

If VIN > VR5 then the op-amp output will start to swing low until the inverting input is equal to the non-inverting input. The effect is that OA3's output will settle at 0.7 V or so below VR5 and VOUT = VR5.

Andy has made some good suggestions on diode selection.

• (b) is an interesting case. Actually, Vin by sinking/sourcing current through R4 from/to the op-amp output tries to change its voltage. So it acts as a kind of an "input disturbance". But the op-amp successfully copes with it and eliminates it. But if you insert another resistor between the op-amp output and inverting input, the op-amp will be forced to change its output voltage more to overcome this new disturbance. Thus we come to the idea of the inverting amplifier where two voltage sources (Vin and Vout) fight through resistors (R1 and R2) to change the voltage of the inverting input... – Circuit fantasist May 23 '20 at 14:44
• I remember when 0A3 was a gas filled voltage regulator tube. – richard1941 May 28 '20 at 21:53

Because of negative feedback, the op-amp will try to keep the signal level between inverting and non-inverting inputs at 0 volts differential. So if the +V input (reference) is at +2 volts (for instance), the op-amp will try to put +2 volts at the -V input.

But, because of the diode, the op-amp can only pull current away from the -V input node so, if the real input voltage (to the left of your diagram) is below +2 volts, no amount of pulling by the op-amp is going to change the voltage at -V in.

However, if the real input were (say) +3 volts, then the op-amp can drag current via the diode (and input resistor) and achieve its aim of keeping + 2 volts at the -V input.

what should I watch out for when choosing a diode part?

Choose a high-speed low capacitance diode like the 1N4148 or 1N914 or BAS16. Don't bother thinking about 1N400x diodes because they are too slow.

• The op-amp sinks current from the input voltage source. The op-amp input bias current can be either sinked from or sourced into "-V input" depending on the type of the input transistors. Its path is through the input source, the load and the diode when forward biased. – Circuit fantasist May 23 '20 at 14:12
• I'm going to add the word node and hopefully you can stop what I see to be pointless behaviour. So "-V input" becomes "-V input node". – Andy aka May 23 '20 at 17:18
• Never, ever modify any of my answers or questions. If I find that there are cases, I will be genuinely disappointed. It’s completely rude in my book to do this without telling me. So, if you have done that, now is the time to own up. If, in the future, I stumble across answers that you have modified and you have not previously told me, I will flag this event to moderators and I shall not be as kind hearted as I am now. Simple rule - stay away from my answers. – Andy aka May 23 '20 at 20:08
• @Circuitfantasist editing other users' answers can be fine, but only to fix obvious mistakes, not to change the meaning of what they wrote. Please respect Andy's work. – clabacchio May 25 '20 at 12:55
• @Circuitfantasist whatever you think of Andy, it's his answer and if he doesn't agree with your edit you should just leave it be. Feel free to answer yourself if you want – clabacchio May 25 '20 at 15:29

That circuit is more of a “clamp” than a voltage regulator. The output voltage will be the input voltage or a fraction of the 9V set by the pot, whichever is lower.

There is no reference, so it’s not really a voltage regulator.

The diode is not very important except you would like it to be low-leakage if the resistor value is high (and the op-amp has to able to sink the current from the resistor, so you don’t want it too low). A common switching diode such as LL4148 will do in many cases, but there are special situations.

The clamping speed will generally be limited by how fast the op-amp comes out of saturation at the negative rail, different op-amps vary and you cannot assume it will be at the datasheet slew rate.

• This circuit is rather "limiter" or "clipper" than "clamp"... but perhaps this is more a matter of terminology. If V+ is stable (reference), it can be considered as a kind of voltage regulator when the diode is forward biased. Then it keeps its output voltage equal to V+ regardless of the input voltage variations, load variations and Vf variations. – Circuit fantasist May 23 '20 at 14:25

I was wondering how a diode is used to control the voltage here?

The diode does not control the voltage here; it only allows the op amp to control the voltage.

Note something very interesting here - the circuit output is not the op-amp output. As drawn, it seems the circuit output is the op-amp inverting input!?! Of course, this is a joke... but it makes us think about what this circuit really is...

The combination of the diode and op-amp forms the so-called "ideal diode"... i.e., a diode with (almost) zero forward voltage drop VF across it. How does the op-amp do this magic?

By lowering the diode cathode with VF (0.7 V), the op-amp actually adds VF in series to the diode thus neutralizing the voltage drop VF. As a result, the voltage level when the output voltage stops changing is precisely equal to the reference voltage at the non-inverting input. simulate this circuit – Schematic created using CircuitLab

Also, the combination of the op-amp and diode here can be thought as of an "active zener diode" with Vz = Vref. simulate this circuit

The name of this circuit is "limiter" or "clipper". It freely passes the input voltage through the resistor to the load (voltage divider!) if it is less than Vref. If it exceeds Vref, the diode begins conducting and closes the negative feedback. The op-amp "pulls down" the diode cathode until V(-) = V(+) and the circuit (not op-amp!) output voltage is fixed at Vref.

Let's finally summarize the "recipe" for making "ideal" diodes with VF = 0. It is extremely simple: Connect a voltage source VF in series to the diode so that it neutralizes the voltage drop VF across the diode.

• Tip: to avoid the "circuits for the blind" effect on small circuits you can add 's', 'm' or 'l' before the .png in the markdown to force an imgur size. You have to undo it to edit the schematic again. Alternatively place a '.' or something over on the right to force the width which effectively scales it down. I use my $\color {green} t$ logo which helps me recognize my own schematics when I return to a question years later. – Transistor May 23 '20 at 16:07
• Thanks... I guessed that some parameters had to be set, but I couldn't find them. I really need to study this editor because I can't do without it. But you know, we're in a hurry to write something interesting and there's still no time left for that... – Circuit fantasist May 23 '20 at 16:55