Author Topic: Am I using the 2N2222 correctly? edit-2N2222A  (Read 10653 times)

0 Members and 1 Guest are viewing this topic.

Offline ScarceSamTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Am I using the 2N2222 correctly? edit-2N2222A
« on: February 10, 2017, 08:09:51 pm »
*UPDATE- The 2N2222s came in, they are actually 2N2222As, photo attached

This is my first use of transistors in a project. I need to control a SainSmart 16-Channel Relay Module using an Arduino 101(3v3 GPIOs). This Relay Module uses 5 vdc through Opto couplers to power the relays. The input pins on the relay board are at 4.4 vdc and need to be brought to GND to switch on.
When I connected the Arduino 101(3v3 GPIOs) directly to the relay module some of the relays would stay on while others would be controlled by the Arduino. It all worked fine when I tried an Arduino UNO(5v GPIOs) in place of the 101. But, I want to use the BLE capabilities of the 101.
So my solution is to use 2N2222 transistors because I’ve read they are good at general purpose low-mid power switching. Below is the configuration I think is correct. Any feed back would be greatly appreciated. I’ve tried reading the Data Sheet but I’m mostly going off of other forum posts.

Relay Board inputs; +4.4vdc, input-ground 4mA
Arduino 101; 3.3vdc GPIOs, max 20mA per GPIO
T1: 2N2222A
R1: 10K, to reduce current through the Base to 0.33 mA
R2: 100K, drop down resistor. (is it needed?)



Thanks!
« Last Edit: February 11, 2017, 10:41:33 pm by ScarceSam »
 

Offline Cliff Matthews

  • Supporter
  • ****
  • Posts: 1910
  • Country: ca
    • General Repair and Support
Re: Am I using the 2N2222 correctly?
« Reply #1 on: February 10, 2017, 08:35:28 pm »
A typical 817 opto coupler's input has an infrared LED that drops about 1.2v Vf at 5ma (240 ohms). http://www.vishay.com/docs/83522/k817p.pdf The ATmega 328 can source up to 200ma total, so I think a 470 ohm or 1k ohm resistor is all you need, forget the transistor. What drives the relays is already on the SainSmart module.
 

Elf

  • Guest
Re: Am I using the 2N2222 correctly?
« Reply #2 on: February 10, 2017, 08:58:24 pm »
Don't forget about Vbe; if the GPIO pin is at 3.3V and Vbe of the transistor is ~0.7V, then a 10k resistor would give it a 0.26mA current through the base (V=IR, 3.3-0.7=0.00026*10000). This would be ignoring (removing) the R2 drop resistor as it wouldn't do much for you -- the base shouldn't "float," it already has a good path to ground through the emitter.

The Beta of a 2N2222 is about 100, if I recall; that would let at least 26mA flow through your transistor which is more than the on-current of the relay according to your specs. So, the relay would be on.
« Last Edit: February 10, 2017, 09:00:00 pm by Elf »
 

Offline ScarceSamTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: Am I using the 2N2222 correctly?
« Reply #3 on: February 10, 2017, 09:00:41 pm »
Cliff,
I didn't have any issues using the Arduino UNO (ATmege 328) to controll the SainSmart module.
However, I'm tring to use an Arduino 101 (Intel Curie Module) for it's BLE capabilities. When I tried to have the Arduino directly connected to the SainSmart module it wasn't able to keep some of the relays off.
I think the issue is because the Arduino runs at 3.3 volts but the SainSmart module controls are 5 volts.
If it's just a matter of using resistors with the 101 that would be awesome!
Thanks for the info, I'll try 1K resistors with Arduino 101 tonight?
« Last Edit: February 10, 2017, 09:19:21 pm by ScarceSam »
 

