0
\$\begingroup\$

I am designing a PCB for some LEDs based off of the arduino nano. The LEDs I am using are 24 WS2812, and the microcontroller I am using is the ATmega328P-AU. I have the AMS1117-5.0 voltage regulator feeding power to the microcontroller. The whole circuit is meant to be powered by your computer via USB. Should the voltage regulator also power the LEDs, or can I bypass it? The AMS117 can supply up to 1.5 amps, which should be enough to power the whole circuit, but I want to be safe. Would a better idea be using a dedicated voltage regulator solely for the LEDs?

\$\endgroup\$
10
  • \$\begingroup\$ You provide some, but nowhere near enough, information. But in general, LEDs should be driven using a circuit that controls their current -- not their voltage. Circuits that control current are usually really good at doing it regardless of the impressed voltage differential. So, within limits, I don't think there would be much problem using the LEDs directly with an unregulated, higher voltage power supply if you use low-side current regulation methods. \$\endgroup\$
    – jonk
    Jun 22, 2020 at 21:16
  • 1
    \$\begingroup\$ @jonk that would be counterproductive advice here, the WS2812's have integral drivers and need a voltage source, not an external current-mode driver. \$\endgroup\$ Jun 22, 2020 at 21:17
  • \$\begingroup\$ What is your power supply? The AMS1117 datasheet specs only 1A, not 1.5A. 24 RGB leds with ~20mA per color works out to 1.4A by themselves. That exceeds the AMS1117 current spec. \$\endgroup\$
    – JYelton
    Jun 22, 2020 at 21:18
  • \$\begingroup\$ @ChrisStratton If it uses built-in low-side current regulation, then the only requirement is likely to be the limitations on the maximum voltage it can stand off. My thoughts would remain. \$\endgroup\$
    – jonk
    Jun 22, 2020 at 21:18
  • 3
    \$\begingroup\$ You need to specify the ultimate source of power before the regulator, and take time to lookup the WS2812 voltage range and power consumption and include that in the question. You are proposing a wasteful linear regulator, generally for a larger number of LED pixels of this type you'd want a switching power supply and 24 is getting into that territory but for just a few a linear might be acceptable. \$\endgroup\$ Jun 22, 2020 at 21:19

2 Answers 2

1
\$\begingroup\$

WS2812B draws 50mA when fully on, with 24 of them, expect 1.2 Amps.

PC USB ports are limited to 500 mA, so they're out. You'll have to use a "USB cellphone fast charger" which is really a 5V 2A power supply with a USB connector on the output.

Since the "charger" already provides regulated 5V, you don't need the regulator for the LEDs.

If you use a 5V micro (as implied by the fact you use the 5V version of the regulator) then you don't need it for the micro either.

\$\endgroup\$
0
\$\begingroup\$

No. The AMS1117 is speced to allow up to 1.5 A only in specific circumstances, such as VIN being only 1.5V above Vout (So 5 + 1.5 = 6.5V In) and with sufficient cooling. The AMS1117 is a linear regulator so it basically acts like a giant resistor, so at ideal 1.5V drop out at 1.5A it's still putting out 3 Watts of heat. If you dont provide a proper heatsink then it wont be happy. Its typically a 1 Amp regulator and that's what all its descriptions say even in the datasheets first page.

For this circuit you either want to provide a regulated 5V in (aka any 2.1Amp usb power supply) or you ideally want a switching regulator (car usb adapters are ideal for this since they tend to take 7 to 24V in to 5V regulated out, depending on the IC it uses). Linear regulators are not great for your scenerio.

You could provide the led circuit it's own power regulator, in parallel to the microcontrollers regulator, or you can power both of them from the same regulator if you take the current and heat into account. Also make sure you add a nice cap at power for the LEDs, the rapidly changing power draw can cause the voltage to dip and cause brownouts for the LEDs or the microcontroller.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.