I am trying to figure out how to set set_max_power_in_volts_and_milliamps() and retain the ability

gplus
(Ryan Webber) #1

I am trying to figure out how to set set_max_power_in_volts_and_milliamps() and retain the ability to get full brightness out of my ws2812b’s ?
If I simply comment out this function (currently set to 5,1500) my LEDS are capable of intense whites, but using this function, seems to limit my brightness to about half.
I am likely setting the wrong MilliAmps value. How do I go about calculating the correct top limit?

(Daniel Garcia) #2

You’re asking for two conflicting things. Setting the maximum power draw means that brightness will get scaled (on a per-frame basis) to make sure that you aren’t drawing more than the amount of power you’ve set - in this case 1.5Amps. You don’t mention how many leds you are trying to power, or what size of power supply you’re using. Typically, you’d want to set the max power based on your power supply, e.g. if you have a 2A supply, then you’d used 2000 - if you have a 10A supply, then 10000. (Or, if you are running off of batteries, you could set a max power draw on the lower side to get more out of a given battery).

So - for leds that will be plugged in - you want to set the value to the max draw of the power supply that you are using (converting from amps to milliamps, of course - so a 2Amp supply would be 2000 milliamps)

For leds that will be using a battery, take the capacity of the battery (e.g. 10Ah) and divide it by how long you want the thing to run (e.g. 20 hours), again converting to milliamps.

This brightness gets recalculated on a frame by frame basis.

(Ryan Webber) #3

Thank you.
I didn’t get the relationship between the total project / power source and the setting. I started with very low settings… thinking it was a per led setting… I moved up to the 1500, realizing that I clearly didn’t understand how this was meant to work.
I have ~800 leds and require no more than 60 amps from my 80 amp supply.
I think I should be good setting usage at 5v 48000ma

thanks again.