# Bi-colour LED resistor value

I am trying to calculate a suitable resistor to give about 2mA to the a bi-colour LED in the following configuration: 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: 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?

• If you plan on building this [bi-color LED], I strongly suggest you get one of the LEDs and experiment with resistor values. Reason being, various wavelengths are perceived differently - while current could be exactly 2mA each, one can still seem far brighter than the other. Oct 7, 2020 at 15:43

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

replace SW1 with your GPIO directly. simulate this circuit – Schematic created using CircuitLab

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

• Thank you for this, it does give 2mA for the green diode but not the red diode. (when the TTL is in the "low" state). I have calculated that for 2mA (approx for an ideal diode, Vsource=5V, VTTL H=5V) there is one intersection that gives R2 as approx 443.93 and R1 as approx 510.75. This seems to be correct using circuitlab. Oct 9, 2020 at 10:10 Figure 1. Image source: 1 GPIO, bi-colour, 2-pin LED.

Try converting the parallel resistors into an equivalent voltage source. simulate this circuit – Schematic created using CircuitLab

Figure 2. When R1 = R2 then the equivalent source voltage is V/2 in series with R/2 (R1 and R2 in parallel).

If we take Vf = 2 V as an average for the red and green we will then have 0.5 V across R1/2. You want about 2 mA so from * R1/2 = V/I = 0.5/2m = 0.25k* so 250 Ω. Since the two resistors are equal you'll use 500 Ω.

Try that and see how it looks.

• Thank you for your help. I follow the last part (assuming Vf etc..) but I'm not sure I understand the equivalent voltage source part. Could you explain it in a little more detail? Also, doesn't this calculation only calculate the scenario when the TTL pin is low? Won't the equivalent circuit be different when the TTL pin is high? Oct 7, 2020 at 15:53
• when the current will flow through R1/2 then a voltage drop will across R1 or R2. it won't be 2.5V anymore Oct 7, 2020 at 16:28

An old fashioned TTL high is not +5V, it could be only +2.4V and still be valid. A TTL low can be +0.4V.