transistor relay circuit

Hello all,
I was wondering what transistor i should use for this relay ?
Relay : www.radioshack.com/product/index.jsp?productId=2049716
I have 3 different transistors
Mps 2222a -331
2n 4401 -331
2n 3904 B331
They were from radioshack, in which i believe the emitter and collector are switched, so i must flip them.

Coil Rating: 7.9VDC, 18mA, 500 Ohms

Any NPN transistor can be used to connect coil - to GND, with coil + to 9V per the comments.

Yeah… Most transistors will be rated for more than 18mA (collector-emitter current), so almost any NPN transistor should work. The current rating on a transistor is it’s maximum*, and the actual current is determined by the circuit/load (Ohm’s Law).

If you assume a beta (current gain) of around 100, and then cut that in half for "safety margin), you need bass current of around 4mA. A 1K base resistor is “close enough”.

Don’t forget the reverse “protection” diode across the relay coil.

They were from radioshack, in which i believe the emitter and collector are switched, so i must flip them.

What??? I doubt the transistors are defective in that way… If a transistor is bad, it’s usually “dead”.

  • In “linear” ( non-switching) applications, you can often exceed a transistors power rating and fry it without exceeding the voltage or current rating. This is a switching application, so that’s not something to worry about here.

Thanks and the ones i am using are not flipped actually. The comments on radioshack .com say that some people had transistor which the e and c were flipped but mine are fine.