United Kingdom
Asked — Edited

Running A Led Of Port D6

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.:)


ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

United Kingdom
#9  

Cool. Thanks guys.:)

#10  

An LED works for me on D6. Both with set digital and with PWM.

Alan

United Kingdom
#11  

Consider using a TIP122 transistor switching circuit and a voltage regulator, you will have 5A to play with that way which should be enough for a string of LEDs.

If building the TIP122 is beyond you email me, I will happily send you one.

United Kingdom
#12  

@Alan. Interesting. Well thanks for testing it. I must have a dud port then. I don't remember putting anything on the pin to damage it though. confused.

@Rich. Me going on about the signal pins, I completly overlooked using the Vcc pin and a regulator sleep. Probably stating the obvious but the regulator would need to be 5v tolerant correct? Thanks for the tip, and for the offer. I might just take you up on that.:)

One thing, how would I control the LED strand (On/Off) using the Vcc and ground pins. Am I right in saying that the Vcc pin supplies a constant power feed?

United Kingdom
#13  

Here's the circuit for the transistor circuit that's floated around the internet since the beginning of time;

User-inserted image

When a voltage is supplied to the base of the transistor it makes connection between the collector and emitter thus completing the circuit for the Vcc/Ground circuit.

Setting the digital port that's connected to the base to high will enable the transistor and whatever is connected to it will become energised, be it an LED, a lamp, a motor etc. setting the port to low it will disable the transistor and the connected device will become de-energised.

Since the V4 EZ-B has 3.3v logic the 1k resistor needs to be changed, I do not know off the top of my head what it should be but believe it's around 660 ohms, it's mentioned somewhere else in the forum though so a simple search will find it.

Here's a tutorial on how to make the circuit on proto board, it is a very simple circuit however if it is beyond you I am sure I have some proto board, tip122s and resistors left lying around.

You can regulate the VCC pin to 5v or any other voltage you want. You could just use resistors to bring the voltage down too however that would be inefficient.

#14  

I use one of these to turn on and off external devices like a high output LED...Relay It plugs directly into one of the ezb's digital ports and is simply controlled by toggling the digital port high/low.....

United Kingdom
#15  

Thanks for the info guys. Just reading through my last post...

Quote:

Probably stating the obvious but the regulator would need to be 5v tolerant correct?

#16  

@Steve... What do you mean 5amp tolerant? The first time you said it was correct I think... "5v tolerant"... The digital pins (signal pin) on the ezb are 5V tolerant.... My relay solution is a simple switch, plug and play... What is the voltage rating for your led light string?