Philp711
Posts: 1
Joined: Mon May 28, 2018 1:31 pm

Connect 250 RGB leds

Mon May 28, 2018 1:41 pm

I’ve started a new project where I need to be able to control around 30 RGB leds independently and then each led will consist of a few to light certain sections so basically let’s just say groups of 5-10 leds and 30 groups individually controlled, I’d like to be able to get some detailed colour if possible

And I’m stumped, I’ve seen servo pi pmw zero which gives me 16 extra gpio pins and I’ve seen the IO pi plus which gives me 30 extra, because I think I need a gpio per pin of the led and they have 4 pins

But then I’ve also heard that I can just use one pin per led and still be able to change the colour how I want

I’ve searched as much as I can for python code for it, ways of attaching leds and then code of how to do that, I’m a beginner and the more I search for answers the more confusing it gets, any help?

I do apologise if I’m on the wrong thread if so just point me to the right one please

drgeoff
Posts: 9901
Joined: Wed Jan 25, 2012 6:39 pm

Re: Connect 250 RGB leds

Mon May 28, 2018 5:11 pm

An RGB LED is merely a single package containing 3 LEDs of different colours. Any LED has two connections, just like a light bulb. Inside the package, one connection of each LED is joined with the corresponding connection of the other two. The other connection of each LED is kept separate. So the package has only 4 external connections but each LED is individually controllable.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Connect 250 RGB leds

Mon May 28, 2018 5:24 pm

Philp711 wrote:
Mon May 28, 2018 1:41 pm
But then I’ve also heard that I can just use one pin per led and still be able to change the colour how I want
If this is possible I don't know about it. To have complete control over colour you need to control the intensity of red, green, and blue separately.

Look up "RGB LED Cube Project" to get ideas about how to control many LEDs - from the point of view of the software, but also the necessary hardware. Instructables is a good source. Bear in mind that the LEDs don't have to be arranged as a cube.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

User avatar
PeterO
Posts: 5084
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connect 250 RGB leds

Mon May 28, 2018 5:29 pm

Philp711 wrote:
Mon May 28, 2018 1:41 pm
But then I’ve also heard that I can just use one pin per led and still be able to change the colour how I want
These are devices like the WS2812

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Connect 250 RGB leds

Mon May 28, 2018 6:46 pm

PeterO wrote:
Mon May 28, 2018 5:29 pm
These are devices like the WS2812
That's the equivalent of building an RGB LED controller into the LED itself.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

User avatar
joan
Posts: 14376
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Connect 250 RGB leds

Mon May 28, 2018 7:27 pm

Can you use LED strips? That is likely to be the only practical solution unless you want to spend an awful lot of time designing and building bespoke hardware and software.

Return to “Beginners”