led snowfall led's

hi all again
need help with a simple led design but i havent got a clue where to start ( newbie) i have made some led tubes but i want them to look like snowfall like this

so where do i start ?
do i use a relay module ? transistors and where can i start for the sketch
i have an arduino mega.

thanks
marko

With 40+ individually addressable LEDs in a tube I would call that anything but a simple design. They appear to be using one (or more) shift register LED drivers and a four or more transistors or mosfets to be able to write to the LEDs in a cascading pattern. And of course everything is built onto a custom, 33" PCB. (link to retailer's page)

You sure you don't have any other simpler projects that need help? :slight_smile:

as with the With 40+ individually addressable LEDs in a tube. sorry should have made myself a little clearer im only wanting 12 banks of 4 leds in my project. maybe something like the nightrider led's but only one sided

12 banks of 4 LEDs, and all four LEDs in a bank will be on at the same time?

What kind of LEDs are these that you're using? Do you know their voltage and amperage requirements?

What are you using to control them (an Uno or similar ATmega328 board)?

i have a mega arduino i'm powering the led with a seperate 12volt power supply 100 watts basically i need help with the sketch and what to use a relay of 12 banks or transistors the 4 standard 5mm leds will have only 20mw each x4 = 80mw all on at the same time x 8 or
i think i will use use
ULN2803A

Transistors will work fine. 2n2222 or 2n3904 would be two common NPN types.

Here's a schematic (second image on the page) that shows the basic setup. Instead of the 5V arduino powering the LEDs use your 12V source, change the resistor (R2/3/4/5) to 680R, and instead of four sets in parallel use just two sets and put two LEDs in each set.

For your digital outputs controlling each transistor use a numerically consecutive set of pins, for example 22 through 33 (that's 12 pins). Your code would then look like:

for (int x = 22; x <= 33; x++) {
  digitalWrite(x - 1, LOW);
  digitalWrite(x, HIGH);
  delay(100);
}
for (int x = 33; x >= 22; x--) {
  digitalWrite(x + 1, LOW);
  digitalWrite(x, HIGH);
  delay(100);
}