MUX CAN and RS-485 on the same lines - Page 1
Forum section: electronics / projects

author: alderlerob
author_rank: Newbie
timestamp: October 25, 2023, 02:38:40 pm
content: Hi all,To minimize the number of lines used for connectors, I would like to multiplex CAN signals and serial RS-485 on the same lines and choose which one to use via my microcontroller.However, there's an issue with the voltage levels of CAN and RS-485. CAN operates at voltage levels of 1.5 to 3.5V, whereas RS-485 uses voltage levels ranging from -5 to 5V.I have not been able to find an IC that is suitable for this application.The specifications for CAN are basic, using the CAN 2.0 standard at 1 Mbps, and the RS-485 baud rate is 115200.Do you have any options that could be a good fit? I would like to avoid mechanical relays.Thank you

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 25, 2023, 02:40:41 pm
content: RS485 doesn't normally use negative voltages

author: Siwastaja
author_rank: Super Contributor
timestamp: October 25, 2023, 04:02:59 pm
content: Quote from: alderlerob on October 25, 2023, 02:38:40 pmNo, not at all. Both differential voltage levels and common mode ranges of RS485 and CAN transceivers are very close. I don't think you need even a mux; you could just parallel the RS485 and CAN transceivers, as long as you enable only one at given time (use transceiver ICs that have enable pin, such that the chip is in listen only mode when disabled).

author: langwadt
author_rank: Super Contributor
timestamp: October 25, 2023, 04:05:38 pm
content: Quote from: Siwastaja on October 25, 2023, 04:02:59 pmafaiu the first CAN was implemented using RS485 trancievers

author: alderlerob
author_rank: Newbie
timestamp: October 25, 2023, 07:08:04 pm
content: Oh you are right, the RS485 output stay between Vcc and gndThat is a good newsThank you all

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 25, 2023, 10:31:48 pm
content: Both CAN and RS485 have a common mode range of about -7V to +12V (= 5+7) This makes it convenient for both power and data over a long cable. Suppose you have a long (100m) cable and a 24V power supply and local notes make local 5V for the nodes. If the most furthest node has a voltage drop of 3V over each supply line, it's GND level will also have risen by 3V, so at the end of the cable it has 18V left for the SMPS to make 5V.But more importantly, if a node on the start of the cable (where the power supply is) sends data to the furthest node, then the furthest node sees the data between -3 and +2V because it's local GND level has risen by 3V.-------------------Most RS485 transmitters can generate perfectly valid CAN signal levels if you tie the data output of your uC to the transmitter enable of the RS485 driver. But be careful. Some RS485 driver IC's put the transmitter in a power down mode depending on the state of the input pins, and they may have a too long wake up time to do this.RS485 drivers can also receive CAN signals if the "idle" state of the lines are tweaked a bit with biasing resistors, but in this case you have a reduced robustness.I am not sure how CAN receivers act when they get RS485 input levels on their inputs. I guess it will very likely work, but it's outside of the standards.