How does this simple circuit work if the diodes are replaced by LEDs?

How does the simple circuit in the answer to

What is the simplest and best device (or circuit) to stop the flow of current in a line when current in another line is present? work? What I don´t understand is if both the diodes are LEDs,powered by some minimum voltage, then both of them would light up hence the circuit cannot work. But since the answer is marked as correct in that question-so where am I wrong? It is just a simple question. The circuit is given below as a circuit to switch between two different power supplies.

• Why do you think both LEDs would light? Commented Jul 2 at 14:43
• What makes you say that "hence the circuit cannot work"? It sounds like you've made a mistake in your reasoning somewhere, but I don't know what your reasoning is, so I can't tell you what the mistake is. Commented Jul 2 at 16:09
• D3 and D9 are not LEDs. Commented Jul 2 at 21:54

Short answer: as shown, this won't work hardly at all with LEDs swapped in.

Why? LEDs have a much higher forward voltage drop (Vf) than normal diodes, somewhere between 1.2 and 3.5V depending on wavelength. Compare to switching diodes which a have Vf of only 0.3V for Schottky or 0.7V for silicon.

The result is that the LEDs will cause the circuit to not put out a useful power voltage with the input voltages shown because they insert so much forward drop, especially if you choose super green, blue or white LEDs: shorter wavelengths that have forward drops of 3V or more.

For example, say you chose a red LED for 3.3V and white LED for 5V. Here's what would happen:

• 5V on: output would be 5V - 3.1V = 1.9V
• 3.3V on: output would be 3.3V - 1.8V = 1.5V

And the LED brightness? This would depend on the load resistance. With no load nothing would light at all.

Speaking of which, say you chose to jack up your power supplies to overcome the LED forward drops. You still need to mind the LED current as the power dissipated in LEDs is higher than a regular diode, again owing to their larger forward voltage drop.

As already mentioned the drop over a LED is too high. Also the current is very limited. Schottkys support much higher currents. This is how I would do it (for a low power application):

• That's kind of ok, but it doesn't show which power rail is supplying the load. I believe this is OP's intention. Commented Jul 2 at 18:25
• It basically is. D3 on, it's 5V rail. D3 off, D4 on, 3V rail. Both on 5V rail. @hacktastical
– S_G
Commented Jul 3 at 7:19

If both voltage sources are present, then D9 is in reverse bias so no current flows and the diode is not illuminated. I don't recommend this circuit since you are limited to the current of the diodes, the brightness depends on load, and the efficiency/output voltage is low.

How does this simple circuit work if the diodes are replaced by LEDs?

It doesn't work for its intended purpose. I imagine you want to retain the diode functionality, but add indication of which supply is powering the load. The circuit below accomplishes that.

R4 is balances the current between LD1 and LD2, so that roughly 2mA flows across the LEDs in both cases. That way the indicators have the same brightness. When 5V is present, the ≈3mA flowing through LD1||R4 biases LD2 in reverse even if 3.7V is present.

simulate this circuit – Schematic created using CircuitLab

If you'd like to avoid the forward voltage drop of a Schottky diode, reverse beta of transistors can be used. Q1 and Q3 are selected to have reverse beta of at least 15 or so. A bit of power is wasted due to the relatively high base currents of Q1/Q3, but the forward voltage drop is around 50mV or less.

Q2, Q4 and R2 form a comparator that switches Q1 on and turns Q3 off when +5V is present.

simulate this circuit

The circuit above works well under full load. But the base current of Q1/Q3 is constant and doesn't depend on the load current. Thus, under light loads, the base current may well exceed the load current. The efficiency of this circuit drops precipitously then.

Using op-amps, we can control the pass transistors to have a constant voltage drop (reverse saturation voltage) independently of the load current. Only enough base current will flow to maintain this low voltage drop and no more. Exploration of such a circuit could begin with:

simulate this circuit