# Dual voltage LED circuit

I am designing a board that will eventually be connected to a front panel with LEDs. In the meantime, I have a set of LEDs mounted on the board itself for debugging and whatnot. To debug this board I will be running it off of a 5v arduino, but my final circuit will be run off of a pic24 at 3.3v.

Here is what my circuit looks like:

During assembly and debugging, D2 will not be connected, so all current will go through D1. R1 is calculated to give 20mA through D1 at 5V. Once the panel is connected, D2 will be connected and R2 should give 20mA to D2 at 3.3 V.

What will happen to D1 at that point? My intuition says that current will not flow through R1 since it is higher resistance than R2. This is what I want. I definitely don't want to put 5V through after D2 is attached or I may overload it. I could just unsolder R1 and D1 once I am done debugging, but I would rather not.

Is this safe to do? I don't want to plan on this strategy under false assumptions and blow up leds. Is there any safe way, short of replacing R1 when switching, that D1 would still work once D2 is attached, so that it works at 5v or 3.3V?

• A simpler and better strategy could be to use a high brightness LED, so that the LED is still bright enough with the lower current at 3.3V (and isn't killed by the current at 5V). Nov 30, 2011 at 12:53

No, it doesn't work that way. The two LED strings are in parallel. That means the both see the 3.3V independently. Let's say the LEDs drop 2.0V, which appears is what you are assuming from your numbers. That means when SRC is 5V, there will be 3V on R1. 3V / 150Ω = 20mA as you said. However, when SRC is 3.3V, the same logic still applies. The LED will still take about 2V, so there will be 3.3V - 2V = 1.3V accross R1. 1.3V / 150Ω = 8.7 mA, which will be the current thru D1 when SRC is 3.3V.

If this extra 9 mA is of no consequence to your 3.3V supply, then you can simply leave R1 and D1 on the board. If the 9 mA matters, then you have to do something. Removing either R1 or D1 would do it.

Another thing to consider is that you don't need 20 mA thru D1 when debugging. You probably got that from the datasheet, which shows 20 mA as the maximum. That's a common value for small LEDs. However, it will still be plenty bright enough to see on your bench at 5mA. Since R1 is dropping 3V, it can be 600Ω to allow 5 mA to flow. Then at 3.3V you only get 2.2 mA thru R1 and D1. That's a lot less than 9 mA as you originally had it. If 2.2 mA is tolerable, then you need to do nothing more.

• Thanks for clearing that up. I may increase R1 a bit and then call it good enough. Nov 29, 2011 at 18:51
• @CMP: I'm not clear what you're asking, but a pullup resistor only has current thru it when the line is being held low. A pullup resistor disconnected from its line or with the line floating high draws no current. However, that is a rather different situation from your LEDs. Nov 29, 2011 at 19:05
• @CMP: I just answered a comment of yours that you apparently deleted as I was typing the answer. Anyway, your LED situation has little to do with pullup resistors. Nov 29, 2011 at 19:06
• Pretty much I got confused and stopped applying ohms law consistently. I read wikipedia on the subject and it cleared it up a bit. Nov 29, 2011 at 19:11

Assuming an ideal voltage source, then one, two, a thousand LEDs will make no difference to the current in each other.

For your example I'll assume a Vf of 1.4V and a voltage of 3.3V.

For D1, Iled will be (3.3 - 1.4) / 150 = ~12.6mA

For D2, Iled will be (3.3 - 1.4) / 56 = ~40mA

Removing one LED will do nothing to the current flowing through the other LED, it will remain the same (the total current drawn from source will drop though).
This is because the voltage across it stays constant (i.e. it still has 3.3V across it so according to Ohms law of I = V / R the current can't change)

• Just wanted to answer basically the same thing. Note: Even if a LED is rated at 20mA it will also light up with much less (even 5mA?). Nov 29, 2011 at 18:28
• Even 1 mA - but not very bright in most cases. Nov 29, 2011 at 23:00