NPN transistors and their math

Hi there,

I’m new to transistors and while doing an excercise on the Freenove UNO (similar to the Arduino UNO), I took some readings with my multimeter, in order to get a better understanding of what’s going on. I would like to know if my logic is correct.

The circuit diagram is attached, I’m using the active buzzer in the kit and the S8050 NPN transistor.

So knowning that transistors will amplify your current, and seeing on the internet that the transistor that I have probably has a gain of about 100 and a Vf of 0.7V, I took the current reading between the 1kohm resistor and the base of the transistor (b-e) and got about 4 mA (which makes sense because (5v - 0.7V) / 100kohm = 4.3 mA. I then figured that if the gain is 100, then on the other side (c-e) it should be 430 mA. Although, between the buzzer and the collector pin of the transistor, I’m reading 27 mA (a factor of about 16x).

I then saw on the web that the gain will be related to the current on both sides of the transistor, AND also the resistance on both sides. I saw on the web a buzzer similar to mine rated at 5V and has a max current of 32mA. Would this be because there is a fuse in it acting like a resistor (5V / 0.032A = 156 ohm), and I need to account for that? If I do that, and say that ratio (1000 ohm / 156 ohm) which is a factor of 6.4x, multipied by the factor of 16x above, gives a gain of 102, which is damn close to what I saw on the web.

… Sorry if explained this poorly, but I just want to know if my reasoning is correct and my understanding of the transistor and the current values I got are correct.


Would this be because there is a fuse in it acting like a resistor (5V / 0.032A = 156 ohm),

I don’t see a fuse but the buzzer has a resistance. They don’t usually give a resistance spec, but they give a current spec so you could calculate it.

The transistor is fully-on. It’s in “saturation” so the current depends on the voltage and the load. That’s good! This is what happens when we use a transistor as a “switch” in digital applications. It’s either on or off, it’s not linearly amplifying current. We normally calculate a base resistor to make sure the transistor is saturated.

In digital circuit design it’s not unusual to “assume” an hfe of 20-50 to be sure the transistor will saturate.

The other point is that the gain figure is generally given as a minimum. The actual gain could be much higher.

Thanks DVDdoug for the response :slight_smile:

Do you think my math, logic and the way I calculate the 100 gain is correct, and that the currents I’m seeing make sense? Just want to make sure I have a good comprehension of the NPN.

Many thanks,

The collector current will only be your calculated 430mA if the collector circuit can pass that much current.

5V / 430mA = 11 ohms

The buzzer would have to have 11 ohms or less, then. But it probably doesn't. You can certainly now calculate its resistance, though.

The gain of a bipolar transistor depends on the collector current. Consult the data sheet for representative values, understanding that the values stated are approximate and may be off by a factor of 2 or more.

Example from the S8050 data sheet (hFE values, bottom row):

I re-read all the currents, and Ic = 26 mA, Ib = 4 mA , Ie = 30 mA. which I guess makes sense, but that would mean my gain is only 26 / 4 = 6.5

Is that possible for this situation and this transistor?


If the transistor is saturated, the gain calculation is not meaningful, because the collector current is limited by the load resistance.

Aaaaaaahhhh.... so if I had something there beside a buzzer (like something with a lot less resistance than the buzzer clearly must have), the current Ic would be higher and the gain i calculate will be higher. I'm not seeing it's true gain because of the load before point c.

OoooooR.... I could use an even bigger resistor at the base which will make a lot less current. If the current at point c will be the same because it's limited by the buzzer, the gain i notice will be higher.... sound right?

I guess in this case, the transistor is merely switch.

Thanks everyone :slight_smile:

For use as a switch, you want the transistor to be fully saturated, as that way it dissipates the least power. But you don't want excessive base current either.

In such cases, many people assume gain (hFE) = 10 at some assumed collector current, in order to calculate the base resistor value.

Thanks everyone who replied, I think I have a better understanding of the NPN transistor now.

Stay safe and healthy :slight_smile:

I re-read all the currents, and Ic = 26 mA, Ib = 4 mA , Ie = 30 mA. which I guess makes sense, but that would mean my gain is only 26 / 4 = 6.5

Is that possible for this situation and this transistor?



When a transistor is in saturation the base-collector junction is forward-biased. This means its no longer working
the same way as when used as an amplifier (cb-junction reverse biased). There's no electric field pulling charge
carriers to the collector any more.

So the normal small-signal gain parameter doesn't apply.

What happens is that the device is driven by concentration gradients. Most transistors have the emitter doped
about 100 times more than the base, and the base about 100 to 1000 times more than the collector. In the
language of semiconductor devices that would be N++ P+ N-- (or for PNP P++ N+ P--) +/- representing
dopant concentration, not charge sign.

The overwhelming difference in carrier densities is what drives the charges injected into the base by the emitter
to reach the collector, when there's no electric field to pull them there. There are also a huge number of charges
just sitting around in the base, known as "stored charge", which makes a saturated transistor slow to turn off.

A 300MHz transistor in saturation might take 1 to 5µs to turn off, despite being able in linear mode to usefully
handle 30MHz signals.

Because the carriers hang around in the base much more, they recombine much more, which leads to much
higher base currents, ie much less current gain in saturation, normally in the 5 to 20 range. If you are happy
for a switching transistor to drop about 1V between emitter and collector, then the device is in the active region
and the current gain will be much higher. However the heat dissipated in the transistor might be 20 times greater
than when in true saturation - for high power loads that's a big deal.

Thanks for that Mark. I have learnt something new and useful this evening.

One of the things that it took me a while to understand WRT transistors is that the actual gain of the transistor is usually “mostly irrelevant” to the gain of the circuit that the transistor is USED in.
You have your switching circuits (like we’re talking about here), where the collector current is limited by the output circuit (hopefully) and Ic (0 or 1) is actually much less than Hfe*Ib
And then there are the various analog amplification circuits, which are also designed so that other factors lead to the circuit gain being non-dependent on the exact value of Hfe. This is largely because Hfe is pretty variable, even withing the same part number from the same manufacturer (and depends on things like temperature and the magnitude of signals as well), and you don’t want that sort of inaccuracy getting into your audio amplifier. (This means that the Hfe of the transistor has to be significantly larger than the gain you need from the final circuit, but that’s usually pretty easy to accomplish.

(The same thing is true of more complex analog circuitry like op-amps. An “ideal” op-amp has infinite gain, but is rarely used that way.)

Thanks for that Mark. I have learnt something new and useful this evening.

I refer you to the excellent EdX course:

A 'Baker clamp' can be used to prevent full saturation.