claudeheintz / LXDMXWiFi_Library

Library for ESP8266 implements Art-Net and sACN with example DMX input/output to/from network
BSD 3-Clause "New" or "Revised" License
76 stars 17 forks source link

Frame rate #9

Closed he-leon closed 7 years ago

he-leon commented 7 years ago

Hi! Thanks for making this library available! I tried the ESP-DMX example using an ESP8266 12F. It does work, however the frame rate seems to be pretty low. Fades are not continuous and stuttering in my test setup. Is this a general limitation of the ESP8266 or is there something wrong with my setup? Thanks!

Best, Leonhard

claudeheintz commented 7 years ago

Can you explain your entire setup? There are a number of possible causes depending on if you are outputting DMX, driving LED pixels, etc. The source of control can be important as well. For example, the ESP8266 does not do well receiving more than 2 universes of broadcast Art-Net. Even though it will ignore packets for other universes, the network stack still needs time to read and throw away those extra packets. Art-Net 4 does away with this because the ESP8266 should only receive Art-Net that is unicast specifically to it for its universe. This particular issue may not be what is going on for you. I choose it to illustrate the need to know the whole picture before I can offer you suggestions as to why the library isn't working for you.

he-leon commented 7 years ago

Thanks for thes fast answer! My schematic is pretty similar to the one you provided in your example. However I did not use the huzzah Board but a bare ESP8266 12F. I added an LDO, caps, pullups on a stripboard. For DMX output I'm using a RS485 module which i had lying around. As I don't need it, DMX input was removed from the sketch. I also added a webinterface for configuration, which is disabled in DMX mode, however. For controlling I'm using qlcplus. I also tried an Android App. With both variants stuttering was present. I'm controlling a single channel for test purpose (PAR RGB LED). I also tried it on my 8 ch dimmerpack with conventional PAR cans.

I'll do some more tests to locate the problem. First of all I'll try if I can get smooth fading when generating the DMX signal on the ESP without using ArtNet/E.131. I saw there's a fading example in LXESP8266DMX.

claudeheintz commented 7 years ago

Is the RS485 driver chip powered by 5v or by the same 3.3 that is supplying the ESP8266? The 8266 sucks a lot of current doing WiFi. It could be that there is a power issue.

A single LED, as you suggest, could narrow it down between the WiFi/Art-Net and the DMX. You can run the brightness of an LED with Art-Net to test the controller/Art-Net/ESP8266 part. And loop a fade of DMX output with no WiFi to test the output circuit.

If it turns out to be WiFi, check the speed that your controller is sending Art-Net/sACN. It shouldn't be faster than ~44 packets/sec. If there's a speed control, try backing that off to be sure that the ESP8266 can keep up. Along these lines, you might try overclocking the ESP8266 to see if that helps.

he-leon commented 7 years ago

Thanks for your help! The MAX485 is powered by 5V and DI is controlled by 3.3V from the ESP. I did a test without using WiFi by generating the DMX fading signal directly on the ESP. It is a lot smoother, only some very small irregularities can be noticed. I'll have to compare it to my normal USB DMX controller to decide whether it's already the optimum. I think qlcplus is transmitting at 50Hz, I'll check out if this can be lowered. Also, I'll do some more testing using different combinations of Power supply, RS485 driver, ESP Huzzah/ ESP32, etc. I'll report back my findings!

Edit: Unfortunately, I didn't find the time to do the testing yet. I'll close the issue for now, and reopen it when I have new insights!