I run Glediator (or Jinx!) on a 32 x 16 WS2812B matrix with serial communication to a simple Arduino UNO or Arduino mini Pro with USB-serial interface (1000000 BAUD) with the FUTA1UOI7CCLGLL.ino sketch (see attachment)
I thought it was a great idea to use ESP-01 for this instead since it is small, cheap and the task needs only one output line. (Though I do not need WiFi for this.) I can successfully run different FastLED projects from ESP-01 on my LED matrix. And I can see (with osciloscope) that the output pin is sending pulses of 1.4microsecond. I am also aware that the ESP-01 is 3.3V so I removed the resistor to first LED. But when I run FUTA1UOI7CCLGLL.ino from Glediator, nothing happens!
I tried the same with ESP8266 Wemos D1 mini. I could connect an SD-card to it and run myanim.dat file (which means that the FastLED.show function works fine with ESP despite the different chip-frequency), but the FUTA1UOI7CCLGLL.ino won't work.
I suspect, that it has something to do with ESP8266 interrupt handling while reading the serial stream.
I tried with lower BAUD rates (500000, 250000) but it did not help.
Can anyone tell, what's wrong with ESP8266 in that respect and how to possibly work around it?
FUTA1UOI7CCLGLL.ino (1.25 KB)
I am also aware that the ESP-01 is 3.3V so I removed the resistor to first LED.
That does not follow at all.
The resistor is there to prevent reflections and add a bit of protection to the first LED in the event of applying data to it without the strip being powered up.
You need to boost the 3V3 signal up to 5V with a level shifter. Don't use the type designed for I2C, these are not fast enough to be robust at those sorts of frequencies. This is my favorite solution.
Hi Grumpy_Mike and thank you for your explanation and for the suggestion on a proper circuit to connect to WS2812B LED-strip which I will implement in time.
But this is not the solution to my problem. My hardware connection works fine with ESP and FastLED sketches sending data to the LED-strip (example myanim.dat from SD-card) except when the data is simultaneously sent to the ESP over serial connection with Glediator protocol. And it's probably not the sending of data that goes wrong since it is only loading the byte array in ESP chip, that is afterwards sent to the strip with FastLED.show function. So my suspicion is, that during executing FastLED.show the WS2812B time-sensitive procedure in ESP is interrupted in a different way than it is with AVR Arduino.
Is it really possible that no one else tried to run the simple LED strip driver from ESP-01 and run into this problem?
By the way, does anybody know the upper limit of ESP8266 serial BAUD rate?
Thank you again Grumpy_Mike for being fast and helpful.
So my suspicion is, that during executing FastLED.show the WS2812B time-sensitive procedure in ESP is interrupted in a different way than it is with AVR Arduino.
We’ll an interrupt is an interrupt and disabling is the same as any other, so I don’t think so.
Is it really possible that no one else tried to run the simple LED strip driver from ESP-01 and run into this problem?
We will have to wait and see then.