esp32ModbusRTU icon indicating copy to clipboard operation
esp32ModbusRTU copied to clipboard

polarity of A and B wires

Open jandegr opened this issue 6 years ago • 1 comments

Hi,

I am far from an expert on the matter but I found 2 versions of terminating A and B. 2fdda3cc7cd98d10b83f8feb2a3fb80e7aec9005

The sample hardware in the readme does as in the top diagram, pull B to VCC and A to GND and then in the sdm630 sample ino, the serial port is initialized with the invert parameter true.

All cheapish prefabricated ttl-rs485 converters I found use the bottom diagram with A pulled to VCC and B to GND, with an 120ohm resistor between A and B, but then the invert parameter must be set to false.

I think it would be good if you spend a few words on the invert parameter in readme.MD to avoid confusion (and a failing setup) for new users.

nogmaals bedankt.

jandegr avatar Apr 06 '19 07:04 jandegr

You're right. I forgot about this after testing my initial setup (which didn't work because of counterfeit max3485 chips that couldn't handle the 3V3). It's mixed up right now. thanks for the pointer.

Offcourse, confusion comes from the rs485 standard itself where -as I understand- A should be negative to B whereas the real world implements the opposite.

bertmelis avatar Apr 06 '19 08:04 bertmelis