Controlable Powered LED Array?

Hi All,

I'm new to all this, but pretty quick to learn. I'm going to assume this is a n00b question, but I can't for the life of me find anything that explains my query! :frowning:

Before I start; I'm not too interested in controlling each LED individually, so I'm assuming I don't need a shift register (don't know how to use one yet anyway). I just need to be able to control an array of LEDs as a single unit.

I want to create a simple 20 x RGB LED array spotlight with PVM.

I've written a small code to control a single RGB LED with onboard digital pin PVM, mixing the colours, all fine.

I also know that a bunch of LEDs in series require a higher voltage. I can connect these directly to 12v (for example, with the correct resistor) and have them all light up nicely.

The digital pins on my Arduino Uno board don't output 12v however... so how do I get 12v to my LED array VIA the Arduino so I can control it??

PVM? You mean PWM! Try the Arduino website for examples of driving high voltage loads - any of the relay driving circuits would work for LED chains and you can skip the free-wheel diode. There are also constant-current high-voltage LED driver chips available these days. Just look out for power dissipation issues in the drivers and resistors.

PWM! Yes, that's what I meant! I wonder where I got PVM from... :B

So I'd need a relay? I DID wonder... but I'd be wanting to do PWM over it too... would a relay be fast enough? My knowledge of relays are of those found in cars.. big clicky things... :S

Heat issues, also well noted. :slight_smile:

No you don't need a relay - I'm just saying that a circuit that drives a relay can be adapted to drive LEDs - especially if 12V is involved.

Look at this schemtic where I have 20 LEDs turned on by 1 transistor in the upper right corner. That's what you need.
Strings of LEDs connected in parallel. 12V in, thru each string, to transistor Collector, Emitter connected to ground, Arduino output pin to a resistor to Base of transistor.

Ahhhh... transistor! That looks like my missing link! I did always wonder about their exact purpose. :B

So that'll take the output from one of my digital pins, and make / break the 12v circuit on the other two pins accordingly? I assume their spec sheets will indicate max voltage ratings in case I use more power for larger arrays?

Thanks for your advice guys. :smiley:

Yes, drive the other 2 LED leads like this as well.
Assuming you have a common Anode RGB LED - I don't think you said.

Wait a second - you can't wire RGB LEDs in series.

You'd have to wire them all up in parallel - increasing the current required.
So for 20 in parallel, at 20mA max each, that 400mA you have to control.
For 3 colors. Will need a decent power supply if all are on.

Does anyone make RGB LEDs without a common Anode or Cathode? Then you could connect the colors individually in series.

I'd advise to use ULN2003
You can find data on it:
And example in my project -):

where I used it with +12V power.

ULN2003 is a good solution to drive multiple parallel colors in the RGB LEDs.
1 part, 3 current limit resistors, vs 3 transistors, 3 base resistors, 3 current limit resistors.

Of course! You can't use RGB LEDs in series... the ones I have are common cathode.

I think I'm going to need to dig up an old laptop PSU! 1.2A for 20 RGB LEDs, right? (assuming all 3 diodes are on for white - 20mA x 3 diodes x 20 units) and I'm actually planning on having 2 of these 20 LED arrays.

Also, CrossRoads, what're you using to draw your schematics?

I use the software from I find it very easy to use.
To post here, I do a screen capture, paste into powerpoint, save as .jpg.
Sometimes crop down to size, and resize, using Office Picture Manager.
Since the parts are generic, they don't have footprints tied to them for making layouts like eagle does, but we are generally not discussing layouts here. Is also pretty easy to make a new symbol if needed, or to change & save an existing one.
I have several done up to represent a generic 328 arduino and a promini.

I haven't tried the PNP transistor approach to controlling current (am still working my way thru a small drawer full of NPN transistors).

Ok! I think I've got it...

So I'm gonna grab myself a ULN2003 for the darlington pairs... but basically this is what I have so far.

This is for a single colour LED array and the 'H' representing the High and Low input from the Arduino.

I'm getting all LEDs lit on a High signal, and none of them lit when it gets a Low signal, so... it appears to work.

I'm going to assume too that this will be quick enough for PWM?

It's not correct, you have to add up two resistors, one serial to
base first transistor (input), and second in collector line the same first transistor.
This is why ULN2003 was broght to light, to save time on
calculus value two R's, and time for soldering 4 elements together.

Your depiction of the ULN2003 driver is not correct.

You guys are very patient. :slight_smile:

How far off am I now? :stuck_out_tongue:

I did the same here, just using a single transistor.
The ULN parts sure make it convenient.