I have 6 devices (thermostats) that all communicate via modbus to a central controller. Each unit is in a separate building, and each one has a BB-Electronics Optoisolator/Repeater (485OPDR-HS / line bias on units disabled on the network side, enabled on the side connected to the thermostat). I have line bias at the controller (470 ohm resistors to 5v and ground), and 120 ohm termination resistors at each end. Line length is about 300 meters. Twisted pair with ground.
Cannot figure out why the network randomly stops working. When it does, the voltages on the pair are 0 and 4 volts. While running, I see voltages between 1 and 3 volts.
I've changed the RS485 converter at the controller, from 3 different RS485 to RS232 units and currently using an FTDI USB/RS485 converter (the USB unit seems to produce fewer CRC errors). Though, the only CRC errors that do appear are only seen at the devices, not at the controller. I think that the data sent from the controller to the devices is garbled, but it retries once and keeps going.
My logs show the hex data and when it fails, one of the units just stops responding during its transmission, and the controller cannot talk on the network as the voltage is at 0 and 4 volts. It's randomly one of the six units that stop, and essentially lock me out. The only fix I can do is power all the units off and back on. Controller does not need rebooting to fix.
I'm stuck at this point and cannot figure out what is causing this issue. I've checked the data on an oscilloscope when it is working, and although not perfect, the waveforms seem pretty solid to me.
Any ideas how to proceed? Any thoughts??
When you experience this issue, you're saying that one of the thermostats stops responding entirely and must be rebooted. While this sounds like a logical issue with the thermostat itself, it's possible it's getting into this state due to electrical problems with your network.
I would recommend starting by removing your 470 ohm bus biasing resistors from the network to see if any difference is observed. According to the 485OPDR-HS quick start guide, it already has 4.7k ohm local biasing on its Data In terminals. By installing additional 470 ohm biasing, you are exceeding the 32 unit load limit on your network.
Some other things to check is that the RS-485 signal ground connections are landed on the proper signal ground terminals on all devices and not power ground, earth, or shield ground. Make sure the DIP switch settings on each 485OPDR-HS are set correctly for 2-wire RS-485 operation according to the quick start guide (i.e. Switches 1, 2, 3, 4, 5 = ON, Switch 6 OFF). You can also test removing the termination resistors from the network to see if that makes a difference.