Offline ScarceSamTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: Am I using the 2N2222 correctly?
« Reply #4 on: February 10, 2017, 09:18:44 pm »
Elf,
I'll remove R2. If I wanted to reduce power consumption I can increase the R1 but, the SainSmart module Amazon listing states that it takes 15-20 mA to drive the relays. So, the 10k should work for the listed current. I'll give it a try when my transistors come in tomorrow.
Thanks for showing how the numbers from the datasheet relate to the needed calcs, I'm trying to learn.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Am I using the 2N2222 correctly?
« Reply #5 on: February 10, 2017, 09:29:19 pm »
Ideally you want to saturate the transistor when using it for a switch, so look up the saturation current and try to hit that.

The pulldown resistor is unnecessary as AVRs have totem pole outputs.
 

Offline Cliff Matthews

  • Supporter
  • ****
  • Posts: 1910
  • Country: ca
    • General Repair and Support
Re: Am I using the 2N2222 correctly?
« Reply #6 on: February 10, 2017, 09:42:47 pm »
Cliff,
I didn't have any issues using the Arduino UNO (ATmege 328) to controll the SainSmart module.
However, I'm tring to use an Arduino 101 (Intel Curie Module) for it's BLE capabilities. When I tried to have the Arduino directly connected to the SainSmart module it wasn't able to keep some of the relays off.
I think the issue is because the Arduino runs at 3.3 volts but the SainSmart module controls are 5 volts.
If it's just a matter of using resistors with the 101 that would be awesome!
Thanks for the info, I'll try 1K resistors with Arduino 101 tonight?
Go lower. If you're sourcing 3v, 1k will likely not drive opto coupler inputs beyond 2ma. If it still doesn't work, maybe put 1.5 battery across a 1k pot and send the wiper and ground as output to quickly test each of the opto coupler inputs.   
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Am I using the 2N2222 correctly?
« Reply #7 on: February 10, 2017, 10:16:12 pm »
That must be one s--tty relay board design.  I see it uses ULN2803A drivers for the relays + the indicator LEDs, and their input current with a 5V logic signal will be under 1.5mA.   For the optocouplers to need 15mA to 20mA means they must have a current transfer ratio of 10% or worse - that's not even Chinese factory floor sweeping grade.  Alternatively the ULN2803A chips could be fakes.
Lets leave aside the insanity of using optoisolators then bypassing them by feeding their input side from the same 5V rail as their output!   

I wouldn't trust those relays to control anything over 24V - if the creepage distances are as screwed up as the rest of the design, it wont be safe for mains even if the relays are supposedly 250VAC rated.

Check the current that is required to pull each opto input down to ground with a DMM.   If the optos are even crappy 50% CTR ones and they are overdriving them by a factor of two to allow for aging,  it shouldn't be more than 6mA.
Also check the voltage on the corresponding ULN2803A input pin.  With the opto input grounded, it should be at least 4.5V.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Am I using the 2N2222 correctly?
« Reply #8 on: February 11, 2017, 12:51:51 am »
They may just be going by the max rating for the LED in the optocoupler, 20mA sounds reasonable for that, although in practice much less ought to work.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16611
  • Country: us
  • DavidH
Re: Am I using the 2N2222 correctly?
« Reply #9 on: February 11, 2017, 02:48:24 am »
If a CMOS output is used to drive the transistor, then R2 is not needed because the CMOS output can pull the base to ground.  I typically go for a forced beta of 1/2 the minimum hfe so assuming a minimum hfe of 100 for a 2N2222:

4mA/50=80uA
3.3V-Vbe=2.7V
2.7V/80uA=34k for R1

A 2N3904 would be more typical to use these days than a 2N2222.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Am I using the 2N2222 correctly?
« Reply #10 on: February 11, 2017, 03:07:56 am »
Some thoughts -

1) Do NOT remove R2. That holds transistor off while UP starting up, port
in hi z. Absorbs leakage that could otherwise turn on transistor.

2) For max collector current in 2N2222 make Ib = Icmax /10. That is a rule
of thumb to force transistor into saturation.

3) If collector connected to relay, inductive load, add diode to absorb turn off transient.

