This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hot-swap/multiplexing CAN transceivers

Other Parts Discussed in Thread: SN65HVD232, TS3A24157

I want to connect a microcontroller with two CAN channels to three different CAN networks, selected via code. Effectively, I want to multiplex my CAN transceivers.

For CAN1, I use the TI SN65HVD232. For my second channel, I want to use HS-CAN with an SN65HVD232 or SW-CAN with the NCV7356 from ON Semi (TI doesn't offer SW-CAN transceivers).

What is the best way to multiplex these transceivers from a hardware standpoint? Do I just use a switch for CANH and CANL (and if so, which switch could I use)? Or would I just turn one transceiver off and only have one operational at a time? Ideally, I would like to be able to switch the selected network on and off without cycling power to the microcontroller.

In the past, I looked at using the TS3A24157 as a switch, but I never managed to get it to work (could be too lossy, too slow for 250kbps, or maybe my code was just wrong). I'd appreciate hearing how you would design such a network from a clean slate. I have limited access to test equipment, so while the last time I posted I received a very helpful response about 'scoping the delay, it's much more feasible for me to implement what someone else has already tested.

Thoughts, part numbers, and especially diagrams are appreciated!

  • Any reason not to switch on the digital side of the transceiver?  That would simplify things a lot.

     

    Robert

  • Right now, I'm proposing switching between the MCU and the transceiver. Are you suggesting switching between the transceiver and the network itself?


    I thought switching between the MCU and transceiver would be simpler from a software standpoint (that way, I'm not talking to two transceivers, only one of which is receiving data). Perhaps this is the wrong assumption to make.

  • It wasn't clear to me which method you were attempting. I agree with you that working on the digital side will be easier.

    Keeping in mind that I have never attempted this, my first thought would be to use tristateable single gate buffer/drivers. One for each line (tx, rx) on each transceiver. The extra delay will be small compared to the transceiver so it shouldn't reduce your maximum cable length by much.

    I'd test without changing buses throughly as you could before attempting to switch. If it works with a single bus without affecting the disconnected bus then switching only introduces the switch management. I'd want to be sure the CAN peripheral was completely off during the switch.

    I'd be interested to know if you are successful

    Robert

  • Hi Joshua and Robert,

    I apologize for the delay in getting back to you. I have been on vacation since this thread started.

    Please take a look at the reference design below:

    http://www.ti.com/tool/TIDA-00267

    This design was created to be able to handle mis-wiring during installation in software as opposed to needing to fix it in hardware. This is an isolated design but it can also be done without isolation using just U6 and U8. This option only has one transceiver powered at any time so that you can just tie the two TXD and RXD nets together without any gate.

    Another option closer to what Robert was suggesting is switch the TXD to one of the two networks and combine the RXD outputs with a logic gate. My concern with this set-up is how are you going to handle if there is traffic on one bus while you are communication on the other? If this is not a concern in your system, you can simply use an AND gate because CAN is logic high when recessive. Therefore if either bus was dominant, one transceiver would have a low RXD signal and the gate would output logic low as well.

    Please let me know if you have any questions,

    John

  • John Griffith said:
    Another option closer to what Robert was suggesting is switch the TXD to one of the two networks and combine the RXD outputs with a logic gate

    My concern with that is that traffic recieved on one network affects the other network.  My assumption from the description was that the desire was to switch between networks not be active on both at the same time.

    I think it is necessary to be blind to the recieved traffic on the bus you are not on, otherwise you will introduce errors on the bus you are on.

    John Griffith said:
    This design was created to be able to handle mis-wiring during installation in software as opposed to needing to fix it in hardware.

    It's probably just me, but wouldn't jumpers or even reed relays have been easier and simpler?

    Robert

  • Hi Robert,

    I agree, and have the same concern about handling traffic on both buses. A simple 2:1 MUX could be used to switch between the two RXD signals if both transceivers remain on and have traffic on both buses simultaneously. On the reference design, one transceiver is shut off at all times so the traffic "issue" is solved.

    I understand your statement about adding jumpers, or something simpler to switch between the two networks. This design was made for a customer so that it could be handled in software. Another option is to have keyed connectors on the bus so that the wires are always installed correctly or to have color coding and training for the installers. Lots of options, this was just one I wanted to share.

    Thanks,

    John

  • John Griffith said:
    A simple 2:1 MUX could be used to switch between the two RXD signals if both transceivers remain on and have traffic on both buses simultaneously.

    Also on the TxD line for the same reasons.

    John Griffith said:
    This design was made for a customer so that it could be handled in software.

    Just curious since the design seemed complex for the stated problem.  Of course the relays would be SW controlled as well but whether that was cheaper or more space effective would be a question for more detailed analysis.

     

    Thanks

    Robert