# Different LED for POWER ON and for LOAD ON, how to wire?

As you can see in the picture, for LED1 it's all good, 12v and 800 ohms = 15 mA to the led.

But i don't know how to wire LED2 since the load to the LED will change depending on the load/Vout of the supply. How can i wire LED2 in a smart way?

(I'm not gonna use this circuit, it's just for an example)

Update: The reason that i wanted this from the beginning was because i wanted a way to break the load "fast". If i use a switch before LED1 and turn the circuit off, Capacitor C7 and C8 will have to be emptied and that will make the voltage slowly decrease instead of going to 0 directly. So i was thinking of having two switches like this:

And when the load switch is closed = current can flow then i want some kind of indicator (LED) in this case to light up and stay that way until i open the switch again, the lowest voltage possible is 1.25v, and the highest voltage in my case is around 18v. And i want the LED to stay on no matter what voltage i choose between 1.25 > 18v.

Also I'am a beginner in eletronics, so i apologize that i was a bit unclear. Please comment if you need me to add any more info regarding this.

• I would just also use an 800 ohm resistor for LED2 as it is in that schematic. LED2 will just change brightness according to the voltage you set at the output but still light up as long as Vout is higher than 2.5 V or thereabouts. – Bimpelrekkie Mar 24 '16 at 10:21
• I see, But since this is an LM317 the minimum voltage is 1.25 (with that voltage the LED will turn off) – Xane Mar 24 '16 at 10:24
• That is correct. If you want to fix that then you should feed LED2 from the 12 V at the input and use an NPN transistor to switch it on and off. Then LED2 can be on even when Vout = 1.25 V. But de note that LED2 does not add much information, it will only be off when 1) no LED1 is also off 2) The LM317 is broken or shuts down 3) you short the output. But if that is what you need then the transistor solution is usable. – Bimpelrekkie Mar 24 '16 at 10:45
• Sorry for the lack of info, basically what i want is that when PR1 (wire to the far right) Have any voltage across it, i want LED2 to be turned on. When no voltage goes through it i want it to be off. – Xane Mar 24 '16 at 11:11
• You really shouldn't accept a answer so quickly. Others may have different things to say, but probably won't bother when there is already a accepted answer. I know that's what I do. – Olin Lathrop Mar 24 '16 at 11:18

First, 12 V into 800 Ω in series with a LED does not result in 15 mA. You are forgetting the LED voltage drop. Figure 2.1 V for a green LED. That leaves 9.9 V across the resistor. (9.9 V)/(800 Ω) = 12.4 mA. However, that's still fine. For most circumstances, even 5 mA is enough to light a indicator LED.

To figure out how to light LED2, you have to first specify when it is supposed to be lit. Should it light when the voltage is at least 90% of the intended value? Just light as long as there is any meaningful voltage on the output? Something else? It's not clear, since there isn't much point in the second indicator anyway. What is it supposed to show you that the first indicator won't?

Let's say the purpose is just to show there is some meaningful voltage on the output. The indicator will then tell you that the load isn't shorting the output, or that the regulator isn't in thermal shutdown. The basic problem is that the output voltage varies quite a lot, and you want the LED to be fairly constant.

Here's a quick and dirty circuit that should still be good enough:

The basic concept is to run Q1 as a fixed current sink. With the values shown, this current should be around 6 mA. This is the current thru the LED as long as the output voltage is above a minimum value in the 1.5-2.0 V range. The LED current won't change much as the output voltage varies above that.

This works by D2 and D3 forming a fixed voltage source when enough current flows thru them. This current comes from Vout, with R1 limiting it to a safe value. With Vout at 2 V and above, the voltage at the top of D2 should be reasonably constant.

The base of Q1 is held at this voltage. The B-E drop of Q1 and the drop across D2 should be about the same, so the drop across D3 appears across R2. With 700 mV across R2, 5.8 mA will flow thru it. Most of this comes from the collector of Q1, which comes thru D1.

Higher values of Vout just cause more current to flow thru D2,D3, but the voltage across these won't change much. There will be some change and temperature dependence, but the current thru the LED will be fixed well enough to serve its indicator function. This is a case where ±25% is still good enough. You'd need to see two LEDs side by side to notice a 25% difference in brightness.