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?