rstephan / ArtnetnodeWifi

Arduino library for a Art-Net-Node (artnet) over WiFi, handle DMX data and response to Poll requests. Runs on ESP8266, ESP32, WiFi101 and WiFiNINA devices.
81 stars 21 forks source link

Best practise to troubleshoot for signal ---> No Idea if I did set it up wrong or if my DMX broadcast is not working #20

Open vonfinck opened 1 year ago

vonfinck commented 1 year ago

Hey, I am banging my head against this. I have used the example "send dmx ..." and I am using DMX Resolume Arena to broadcast a dmx signal to my fixtures. But I have no clue if I don't receive any signal on the esp32 or if I have setup the library wrong or if my dmx output is just wrong or not working.

My setup: AZ Delivery ESP32 + Resolume DMX Arena

ESP logs successfull connection to wifi and sends one "dmx data packet reveived" ping and then nothing more.

How can I figure out where the stopper is? Or how would you test for positive signal in the wifi and signals received on the esp32?

Thank you a lot

rstephan commented 1 year ago

Hi, (I have read your email.)

Just a recap. You are trying to build something like this:

PC (Resolume DMX Arena) -> ArtNet/WiFi -> ESP32 -> RS485/DMX -> other box

Right?

So one step at a time. Try my https://github.com/rstephan/ArtnetnodeWifi/blob/master/examples/ArtnetnodeWifiDebug/ArtnetnodeWifiDebug.ino example.

In the Arduino Serial Monitor, you should see lines like this:

DMX: Univ: 1, Seq: 1, Data (...)

If this is not working, make it work!

My Libraries works with different programs like:

vonfinck commented 1 year ago

Hey, BIG fat thanks already for the help! Setupup wise: Exactly like you put it.

I am seeing now finally an output ;D

DMX: Univ: 0, Seq: 0, Data (512): FF 37 34 0 0 0 0 0 0 0 0 0 0 0 0 0 ... (changing of course constantly, )

Im now going to trouble shoot the RS485... maybe there is my flaw.

vonfinck commented 1 year ago

I am getting further and further ;D

Though the DMX decoder does not yet recognize the signal. (the DMX Control led is not turned on and also it does not turn on any channels).

Here is what I can scope from it: IMG_20230220_125723

Maybe the baud rate is not right? Or the voltage? Or the Signal not clean enough? My esp32 supports only 3.3v output but has also a 5v pin. I assume for reference voltage but not as power source / signal?

I have connected the RX485 as: RE and DE to the RS485's VCC pin (and that to the ESP32 5V Pin) DE to ESP32 TXD pin

on the RS485 output the B to DMX D- A to DMX D+ GND to common ground

Any tips and help is again of course greatly appreciated. I feel I am THAT close!

rstephan commented 1 year ago

That's good news so far.

For the wiring: Yes for the most part, the RS485 boards use a MAX485 or similar. 5V is the right voltage. So:

I guess the "DE to ESP" is a typo. "DI to ESP32 TX". And yes, the ESP32 is a 3.3V device and the MAX485 is a 5V one. But in this direction, 3.3V out to an 5V input is for the most part okay.

For the A/B and D-/D+, there is no exact rule. If A <-> D+ and B <-> D- is not working, try the other way around: A <-> D- and B <-> D+.

To the scope screen. Unfortunately, the top part of the screen is cut off. A bit (the shortest time between a rising and falling edge) should be 4µs (1/250000 b/s). On pin DI/ESP TX you should see the something like on the scope. To measure the output, the RS485 signal, use channel 1 for pin A and channel 2 for B. You should see two signals with, A is the inverse of B. If A goes up, B should go down and so on. To "scope" digital signals, it is best to send only a few packets and also shot ones. No the ones with 512 bytes per frame. Also use "single shot" to catch A frame and not many on top of each other.

And finally, check the address setting of the DMX receiver. According to the debug output you are only transmitting 3 (usefull) bytes (Addr. 1 to 3). Your other device must match.

vonfinck commented 1 year ago

