# NPN Transistor with Diode logic

I'm trying to learn how to use transistors to amplify current and I can't wrap my head around how to use them with diodes, specifically LEDs which display nonlinear properties. I know that they have IV curves, meaning that doubling voltage won't mean only a double in current. It will be much more.

How do transistors deal with diodes?

simulate this circuit – Schematic created using CircuitLab

I learned that (generally) the collector current is Beta * Base current. In this example let's make it easy and make beta = 100

Also, once the current in the base reaches a saturation value, Vce is 0 due to the current gain causing a complete drop in the voltage before the transistor.

I've always had trouble when it comes to LEDs, but does the Ic = Beta * Ib apply even with an LED? If the base is receiving 0.2mA, then Ic = 20 mA, and from the LED datasheet that means the LED drops (for example) 2.5V. I can find the R1 value which would allow this to work with Ohm's Law (325 Ohms).

But what happens in this circuit when I apply, lets say, 0.1mA to the base? Now 10 mA runs to Ic, meaning the LED drops (lets say from a fake datasheet) 1.2V, and the 325 Ohm resistor has to drop 7.8V. This means that 24mA is running through it.

How does the math work in this situation? I am completely lost. Thank you!

A transistor works in two modes: 1) Linear 2) Saturated.

What you explained:

I learned that (generally) the collector current is Beta * Base current.

is only for Linear mode. Transistor will be keeping the current of Collector to Emitter (CE) equals to 'Beta * Base current'.

For example, in scenario that you provided, you apply 0.1ma to base; let's assume Beta is not temperature depended and is equal to 100. So the CE current will be 10ma; but only if transistor can keep up the linear condition. The transistor will be linear as long as the Vce will be more than 0.2v. In your case, by passing 10ma in your load (everything is in series, so current is the same for all of them), there will be 1.2v on led (according to your datasheet!), 3.25v over your resistor and the rest of 9v (9 - 1.2 - 3.25) is 4.55v between collector and emitter of transistor (Vce=4.55v). The Vce is more than 0.2v, so the transistor is working in linear mode and is dissipating 4.55*10 (45.5 mw) power.

Now, let's have another example; let's assume you apply 0.5ma, the Ice wants to be 50ma (as explained in your question). If the Ice is 50ma, the voltage drop on led (as datasheet explained) may be 3v; and the drop on R1 will be 325 * 50ma=16.5v! But we don't have that power supply. The power supply only provided 9v. If we calculate again, the Vce must be 9v-16.5v-3=-10.5v . As stated before, the Vce can not be less than 0.2v . In this case, transistor is saturated. We must assume the Vce is indeed 0.2v and now calculate the Ice again. If Vce is 0.2v, then we use led curve v/i as an equation and (9-0.2) as load voltage and with these two equation we can find the voltage and current of led. However for simplicity, let's assume led is saturated at 3v (from datasheet for high currents). Now we have 0.2v on Vce, 3v on led and the rest (9-0.2-3 = 5.8v) will be on R1 . This means that the current on load will be 5.8v/325=17.8ma. This is less than 50ma calculated from calculated from betaIbase and we are indeed in saturated mode. In this case, the power dissipation of transistor will be 17.8ma0.2v=3.56mw .

• This clears up everything. I simply didn't know that Vce had this behavior! Nov 29, 2020 at 18:08

Try thinking about the situation like this.

The transistor has a load connected to the collector, it is not aware of the nature of the load but it will try and maintain the collector current in accordance with the base current as you have described i.e. Ic = hFe * Ib. The gain might well be 100x for small base currents.

As the base current is increased eventually you'll reach a point where the collector current is not increasing proportionally. The transistor is going into saturation. The gain may be only 5x (for example) at this point and Vce will go down to a small voltage say 0.2V

In your case the circuit will be dropping 8.8V across the load (diode and resistor). With a diode forward voltage of 1.2V there will be 7.6V across the 325ohm resistor or about 23mA through the load. Driving the base with a higher current will not change this as the transistor is saturated.

Regarding the transistor's behaviour i.e. saturated as being independent of the load we could get a better estimate of the collector current by either graphically plotting the diode characteristic curve against the resistor volt drop or using the diode equation to solve iteratively. Either way you are correct there will be about 23mA through the LED. You can verify with the LED's datasheet to check it can handle this current and check the forward voltage.

• I didn't catch a key point: How does this work during the active region? Lets say when I am not saturated and only apply a very small current into the base. Is this going to make my current through the load very low, also? -> Lets say 0.1 mA through the base, (Which I assume with beta =100 means 10 mA in the collector) meaning that the resistor drops 3.5V and the LED drops 1.0V. Does this mean that VCE will be 4.5V? Nov 29, 2020 at 7:21
• Yes. You can perform that calculation exactly as you have described. Following that approach you can see that as the base current tends toward 0 Vce will tend toward 9V. Typically the LED will need a few mA to be visibly on. A transistor circuit using an LED to indicate logic status would normally operate in satured mode. Nov 29, 2020 at 7:57

As you know the collector current $$\I_C\$$ (in the active region of the transistor) is approximately $$\\beta\$$ times the base current $$\I_B\$$. There is a voltage drop across the emitter and collector of the transistor $$\V_{CE}\$$ that the transistor "creates" to make the current $$\I_C\$$. Thus, to a first approximation, and within limits, you can change the value of R1, and the current through the LED will remain (again approximately) constant. Thus, you do not need to calculate which value of R1 you need to give the LED the appropriate current. You only need to calculate some value (possibly even 0) for R1 which will allow the transistor to operate in the active region (and not fail due to overload). For example, if R1 is $$\0\Omega\$$, and there is a 2.5V drop across D1, then Q1 will have a $$\V_{CE}\$$ of 9V-2.5V = 6.5V.

So, the base current controls (with caveats) the collector current. To calculate the base current, take the base supply (3V), subtract $$\V_{BE}\$$, say 0.6V and divide by R2. $$\I_B = \frac{3-0.6}{R2}\$$

• In the other answer that is the point that I didn't see. I had no clue that the transistor could compensate for the Diode's IV by increasing its VCE. That is extremely interesting, thanks for posing it in an understandable way. Nov 29, 2020 at 7:45