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.

Using CAT5 Ethernet cables for CAN

Expert 2021 points
Other Parts Discussed in Thread: SN65HVD255

Hi,

I would like to use UTP CAT5/CAT5e cables in an inexpensive industrial control system connected by a CAN bus.  CAT5 cable has an impedance of 100 Ohms, but the CAN spec specifies 120 Ohms.  How much will this impedance mismatch matter?  The distances from one end of the bus to the other will be fairly short (3 to 10 meters or so).  I see the CAN spec has a definition for RJ45 connectors, but the cable impedance is the issue.  I could terminate with 100 Ohms, 110 Ohms, or 120 Ohms.  100 Ohms would match the CAT5 cable but the CAN transceivers would be seeing a lower impedance.  120 Ohms would create an impedance mismatch between the cable and the termination.  110 Ohms seems like an OK compromise.  If the termination was off-board then the node would still be compliant but the installation would not be.  Is there a source for inexpensive 120-Ohm CAN cables that use DB-9 connectors (which seems to be the norm)?  The cost of CAT5 Ethernet cables is hard to beat.

Thanks in advance for the help.

Greg

  • The CAN standard is written for 120 ohm cable as you describe, however the modern CAN devices have very wide RL (load) characteristics.  Since you indicate the network will be very short, 3-10 meters,  there isn't long cabling and additinal loading to consider that would normally come into play in a lot of CAN networks.  If you terminate properly for the CAT5 cabling using 100 ohm resistors you will end up with a RL equivalent of 50ohm vs what would be 60ohm for normal CAN cabling.  The main concern for this is the output differential voltage of dominant bits, however on a modern CAN transceiver, such as the SN65HVD255/256 you will see the VOD(D) parameter is specified over a RL from 45 ohm to 65ohm so from a termination load view point only you are well within spec.  This however will force fewer total nodes on the network as you will want to remain in spec of the VOD(D) even with the starting RL being lower.  This will reduce the number of parallel nodes that may be added while staying within the 45ohm datasheet spec for VOD(D).  As each node is added the input resistance of that node (receiver) will be in parallel with the termination resistors.  Thus this system would theoretically allow for 33 nodes while maintaining the 45ohm minimum (ie 33 nodes of 15k ohm, min in parallel with 50 ohm = 45ohm).  Obviously using precision resistors and tighter voltage supplies on the CAN transceivers helps maintain spec compliance.  Another point is the CAN VOD(D) minimum spec is 1.5V and the receiver input threshold spec for CAN dominant is 0.9V so there is a lot of margin built in.  Again for a 3-10m network there will not be nearly the parasitic losses the standard allows for.

    Thus in general you should be able to make a reaonable CAN network even terminating the 100ohm cable properly, it will just reduce lenght of the network and number of nodes possible within CAN PHY spec.  Just keep in mind the additinal parasitic loading effects of any other network changes to make sure you keep the impedance the "drivers" see within the allowed tollarance of the CAN network.

    -- Scott

  • Hi Scott,

    Thanks for fast and detailed response to my question.  It sounds like it will work out well since I don't plan on having anywhere near 33 nodes on the bus.  I appreciate the explanation of what the limits are.  I'll have to experiment with 120-Ohm termination and see what it looks like on the scope compared to 100-Ohm termination.  Good to know it should work fine at 100 Ohms.

    I have one more question that is related.  I am concerned about what will happen if the CAN driver is plugged into an Ethernet adapter.  I didn't say this before, but the twisted pair pinouts for T568 and CAN are the same, so a standard Ethernet cable will work, pinout-wise.  I used an Ohmmeter to measure the DC resistance of the transformer windings of an RJ45 with the integrated magnetics.  I was reading about 0.8 Ohms between pins 1 and 2, and the same between 3 and 6.  Looking at the data sheet for the SN65HVD255, I am having trouble understanding which parameter would represent CANL being shorted to CANH by 0.8 Ohms.  Using the spec for the Dominant Short-circuit steady-state output current of 160 mA, the power dissipated would be 0.16*0.16 * 0.8 = 20mW, which doesn't seem like a lot of power dissipation.  Am I looking at that correctly?

    Thanks and Regards,

    Greg

  • Actually in RS-485 we experienced that some undertermination can be actually better for signal integrity.

    Sorry, that I had to throw in my 2 cents.

    Cheers, Thomas 

  • Hello Greg,

    CAN transceivers are design for shorts circuits to all sorts of nasty supplies, in the SN65HVD255/6 case from -27V to +40V.  There will be no damage to the the device itself by shorting CANH to CANL via the Ethernet transformer.  I would be concerned about the inductance of the transformer possibly causing transients outside this voltage range since I haven't tried this "fault".  You would want to look at this fault case and determine if the CAN bus will have transients generated on bus state changes (ie when the current flow change occurs on the bus pins).  There may flyback via an inductive kick, if you see that you may want to add some TVS diodes or varistors on CAN bus lines to keep these spikes in the -27V to +40V range.  They should be near the connector and with a good path to GND.  If you look at the SN65HVD255 EVM (http://www.ti.com/tool/sn65hvd255devm) we have put footprints on the board for these types of devices. It is generally a good practice to at least put the pads there on the PCB, even if they unltimately don't need to be popoulated.  There are 3 pin TVS diode packages to cover both CAN lines in one package such as the Semtech SM712, or standard TVD diodes such as the MMBZ18Vxx series or vairstors that follow capacitor footprints.  The trade off on these is clamping voltage levels, energy capability & capacitance (higher will slow down CAN transitions and add loop delay possibly causing a reduction of data rate if there are too many of them). 

    -- Scott

  • Thanks for the 2 cents Thomas.  Your experience is worth a lot more than 2 cents! ;-).  Good to know that the lower impedance might be good.

    Scott, thanks for thinking about the inductance of the Ethernet transformer.  I'll be sure to include the pads for TVS devices.  I wonder if the current spikes on the CAN side could cause spikes on the Ethernet side?  Hopefully it would be within the ESD specs of the Ethernet PHY and the PHY would not be damaged.

    I didn't see a spec in the data sheet for CANL being shorted to CANH in the dominant state.  I see a spec for CANL being shorted to 32V with CANH open, or CANH being grounded with CANL open.  I also see a supply current spec for when it is driving dominant and CANH is tied to -12V.  That last spec appears to be closest to the spec I'm looking for.  I'd expect CANL being shorted to CANH would be less than that value.

    I'm new to CAN, so please correct me if I'm wrong.  With multiple nodes on a bus, the idle state of the bus would normally be recessive and CANH would equal CANL.  So in that state there wouldn't be any current flowing if CANH was shorted to CANL.  The case to worry about is when it drives dominant.  As long as the CAN node was operating properly (safe to assume because the fault case I'm concerned about is where the user accidentally plugs the cable into the wrong jack), the current in question would be the average current since the only appreciable current flow is in the dominant state.  I read the section titled "CAN BUS SHORT CIRCUIT CURRENT LIMITING", which says the driver will shut down after a certain amount of time has passed.  Does the time out circuit keep the driver turned off until the TXD input is toggled to the recessive state where it is enabled again?

    Thanks for your help.

    Regards,

    Greg

  • Hi Greg,

    Your understanding of recessive is correct, CANH = CANL = ~2,5V (Vcc/2) pulled there by the CM bias circuit of the transceivers, minus any GND shift and supply issues that influence the CM point one way or the other.  This will have essentially no current flowing unless there is a CM shift with the bus lines shorted via the transformer.   The average current understanding is correct.  TXD DTO will hold the driver off until TXD pin sees a recessive and thus clears the "fault" see page 5 of the HVD255 datasheet for more info on how the TXD DTO of that device works.   See page 6 of the datasheet for more on how the HVD255 current limiting works and the DC average topic.  Below are some other comments on your assumptions / questions.

    The datasheets basically cover the DC worst case single ended options for CAN and are derived from automotive, ie the 32V DC on CANL and CANH to GND (basically the same current as a short to negative voltage).  Thus the CANH and CANL will in your case "fight" each other, but both will current limit to the max 160mA and not "generate" a voltage that the other one cannot withstand.  From a datasheet spec we just highlight test cases on the corner conditions which rightly or wrongly has evolved over time, autmotive standards for CAN and competitors to these points which are not always obvious for industrial or non-automotive use cases of CAN.  You can simplify the concept to any time CANH is dominant and pulled below its output current it will try to source the current till it hits the current limit, and CANL is the opposite.  The CANH at -12V ICC is also a worst case corner coverage point for ICC during shorts so if you are worried about the instantaneous peak current the device would ever take under fault condition that is it.  But since CAN switches and HVD255 has TXD DTO you would never stay dominant and at the high ICC for more than TXD DTO time (or in normal CAN Communication for 11 bits, 5 dominants before bit stuffing with an error frame of 6 bits directly after it). 

    Enet PHY --> would have to look at this and it may depend some as well on which form of the isolation architecture transformer is being used, ie if the CM choke portion of it is bus facing of PHY facing.  Both are available and in use for Enet.

    -- Scott

     

     

  • Hi Scott,

    Thank you very much for your detailed answers to my questions on this topic.  I feel very good moving forward, and I plan on making some real world measurements of the signals on the Ethernet side of the transformer to see what effect the CAN bus has when it is plugged in.  Thank you again!

    Regards,

    Greg