Hey guys.
I have a couple of general questions regards running LED's off a digital port.
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.
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.
A bit more info/diagram for clarity;
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.
If you ask Jeremie - he can help you with a mosfet schematic that can connect to the PWM of the ez-b and give you brightness control
Thanks DJ. I may just do that.
As I recall those relays need 5V to operate and the EZ-BV4 is 3.5V. You will require a converter like a EzSBC.com LS1
@bookmaker32
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.
Here's the thread that I believe @DJ is referring to. P-Channel FETs are used for switching/dimming the positive voltage side. But as the other folks on the forum have suggested a TIP high current transistor would work, or an N-channel MOSFET (for switching the negative side of the LEDs) would work as well.
@Bookmaker32 funny enough some relay coils will still respond to a lower voltage. I remember switching a 9V relay with 5V in the past.
Thanks Jeremie. I'll take a look.