# Transistor Ohms

I've built the circuit in the schematic below to control my TV, the D1 and D2 LEDs are the two mini LEDs from this IR Extender:

I've cut it below the female headphone jack and I'm using my Raspberry Pi using LIRC to send commands. Everything works great except that I'm not sure about the two 10k Ohm resistors.

For the BC547b transistor I saw the max mA for the base was 100mA so I thought that for the 3.3V an R1 of 70Ohms would be about 47mA and would be safe. However when playing around with it more I found that even with the 10k Ohms resistor (0.33mA) it still worked.

Would this 10k resistor be safe to use and not cause any issues that for example the current is too low, or should I stick with the 70 Ohm resistor? Better would probably to actually calculate the best R1 value?

With the LEDs (R2) I just tried a number of resistors and the 10k Ohm still worked and isn't too bright as with for example a 2.7k Ohms resistor. Could the 10k resistor influence the lifetime of the LEDs?

• I'm looking at this with a mobile device or I would provide a more elaborate answer, but I just wanted to point out that with an NPN transistor in saturation has the equivalent of a diode forward voltage drop (~700mV) between the emitter and base when the emitter is grounded. That being said, the base current is actually '(3.3-0.7)/10000 = 0.26mA'. Also, driving LEDs at higher power certainly reduces the device's life. Jul 5, 2014 at 19:24
• That schematic can never work. Your LEDs are backwards. What is the forward voltage $V_f$ of the LEDs? Jul 5, 2014 at 22:32
• Yes, Wouter van Ooijen also mentioned this below. In the actual circuit I did put the LEDs in correctly as I had a working circuit already! Jul 6, 2014 at 10:45
• Why not edit your schematic to show the circuit you actually built? Jul 6, 2014 at 15:07

Steps to design:

1. The collector current of the transistor is given by $$I_C=\frac{5V-V_{D1}-V_{D2}-V_{CEsat}}{R_2}$$ Where $V_{D1}$ and $V_{D2}$ are the forward drop of LEDs. $V_{CEsat}$ is around 0.2V for BC547.
So first fix the value for $I_C$ by selecting a value for $R_2$. The value of $I_C$ must be less than the maximum collector current of the transistor (100mA).

2. Find the base current of the transistor as: $$I_B=\frac{I_C}{h_{fe}}$$ This is the minimum base current required to place transistor in saturation. From the circuit, $$I_B=\frac{3.3V-V_{BE}}{R_1}$$ Where, $V_{BE}$ is 0.7V.
So design $R_1$ such that $I_B$ is sufficient to make the transistor put into saturation.

High current flowing through the LEDs can reduce the life time. So choose $R_2$ wisely. The datasheets of LEDs will give the current ratings.

• Thanks for the info! Unfortunately I don't have the datasheets for both the LEDs (they look smaller than the separate IR LEDs I bought in the store) and the transistor (it just says BC547b on the transistor but no manufacturer). Jul 5, 2014 at 19:54
• @PietPaulus you can use datasheet from any manufacturer for BC547. I can not help with the LEDs. Typically a current of 5-10mA is fine for LEDs. Jul 5, 2014 at 20:03