3
\$\begingroup\$

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:

schematic

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?

\$\endgroup\$
  • \$\begingroup\$ 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). \$\endgroup\$ – starblue Nov 30 '11 at 12:53
5
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Thanks for clearing that up. I may increase R1 a bit and then call it good enough. \$\endgroup\$ – captncraig Nov 29 '11 at 18:51
  • \$\begingroup\$ @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. \$\endgroup\$ – Olin Lathrop Nov 29 '11 at 19:05
  • \$\begingroup\$ @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. \$\endgroup\$ – Olin Lathrop Nov 29 '11 at 19:06
  • \$\begingroup\$ Pretty much I got confused and stopped applying ohms law consistently. I read wikipedia on the subject and it cleared it up a bit. \$\endgroup\$ – captncraig Nov 29 '11 at 19:11
2
\$\begingroup\$

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)

\$\endgroup\$
  • \$\begingroup\$ 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?). \$\endgroup\$ – 0x6d64 Nov 29 '11 at 18:28
  • \$\begingroup\$ Even 1 mA - but not very bright in most cases. \$\endgroup\$ – Russell McMahon Nov 29 '11 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.