Replies: 11 comments 33 replies
-
Components are
|
Beta Was this translation helpful? Give feedback.
-
1. Connect ESP32 to max3485UART0 (
I also added a 120Ohsm resistor between A and B at the max3485. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Further testingOK, we had to swap the rs485 lines. But what if we can't do this? There a trick in software to invert the UART levels:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Spurious 0x00???As seen in the previous post, there is a spurious 0x00 on the RX of the esp32. This is unwanted and avoidable. First you have to understand that when configuring a pin as RX, Arduino sets it to Adding a strong pull-up (non-inverting Serial) or pull-down (inverting Serial) makes the issue disappear. |
Beta Was this translation helpful? Give feedback.
-
💯 points awarded! Excellent you found that out. Unfortunately this seems to be nothing we can solve in software for our users. |
Beta Was this translation helpful? Give feedback.
-
I have given it some thoughts and I think it is solvable. Unfortunately I don't have time this week to test. |
Beta Was this translation helpful? Give feedback.
-
So I made the circuit again, now but bus line biasing et voilà! Got it running smoothly. Trick is to put the bus in a known state when idle. That is: voltage difference must be lower then 200mV. See #112. |
Beta Was this translation helpful? Give feedback.
-
In this discussion, I'm going to build a simple modbus RTU circuit on a breadboard.
While doing so, I try to give as much information about the steps and attention points so you can use them for your debugging.
Beta Was this translation helpful? Give feedback.
All reactions