A RS485 bus needs a 120ohm resistor placed at each end of the cable run.

Software switched terminating resistor

This circuit works well for digitally switching in a terminating resistor: