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
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.
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.
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.
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.
Also, the combination of the op-amp and diode here can be thought as of an "active zener diode" with Vz = Vref.
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.