LED Starlight wall?

Hello all,

I am new here and am in need of some help. I am wanting to start a project that will use 30-40 LED's that will light and "twinkle" like stars for my nursery. Can someone help me out? Just a few pointers on where to get started. i.e. which Arduino board to purchase? What other components I should look at? Any help would be much appreciated!

I do have a small background in electronics but I've been away for quite a while.

That shouldn't be too hard.

The Arduino Uno has 14 digital I/O pins. You could create a matrix with 7 rows & 7 columns to control 49 LEDs individually. (Basically, you connect the -side of LEDs to the column and the +side to the rows... or something like that.) Or, the mega has 54 output ports so you can connect one LED per port.

Each port can drive an LED, but there is a limit to the total current. With lots of LEDs, you'll probably want to some driver chips (maybe ULN2003/4 or ULN2803/4), Of course, each LED needs a current limiting resistor.

Then, you just need to write some simple code to output random data at random times. If you want to fade the LEDs, some of the outputs can be programmed with PWM to control the average brightness.

So using a ULN2004 (input current of 0.35mA at 5 V) connected to a PWM pin (max of 40 mA per pin) on the Arduino I would be safe to drive up to 25 LEDs (minus the protective resistors) from the output pin of the ULN2004? Or has my mind slipped too far?

I think I will be safe (correct me if I'm wrong here) to use the Arduino Uno and build my own 8x8 matrix of 20 mA White LED's that will be able to connect directly to the Arduino (following the tutorial here: Arduino Playground - DirectDriveLEDMatrix). Am I correct on this? Thanks!

Is there any way I can get this moved to the LED/Multiplexing forum? I think I might get more help there?

Correction:

The Arduino Uno has 14 digital I/O pins.

Uno has 20 digital I/O (analog works as digital too), so size of matrix can go up to 10 x 10 = 100 leds.

I think I will be safe (correct me if I'm wrong here) to use the Arduino Uno and build my own 8x8 matrix of 20 mA White LED's that will be able to connect directly to the Arduino (following the tutorial here: Arduino Playground - HomePage). Am I correct on this? Thanks!

It's possible to drive leds by arduino itself, but current would be limited to : 40 mA / 8 = 5 mA per led, so don't expect "bright" illumination. Buffering outputs by chip helps to solve this limits. Other popular drivers TLC5940, MAX7221 and of course ULN2003

Can I ask where you got the 8 from in your calculation of 40 mA / 8 = 5 mA?

It seems a lot of people use the MAX7219/21 for their projects so I might try that. I am just worried that I might only be able to have 1 brightness for all LEDs at the same time. I may have to use two of these drivers (if I can do that?) to control 2 different groups for different brightness levels of the LEDs.

I was referring to reply #3:

I think I will be safe (correct me if I'm wrong here) to use the Arduino Uno and build my own 8x8 matrix of 20 mA White LED's that will be able to connect directly to the Arduino (following the tutorial here: Arduino Playground - HomePage). Am I correct on this? Thanks!

So 8 come from matrix size 8x8.