I'm using FastLED to power 130 APA102 LEDs.

I’m using FastLED to power 130 APA102 LEDs. I found an example confetti demo and modified it a bit for my needs.

I have everything hooked up like so:
-9V 1.5A power supply going into buck converter
-buck converter outputting regulated 5V
-output from buck converter going to breadboard
-two separate power outputs from breadboard: one to the arduino and another to the LEDs
-ground connections for arduino/LEDs
-data and clock pins from arduino to LEDs

There still wouldn’t be enough power to drive 130 LEDs at full brightness, so I tried to control the power with FastLED. setMaxPowerInVoltsAndMilliamps. However, when I do that the buck converter starts making a humming sound. The animation seems to work fine though. It’s even pretty bright, which I don’t understand. I thought it would be pretty dim because of lower power.

The really weird part is when I remove that line of code everything works exactly the same.

So my questions are:

  1. Why is the buck converter humming?
  2. Am I using FastLED. setMaxPowerInVoltsAndMilliamps correctly?
  3. If I’m not using it correctly how do I fix it?
  4. If I am using it correctly, why is there no change when I remove the line?

Thanks for the help!
https://gist.github.com/anonymous/7a7b760a56f283e1049d6cf2fd95c6fc

Buck converters work by using oscillators and transformers.

It’s not uncommon for the windings of the transformer to make a noise at lower power levels but not at high power output.

Have you checked the power with a meter?

I use this in the setup:

set_max_power_in_volts_and_milliamps(5, 500);

and this to display instead of Fastled.show:

show_at_max_brightness_for_power();

@Stuart_Taylor I didn’t know that, so that’s reassuring. I just checked (should have done that before posting), and it’s drawing no more than 1A so that’s good.

Since I’m going from 9v/1.5A to 5V, would I theoretically be able to use 2.7A? Of course a little less due to the Arduino pulling a little bit.

@Joe_Meissler yes you can but also consider the buck converter efficiency that can be approximated to 90%.

So power in = 9V * 1.5 = 13.5W

max power out = 13.5 * 90% = 12.1W

max current out = 12.1W / 5V = 2.43A