DMX out

Hi, i am trying to get the DMX out working on a eps32. so far i am able to compile a working version without uncommenting the #define WLED_ENABLE_DMX line.
whenever i uncomment this line as explained in the DMX out wiki the esp32 ends up in an infinite error loop. i am using platformio and have been trying to do this since version 10.
is there annyone that has been able to get this working?

Try this it might work for you WLED-wemos-shield/resources/Firmware/WLED_wemos_shield/v0.13.0-b2 at master · srg74/WLED-wemos-sh

… removed … original reply was incorrect

Not exactly true…

Check out the docs…

WLED definitely will output DMX data, although it takes a recompile to do so.

1 Like

Wow, totally missed that one in the change logs. Thanks for posting. Edited my incorrect reply above…

thanks all for the reply but is there somebody that has succeded in getting this to work? annyone?
the plan is, like i hace read the instructions, to be able to get DMX out from artnet input and to generate R G B channels from the pixelcolors in the ledstrip. so what i plan to do is have a 300 led ledstrip and have some DMX driven floodlights that generate an background color comparable to the philips ambilicht that generates a background color to a TV screen. since version 10 i am trying to do that.

“Dramatic music” and a dry voice speaking the words “Two years later” .
i found that the only way to get the compiled version to run on esp32 with uncommented “#define WLED_ENABLE_DMX” is to change the line “WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0)” also in Wled.h to “WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(1)”
That way i get the extra tab DMX Output in The config screen where i can assign functions to output channels. But no DMX output no matter witch pins i choose for led data or DMX out pin.
there is a wiki page so there must be someone outthere that knows how to get this working or that has used this function.

Yes it is possible. The default output pin is GPIO2. (pinD4 on NodeMCU)

I don’t believe you want to change this line:
WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(1)

This will effectively not send to DMX from WLED, and would set the base ArtNet Universe to 1 (I believe)

Are you trying to run the DMX lights from WLED or another source?

Alright, so I’ve done some digging…

Basically right now the DMX output pin is hardcoded to pin 2 as I said. That’s because this is Serial1 on the ucontroller.

NodeMCU does support additional hardware serial sending on pin 15, however this can only be used with Serial.Swap() function, as far as I can tell.

Serial is also used for Debugging/ sending back over UART so I’m not 100% sure if we can use this or not. So far I have not had success in sending DMX over TX2 (GPIO15)

Another option (possibly easier) would be to use SoftwareSerial library. I am not sure if this would handle the load of DMX but it is worth a shot…

Quick Edit: I actually did get the second DMX output working! WooHoo! I was able to use Serial.Swap to output to pin15. So this can use both UARTs for DMX. I am not sure what will happen since Serial is now used by DMX but it appears to mostly be used for Debugging.


OK more learnings today…

I figured out that I can indeed send two DMX signals. I am sending one over pin15 with Serial and Serial.Swap(). I am sending the other over Serial1 on pin2 (this can’t be changed as far as I can tell.)

I also have a better understanding now of how DMX is implemented in WLED which confirms some assumptions but also creates some new challenges with how multiple universes should operate…

Writing some notes here to keep track of findings and also open to ideas…

Basically DMX can be used in two ways:

  1. DMX Proxy Mode
    This takes the ArtNet or sACN data and immediately bounces it to DMX. This should be fairly trivial to implement a second Universe as we can just take the Universe from ArtNet, etc… and write it to the appropriate port. For this we would essentially need to have two proxy universes selectable in the UI.

One issue I am having here is getting the proper Art-Net universe from the ESPAsyncE131 library and I’m not quite sure why… I am sending Universe 1 and 0 and they are both getting sent to the same DMX channel…

  1. LED Strip Mode
    Basically WLED treats DMX lights as part of an RGB LED strip. This gets a bit more complicated because if I understand how WLED works if basically fills up a universe with 510 RGB LEDs then moves on to the next, etc… This isn’t really conducive to setting up multiple universes, unless you’re literally just lining up RGB cans or something like that… but even then if you are mixing fixtures you’re going to have a rough time setting this up properly.

Hi nturley, thanks for the reply. but i still do not know how to get the wled compiled and get it to work on a esp32. whatever i try folowing the wiki instructions, whatever pins i choose i end up with a esp32 rebooting over and over again. it would be nice if someone explained how to get this thing working first.
How the different modes work and what pins are usable we find out later. i use the olimex esp32-poe hardware. The best thing would be if we could get the gpio 4 pin to spit out DMX.
i have made other non led related projects running on this hardware using all pins with hardwareserial with multiple rs232 outputs running together with a web interface and so. if i complile a wled version with DMX disabled everything works fine, ethernet enabled multiple led datapins, all works fine until i uncomment the WLED_ENABLE_DMX line.

Hey Krismad,

Sorry for hijacking your thread. I realize now what I was working on was not that relevant. Oops!

I have not actually tried with ESP32. I am using ESP8266 NodeMCU clone devboard. I am going to order some though, so will get back to you on that.

In the meantime, maybe some of the info in this issue will help?

Hi nturley,
Unfortunately all is leading to a dead end.
I am glad you “hijacked” the thread, so it looks like you got DMX out working on ESP8266.
an option for my project is having a ESP8266 with wled and DMX out enabled and having it in sync with the ledstrip on the ESP32.
did you get wled with DMX out working on the ESP8266?

Yes! I have gotten DMX output working with ESP8266.

I am using this shield:

The first universe works fine without any changes to the code just compile with that #define uncommented, or with the compiled binary linked on that page. The second universe also works with the method I mentioned above. I need more time to figure out how to integrate that intelligently with WLED…