I want to control an LED that draws 120mA of current with an analog pin (digital ones are used). The Atmega is rated at 40mA.
I thought of 2 possible solutions: - interrupt the LED circuit at the ground wire by using a 2N2222 transistor. - interrupt the LED circuit at the (+) wire by using a relay.
Using the 2N2222 would be cheaper and easier for me (I already have one). Can I interrupt the LED circuit on the ground wire without causing problems for the Atmega, the LED or the entire setup? I am thinking of putting a 1N4004 (also have one) diode at the analog pin.
Any feedback is appreciated. If anyone has other suggestions, I would love to hear them.