Hey guys.
I have a couple of general questions regards running LED's off a digital port.
1. I hooked up a 3V LED to the signal and ground pins on D6 on my v4 earlier today, made a little digital on, sleep 5 seconds, digital off script to test it but all it would do is very quickly flash once. I changed it over to port D12 and it worked fine. Any reason why D6 didn't work? The port is fine as I tested it with a servo. I was just wondering if it's because D6 is also a UART port as well and this may have caused the issue.
2. Any ideas if I could power a set of 20, 3v fairy lights off the V4 signal and ground pins? I lent my multi meter out so I can't test the amp output of the LED's. They normally run off two 1.5v AA batteries. Could 20 bulbs be too much?
Thanks.
Asked
— Edited
Rich mentioned using the Vcc pins with a TIP122 circuit which will allow me to use the 5 amps from the Vcc pin. What I wanted to confirm was that using a regulator, that would have to be 5 amps too. For example, the 5v regulator from the shop only supplies 1 amp and would not be sufficient. Is that right?
I have two sets of 20 bulb LED strands, one is 3v and the other is 4.5v. I'm only looking at using one of these.
The regulator can be whatever you need it to be. You can't have too many amps but you can have not enough. A 1A may do but it will depend on the current draw of the LEDs.
Thanks again Rich and Richard.
Hey, you mentioned about using a relay switch like the one you linked to and I just found this on Amazon. I just wanted to ask about hooking it up. I get the Ground, +5v and signal in the right, but what are the terminals on the left (NO, COM, NC), and to which ones would a need to connect a two wire LED string?
COM = Common
NC is normally Closed (i.e. when the relay is not powered/the EZ-B isn't set to high) the contact is closed.
So, you would have your Vcc to Com. The LED, light, motor whatever connected to NO and the other side of it to ground. When the signal pin of the digital port is On/High it would close the contact and whatever is connected would work.
If you wanted it to work when the EZ-B signal was low/off (including if the EZ-B is powered off) then connect between Com and NC.
The switch in the relay is moved by the electromagnet from NC to NO when the relay is energised.
Thanks Rich. Just to confirm from what you said, the other side (LED wire) goes to a ground on the battery. So this doesn't need a common ground then?
EDIT: Forget what I said about common ground. I'm going to power the LED's (with a 5v reg) from spare ground and Vcc pins on a port which a ping echo uses.
Thanks again buddy.
Indeed they are 5v. I'm going to power it from spare ground and Vcc digital pins through a 5v regulator (post#27). Thanks though.
@Bookmaker32 funny enough some relay coils will still respond to a lower voltage. I remember switching a 9V relay with 5V in the past.
Edit: I meant 3.5 volts.
According to the write up, it should work at 5v.
EDIT: I've just seen your edit. No worries.