Advice on power management and control for ~100 LEDs

Hello all, I have a request for advice on a power management strategy for a project I’m working on. I am new to the world of electronics, this being my first project, and I’m a little unclear on some concepts that are probably very simple.

I’m still in the experimental/learning stage, and have found this website and other resources so incredibly helpful. Want to say thank you up front to everyone who takes the time to help newcomers like myself.

So, it may help to understand the project itself. It is somewhat of an architectural model that I intend to light up… It has 9 floors requiring internal lighting for the rooms: Ground floor requires 2 LEDs, then six floors above that with 8 LEDs per floor, above that two floors that require 7 LEDs each. It’s a total fluke this adds up to a convenient 64 floor lights btw, and these are all standard 5V20mA LEDs that I’m going to run at nominal (I bought a buttload of 100Ω 1/8W resistors for them).

Beyond these, the project will also require an LED for the building aerial strobe, 15 RGB SMDs and 2 RBG LEDs for internal/external seasonal lighting, perhaps a half dozen ‘flood light’ LEDs to simulate perimeter security, and a handful of other one-off LEDs for other effects plus whatever else I may decide to throw in because it’s fun!

These lights may, at times, be all or mostly all on, and I will need to address most of them individually, certainly so for the interior lighting. I’m going to try to simulate day/night hours when many or few room lights would be on (controlled at random in the code), lobby lights and outside lights always on, other lights being triggered manually, that kind of thing.

Long story short, I came to understand I cannot expect to power the entire system, all LEDs on at nominal power, through the Arduino (or can I?) and the shift registers I have (I bought 10 74HC595s) and needed to begin consider how to manage the power supply, and I came up with this experiment (forgive how crude this schematic is, it’s my first):

This is basically straight from the ShiftOut tutorial, except my goal was to split the power between the two sides of the transistors (npn2222’s). This is exactly what I’m looking at next to my laptop here, and it works. It took several iterations ironing out flickering and dimming, seems a well placed resistor always solved these issues.

Now, my questions!

  1. Is this doing what I think it’s doing? Are the LEDs drawing the current they need and the Arduino/595 drawing what it needs, separate from one another but sharing a common ground?

  2. If so, would it now be safe to place more LEDs in series through each transistor (ie, right now I have 2 LEDs per, but could I put 5 or 10 in each series for example?) My instinct is yes, based on I think (1) is true.

My intention is to continue to pursue the strategy in this schematic, add a second 595 to create an 8x8 matrix to light/control the 64 interior rooms, and then add a third 595 (and perhaps a fourth, fifth, etc) to begin controlling the rest of the lighting.

  1. Being that the first two 595s are operating as a matrix, is it even possible to add further shift registers that:

[ a ] Operate outside this matrix (Normal shift register behavior)?, or

[ b ] Constitute a completely new matrix (a third and fourth 595, a fifth and sixth, etc)?

  1. Am I even on the right track here? Or did I go off the rails long before any of my questions are even valid lol?

Anyways. Sorry for being so long winded here! I felt like I wanted to be thorough. Thanks in advance for your patience and any advice/criticism you may have!

ps. The schematic isn’t showing up in the preview, so I attached it as well.

  1. Look into addressable LEDs such as the WS2812 “Neopixels”. Only 1 Arduino output to contol a nearly unlimited number of LEDs. They can all be RGB even if most of them are just driven as white. (But you can tune the white so the indoor ones are warm white and outdoor ones are daylight or blueish.)

Run power and ground to the LEDs in a “star” pattern from a suitable 5V supply, like.5-6 amps. Short strips of up to 30 Neopixels can be powered from one end. The data line will make a snake pattern through the entire string.

I have not found a cheap source for individual Neopixels. They are significantly cheaper if you buy them in 1-5m strips. So much so that I expect your room lighting on each floor would use one long strip with only every second or third LED illuminated.

@MorganS

Thanks for the reply.. Can these strips be cut into individual LEDs? Or does that sever the functionality?

A key requirement in this project is that each room in the structure contain a single LED, each room being sealed and light-blocked.

Yes the strips are designed so you can cut between any two LEDs. The data wire must be joined up as a continuous snake but 5V power can go to individuals.

@MorganS

I'm looking them up right now. You're right, that would be an absolutely ideal solution, except for the scale of the model. The rooms in the 6x8 floors are 3.5x6mm and are not subject to change.

The smallest neopixels I'm seeing on Adafruit are the 5050s, just a tad too big for my purpose, not sure I can shave 1.5mm off of them. Besides that, I've already puchased the SMD LEDs, the resistors, and the shift registers.

Also, I am curious to know, for the sake of knowing, whether my power management solution is viable.

5050 is the size of the LED package. Adafruit also has 3535.and 2427. Only 2.4 x 2.7mm

They sell.these in strips too. For those small sizes it would be nearly impossible to handle without being mounted on a strip.

But you already have most of the parts, so...

  1. Your F*ing breadboard picture has lots of pretty colored wires. Switch F*ing to the schematic view and drag things around to minimize the number of wire crossings. Then I can comment on it.

Aside: there is a trick to inserting a picture. Attach it and hit "post". Right-click the attachment link to copy its address then edit your post to put that into an [ img ] tag.

  1. You don't have 5V LEDs. They are more likely to be 1.2V but different colors have different voltages. You can put as many in series as you have volts on your power supply.

BUT you might think you can put 10 LEDs on a 12V supply. That leaves nothing for the ballast resistor. With no resistor, if the supply drops to 11.9V the LEDs all go off and if it rises to 12.1V then the LEDs burn out. So put 9 LEDs in the string and choose a resistoe to give the current gou desire with only 1.2V across the resistor.

  1. Yes you can daisy-chain shift registers and drive different outputs to do different functions.

You should look into specialized LED drivers such as the MAX7219 which does the matrixing for you. It is intended for 7-segment digits but there is no reason why you should not use discrete LEDs.

There is another Maxim chip which acts as a 16-output shift register and current-controlled LED driver. It only needs one resistor to set the current for all LEDs. Good for driving multiple colors and series strings at constant current.

@MorganS

The 3535s but be tight but the 2427s would work for sure, I'll consider them, this does sound like the better solution, especially so with the very fine control of the temperature of the white if they're RGB capable. I appreciate the advice on that, I may yet go that route, it would save me a lot of effort.

Yeah the schematic, it's a mess I know, it's my first try at it.

The LEDs I have, yes you're right, they're not 5V.. In a Vr condition of 5V is what I was trying to express. I think they're min 2.8V, max 3V, something like that. They're Cree CWAXB{133,233,513}s. In the data sheets there are various bin numbers with different min/max voltage ratings and I'm not certain how to tell which mine are.

Since purchasing the 595 I came across others recommending the STP16C596 (among other solutions) in scenarios similar to mine. I had already concluded I bought my parts before completely exploring all the options... $200+ into the inventory now, I'm the better part of committed. That's a lesson learned for sure.

Thanks again, I do appreciate the time you took. As a veteran software developer I know how it feels when you tell a rookie 'This is the best way to do it', and they keep on with the way they want to do it anyways and want your help to do it. I totally get it.