ESP32 Modbus RTU Master Data Direction Pin Goes Low During Transmission

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
vladiand
Posts: 1
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 5:35 pm

ESP32 Modbus RTU Master Data Direction Pin Goes Low During Transmission

Post by vladiand »

Hello,

I'm working on a modbus project with ESP32 TTGO board, which as a modbus RTU master gets data from a power meter.
The problem I have is that during the trasmission, after the second byte the Data Direction Pin goes low and the rest of the Modbus request message is not transferred over the RS485 bus.
ESP32 Modbus.jpg
ESP32 Modbus.jpg (54.76 KiB) Viewed 1561 times
ESP32 Modbus2.jpg
ESP32 Modbus2.jpg (68.31 KiB) Viewed 1561 times
Can you please check?

Regards,
Vladislav
Attachments
ESP32_TTGO_Modbus.fcfx
(26.89 KiB) Downloaded 166 times

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: ESP32 Modbus RTU Master Data Direction Pin Goes Low During Transmission

Post by medelec35 »

Hi.
The App Developer website has a Mains Power Monitor - ESP32, USB.
That uses the PZEM-004T to communicate via MODBUS.
You could use that to compare with your version.
It works OK with Wroom32 and WiFi Kit 32.
With the latter, it also displays all the values.
PM WiFi Kit 32.png
PM WiFi Kit 32.png (165.49 KiB) Viewed 1557 times
I'm thinking of adding it to the TTGO myself s the text will look much better in colour.
Martin

Post Reply