https://www.google.com/imgres?imgurl=http%3A%2F%2Fwww.electronics-tutorials.ws%2Ftransistor%2Ftran12.gif%3Fx98918&imgrefurl=http%3A%2F%2Fwww.electronics-tutorials.ws%2Ftransistor%2Ftran_4.html&docid=OD3QwYWl5JGIyM&tbnid=dH7ujvaXRpgr_M%3A&vet=1&w=360&h=248&bih=720&biw=1517&q=transistor%20relay%20driver%20image&ved=0ahUKEwjHvLeOiIfSAhUJ7oMKHbokAu8QMwh0KE4wTg&iact=mrc&uact=8

Regards, Dana.
« Last Edit: February 11, 2017, 12:59:02 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline LukeW

  • Frequent Contributor
  • **
  • Posts: 686
Re: Am I using the 2N2222 correctly?
« Reply #11 on: February 11, 2017, 04:19:18 am »
The relay module will have a 12V supply that drives the relay coils, this will need to be connected.

Some of these cheap Chinese "Arduino-style" relay modules have a 5V reg on board to provide the 5V supply, but maybe some don't. Not sure if yours does.

Note that even though optocouplers are used, the design does not provide galvanic isolation.

The whole thing is stupid design - ULN2083 drivers, plus optocouplers, and the optocouplers are completely pointless. The could simply provide a transistor and a diode on board (or a ULN2083 style IC), plus the 5V reg.

The input pins on the relay module will have a separate ground pin on the same bank of pins.

If there is a 5V supply on board, you should be able to connect the 12V coil supply, and then connect a jumper wire from the ground on the header bank to IN1, or whatever, and turn the relay on.
Check that that works.
Then try adding a transistor in place of the jumper wire.
The relay module ground will have to have a common ground with your circuit.

Try connecting the base of the transistor circuit to 3.3V (or 5V) to turn it on - you don't need the microcontroller module when you're building this circuit, and if you're not sure about your work it may be better to connect it last to avoid any damage risk.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Am I using the 2N2222 correctly?
« Reply #12 on: February 11, 2017, 06:07:09 am »
I went on the Sainsmart site and found the board 'manual' - a craqppy schematic without component values and a PCB layout.  According to the PCB layout, the creepage distance between the relay contact common pin and the +12V track feeding the coil is as little as 1.2mm for the upper relay bank and 1.65mm for the lower bank.  This board is UNSAFE for switching any voltage above SELV, and I wouldn't recommend using it for inductive loads either.

With 12V power connected, the on-board LM2576 regulator should be providing 5V on the marked pins of the input connector, that you can use to power stuff for the tests LukeW suggested.

Please report the markings on the resistor modules PR1,PR2,PR$ & PR7 (should all be the same), or measure the resistance across one of the modules between the common pins (lower) and one of the upper pins feeding one of the optocouplers' input sides.  Also please report the markings on the optocouplers.
That will let us calculate how hard they actually need to be driven to switch the relays reliably.

I'm trying to determine if the optocouplers are more trouble than they are worth, and should simply be removed and bypassed, so your 3.3V logic can directly drive the ULN2803A relay drivers.  Otherwise, it may be possible to cut and patch the supply tracks to those resistor modules to isolate the input side 5V from the relay driver supply to make them actually useful.   Its possible that they could then be driven successfully direct from 3.3V logic.
« Last Edit: February 11, 2017, 06:10:59 am by Ian.M »
 

Offline ScarceSamTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: Am I using the 2N2222 correctly?
« Reply #13 on: February 11, 2017, 09:25:14 am »
James_s
I’m not really sure how to read the data sheet re:saturation current or much else really. That's the reason for the post. I thought I had it with the plan above. But, I wanted to run it by others before I burned up a $35 micro-controller.

Cliff,
I think you’re understanding me incorrectly. The SainSmart module is driving the opto couplers. The Arduino just need to bring it to GND to switch it on. The problem is the 3.3 v GPIO of the Arduino 101 won’t keep the pin high enough to turn the relay off.

