Universal PNP (and PNP) transistors (BJT) for ATmega328 based Arduinos - what to buy?

I would like make a lot of small projects using ATmega328P (and other ATmega family) based Arduinos (UNO R3, old Nano and similar).

That means USB power (5V, 0.5A max, but typically way less, like 100mA) and frequencies up to 16MHz.

I want to use lot of BJT transistors for LED switching, sniffing all signals, amplifying weak signals etc. etc.

Mainly because transistors are cool and I want to get some practise with using it.

I want to buy fistfull of PNP and another fistfull of NPN transistors and start experimenting, but I do not know, which types are best suited. There is too much of available types and I cannot understand which I should buy.

At beginnig I will NOT be driving motors or solenoids, I want to drive LEDS, resistors and singal other transistors and MCU. (Also try open collector NOR to detect when any of many signal goes high and similar techniques, mainly for the sake of doing it). If I would like some powerfull work, I will buy some power transistors later.

The question is - What transistors I should buy?

They should be cheap (as I want buy like 50 or 100 of each type, maybe on AliExpress), common (so I could use the same type after many years, when the old ones are destroyed or lost) and good enought (fast, so I will not need to solve frequencies, 0-0.8V would be considered no signal and 2.5V-5V would be considered full signal and should survive some accidental missuse, which happens on breadboards (like accindental contacts to something else, full capacitor or bad polarity) without burning too often :sweat_smile:)

They do not need to be excelent for HiFi audio, GHz frequencies or driving more power than 0.5W for more than split of second.

What types of PNP and NPN you use for your projects and why?

What types you recomend me?

Thanks for all and each opinions :slight_smile:

It somewhat depends on where you are located. In the US, mostly 2Nxxxx transistors are popular (sometimes PNxxxx if in plastic packages.) In Europe , the BCxxx range seems to be more popular, and in Asia, the 2Syxxxx. I don't know why.

For the US:
2n3904 (NPN) and 2n3906 (PNP) or
2n4401 (NPN) and 2n4403 (PNP) or
2n2222A (NPN) and 2n2907A (PNP) (somewhat higher current than the 2n39xx)

They're all about $0.05 each in q100, from digikey, which is a very trustworthy supplier. Probably much cheaper from Aliexpress/etc. (although the current tariff situation may complicate finding the cheapest source :frowning: )

OTOH, if your order from China (or eBay, Amazon, etc), you may get "generic, somewhat like" whatever you actually ordered (and they'll probably work fine.) (I'm still working through a "full reel" of "house marked NPN transistors "like 2n4401" that I bought from Electronics Goldmine - I expect them to last longer than I do.

3 Likes

I recommend

BC327 - PNP
BC337 - NPN

2 Likes

Any one that fits your needs. But why BJT and not MOSFET?
My needs were <= 0.03$ and 15V, 100mA, 100mW at least. Best available in dual case (SMD and PTH) and handy pinout (E-B-C)..

3 Likes

Good question :slight_smile:

Basically I had seen mainly BJT schemas around me, I started play with BJT 40 years ago (and no MOSFET was aviable for me at the time) and I remember when I got some informations about MOSFETs, it said they are expensive, hard to obtain, need big voltage and are easy destroyeable, so I was not interested.

But times are exchanging and I was stuck in my old minset.

If you found what fit your needs, it would fit my too and I will love to learn about it :slight_smile: (What type you suggest?)

Hi
Last year I bit the bullet and purchased a pack of assorted BJT from Ali.
I tested a select few and they appear ok.
I made the top label and the data label on the inside of the lid.
Great for just opening and going ummm.. yes... no... that will do... when the protoboard is on the bench.


Tom.... :smiley: :+1: :coffee: :australia:

2 Likes

I actually only have BC547 & BC557 as general purpose transistors in my box.

2 Likes

2N3904 and 2N3906 are my stock general purpose devices for controlling low power relays etc.
Readily available in the UK.

I think you should first learn how a BJT works. They are current controlled current devices not voltage controlled.
Maybe you are thinking about MOSFETs and not BJTs

1 Like

Yes, you are right.

I do somehow know it, but not actively.

LEDs are also current controlled, but there is some threshold, where they do not operate (I mean shine) under - something like 2V for red, 2.5V for many other and 3V for blue (approx. ), so I can use (with some resistor) 2 red LEDs in serie on one pin, but only 1 blue LED.

And none of LEDs would shine for even highest values of LOW signal (Vol <= 1V) and every LED can be turned on even with lowest HIGH signal (Voh >=4.1V). So that is what I meant with the statement (which was bad formulated).

And yes, MOSFETs within such range will be better for my needs. (I just did not consider them by mistake.)

I started with electronic tubes 60 years ago :slight_smile:

BJT are fine for analogue circuits while MOSFET are better suited for binary (ON/OFF, PWM...) output. MOSFETs should be logic level compatible (IRL...) and support the output voltage.

Digital outputs can only feed LEDs in one direction, while in the other direction they operate in parallel to the LED and can not output any current. The worst case signal levels come in 2 sets for guaranteed output (provided under acceptable load) and recognized input states.

Your pin voltage is not really relevant since you want to use transistor to drive the LEDs.
Pick some BC337/BC327 from AE and start experimenting how they work. Or pick $2 assortment with practical plastic box.
aliexpress.com/item/1005008077649425.html

Don't forget to get some resistor assortment kit as well!

2 Likes

For the needs described, forget about MOSFETs — regular BJT transistors already listed are perfectly fine. Consider MOSFETs only when driving high currents and when you can control the gate with voltages above 5 V (logic-level IRL types help a bit, but they’re not the best choice if you only have 3.3 V; they perform best when the gate gets at least 9–10 V). To avoid excessive power dissipation in MOSFETs, a practical rule of thumb is to choose ones rated for 10–15 times the current they’ll actually handle (in that case, a heatsink usually isn’t needed).

1 Like

What does that mean?
I've achieved excellent performance with many MOSFETs at lower gate voltages.

  • Most MOSFETs come as SMDs.
    To make these more friendly for solderless breadboards, you can buy SMD to DIP converter PCBs.

1 Like

Yes, I was too categorical. I have also successfully used non–logic-level MOSFETs at 5 V Vgs, but only with currents not exceeding 1 A. I didn’t mean that logic-level devices at 3.3 V don’t work, but that they still perform better with higher Vgs. According to the output characteristics in the datasheet, at 10 A the power dissipation of an IRL44Z decreases by about one watt when Vgs is increased by 4–5 V from 3.3 V.

You just repeated what you said before.
What do you mean by better?

I dunno...

  1. MOSFETs in through-hole packages are relatively rare. (You didn't specifically ask for TH parts, but ... I assumed.)
  2. MOSFETs with good performance at 3.3V logic levels are relatively rare ("Good" may be relative here; you end up trying to compare an Rdson to a Vcesat, and ... they're different.)
  3. You mentioned amplification: a lot of the cheap MOSFETs, and their specs, are aimed mostly at switching. Trying to achieve analog behavior might be challenging (not least because there seem to be fewer examples.)

I am using the ATmega328 on 5V and as I usually power the projects from USB, I do not use more than 500mA (I usually need like 100mA at max), so it should be ok :slight_smile:

Yes, I already have some and will buy more. And in case of need I am not afraid to improvise :slight_smile:

1 Like