r/FastLED • u/Yves-bazin • Oct 13 '20
Code_samples APA102 parallel output esp32 with I2S try out
Hello
I have done the first draft version of the esp32 16 parallel outputs driver for apa102. Anyone to try it out ?
I can go up to:
- 8Mhz for 16 //outputs hence for instance refreshing 16x256 =4096 leds at 930fps .
- 10Mhz for 8 // outputs hence for instance refreshing 8*256=2048 leds at 1110 fps.
These numbers may change after full implementation:)
I know you can refresh the APA102 at an higher rate than that but that would mean rearranging the data differently so that no transformation before sending the bytes would be needed then loosing the led manipulation like led[x]=CRGB::Red and all the FastLED functions.
Does anyone knows why the current version of the Fastled implementation of APA102 goes at 4mHz even when setup at 12MHz ?
PS: this will need to be sightly change for ws2801 leds
3
u/spolsky Oct 13 '20
You asked why the default speed for apa102 is 4Mhz ... I assume it is related to this:
https://www.pjrc.com/why-apa102-leds-have-trouble-at-24-mhz/
To summarize - the apa102 chips do not actually regenerate the clock signal as they pass it along, so it gets more and more offset from the data signal the more pixels you have. I’m guessing at some point the fastled maintainers took a conservative clock speed so that most people would not hit this problem.
3
u/Preyy Ground Loops: Part of this balanced breakfast Oct 13 '20
Thanks for your work. This definitely makes this hardware an attractive combo.
2
u/Netmindz Oct 13 '20
Any extra hardware needed or specific pins that must be used?
2
u/hesthewanderer Oct 14 '20
Amazing. I'd love to check it out.
1
u/dignick Apr 13 '24
Hi,
I would love to try your library out but I'm using FastLED 3.6.0 and I get compile errors e.g.:
newI2SDRIVER/I2SAPA102.h:117:14: error: 'i2s_dev_t' {aka 'volatile struct i2s_dev_s'} has no member named 'conf'; did you mean 'rx_conf'?Which version of FastLED was this written for? Do you have plans to merge it into FastLED?
1
u/Artemkamax Nov 27 '23
Hi! Have you any updates of this code? I have 2 problems with it. My config is 8 strips and 53 leds per strip. I use SD_MMC driver to read from sd and wrire to leds array. First problem: when I change default speed from 4 to 10Mhz, second diode not working, and some problems with timings, artifact. Second promlem: I have some conflicts with sd_mmc driver. They dont work together. May be dma channels conflict or so. Can you help me?
1
u/JoPeTo2000 Nov 27 '23
Hi, necessary and useful - great work!
Any chance of something like this working on Teensy 4(4.1)?
I have some memories, that I read somewhere that maybe it can be implanted in FastLed - parallel apa102?
Thanks in advance!
1
u/Artemkamax Jan 06 '24
Hi! thanks for your library! I make some test and have problem with apa102 leds.
esp32, last idf, example code
NUM_LEDS_PER_STRIP 200
NUM_STRIPS 8
SPEED 4mhz - 596FPS -good work
SPEED 6mhz - 886FPS -good work
SPEED 8mhz - 1161FPS -first 10 Leds has problems, other-good
SPEED 12mhz - 1175FPS -wrong work, doubling running leds
SPEED 20mhz - 1175FPS -wrong work, doubling running leds
SPEED 30mhz - 1173FPS -wrong work, doubling running leds
SPEED 40mhz - 1173FPS -not work(flashing leds)
I tried this setup to work with NeoPixelBus at 40mhz, and it work fine(one strip)
Can you help me?
3
u/Heraclius404 Oct 13 '20
I should be able to get to this in a few days... thanks!