Ian.M
First, HAHA, I’m a Newb when it comes to this stuff and I realized the “isolation” is pointless if they are being fed off the same supply. But , the plan is to control 12vdc motors in a kids ride-on electric car. I measured the pull down current at 3.85mA. And the voltage on the ULN2803A input with the opto grounded is 4.8v. I’m guessing the 15-20 mA drive current listed on Amazon is the actual relay drive current?

David
Thank you for using the abbreviations (Hfe and Vbe) from the data sheet in the calculations. That helps me know where to get the numbers. That's why I’m here, to learn. I think I will try a higher resistor value. I try to conserve power where I can.
Yea, I read there were other transistors that were more common now. Maybe I could have even used MOSFETs to directly drive the 12vdc motors I'm drying to drive. But, 2n2222s seemed very common, I found them cheap, the project is a kids electric ride on vehicle(not real important) and I know relays.

Dana
1)I think I will keep R2. I’m using one of the relays to turn a pair of motors on but I’m using the others to reverse direction and others to change the speed. So, I want to avoid any chance of the relays accidentally turning on. That would cause a dead short, Bad!
2)That’s how I calculated my original design, but I didn’t take Vbe into consideration(didn’t know how to). I Think I’ll try a couple different R1 values because I want full saturation but to conserve power since it will be running off of batteries.
3)The SainSmart module has the diodes built in. 

LukeW
I’ll be running the whole setup off of a 12v battery.

The SainSmart module does have a 5v regulator on board. It’s what drives the opto couplers.

Yea, I realized the “isolation” is crap but the project is to run a kids ride-on vehicle. So, nothing here is vital, I’m using it more as a learning experience. Just don’t want to burn up the arduino.

I’ve tried jumping Inputs to GND and it does turn on the Relays. I will be using a common ground among everything.

Yess! Testing the circuit with a 3.3 volt source instead of the actual MC is a great idea. I will definitely be doing that. Thanks for the idea.

Ian.M -again :)
I didn't really trust it to drive much more than 24 volts. The plan for this project is to drive the two 12vdc motors on a kid’s Peg Perego electric vehicle. If the Fly-Back voltage is going to be an issue I can put a diode across the one relay that's going to be the power switch or “throttle”. One is the “throttle” others are to reverse direction and others are to change the speed.

That would be awesome if the Optos could actually be isolated and driven by only the Micro-controller. Especially since this project is only a temporary install. I could then use the relay module with any other micro-controller and just change the resistors and not worry about a bunch of extra circuitry. Looks like it's just a matter of removing PR1, PR2, PR4, and PR7, then connecting to the Optos through appropriate resistors
 




Thanks everyone!! I may not be completely coherent in my replies. Please bear with me, it’s late and I have two small children. I’ll check back Sunday....
« Last Edit: February 11, 2017, 09:26:57 am by ScarceSam »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Am I using the 2N2222 correctly?
« Reply #14 on: February 11, 2017, 10:41:54 am »
Thank you for posting the closeup photos.  They are going to be a big help figuring this out.  That 3.85mA input pulldown current is very useful to know as well.

I'm really glad to hear you aren't going to use the relay board for AC mains.  High current low voltage motors + improperly isolated optocouplers aren't dangerous to you, but could be a real risk to your Arduino 101.  The relays *should* provide enough isolation, but if the high motor currents cause the 12V supply and ground to the relay board to bounce around, it could crash or even damage the Arduino.

Cutting and patching the board so that the input side of the optocouplers run off a separate supply that comes from the Arduino would make it much more resistant to that sort of problem.  It may also eliminate the need for an extra protoboard to interface the two, but that isn't certain.  The Optocoupler LEDs have 1K series resistors and probably have a Vf of about 1.15V @3.85mA If when running from 5V.  If run from 3.3V, they'd only get about 2.2mA If which might not be enough to turn on the ULN2803A inputs reliably. You could try if a 470R resistor from an opto input to ground is enough to turn on each relay reliably.  If so then converting it would be worthwhile. 

