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.

TCAN334: Can I use an analog switch (like Vishay DG636E) to connect/disconnect CANH and CAHL to I/O lines?

Part Number: TCAN334

I would like to swap function of I/O pins on our product from the CANH and CANL lines of the TCAN334 to other purposes using a high speed analog switch (like the Vishay DG636E).  Will this work?  What problems might this cause to the CAN interface?

  • Hi Walter,

    I'm not sure I completely understand the desired use-case here. Could you please elaborate on the design?

    Is the goal to disconnect TCAN334 from the CAN bus in order to drive/receive information here from another source? Or is it to switch the bus that TCAN334 is driving? A diagram showing the system in each switch state would likely help my understanding. 

    Once switched, what signals are planned to be sent over the CAN lines? If these are separate analog signals, they will have to be compatible with the related CAN bus termination and potential loading from other sources. Digital signals would likely not fair well on such lines. 

    Regards,
    Eric Schott

  • Hi Eric,

    The idea is that we want to be able to repurpose GPIO lines on our product to serve multiple functions.  Two GPIO can be configured as CAN lines or they can be "switched" to TTL serial lines.  The switching only happens when the system is reconfigured.  The question is will the CAN bus function properly if it is passed through an analog switch like the Vishay DG636E, or is there some aspect of the CAN bus that will be violated an corrupt the data.  As far as we can tell, the bandwidth and voltage range is adequate so placing this switch inline with the TCAN334 CANH/CANL lines should work.  Are we missing anything?

  • Hi Walter,

    Thank you for the figure. This is indeed an interesting case - I've never seen CAN lines double as GPIOs. 

    My main concern with this approach would be the series resistance added to the CAN lines by the switch. Differential CAN signals (especially those driven by 3.3V transceivers) are sensitive to series resistances because they depend on a relatively small voltage differential to detect a signal. Any resistive elements will attenuate this differential and make it more difficult for a driving node to drive a valid signal across the bus to receiving nodes. In contrast, TLL logic may have a larger threshold difference and may tolerate the loss in potential more easily. Depending on the resistance added by the switch, this may be acceptable if the cable length of the bus is sufficiently short.

    I also noted that the DG636E switch specifies a maximum continuous current of 30mA through any terminal. CAN transceivers will pass more current than this between CANH and CANL to drive a dominant signal. For examples, a transceiver attempting to drive a 3.0V differential across a 60-ohm load (two 120-ohm termination resistors in parallel) will need to pass 50mA continuous through CANH and CANL. In the case of a fault on the CAN bus (CAN lines shorted), the transceiver will pass even more current - up to its current limit (TCAN334 specifies Short-circuit steady-state output current, Dominant = +-200mA). 

    I believe the continuous current limit may be solved with different switch selection, but accounting for the series resistance added by such a device makes the CAN design tricky. If the rest of the CAN system is simple you can probably get away with adding some complexity here - possibly testing a prototype with discrete resistors first to see how it fairs with this limitation. 

    Regards,
    Eric Schott

  • Thanks, Eric.  This is very helpful.  Another option we are considering is simply putting the TCAN334 in shutdown mode and ensuring the 120 ohm termination resistor is not in circuit.  This way we can still allow customers to repurpose the GPIO for CAN or TTL serial communication and not cause problems for the CAN transceiver.  Do the CANH/CANL pins go into a high-Z (tri-state) mode when the part is shutdown?  Do you think this will work?

  • Hi Walter,

    This solution looks much more promising. The CAN lines will indeed remain high-impedance when TCAN334 is disabled/unpowered and should not interfere with the signals passed on the bus when in this state. While the extra line connecting the CAN lines to the switch is not idea, this likely won't have any significant impact on the CAN signals unless other other factors are nearing their limits. 

    How do you plan to remove the termination when switching form CAN to TTL? I ask because I would like to make sure that proper termination is present when in CAN-mode. 

    Regards,
    Eric