Monsieur Chupon
Posts: 2
Joined: Mon Apr 06, 2015 4:05 am

Using 3.3v GPIO pin to power +100 LEDs

Mon Apr 06, 2015 4:32 am

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!

User avatar
mikronauts
Posts: 2783
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

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

Mon Apr 06, 2015 6:18 pm

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
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

SouthwoldImages
Posts: 9
Joined: Thu Jan 01, 2015 11:15 am

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

Mon Apr 06, 2015 7:07 pm

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!

User avatar
Burngate
Posts: 6303
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

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

Tue Apr 07, 2015 10:47 am

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 3926 times

Monsieur Chupon
Posts: 2
Joined: Mon Apr 06, 2015 4:05 am

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

Tue Apr 07, 2015 11:20 am

Thank you guys! I'll go with the level-shifter solution :)

PiGraham
Posts: 3938
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

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

Tue Apr 07, 2015 11:30 am

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/

Mattmax
Posts: 10
Joined: Wed Oct 16, 2013 7:38 am

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

Wed Jun 17, 2015 9:48 am

edit..... delete
Last edited by Mattmax on Wed Jun 17, 2015 10:04 am, edited 1 time in total.

Mattmax
Posts: 10
Joined: Wed Oct 16, 2013 7:38 am

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

Wed Jun 17, 2015 10:04 am

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.

Return to “HATs and other add-ons”