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


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.

  • \$\begingroup\$ Sorry just edited. Micro output 5V, 2.5V source. Difference is 2.5, current will be 2.5 / r parallel. R parallel = 83.3 ohms. Ear R is 167R \$\endgroup\$ – user1582568 Jan 27 '16 at 4:31
  • \$\begingroup\$ 4.30am here and having trouble typing, finally got the right text! \$\endgroup\$ – user1582568 Jan 27 '16 at 4:33
  • \$\begingroup\$ The formula is (V ÷ A) × 2 then? Why is it doubled? \$\endgroup\$ – HighInBC Jan 27 '16 at 4:40
  • 1
    \$\begingroup\$ Take the thevenin equivalent of your divider. It will be 2.5V in series with the parallel combination of the two resistors. We calculated that we want the equivalent circuit to be 2.5V plus 83.3ohms. The parallel combination of 2 equal resistors will be half their value, so each resistor must be twice the required parallel value. A couple of other points, although the LED Max current is 30mA it will most likely perform well at a lower level. Is your micro output capable of 30mA? \$\endgroup\$ – user1582568 Jan 27 '16 at 4:46
  • \$\begingroup\$ I am having a bad morning here, I forgot to subtract the 2V LED drop this time, answer edit coming up \$\endgroup\$ – user1582568 Jan 27 '16 at 4:54

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.