Alternatively, if you don't want to hack the relay board, you could use 74HCT series buffers as level translators, powered from the relay board's 5V pin.  74HCT logic is 5V CMOS logic with TTL compatible input thresholds.  A TTL logic '1' is anything over 2.0V, which is compatible with 3.3V CMOS logic levels, but then you'd need a really good short ground connection between the Arduino and the relay board to prevent problems with ground bounce.

Your transistor idea could also work well with a little rearrangement but will be a lot more complex than an all-in-one buffer chip that can handle eight relays.

I'll need a bit of time to study the photos and the PCB layout.   Check back tomorrow ;)
« Last Edit: February 11, 2017, 12:36:47 pm by Ian.M »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21672
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Am I using the 2N2222 correctly?
« Reply #15 on: February 11, 2017, 05:14:34 pm »
<sarcasm>
No.  You are not using the 2N2222 correctly.

Instructions:
1. Pick up 2N2222
2. Toss in bin

You are now using the 2N2222 correctly.
</sarcasm>

But seriously, can we please forget about the 2N2222?  It's a metal can part.  It's expensive.  There are very few specs.  It's not even the 2N2222A, let alone a much more common PN2222A (plastic).

(And yes, the package is the major difference between these, and no, it's not a pedantic difference: JEDEC designations specify package, so when you say "2N2222", you're referring to one particular part -- not the improved -A version, and not the plastic version!)

But much more practical, you should be looking at reasonably well specified transistors, like 2N4401 (complementary PNP 2N4403).  Preferably by On Semi (they provide useful data on most of their transistors, going above and beyond the minimal JEDEC spec).

For other applications, you can go smaller: 2N3904 is good for < 200mA; MMBTH10 is good for 50mA (and is even faster); or you can go larger, say with ZTX651 (up to 2A) or PBSS303NX.  Or use MOSFETs, or protected switches (MOSFETs paired with an internal IC that protects against excessive current, voltage and temperature).

Cheers!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Am I using the 2N2222 correctly?
« Reply #16 on: February 11, 2017, 05:30:31 pm »
OTOH if you've got a bag of bloody metal can 2N2222 transistors, that you've had since Genghis Khan was in nappies, you might as well use them for one-off non-critical applications where their crappy specs don't matter.  Just don't buy any more . . . .
 

Offline FlyingHacker

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
  • You're Doing it Wrong
Re: Am I using the 2N2222 correctly?
« Reply #17 on: February 11, 2017, 05:47:47 pm »
Curious why you disparage the 2N2222 (A presumably), but recommend the 2N3904.

I have heard that some manufacturers test their 2N2222 transistors and label them as 2N3904 if they don't meet the 2N2222 specs. Is there any truth to this? I have no idea how reliable the source of this information is... I suspect not very.

Both parts are ridiculously cheap for one-off stuff, and if you are only going to stock one, would it not be better to stock the higher current 2N2222A? Or is there something this hobbyist is missing?
--73
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21672
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Am I using the 2N2222 correctly?
« Reply #18 on: February 11, 2017, 08:20:28 pm »
Though 2N3055 is even worse, and more deserving of ire...

Of course if you don't buy from reputable sources, who knows what floor sweepings you get.

I don't see that you could pass off a 2N2222 die as a 2N3904: the capacitance is wrong (the die is simply bigger, and so is Ic(max)).

