will9183
Posts: 4
Joined: Sun Jan 28, 2018 2:19 am

Controlling 5 Volt RGB LED Strip

Thu Aug 15, 2019 1:28 am

Hey, so I have this USB powered RGB LED strip that I got at Walmart a while back. I wanted to control it with a Raspberry Pi, preferably a Raspberry PI Zero W. Looking at the pins on the strip there is a com+, G, B, and R pins. I read this article https://dordnung.de/raspberrypi-ledstrip/ to control it with the Pi, but it is for a 12 volt strip. The question I have is because the strip runs on 5 volts, could I power it with the Raspberry Pi's 5 volt power?

hippy
Posts: 7739
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Controlling 5 Volt RGB LED Strip

Thu Aug 15, 2019 2:53 pm

will9183 wrote:
Thu Aug 15, 2019 1:28 am
The question I have is because the strip runs on 5 volts, could I power it with the Raspberry Pi's 5 volt power?
Yes, and No. The Yes being that the voltage will be suitable, the No being that the current drawn by the LED strip is likely to be more than the Pi's PSU can supply, more than the Pi's connectors are rated for.

Use a suitably rated 5V supply which powers the Pi and the LED strip and that should work, so long as switching the LED strip on and off does not adversely affect Pi operation.

I believe you also shouldn't connect the RGB to Pi GPIO pins direct as they will sink all the current through the LED strip and that's way more than the GPIO can handle.

gilhuguley
Posts: 11
Joined: Mon Jan 21, 2019 3:21 pm

Re: Controlling 5 Volt RGB LED Strip

Thu Aug 15, 2019 5:22 pm

Do you have a multimeter? If so, you should be able to power up the LED strip from a separate 5v power supply, and insert the multimeter in the power leads and read the milliamp draw. That way you could know if it exceeds the sinking capability of the PI USB. (Of course switching it on and off might cause transients the Pi couldn't handle, but that is a whole 'nother problem). 8-)

will9183
Posts: 4
Joined: Sun Jan 28, 2018 2:19 am

Re: Controlling 5 Volt RGB LED Strip

Sat Aug 17, 2019 2:16 am

gilhuguley wrote:
Thu Aug 15, 2019 5:22 pm
Do you have a multimeter? If so, you should be able to power up the LED strip from a separate 5v power supply, and insert the multimeter in the power leads and read the milliamp draw. That way you could know if it exceeds the sinking capability of the PI USB. (Of course switching it on and off might cause transients the Pi couldn't handle, but that is a whole 'nother problem). 8-)
I actually forgot to mention that this strip came with a control board and it would be powered by USB. The problem is that it is broken and only the blue light shows. So when I measured the amps, I got a measurement of 0.12 amps, which I don't think is accurate. The power supply I am using only suppplys up to .85 amps.

Also I was going to connect the pins to a N switch MOSFET then connect that to the GPIO. And I have put a picture of what the end of the strip looks like.
Image I was going to connect G, B, and R to the MOSFETs.

Hopefully this information helps.

will9183
Posts: 4
Joined: Sun Jan 28, 2018 2:19 am

Re: Controlling 5 Volt RGB LED Strip

Wed Aug 21, 2019 1:48 pm

Due to some issues I had with the strip I was using, I had to switch out the strip with another similar strip. I connected the strip up to the Pi using a separate power supply and measured the amperage, which was around .5 amps on the white setting. Would this be too much for the Pi Zero to handle?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Controlling 5 Volt RGB LED Strip

Wed Aug 21, 2019 9:25 pm

will9183 wrote:
Wed Aug 21, 2019 1:48 pm
Due to some issues I had with the strip I was using, I had to switch out the strip with another similar strip. I connected the strip up to the Pi using a separate power supply and measured the amperage, which was around .5 amps on the white setting. Would this be too much for the Pi Zero to handle?
No!

The micro_USB power input is directly connected to the 5V GPIO pins, with *nothing* in between.

so if your PSU can deliver the extra 0.5A to the input, there is no problem.
but there is also no under voltage detection, so measure if at least 4.75V arrives at the PI.

will9183
Posts: 4
Joined: Sun Jan 28, 2018 2:19 am

Re: Controlling 5 Volt RGB LED Strip

Thu Aug 22, 2019 6:50 pm

mahjongg wrote:
Wed Aug 21, 2019 9:25 pm
will9183 wrote:
Wed Aug 21, 2019 1:48 pm
Due to some issues I had with the strip I was using, I had to switch out the strip with another similar strip. I connected the strip up to the Pi using a separate power supply and measured the amperage, which was around .5 amps on the white setting. Would this be too much for the Pi Zero to handle?
No!

The micro_USB power input is directly connected to the 5V GPIO pins, with *nothing* in between.

so if your PSU can deliver the extra 0.5A to the input, there is no problem.
but there is also no under voltage detection, so measure if at least 4.75V arrives at the PI.
Just another quick question, do other Pis work in this same way?

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Controlling 5 Volt RGB LED Strip

Thu Aug 22, 2019 7:21 pm

will9183 wrote:
Thu Aug 22, 2019 6:50 pm
Just another quick question, do other Pis work in this same way?
No. All of the other Pis prior to the Pi4 have a fuse on their input to limit the current available to the Pi. This includes the 5V pins on the GPIO.
The fuses depended on the Pi model.

The Pi 4B doesn't have a fuse.
Unreadable squiggle

Return to “Beginners”