Page 1 of 1

Using 3.3v GPIO pin to power +100 LEDs

Posted: Mon Apr 06, 2015 4:32 am
by Monsieur Chupon
Hello guys,

I'm trying to use my raspberry as a media center with an Ambilight system and I need to power around 120 leds.

I know I won't be able to get enough power using microUSB, so I've made some modifications on the pi to get voltage from an external power supply (5V 10A), like this :

Image

As you can see, I connect the PSU to a barrel jack, it has a 1000uF capacitor to stabilize input current, and it's connected to the C6 capacitor of the raspberry for safety. Everything runs fine.

Then I need to power my 120 leds strip (ws2812b model). At first, I wanted to make a fork and don't rely on raspberry to get the 5v needed to power the leds (as seen in the picture above) but unfortunately, my leds don't work if I use 5v for power and the +3.3v of GPIO18 for signal data : I need to use the same voltage for both. As my PSU is 5v only, I tried connecting power to +3.3v pin (PIN #1) with only 3 or 4 leds. And it works.

But the problem is :
I suppose it's not safe at all to use this +3.3v pin to power my 120leds, which need way more amps than 50 mA, even if I use an external PSU...? Can you confirm it would fry my rasp if I try that?
If it's not, do you know another solution to get the same voltage for both data and power?

Thank you!

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Mon Apr 06, 2015 6:18 pm
by mikronauts
1) use separate power supplies, 100+ LED's can cause quite a spike going from off (black) to full on (white)

2) I would not try to drive WS2812's with a Pi, the timing is very tight/specific

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Mon Apr 06, 2015 7:07 pm
by SouthwoldImages
Hi, I have recently found the following low-dropout voltage regulators which run from a 5v rail & produce 3.3v: LM3940, LM1117 & LE33CZ. May help!

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Tue Apr 07, 2015 10:47 am
by Burngate
Monsieur Chupon wrote:... but unfortunately, my leds don't work if I use 5v for power and the +3.3v of GPIO18 for signal data : I need to use the same voltage for both.
... it's not safe at all to use this +3.3v pin to power my 120leds, which need way more amps than 50 mA, even if I use an external PSU...? Can you confirm it would fry my rasp if I try that?
The 3v3 regulator is limited in the current it can supply. Taking too much might destroy it, though more likely it will just shut down.
Also, 3v3 is at the lower limit of what those leds will work at. Much better to run them from 5v.

Much better to convert the GPIO's 3v3 to the 5v the leds require - a simple level-shifter would suffice.
One fet & a couple of resistors - half of this:
i2c-level-shift-mosfet.png
i2c-level-shift-mosfet.png (2.88 KiB) Viewed 3925 times

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Tue Apr 07, 2015 11:20 am
by Monsieur Chupon
Thank you guys! I'll go with the level-shifter solution :)

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Tue Apr 07, 2015 11:30 am
by PiGraham
mikronauts wrote:1) use separate power supplies, 100+ LED's can cause quite a spike going from off (black) to full on (white)

2) I would not try to drive WS2812's with a Pi, the timing is very tight/specific
Yes, use external PSU for LEDs.

It is possible to drive WS2812 LEDS from Pi if you use the right hardware features.

https://www.youtube.com/watch?v=_eN7SYFK4vI

https://github.com/jazzycamel/ws28128-rpi/

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Wed Jun 17, 2015 9:48 am
by Mattmax
edit..... delete

Re: Using 3.3v GPIO pin to power +100 LEDs

Posted: Wed Jun 17, 2015 10:04 am
by Mattmax
It is possible to run ws2812 / ws2812B with a raspberry pi 2 at the same way?

I'm wanna use the ws2812 / ws2812B as an Status indicatur runnnig / controlled by a raspberry pi 2. So, on the raspberry pi 2 there is running an operation / programm and the status should be shown through the LED's, like 1 green led 10%, 2 green led's 20% and so on....
I hope you understand what I mean.