Powering NeoPixels off a Raspberry Pi 5V Pin. Bad idea?

Before I potentially fry my Raspberry Pi, I just want to ask the experts whether my plan will work. I want to power a 60 LED WS2812 ring from a Pi Zero W’s 5V pin. There will only be a maximum of 23 LEDs on at any time, and only a few of these at full brightness.

The RPi pinout tells me I can expect to get around 1.5 A from the official power supply. According to Adafruit, in an absolute worst-case scenario with all 23 LEDs on MAX brightness, I should expect to draw 1.38A, giving (hopefully) enough headroom for everything, though they suggest the real value would probably be closer to 450 mA.

I’ll need to pipe the data pin to the LEDs through a logic level shifter, of course. And chuck in a resistor between the before the data pin. And I also plan to hook up a Piicodev RTC to the Pi Zero’s I2C. (If you haven’t guessed already, I’m making a clock :sunglasses:) And the colours of the LEDS will change according to the time of day.

I plan to put everything in a photo frame with the LEDs behind some frosted acrylic, and hang it on the wall. So I’d prefer to just have everything powered off the Pi’s pins to minimise the amount of cabling coming down the wall, and the need to use multiple power supplies.

Bad idea?

1 Like

Hi Steven
That link to the pin out also says this
“Devices that require a high current - such as LED panels, long LED strips or motors - should use an external power supply.”

Probably. I personally would not do it. Your supply of 1.5A and your estimate of 1.38A is too close for my conservative liking. The alternative would be to use a large enough supply allowing 50% or even 100% headroom and run both the LEDs and Pi off that. I would not get the LED power from the Pi pins though. I would split it off as a separate connection. Ground connections MUST be common or connected.

I think if you look back there have been a lot of problems with this sort of thing. Almost always resolved with a large enough or separate supply.
Cheers Bob

4 Likes

Hi Steven,

I would agree with Bob on this one.

I personally like to plan to have a power supply that can power a project past its full maximum potential even if I’m only planning on using half of it.
For example I’d plan to have a power supply that can power all 60 LED’s at full brightness. This can be helpful if you end up changing how you use the components in the future.

3 Likes

I say suck it and see. How much will a fried Pi cost?

For some reason I can’t get my Arduino IDE to play with my RP2040 at the moment, so I can’t comment on that, but I haven’t had any noticeable power issues controlling a 200 LED string powered from the 5V pin of either an ESP32 or an Arduino Nano…

And I’ve seen some reports that some logic level shifters might have a hard time with the timing of a RGBA signal, while I’ve seen plenty of reports, and I can also report myself, that controlling RGBAs with a 3.3V signal can work just fine. Same goes for not employing the resistor; I think that might come into it if you have a long wire between the MCU and first LED; something about reflections maybe.

2 Likes

Agree with @Robert93820 and @Aaron.

First thought: If the official supply is connected to the USB connector and the LEDs to the GPIO 5V pin then the power to the LEDs passes through the PCB tracks on the Pi Zero W. Over time these tracks maybe become damaged. If the official supply is connected to the GPIO 5V pin as well as the LEDs then it is not a problem.

Second thought: Total possible power usage is 60 x 60mA = 3.6A. If for some reason all LEDs turn on at the same time at max brightness, not likely. The Pi Zero W consumes about 100mA in normal operation and 250mA when WiFi active.

I think the solution is to split the official supply to the LEDs and to the Pi. Any excess current drawn by the LEDs does not pass through the Pi. The 5V GPIO pin is the same electrical level as the USB 5V pin. It could be used to power the Pi with a split to the LEDs.

The case of all LEDs on at max brightness is something that most likely will not happen.
Nice project !!!

Cheers
Jim

Hi All
Why pussyfoot around. Just use a 5A + supply. Not rocket science.
Cheers Bob

@Robert93820 Disagree.
The official power supply will provide what Steven needs, it meets the voltage requirements of the Pi Zero W (5.1V) and has enough current capacity to run the LEDs that will be on for a clock display.

My concern was running the current through the PCB tracks. The USB connector is at the opposite end to where the GPIO 5V pin is located.

Regards
Jim

Hi James
That is fair enough. As long as a bit of head room is there and you don’t come up with some bright add on in the future.

My main point is why scrabble around with a 1.5A supply then have to scramble for the last few mA. Even then you would be close to the max 1.5A and trust the manufacturer has been a bit optimistic.

In my 60 years (counting retirement time) in this business I have found it to be more satisfactory to overcook requirements a bit. Saves a lot of head scratching and problems down stream.

I wish Steven luck with his 1.5A device.
Cheers Bob
PS. Actually with one of the last major projects I was involved with everything (including power supplies) had to be de rated to 50ºC. That is when you look for some head room. That was written in the spec requirement.

1 Like

If something glitches out and all the lights turn on, your equipment goes bang. That’s bad design.

1 Like

Hi Aaron
So very true. You have to design for worst case unless you are going to dismantle the project forever next week.
Cheers Bob

1 Like

That’s actually a very good point. I might easily make a mistake in my code, unintentionally turning on more lights on than the PSU can handle.

1 Like