ESP32 RS485driver hardwareserial ModbusMaster
Posted: Wed Jan 10, 2018 12:31 pm
Hi, I'm trying to establish RS485 Modbus communication between ESP32 - RS485 Arduino driver board - Modbus device by using harwareserial(2) and the MODBUSMASTER library.
https://github.com/4-20ma/ModbusMaster
I know the MAXRS485 is TTL and ESP is CMOS, but I tried the code on an Arduino MEGA, and powered the RS485 driver board via 3.3V and it works.
When connected via ESP, I see the pulse train going out of the TX (hardwareserial2 pins 4,5) and on the differential AB lines of the driver, but the Modbus device doesn't seem to respond. I don't see it on scope (differential AB lines).
So I'm assuming a problem with the message sent to the Modbus device. Any idea's? Maybe a problem of compatibility of the modbusmaster library on ESP32?
https://github.com/4-20ma/ModbusMaster
I know the MAXRS485 is TTL and ESP is CMOS, but I tried the code on an Arduino MEGA, and powered the RS485 driver board via 3.3V and it works.
When connected via ESP, I see the pulse train going out of the TX (hardwareserial2 pins 4,5) and on the differential AB lines of the driver, but the Modbus device doesn't seem to respond. I don't see it on scope (differential AB lines).
So I'm assuming a problem with the message sent to the Modbus device. Any idea's? Maybe a problem of compatibility of the modbusmaster library on ESP32?