Uno -> Darlington PWM to many RGBleds

Hi Arduino Crowd,

new here and new to arduino, so please be gentle :wink:
I know that controlling multiple RGBleds is a staple topic and i have searched, but maybe I am too dense...

I am trying to hook up 30 RGB LEDS (common Anode / Plus) to my up-and-running PWM out of pins 9,10,11.
Here a pic:
http://dl.dropbox.com/u/3892784/temp/arduino_pwm_leds001.jpg

It's all working sweet with the two potis (one for color, one for brightness), code here:
http://dl.dropbox.com/u/3892784/temp/RGBLED_006/RGBLED_006.pde

I've got a couple of UNL2003 Darlington Arrays here and also tried to hook it up, but the LED just stays dark.

Can anyone point me into the right direction?

Thanks and Greetings, Ubbo

I've got a couple of UNL2003 Darlington Arrays here and also tried to hook it up, but the LED just stays dark.

How have you tried?
Connect the input to the arduino PWM pin, the output to the LED cathode through a resistor and connect the anode to the +Ve supply.

Hi Grumpy_Mike,

thanks for the swift reply.
I have hooked it up again, and now i get a strange phenomenon:
Without Darlington all is good.
With Darlington, it does something completely different with the potis.

Hard to describe, so i made two videos:

Without Darlington:
http://dl.dropbox.com/u/3892784/temp/no_darlington_ok.mp4

With Darlington:
http://dl.dropbox.com/u/3892784/temp/darlington_notok.mp4

Strange...

Any clue?

Thanks, Ubbo

Ok while I am waiting for half an hour for those to download, how about posting a schematic of what you have. Note please a schematic not a physical layout diagram.

Sure, I'll try and find some freeware schematic cretion software for mac...
But it'll take longer than half an hour ; )

I'll try and find some freeware schematic cretion software for mac...

There is a good one called pencil and paper, you use the pencil to draw on the paper and then take as photograph of it to post.

Anyway how the hell have you managed to make something without a schematic, I can't do that and I am better at this than you?

Sure thing, I’ll draw one up ASAP and post it here.

OK got them now, two things:-

  1. You appear to be running it off just 2 AA batteries. This will give you only 3V and is not enough to reliably power a 16MHz arduino.
  2. You seem to have the inputs and the outputs of the darlington misaligned so that one of the LEDs is being controlled by a driver with no input connected to it.

Allright, I have downloaded pen&paper...
http://dl.dropbox.com/u/3892784/temp/rgb_layout.jpg

Have you modify your scketch, ULN is inverting signal. And it has higher drop-off voltage ( ~1V), which would be noticeable via lower brightness, especialy with lower power supply +3V (blue and green should not work at all)

Ok that schematic is fine, the only issue is the low voltage you are running it off. What happens when you run it off the USB supply?

ULN is inverting signal

True but the fact that it is current sinking inverts it again so this will be the same as current sourcing. However the original circuit used current sinking and the code is inverted for that:-
analogWrite(led[i], 255 - color[i]);
So remove the inversion:-

analogWrite(led[i], color[i]);