OLIMEX/ESP32-EVB

Modbus transceiver generates CRC Check errors

nagyrobi opened this issue · 1 comments

Connecting to a MODBUS device using a transceiver like this one:
image
It's a pretty standard MAX485 RS485-TTL converter module.

This transceiver connected to a Nodemcu ESP-32S module works perfectly, software runs as expected (tested for several weeks now).
Moving the transceiver to ESP32-EVB, the exact same GPIOs and software generates Modbus CRC Check failed errors.

Tried various other GPIO combinations. Checked not to use bootstrapping pins. Tried adding pull-up and pull down resistors to TX, RX and Flow control pin - nothing changed. Replaced cables etc. nothing helps.
The transceiver, the bus and the device itself is OK because as soon as I connect it back in ESP-32S, things get back to normal.

The goal is to have Ethernet connection instead of WiFi and later use the 2 relays. This board is just perfect for the task, but I can't imagine what could interfere with the data transmission, as the old Nodemcu board doesn't have this issue.
I would prefer to use the UEXT1 connector if possible, it's just 4 GPIOs I need, 3 for this TTL board (RX, TX, Flow control) and 1 for Dallas temp sensors.

Seems like the problem is missing a Modbus termination resistor. The 120ohm resistor has to be put between the A+ and B+ wires of the bus. On longer cable runs, one should attach such resistors only at the daisy chain ends. Physically put these resistors only at the first and the last device in the chain. If there's only 2 devices on the bus, it comes natural that such resistor should be placed at both. Some factory devices have it already installed, some have a jumper/switch to enable it.
As far as I can see the transceiver module above doesn't have it.

But what I don't understand, is why when the transceiver is attached to Nodemcu ESP-32S this resistor is not needed (and works super reliable for long time), but when attached to Olimex ESP32-EVB I have to put it on, otherwise bad data appears immediately.
Analog signalization mystery I think...