Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
I'm trying to use an I/O pin on the arduino to switch a 5V relay. When I connect the control circuit to the arduino ground and 5V pins, the relay switches fine. However when I try to use one of the I/O pins pulled high to replace the 5V pin, the relay doesn't switch. (The pin is being pulled high for sure).Any ideas?
It just occurred to me that I'm using the relay to power an LED array circuit. It might make more sense to just switch the LEDs with the transistor instead of the relay. Here's my current circuit:
And I have one of these at my disposal if that can be used in place of the transistor:
The LEDs are white indeed but they are rated at at 3.4 V @ 20mA. My battery is about 7.5V fully charged and should be able to maintain that for quite a while.
As for the resistors I did 7.4V - (2 x 3.4V) = 0.6V then 0.6V/0.02A = 30 ohms.So I put 3 x 100R in parallel to give 33 ohms and then that is in series with each of the LED pairs.
Not sure what value to use for R3... If the LEDs can handle a fully charged battery maybe I can omit it entirely. Also, is there a reason for putting a resistor on each of the parallel LED circuits instead of putting one in series with them all?
Great, thanks! Just 1 question:Do I connect the battery's ground to the arduino's? (Or what does the 0V on the schematic represent?)