Electrical – How to calculate the resistor value for a bicolor led

ledresistorsvoltage divider

R4 and R5 have equal values. For both LEDs the forward voltage is 2V and the forward current is 30mA.

I know how to calculate the correct resistor for a single LED. However in this case I am using a voltage divider to create a 2.5V line so that the bi-color LED can show red or green when LOGIC is 0V or 5V. I am confused as to how to calculate the correct values for the two resisters.

I would appreciate a formula explaining how, and an explanation as to why it is that way.

Datasheet for the LED

Bi-color LED schematic

Best Answer

We need a source that provides 30mA with 0 or 5V. The voltage at the divider output will be 5V - 2V = 3V ( or 2V if 0V is applied). So we have a 0.5V variation for 30mA. The equivalent source will be 0.5V / 30mA = 16.7 ohms. Each resistor must be 33.3ohms to give parallel combination of 16.7. This will only work if the micro source impedance is low.