Ttgo/esp32 modbus rs485 node anyone?

Has anyone tried hooking a ttgo v1 to a max485 to read modbus registers?
I have tried a few libraries but can’t get anywhere.
Looks like the esp32 and modbus don’t play very well together.

1 Like

What you might be having an issue with is the turn around time. If you are controlling the MAX485 driver with a GPIO pin, you need to ensure that this is not switched to RX until the last byte has been transmitted and at the same time, ensure that you switch to RX fast enough not to miss the TX data from the Modbus device.
Have a look at the MAX13487 as this has automatic control and works really well with fast Modbus devices. Only downside is that it is 5V only so you will need level shifting to use it. the standard MOSFET BSN20 base level shifter works well with UART speeds up to 19200 without any errors.