I'm new to EE so my theory isn't that strong. I want to trigger a srd-05vdc-sl-c 5v relay with my Arduino using a PN2222 transistor and a flyback diode. I plan on using the schematic below:
Now my question is: If I'm powering the Arduino via USB, will the current draw be too much for the Arduino's Vcc pin, thus requiring external power? I believe I'm reading that the relay will draw ~90mA and the Vcc pin from the Arduino can handle up to 200mA total. However, the transistor drives how much current is actually drawn, correct? Which is a function of the digtal pin voltage, R1 and the Hfe rating of the transistor? So if you were to mess that up, the current flowing to the relay would be incorrect and would not trigger it?