Electronic – Bi-colour LED resistor value

ledresistorsttlvoltagevoltage divider

I am trying to calculate a suitable resistor to give about 2mA to the a bi-colour LED in the following configuration:

schematic

simulate this circuit – Schematic created using CircuitLab

The LED package I am looking at is the L-113SRSGWT (Datasheet here). The Red LED has a typical Vf=1.85V and the green LED has a typical Vf=2.2V.

The idea being that one LED will turn on when a "high" TTL voltage (approx 5V) is applied and the other LED will turn on when a "low" TTL voltage (approx 0V) is applied.

I found a similar question here however I did not quite understand the calculation steps provided. (I have not decided which LED will face which side, I wanted to calculate it first for a rough idea)

The datasheet also does not provide a reverse voltage case for the LED's but I assume that the LEDs will protect one another in the forward and reverse voltage cases. But to be sure, how would I calculate that?

As the two LEDs have different voltage drops this would mean (strictly speaking) I would need two separate resistor values for R1 and R2. But I want to keep them the same for simplicity.

I did a quick calculation for the resistor values with the Red LED Anode facing the TTL logic side and a "high" logic is applied (5v) and got the Thevenin circuit equivalent as:

schematic

simulate this circuit

As R1=R2, RT=2*R2. Assuming 2mA current, I got RT=V/I= 3.15V/0.002= 1575 Ohms. So R1 and R2 should equal approx 787.5 Ohm. Is this correct, or have I misunderstood?

Best Answer

Simulate this and you will get 2mA in both the LED.

replace SW1 with your GPIO directly.

schematic

simulate this circuit – Schematic created using CircuitLab

All resistor value hard to find so use, R1 = 3.7KΩ & R2 = 1.1KΩ