Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not (seem to) recieve data #40

Closed
Theexternaldisk opened this issue Jan 23, 2023 · 4 comments
Closed

does not (seem to) recieve data #40

Theexternaldisk opened this issue Jan 23, 2023 · 4 comments
Labels
question Further information is requested

Comments

@Theexternaldisk
Copy link

I can't seem t recieve DMX data. I'm using a DOIT EPS32 DEVKIT V1 and a RS485 to TTL module (https://www.elecrow.com/uart-ttl-to-rs485-twoway-converter-p-1545.html)
The module RX pin is connected to GPIO 16 and the RX LED is flickering when a DMX signal is applied.
The DMX signal is provided by a simple DMX controller (Elation SDC-16).
What I've tried:

  • both the 3.0 and 2.0.2 release of the library with the standard DMXread sketch. Both don't get any data. Only get an error when disconnecting and connecting the DMX signal.
  • both uart port 1 and 2, without succes.
  • connecting two RS485 modules A and B together with one module on the RX pin and the other on the TX pin and using the arduino multiserial example to send and recieve data. This worked fine even with the baudrate set to 2500000.
  • swapping RS485 modules, without succes

haven't tried:

  • looking at the DMX signal on a scope
  • using other GPIO pins for the RX TX pins
  • diving deeper into the library to see what is going on

any ideas?

@someweisguy
Copy link
Owner

Thanks for the question and the excellent troubleshooting so far. It's funny that you ask about the Elecrow RS485 module. I just got a similar question about it on Reddit. Though perhaps you are the same person that asked me about it on Reddit?

I don't own one of these Elecrow RS485 modules but I just bought one. It should be here in 1 to 2 weeks. There doesn't appear to be a circuit diagram for the Elecrow module, so that makes troubleshooting difficult. But what I can see is that the Elecrow module does not have an RTS pin. The RTS pin is used to control the RS485 module to tell it when to act as a transmitter or a receiver. Because the Elecrow module doesn't have an RTS pin, I am assuming that it automatically switches between transmit mode and receive mode. Typically, this can be done by switching to transmit mode when the RS485 module detects a 1 on the TX pin. When the RS485 module detects a 0 on the TX pin, it switches to receive mode.

If this is indeed what is happening, this could be a problem. At the start of every DMX packet, the DMX transmitter needs to transmit a DMX break. The DMX break is essentially a long 0. I think that because the Elecrow module only transmits when the TX pin is high, it is unable to transmit the DMX break.

I could be totally incorrect here. It is difficult to say because there is no circuit diagram for me to verify. We may just have to wait a few weeks until my Elecrow module arrives and I am able to do some testing.

In the meantime, here are a few more things that you can try:

  • Swap the TX and RX pins and see what happens. It could be that they are just reversed.
  • If you have an additional ESP32, you can upload the DMX write example to one ESP32 and the DMX read example to the other. Then, instead of plugging your ESP32s into an RS485 modules, plug the TX pin of the transmit ESP32 into the RX of the receive ESP32. If you are able to receive DMX this way, then we know it isn't the library or the ESP32 that are the problem.

@someweisguy someweisguy added the question Further information is requested label Jan 24, 2023
@Theexternaldisk
Copy link
Author

Hi,
No I'm not the same person as on reddit.
Sorry forgot to add the schematic I found of this module: https://webshop.domoticx.nl/image/catalog/modbus/RS485%20naar%20RX-TX%20TTL%203.3V%205V%20omvormer%20module%20SP3485/RS485%20naar%20RX-TX%20TTL%203.3V%205V%20omvormer%20module%20SP3485%20schema.png
The module is set to be in read mode while not transmitting data.
Also forgot to say that I've got two of these working one as a transmitter on the ESP32 DEVKIT and one as a reciever on an ESP-C3 mini. Which works flawlessly, it sends and recieves data without any problem.
I'll try hooking it up to an oscilloscope tomorrow.

@Theexternaldisk
Copy link
Author

ohh man, I'm such an amateur :)
Turns out the A or B line was shorted to the DMX ground....
Soldered my own PCB to hold all the modules I need but must have mist this one solder bridge.
Well great work on the library works like a charm.

@someweisguy
Copy link
Owner

I'm glad you got it figured out! Hardware is difficult. I'm currently waiting on v4 of my PCB to come in because I messed up the previous three so far. D'oh.

Let me know if you have any other questions or concerns!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants