Selecting a transistor to drive a 220v relay

I would like to switch this relay with an Arduino Uno:

The data sheet states:
Minimum Contact Load: 1A @ 5VDC or 12VAC

Obviously an Uno cannot drive 1A, so I would like to use a transistor to drive the relay.

Question the First: How much of a safety margin do I need on the transistor? Is a 1A transistor adequate?

Question the Second: Knowing that I am limited to ~20 mA 5v input (the Uno can provide 40mA but I don't want to push it) and need to provide 1A 5v output, how does one select the proper transistor? I've looked at e.g. the Sparkfun website and searched for transistors, but there does not seem to be any faceting feature to narrow down a selection. Does one simply become familiar with the selection and choose from memory? Or stab in the dark until a suitable component is identified?

Question the Third: How might one verify that a potentially suitable transistor is in fact suitable? From stabbing in the dark on the Sparkfun website I've identified the 2N5192G transistor. I am examining the data sheet. What should I be looking for? I was hoping to find a graph that might plot 20mA input and confirm that is enough to cause 1A output. Alas, I don't see anything so obvious.

Finally, to be clear, after assembly I intend to have two qualified electricians examine the circuit and assembly and provide critique. I do not consider myself qualified to handle 220v mains. Other than the most basic considerations such as creep distance (which I see many Sino imports do not do right) I know very little about AC or high voltage, so by designing and building something I hope to be corrected and learn. This is a learning experience, not a product or a project. I don't need to electrocute myself or burn my house down.

dotancohen:
The data sheet states:
Minimum Contact Load: 1A @ 5VDC or 12VAC

Means, you shouldn't switch small loads with the contacts.
A minimum load current is needed to keep the contacts clean.

This has nothing to do with coil current.
Coil current for a 5volt type is ~200mA.
A 2N2222 with 220 ohm base resistor would do.
Don't forget the back-emf diode across the coil.
Leo..

Hello dotancohen.
You are looking at the wrong spec.
The relay input is the coil and the
output is the contacts rating. So,
you should look at the coil data,
5V at 185 ma or choose 200 ma.
A driver transistor will still be needed.
Herb

Wawa:
Means, you shouldn't switch small loads with the contacts.
A minimum load current is needed to keep the contacts clean.

I see, thanks.

This has nothing to do with coil current.
Coil current for a 5volt type is ~200mA.

I don't see that mentioned anywhere in the datasheet. Is that just something that is so well known that it not even need to be mentioned on the datasheet?

EDIT: I now see it in the datasheet. I just did not know where to look.

A 2N2222 with 220 ohm base resistor would do.
Don't forget the back-emf diode across the coil.
Leo..

Thank you, I am looking at the 2N2222 datashet but I don't see where it is mentioned how much current the device will draw, or that it is able to supply the necessary 200mA. I found that page by googling "2N2222 datasheet" and other pages that I found were similar or identical. How do I read that sheet to see that the part is appropriate?

Note that I am not doubting you. I am just trying to learn so that next time I could be able to find the proper part myself. I appreciate your help!

herbschwarz:
Hello dotancohen.
You are looking at the wrong spec.
The relay input is the coil and the
output is the contacts rating. So,
you should look at the coil data,
5V at 185 ma or choose 200 ma.
A driver transistor will still be needed.
Herb

Thank you. I now see that, under the section "Coil Data - 900 mW". Now that answer envokes even more questions, if you will. For one thing, how do you know to use the 900mW coil data and not the 1W coil data? I'm unclear why there are two values. Is that component available with two different coils, or is there only a single coil but the user can choose to operate it in 900mW or 1W mode?

EDIT: Nevermind, I see the info now under "Ordering Information". There are in fact two part numbers available, one with a 900mW coil and another with a 1W coil.

dotancohen:
I am looking at the 2N2222 datashet but I don't see where it is mentioned how much current the device will draw, or that it is able to supply the necessary 200mA.

The transistor doesn't 'draw' current.
It passes (switches) the ~200mA of the coil to ground, so it must be able to handle that coil current.

The 2N2222 is rated for 600mA absolute max, but with ~20mA base current (the 220 ohm resistor) I wouldn't switch more than about 300mA.
All well within the ~200mA the the coil draws.
Leo..

Wawa:
The transistor doesn't 'draw' current.
It passes (switches) the ~200mA of the coil to ground, so it must be able to handle that coil current.

Yes, but is the transistor not drawing current from the Arduino's output pin controlling it?

The 2N2222 is rated for 600mA absolute max, but with ~20mA base current (the 220 ohm resistor) I wouldn't switch more than about 300mA.
All well within the ~200mA the the coil draws.
Leo..

Alright, this may answer my previous question. A 220 Ω resistor passing 5v would draw 1/44 A or about 22 mA of current. That is the current used to activate the transistor? I'm googling for information and I see that the transistor needs enough current to "saturate" it. I'm reading about the p-n junction now to get a handle on all this. Am I on the right track?

How did you get that the 2N2222, while drawing 20mA, will switch 300mA? Is that because transistors are "current amplifiers" (how I see it mentioned in many places)? From where does the 1:15 ratio come from?

Again, thank you Leo for your patience and your instruction. Thank you to all who chime in to help.

Yes, but is the transistor not drawing current from the Arduino's output pin controlling it?

No. The relay does that.

From where does the 1:15 ratio come from?

The transistor data sheet. The current gain for a small, saturated bipolar transistor is typically 10-20.

dotancohen:
A 220 Ω resistor passing 5v would draw 1/44 A or about 22 mA of current. That is the current used to activate the transistor?

Almost right.
The transistor Base-Emitter has a ~0.7volt threshold, so 5-0.7= 4.3volt is across the resistor.
Resulting in 4.3/220= 0.0195Amp = 19.5mA Arduino pin current.

That will fully saturate the 2N2222 up to collector currents of about 400mA.
Above that the transistor won't fully saturate, will get hot, and could end up in silicone-heaven.
Leo..

Coil current for a 5volt type is ~200mA.

How did you come up with that ?
5V/0.200A = 25 ohms.
That sounds a bit low.

This 5V Relay

has a coil resistance of 69.4 ohms. (which sound more reasonable)

This one is 70 ohm coil resistance

See link in the first post.
30Amp relay, 25-27ohm coil.

Not sure why the 5volt version is preferred.
Leo..