Probably, a lot of 2N4401 are sold as PN2222, and BCxxx, among others.  That's fine, as long as they all meet their specs.  Lord knows there's been a massive number of historical types (between American 2Nxxxx's, British BCxxx and such, and Japanese 2SCxxxx and such: tens of thousands!), most of which are utterly generic and interchangeable.  Many types are differentiated by binning (a "2N3904" process might yield different breakdown voltages, hence 2N3903 and 2N3904, or TIP31A-C), and by testing specific parameters (a 2N5088 is, eh, broadly similar to 2N3904, but higher hFE, and specified for noise).

Again, stocking 2N2222(A) (that you've not had since ancient warlords roamed the plains :-DD ) is silly when cheaper, and all around better, plastic parts are available.

Really, the even more important point, to me, is the underlying reason:

Who even buys 2N2222s?  Why?

The reason is the dumbest ever, and the oldest ever:
Because everyone else always has.

It is so easy, so trivial, in this modern age of computing, and of infinite choice, to make a rational, nearly-optimal decision.  You can stack so many constraints, and still not have to compromise on cost.  SMTs are cheaper than ever, and so is PnP assembly.

WHY, in the name of all that is good in the universe, would one resort to such a banal reason as that?  You can have the world, and yet you'll "have what he's having"?  :rant: :blah:

NO!  Get out there and spend ten damn minutes familiarizing yourself with the range of options available to you.  You'll save money, and, if you ever move into designing production electronics, you'll have a head start on where to go.  That's marketable knowledge! ;)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Am I using the 2N2222 correctly?
« Reply #19 on: February 11, 2017, 08:44:32 pm »
Again, stocking 2N2222(A) (that you've not had since ancient warlords roamed the plains :-DD ) is silly when cheaper, and all around better, plastic parts are available.
Insert 'modern,' before cheaper and you'll have my 100% agreement.
Some N.O.S plastic parts are just as fugly as the 2N2222.
e.g. my bag of:

PIHER 2N4287,  minature NPNs good for 45V Vceo, 50mA Ic, with HFE in the range 150-600, produced in Spain while El Caudillo was still roaming its plains!  >:D

Quote
Who even buys 2N2222s?  Why?
Because the part number is so easy to remember!  |O :-DD
« Last Edit: February 11, 2017, 08:46:51 pm by Ian.M »
 

Elf

  • Guest
Re: Am I using the 2N2222 correctly?
« Reply #20 on: February 11, 2017, 09:19:06 pm »
Am I the only one who finds the metal TO-18 (and TO-3, etc.) cases neat looking? Also, the 2N2222 is iconic!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: Am I using the 2N2222 correctly?
« Reply #21 on: February 11, 2017, 09:34:17 pm »
Am I the only one who finds the metal TO-18 (and TO-3, etc.) cases neat looking?
They did have the big advantage of a standardised pinout.
 

Offline FlyingHacker

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
  • You're Doing it Wrong
Re: Am I using the 2N2222 correctly?
« Reply #22 on: February 11, 2017, 10:16:34 pm »
Am I the only one who finds the metal TO-18 (and TO-3, etc.) cases neat looking?
They did have the big advantage of a standardised pinout.

They are also neat looking, dissipate more heat, and are very easy to attach metal heat sinks to.
--73
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16611
  • Country: us
  • DavidH
Re: Am I using the 2N2222 correctly? edit-2N2222A
« Reply #23 on: February 12, 2017, 02:04:11 am »
For me it would just be a cost issue; the 2N2222 in the metal TO-18 package is more expensive than a plastic TO-92 packaged part and the very inexpensive 2N4401/2N4403 is practically as good.  If you find a deal for 10s or 100s of 2N2222s, then by all means use them but I would save them for where the metal TO-18 package matters.

The parts I miss are the easily heat sinked TO-39 transistors.  TO-225 and TO-220 packaged parts do not have the variety which was available in the TO-39.
 

Offline kosine

  • Regular Contributor
  • *
  • Posts: 158
  • Country: gb
Re: Am I using the 2N2222 correctly? edit-2N2222A
« Reply #24 on: February 12, 2017, 02:09:59 pm »
Another trap for young players: Not all "2222" transistors are the same, even from the same manufacturer.

http://www.onsemi.com/pub_link/Collateral/P2N2222A-D.PDF
http://www.onsemi.com/pub_link/Collateral/MPS2222-D.PDF

Electrically they're identical, but the pinouts are different! (Style 17 vs Style 1)

You can probably guess how I discovered this...

Moral - make sure you've got the correct datasheet!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf