Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

DotStar LEDs behind Port Expanders?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DotStar LEDs behind Port Expanders?

by Dave8266 on Thu Jul 16, 2020 9:34 pm

Given their "less strict" timing requirements, is it possible to connect/control the 5050 DotStar LEDs from port expanders such as the MCP23008 or MCP23017, using the software SPI implementation?

They would seem to be an ideal match, as the internal PWM capabilities in the DotStars make up for the overhead/impracticality of per-port PWM through a port expander.

Dave8266
 
Posts: 36
Joined: Mon Nov 14, 2016 5:05 pm

Re: DotStar LEDs behind Port Expanders?

by dastels on Thu Jul 16, 2020 11:26 pm

It might work since the dotstars use a synchronous signal. It'd probably be slow, though.

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: DotStar LEDs behind Port Expanders?

by Dave8266 on Thu Jul 16, 2020 11:40 pm

Thanks Dave. Slow would be fine for my application.
If anyone else has tried this, I'd be interested to hear your results...
I'll give it a go myself, but it might take me a while to get to it.

Dave8266
 
Posts: 36
Joined: Mon Nov 14, 2016 5:05 pm

Re: DotStar LEDs behind Port Expanders?

by dastels on Fri Jul 17, 2020 8:33 am

I've not seen anyone doing this. Have fun!

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: DotStar LEDs behind Port Expanders?

by Dave8266 on Sun Oct 18, 2020 12:52 am

Three months later, I just had a chance to test this tonight.
After modifying a few libraries, I can confirm it works.

As Dave predicted, the update rate is definitely slow - a "full-strip" color change for a dozen DotStars looks more like a sequential chaser.
Increasing the I2C bus clock speed from (100 kHz to 400 kHz and higher) helped significantly, but it's still slower than a direct connection.
The performance jump between 400 kHz and 1 MHz isn't very large, and there is zero change going from 1 MHz to the MCP23008's rated 1.7 MHz, so I have another I/O bottleneck somewhere limiting me to 500kHz or so - perhaps in the I2C implementation on my ESP32?

It does work though. I might switch to a SPI port expander in the future to eek out a bit more speed, but this will get me by for now.

Dave8266
 
Posts: 36
Joined: Mon Nov 14, 2016 5:05 pm

Re: DotStar LEDs behind Port Expanders?

by dastels on Sun Oct 18, 2020 10:40 am

Cool!

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.