Hey i think somewhere I am loosing power or the wiring is wrong ;D. The Max485 also gets pretty hot. (untouchable hot) I have setup more dmx fixtures, so that all available channels are beeing used. Also I took out a new Max485 to make sure that is not the issue.

I have created a wiring diagram to check if I am doing it right. I am getting a signal at 3.2V at the TX Pin on the ESP32 but only 1.2 garbage at the A&B pin from the max485.

Maybe I wired it wrong?

Sheet_2

serial output

vonfinck commented 1 year ago

Alternative wiring I just tested ;D but no success...

Sheet_2

rstephan commented 1 year ago

The wiring looks all right. 3.2V at TX/DI pin is fine. The A/B voltage looks a bit low, but this is a differential signal, so there is no need for a 5V signal. But in case of so much heat, that sounds link a short circuit somewhere. Maybe your MAX485 board/module has not survived your experiments, try a new one. Disconnect all devices and check the A/B signal with your scope, as described earlier (with Art-Net/DMX traffic active).

Please check the polarity of the MAX485 (GND/VCC) and that you are connected to the DMX IN port.

Some DMX devices can be switch between master and slave. Check that all of your DMX devices run in slave mode.

Change the order of the DMX devices, to see if the behavior is the same. With no DMX signal connected to a DMX device, it should be in "black out" mode. If a light is on, another device is transmitting data.

In a long chain of devices the last one must have the termination resistor active. Some need a dip-switch, others need an extra end-plug, better ones can do that automatically.

vonfinck commented 1 year ago

Hey, I got the somewhat jumpy signal output to work. I think the Max485 did had a short, like you said. It looks a bit like the signal is collapsing a few times a second. (I'll upload a video in a second) But I get a somewhat readible output with proper opposing signals. BUT so far I can not get the dmx decoder to accept it.

In Resolume I have created one Lumiverse and enough fixtures to adress all channels but I have only connected one device actually. I also have terminated the signal on the Data in data out with a 1/2w resistor.

EDIT: I have now also tried out different DMX signal senders like JINX and multiple combinations of other starting universe, subnets etc. but no luck so far. I build a quick Arduino DMX signal tester just to see if the DMX Decoder is faulty. I have now tested it with Arduino Uno and this library https://github.com/PaulStoffregen/DmxSimple/blob/master/examples/SerialToDmx/SerialToDmx.ino

I can successfully get the three channels 1;2;3 to light up ;). So it is not the decoder, and the max485 works as well. I think maybe it is an adress issue then?

IMG_20230227_115821

vonfinck commented 1 year ago

@rstephan THANK YOU for the support! I could not have done it without. I have now finally a working setup and will deploy it to the larger installation on Wednesday. Thumbs pressed that everything works out. But the test finally works.

rstephan commented 1 year ago

That's good news. I wish you luck.

Just for curiosity, what was the fault? Bad wiring? Loose connections?

And one final question. The scope is showing the A/B complementary signal, but the time-base is 5µs/div. The pulses are 8µs wide -> 125kb/s. Am I right or did I miss something?

vonfinck commented 1 year ago

Hey Stephan,

I think it was a mix of that. I have in the last run replaced all jumper wires, new max485 module and re-wired the dmx decoder connection. The wiring diagram i used now is the last one in the image. That worked then finally. Regarding the last question, I am going to measure that out more precisely ;D but i think you are right. Let me check that today.

Am Mo., 27. Feb. 2023 um 19:16 Uhr schrieb rstephan < @.***>:

That's good news. I wish you luck.

Just for curiosity, what was the fault? Bad wiring? Loose connections?

And one final question. The scope is showing the A/B complementary signal, but the time-base is 5µs/div. The pulses are 8µs wide -> 125kb/s. Am I right or did I miss something?

— Reply to this email directly, view it on GitHub https://github.com/rstephan/ArtnetnodeWifi/issues/20#issuecomment-1446822152, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKILVVLJWY26E5CRKRPZTX3WZTVPBANCNFSM6AAAAAAU7PSOJ4 . You are receiving this because you authored the thread.Message ID: @.***>