Transistor basics

Being fairly new at this I can’t say I’ve quite got my head around transistors yet. I keep letting the smoke out 😳

I want to use some SMD transistors with the next LED board I put together so I need to figure out if they’ll work first before getting the boards made and generally faffing about. Time to display my ignorance and try an experiment to see just how far I can push them. In this case, “them” is the BC817-40:

BC817-40 SOT23 on adaptor board

BC817-40 SOT23 on adaptor board

I’ll use a couple of my simple 5 x led boards for testing with the transistor driving all the leds for “white”. That’s these then:

Is it up to the job?

Is it up to the job?

The following tables are taken from the datasheet:

Maximum ratings

Maximum ratings



So, as I understand things…

  • The transistor will be fully saturated so I don’t need to worry about P_{tot}
  • The base resistor will have approximately (5-0.7) = 4.3V across it
  • Minimum current gain, h_{FE} = 40
  • For 500mA, I need at least 500/40 = 12.5mA at the base
  • I can’t exceed 200mA at the base so we’ll aim for 50mA
  • That means I need a base resistor of 4.3/0.05 = 86\Omega
  • So, 100Ω should be “close enough for government work”

That seems too easy, let’s see what happens 😆

Ok, it’s been running at 500mA for an hour now and the transistor isn’t even warm. The PSU says it’s sitting there at 5V, 500mA so that looks like a winner. That’s a single BC817-40 running 30 leds (effectively) whereas I’ll be using 3 of them on the 5×5 led boards so they only have to run 25 leds each. What can possibly go wrong? 🙄

I’m bound to have missed something. I know that the 500mA I’m seeing is probably a coincidence since the leds are nominally 20mA each. The resistor values are (obviously) slightly higher than the calculated values so I think that would explain that.

I’m not sure if I should use a resistor to limit the collector current – don’t think so since the planned load is a maximum of 500mA but with some to knock off for the resistors being slightly too large on each led.

I reckon I’ll go ahead and knock up the 5×5 boards in Eagle and and get the initial batch of 5 made up. The plan is to use these as “mood lighting” but they really are just steps on the way to something more elaborate with microcontroller and IR receiver (or wireless) on board for remote control. It’ll take a while to get there as I’ve got a lot to learn, hence the small steps and “numpty” posts like this where I have to figure out what must be “obvious” to people who know this stuff properly.

Still, no smoke, that’s good for me and transistors 😆


Well I slept on last night’s result and awoke to realise it wasn’t totally conclusive. I had proved to myself that using a current limiting resistor on the base of the transistor kept the magic smoke inside where it belongs. I hadn’t proved that not using one didn’t 😈

So, off with the resistor, make a direct connection to the base and…


The leds came on, but only for a very short time. RIP little BC817-40, sacrificed in the name of science 😛

It’s definitely dead but there was no smoke. I guess they can’t really fit much smoke into something so small though…

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *