I am working on a project where I have 4 MAX3485 (for 4 different RS-485 channels) chips talking on the same UART bus with an ESP-WROOM32 module.
This is the schematic:
My code sets all DE_X lines to low and all RE_X lines to high before any communication on any of the RS-485 channels. This, according to the datasheet, should set all the MAX3485 chips into low power mode and all RO pins in High-Z. When talking on a RS-485 channel, the code sets DE_X high, sends the message then sets DE_X low and RE_X low, waits for the reply, then sets RE_X high. The code never talks on more than one channel at a time.
I checked all that behavior with an oscilloscope and all the DE_X/RE_X signals toggle as expected.
When testing I only have one other device to connect to the RS-485 bus, so all the tests are performed with 3 channels unconnected (but with termination resistor).
What am I doing wrong?
Thanks very much for your help!
Edit: The device I'm working on connects to 4 different RS-485 buses and terminates each one. This is needed because the total number of devices that must be reached is 124 and not all of them play nice, so we don't want to take any chances and chose to link 32 devices / RS-485 channel => 4 channels / device.