0
\$\begingroup\$

I just started studying Arduino and I'm watching a online course. I got into the stage where we're suppose to build some sort of protection system so we can plug-in outsourced power supply and prevent the arduino uno from frying.

My problem is that the class course uses a 2N222 Transistor and he talks about \$V_{ce}\$ and \$V_{be}\$ numbers. All I have is a BC558B, BC549C and BC327 transistors, which I've tried to understand the datasheet and one of them is negative, and none of them seems to have similar numbers to the 2N222. I'd like some input regarding the protection system:

Are any of the transistors in hand useful for it, or should I forget about the ones I have and go buy a 2N222?

Maybe I didn't understand much of the course. But the guy says that the Arduino can't handle more than 50 mA and if I want to turn on something that consumes more than that, I need an external power source. But if I plug the power source direct into the Arduino, it will fry. I need to build a protection system using Relé and a Transistor. But he uses the 2N2222 transistor and I don't have this one here. I want to know what's important on it to figure out if the ones I have is enough.

\$\endgroup\$
7
  • \$\begingroup\$ At the moment, this question is unclear. We don't know what you mean by "some sort of protection system". [We are that bad at mind reading.] You should provide a diagram. \$\endgroup\$ Commented Mar 17, 2014 at 16:44
  • 1
    \$\begingroup\$ BTW, you probably mean "2N2222" for the class transistor. \$\endgroup\$
    – Dave Tweed
    Commented Mar 17, 2014 at 16:48
  • 1
    \$\begingroup\$ The protection system isn't the meat of the question, the question is really about transistor substitution. 2N2222 datasheet: farnell.com/datasheets/296640.pdf \$\endgroup\$
    – pjc50
    Commented Mar 17, 2014 at 16:49
  • \$\begingroup\$ I added some info. \$\endgroup\$ Commented Mar 17, 2014 at 16:52
  • \$\begingroup\$ @MarcoAurélioDeleu What are you looking for? You are looking for a successful completion of an [introductory] online course [at least that's how it appears to me]. If you can get through this road block by buying the right kind of transistor - then do it. Having a right part will improve your chances of not getting stuck with the curriculum. Later when you have the time, you can substitute one transistor for another and make a hands-on comparison. \$\endgroup\$ Commented Mar 17, 2014 at 16:52

3 Answers 3

4
\$\begingroup\$

Your understanding is correct, in that you have to careful about subjecting your I/O pins directly to external devices. Sometimes, that is because the external device requires a different (usually, when it is a concern, this means higher) voltage than your I/O pin can provide or tolerate. Sometimes, that is because the current compliance of the I/O pin isn't nearly enough. (This is the ability to sink [towards ground] or source [from the power supply] current.) It's a good idea to stay well below the maximum current compliance too, because the I/O pin voltage itself is pulled away from its nominal value at the higher currents within its compliance range.

The fact that you sometimes see negative, as opposed to positive, values for different transistors when you read their datasheets is a matter of convention. There are two kinds of bipolar transistors (BJTs), NPN and PNP. By convention, the specifications use a different sign for similar parameters listed on the sheet. When considering limitations of one or the other, you focus more on the magnitude than the sign. If you see the "wrong" sign, it probably just means that you are looking at a PNP instead of an NPN you wanted, or that you are looking at an NPN when you wanted a PNP.

The \$V_{ce}\$ term is usually important for one of two things: (1) figuring out the maximum voltage that the transistor will withstand safely when OFF, or (2) figuring out the dissipation on your transistor when operated as a switch that is ON. In the first case, if you are trying to operate a 12V motor, for example, you want to make sure that the BJT can withstand 12V when it is off. (Most will do that.) So you check that parameter on the datasheet. Sometimes, you may want to switch 60VDC and if that is the case there are a number of BJTs that won't handle it. But as a general rule, almost all can handle 30V or so and often 40V. In the second case, you need to look at some of the curves for the transistor and see what \$V_{ce}\$ is when operated in "saturated mode." As a rule, driven sufficiently, small signal BJTs will achieve as little as \$200mV\$ and perhaps even less (less is better.) This can be combined with your current (amperage) requirements for the load to figure out estimated dissipation at the BJT itself.

The \$V_{be}\$ value is usually taken as 0.7V without reading a datasheet as a first approximation for small signal BJTs (most of the small ones.) It's just an estimate used to get a rough idea about setting the value of a base resistor used in driving a BJT. For example, if you have \$5V\$ outputs you might "estimate" that the actual output will be \$4.8V\$ (just to give yourself a little margin) and recognize that \$V_{be} \approx 0.7V\$, leaving only \$4.1V\$. This must appear across the base resistor you use. If the base current needs to be 20mA, let's say, then you know that the resistor is \$\frac{4.1V}{20mA} = 205\Omega\$ So you might then select a \$220\Omega\$ or a \$180\Omega\$ resistor for that purpose.

You mentioned that you need 1A peak and 800mA continuous. That's a lot for most small signal BJTs. So this suggests you need to be careful here and select a BJT that is able to handle it well. It's possible that \$V_{ce}\$ will be a little higher here, because of the higher current for one thing. So for example, if \$V_{ce}\$ will be \$300mV\$ and the continuous load is \$800mA\$ then the dissipation is \$\frac{1}{4}W\$. The BC637 and BC639 are NPN devices that can handle 1A continuous and at \$800ma\$ they have typical \$V_{ce} \approx 300mV\$, too, with \$\beta=10\$. Might be an option here, except that your I/O can't handle \$100mA\$ drive (which is \$\frac{1}{10}\$th of 1A.) So this is starting to look like either a MOSFET solution or else a two-BJT solution.

\$\endgroup\$
1
  • \$\begingroup\$ WoW, that's a lot of information. I'm starting to understand things here, though I'll give an extra time to understand more about this, but I appreciate you taking the time to give me a more detailed explanation on the matter, this is exactly what I was looking for. \$\endgroup\$ Commented Mar 18, 2014 at 3:27
4
\$\begingroup\$

The 2N2222 (note the four 2s, not 3) or 2N2222A are common jellybean NPN small signal transistors. Just about any small signal NPN transistor that can handle a few 100 mA collector current will probably work. I prefer the somwhat more robust 2N4401 for my small signal NPN jellybean applications, but there are many transistors that can probably fit this role.

However, you have to tells us what "that role" really is. Show a schematic of how the 2N2222 is supposed to be hooked up.

The BC558B is a PNP, so not a replacement for the 2N2222. The BC549C is a small signal NPN, but has particularly wimpy max collector current of only 100 mA. If that's all you need, like driving a relay that takes 35 mA, then that's fine. If you need 200 mA collector current capability, then that's not fine. The BC327 is again PNP, so that won't work.

\$\endgroup\$
1
\$\begingroup\$

2N2222 is an NPN transistor in a metal TO-18 case.

BC558 is a PNP transistor; that's the opposite kind, in which current flows in the other direction. Hence the negative values. BC327 is also a PNP transistor. These are not direct substitutes for 2N2222.

BC549C is an NPN transistor in a small plastic case.

The figure that's most likely to be relevant when used as a switch is "Collector Current − Continuous" (Ic). This is 800ma for 2N2222 and 100ma* for BC549. So at this point it depends on what current you intend to put through it. Not knowing more about the circuit, I'd say it's not a good idea to substitute it.

(*the ON-SEMI datasheet lists the unit for Ic as "Vdc", which is simply wrong and probably a cut-and-paste error)

\$\endgroup\$
4
  • \$\begingroup\$ I'm going to turn on one of those small engine that consumes 1 Amp at start and 800 mA to keep running. \$\endgroup\$ Commented Mar 17, 2014 at 17:00
  • \$\begingroup\$ Actually 2N2222 comes in several cases, the TO-18 is just one of them but it is also available in TO-92. Typical 2N2222 types. \$\endgroup\$
    – alexan_e
    Commented Mar 17, 2014 at 18:36
  • 1
    \$\begingroup\$ @alexan_e 2N2222A is a Jedec number and should be in a TO-18. The TO-92 version would have a number like P2N2222A or PN2222A \$\endgroup\$ Commented Mar 17, 2014 at 19:22
  • \$\begingroup\$ @SpehroPefhany I wasn't aware of that but in that case pjc50 is right. \$\endgroup\$
    – alexan_e
    Commented Mar 17, 2014 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.