Xinyuan-LilyGO / LilyGO-T-ETH-Series

156 stars 60 forks source link

T-ETH-Pro ModBus issues #67

Open MosquitoByte opened 1 month ago

MosquitoByte commented 1 month ago

Hello, Using esphome on the T-ETH-Pro to read information over ModBus. When defining RS485 pins as published (TX:IO32, RX:IO33) no information is received. When switching TX/RX pins, information is received but with echoes and CRC errors. Testing the same setup with other ESP32 board+Max3485 chip gives perfect results - so the problem is not wiring or termination. Any idea what should I try?

lewisxhe commented 1 month ago
  1. What is the baud rate of the communication speed?
  2. How many meters is the communication distance?
  3. Have you done any sending and receiving tests between the two boards? Will data errors occur?
MosquitoByte commented 1 month ago
  1. It's 9600 baud.
  2. Very short, 1 device connected with a 2 meter STP cable.
  3. Didn't try connecting the two boards, however when I debug the data on the UART I see that every command is sent but an echo is also immediately received, as if the bus is not turning RX off while transmitting as it should be.

Thanks, and I hope we can sort it out since we are testing this setup for a 2000 pieces project.

lewisxhe commented 1 month ago

The occurrence of the loopback phenomenon has a certain relationship with the automatic control of sending and receiving. The chip's receiver is enabled at other times except when it is in a disabled state when sending low levels.

Do you have any resistors? You can try adding a 10K pull-up resistor to the first pin of the MAX13487E chip to the eighth pin of the MAX13487E chip. See if the situation improves.

MosquitoByte commented 1 month ago

Please provide a picture or schematic of the required modification. First pin and eighth pin is a bit ambiguous. Thanks.

lewisxhe commented 1 month ago

image

MosquitoByte commented 1 month ago

Thanks, I will try and let you know On May 24, 2024, 13:28 +0300, Lewis He @.***>, wrote:

image.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

MosquitoByte commented 1 month ago

After connecting a 10k resistor as instructed everything works perfectly. Is this a design flaw and you will put this resistor on production?

lewisxhe commented 1 month ago

It has been submitted to the hardware engineer and will be added later.

github-actions[bot] commented 3 days ago

This issue is stale because it has been open for 30 days with no activity.