Real time approximative led strip consumption computation

Hi everybody,

As a led consumption, in the context of a strip, is max 60 ma, in full brightness, white (FF.FF.FF)...
Can we estimate the realtime consumption based on the color of every led ?

ie: with Brightness: 255 (FF)
White - FF.FF.FF = 60ma (20ma+20ma+20ma)
Red: FF.00.00 = 20ma + 0 + 0
Orange: FF9500 = 20 ma + (20/0xFF0x95) + 0 --> (20/255149) = 11.68 ma ?

And if we say, for example, half brightness... White would be 60ma/2 ?

Can this be so simple ?

For the first part, yes. That is for most controllers which just drive them linear.

Second part, define "half brightness". If that would be 80.80.80 for a linear driver then yeah. But that would also be the outcome of the first question :wink:

If you define "half brightness" as half as bright as FF.FF.FF for our eyes then no. Our eyes are not lineair. So "half brightness" would be much less than 80.80.80. Some beginners reading about it.

thank for the link, really interesting.

I am more interested in the amp consumption than in the eye perception.
I mean, if I put the brightness to 808080 instead of FFFFFF, would this consume half the amp of full brightness ?
If, when set, the brightness I see is good, and the real value is 90% of full, would it consume 10% less amp ?

I am building my own controller for a specific use, and I would like to log the average amp consumption per light effect... to forecast battery duration...

I mean, if I put the brightness to 808080 instead of FFFFFF, would this consume half the amp of full brightness ?

Yes.

Can this be so simple ?

Yes.

Thanks.

Re-reading the answer of septillion, I realised he did answer as well :slight_smile:

jc

Note, that is for a lineair driver. But then again, 99% are.

And yeah, for the current calculation you can use the linear value. But if you make an application where you want to dim light for/by humans, you might want to consider gamma correction.*. Even then you can still use the “real” linear value for the calculations.

But realize that calculations can get a bit harder if you connect the leds to an (unregulated) battery as a supply. Not only will the current draw vary with the battery voltage, this variation will differ between color. Most noticeably between the red and green/blue. Depending on the variation you may even notice this in the rendered color.

  • An easy way would be to use FadeLed 8) (of which you don’t need to use the Fade part).