I am trying to invent a smarter way to calibrate brightness for variable-length installations

I am trying to invent a smarter way to calibrate brightness for variable-length installations to get good color. I’m doing multiple installations (houses) ranging from ~600-1000 WS2813’s, using a 12A power supply and usually 1 extra power injection point about 2/3 of the way down the strip. Voltage drop is the problem (not amperage).

Currently, for each installation, I dim white LEDS and nonwhite LEDS by separate factors until it looks good with a few test patterns, then use that for every pattern going forward. But I want to make it dynamic, so that it dims differently based on the colors currently being shown. For example, a pattern that’s Red/Green (Christmas) could run with higher brightness than, say, Red/White/Blue. Or, if I’m only using every other LED then I could double the brightness as compared to every LED.

One idea is to put all LEDS to white, and dim it until the whole strip looks good. Then take that percentage (let’s say I dim to 50/256), and multiply it by the total RGB units (256 + 256 + 256) to get the max number of “brightness units” that the installation can service. Then, for future patterns, I could add up the 3 RGB numbers for every pixel that’s “on”, and scale it back to the max number of brightness units before calling FastLED.show().

Alternatively, is this what setMaxPowerInVoltsAndMilliamps would do “for free”?

Would love to hear how others have addressed this!

Try this https://github.com/leonyuhanov/colourObject it lets you set a global MAX value and still gives you a perfect colour rainbow

Using setMaxPowerInVoltsAndMilliamps will dynamically adjust brightness based on pattern colors and the density of lit pixels. However, even if using setMaxPowerInVoltsAndMilliamps you will still need to turn your master brightness (FastLED.setBrightness) down since you’re only using a 12A power supply with that may LEDs.

If you’re measuring a large voltage drop at the end of your strip though you might simply need more injection points (and check that the feeder wire going out to the injection point is large enough too).

Thanks Marc. Yeah, we used 12/2 AWG feeder cable so it has pretty low V drop. And we prefer to avoid more injection points.

Curious, why would we also need to setBrightness down? Wouldn’t setMaxPowerInVoltsAndMilliamps do that for us, assuming we set it to something realistic for our setup? E.g. with 2 power injection points, each seems to pull a max of about 3-3.5 Amps so I could set it to maybe 5 Amps.