0

How many LEDs can CPX support?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How many LEDs can CPX support?

by mikhosert on Tue May 25, 2021 12:24 am

My student wants to use 4 sets of 8 sewable LEDs to be run by the CPX using MakeCode. That's 32 external LEDs. Is that possible? Thanks!

mikhosert
 
Posts: 4
Joined: Tue May 25, 2021 12:21 am

Re: How many LEDs can CPX support?

by blnkjns on Tue May 25, 2021 6:48 am

No problem, You mean a solution like this:
https://www.adafruit.com/product/1559
Image
Even simple boards like a 32U4 powered board can already run hundreds of them.

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: How many LEDs can CPX support?

by mikhosert on Tue May 25, 2021 10:30 pm

Thanks!
Kinda like that but with single-color sewable LEDs. He wants to make a torch with a square top that has 8 LEDs on each side face and with the CPX on the top face. That would be 4 different circuits that could be connected to 4 different pins, but each with 8 LEDs for a total of 32 single-color LEDs.
IMG_0827 2.jpg
IMG_0827 2.jpg (42.04 KiB) Viewed 324 times

mikhosert
 
Posts: 4
Joined: Tue May 25, 2021 12:21 am

Re: How many LEDs can CPX support?

by adafruit_support_bill on Wed May 26, 2021 5:46 am

8 LEDs wired in parallel like that would overload the CPX pins. You would need to add a transistor on each of the 4 channels to handle the current.

adafruit_support_bill
 
Posts: 81534
Joined: Sat Feb 07, 2009 10:11 am

Re: How many LEDs can CPX support?

by mikhosert on Wed May 26, 2021 10:17 pm

Super! That's the kind of info I'm looking for. How many LEDs in parallel can one pin handle? How about total for all pins?

mikhosert
 
Posts: 4
Joined: Tue May 25, 2021 12:21 am

Re: How many LEDs can CPX support?

by adafruit_support_bill on Wed May 26, 2021 10:37 pm

I'm assuming that the sewable LEDs you are referring to are the sewable LED sequins: https://www.adafruit.com/product/3377
These have built-in current limiting resistors. When powered from 3.3V each sequin draws about 5mA. If you wire them in parallel, the current draw multiplies.

The older Circuit Playground "Classic" use an Atmega32u$ processor which could source 20mA per pin, so you could safely drive 4 sequins per pin.
The M0 processor in the Circuit Playground Express can source at most 7mA per pin. So with just 2 LEDs per pin you would be stretching the limits.

A small transistor like the PN2222 can handle several hundred mA, so you could easily drive 8 or more of the LED sequins in parallel per pin.
https://www.adafruit.com/product/756

The Neopixels have their own internal drivers, so you can control hundreds of them from a single pin.
https://www.adafruit.com/product/1559

adafruit_support_bill
 
Posts: 81534
Joined: Sat Feb 07, 2009 10:11 am

Re: How many LEDs can CPX support?

by mikhosert on Thu May 27, 2021 6:45 am

Thanks!

I'm using these Lilypad LEDs: https://www.sparkfun.com/products/14012 but I think they may be similar to the one previously posted. I have blue, red, yellow, white, and green. How can I find out how much these pull and if it has an internal transistor?

Based on your info, I went to the Adafruit guide for the CPX and it says (pg 23) each pin can provide ~20mA. Can you confirm which is correct?

mikhosert
 
Posts: 4
Joined: Tue May 25, 2021 12:21 am

Re: How many LEDs can CPX support?

by adafruit_support_bill on Thu May 27, 2021 8:18 am

The Lilypad LEDs are similar in design to our Sequins and would draw similar current. They do not have an internal transistor.

The 20mA number is accurate for the Circuit Playground Classic, which was based on a different processor. I suspect that the text was just copied from the old guide.

The Circuit Playground Express GPIO pins can source at most 7mA.

adafruit_support_bill
 
Posts: 81534
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.