Driving Multiple LED Outputs

Hello everyone,

I'm working on a project in which I'll be using Arduino Mega 2560's to drive about 30-40 LED's. If each LED has a forward current of about 20mA, then I'll need about (600-800mA?) to drive them.

Would it be feasible to use an AC/DC converter with 5VDC 800mA output (RECOM RAC04-05SC/277) along with a TI ULN2003A transistor array to directly power the microcontroller as well as the LED's instead of just taking the power from the Mega's 5V pin?

AC/DC Converter link: http://www.recom-power.com/pdf/Powerline-AC-DC/RAC04-SC.pdf

ULN2003A link: http://www.ti.com/lit/ds/symlink/uln2003a.pdf

Any response is appreciated.

Terry

Simple lighting setup? Why not a Shift Register, or LED driver to divert the load away from the Arduino?

Yes, ULN2803A to sink current, use lots of IO pins, or daisy chain 5 TPIC6C595 shift registers, use just 3 IO (SCK, MOSI, SS)and 1 more for OE for brightness control. Drive them from a Promini, save a bunch of money.
Separate 5V source for the LEDs either way, onboard regulators will overheat with that much current.

ApexM0Eng:
Simple lighting setup? Why not a Shift Register, or LED driver to divert the load away from the Arduino?

-Good question, Apex. I haven't used a shift register before and didn't think of using one for that reason. Also, my manager just gave me his suggestion as to provide that 5V supply using the AC/DC converter. Since he used to be the chief engineer at Boeing, I'd say his input has some merit.

And no, it won't be a some simple Christmas lighting setup or anything like that, I'm going to be interfacing dozens of rotary switch/encoder/pushbutton inputs and outputting to corresponding LED indicators for annunciators to a PC flight sim (I'm building an Autopilot Control Panel to interface with X-Plane flight simulator, and it's my first panel that I'm building ever...)

CrossRoads:
Yes, ULN2803A to sink current, use lots of IO pins, or daisy chain 5 TPIC6C595 shift registers, use just 3 IO (SCK, MOSI, SS)and 1 more for OE for brightness control. Drive them from a Promini, save a bunch of money.
Separate 5V source for the LEDs either way, onboard regulators will overheat with that much current.

-Ok, I'll consider both options, but a quick question: what is the difference between ULN2003A and ULN2803A? Would I be OK using either if I were to go with this approach?

-So the shift registers reduce the number of I/O pins that I'll be end up using as opposed to the transistor array method? Either way, I'll have enough I/O since I'm going to be using 2 Megas, but I still want to know the benefits of either method

Hi Terry,

what is the difference between ULN2003A and ULN2803A?

The former has 7 outputs, the latter has 8.

-So the shift registers reduce the number of I/O pins that I'll be end up using as opposed to the transistor array method?

Yes, but don't underestimate how much easier this could make your wiring.

Have you considered using max7219 chip to drive your leds? Each chip can drive up to 64 leds and needs only 3 Arduino pins. Also you will only need one resistor to set the led current for all leds, instead of one resistor per led.

Paul

PaulRB:
Hi Terry,
The former has 7 outputs, the latter has 8.
Yes, but don't underestimate how much easier this could make your wiring.

Have you considered using max7219 chip to drive your leds? Each chip can drive up to 64 leds and needs only 3 Arduino pins. Also you will only need one resistor to set the led current for all leds, instead of one resistor per led.

Paul

That sounds intriguing, but I'm still interested in going the ULN2803A way, but if I end up running out of pins then I suppose this will be my backup plan!!!