Is CAT5 OK for CAN bus? - Page 1
Forum section: electronics / projects

author: unscripted
author_rank: Contributor
timestamp: February 28, 2022, 11:56:22 pm
content: I'm looking for some cable to make a wire harness and connect CAN nodes in daisy chain. Speed will be 500 kbps and length about ~2m max. I'm kind of confused about the characteristic impedance as CAT5 is 100 ohms but CAN requires 120 ohm cabling impedance. Would CAT work if termination resistors are adjusted to 100 ohms? Is there any other suggested cable that I can buy at Digi-key? Also, for daisy chain, is it safe to double crimp wires?Edit: The wire harness will be 4-wires as it will carry both power (5V, GND) and signal (CANH, CANL).

author: thm_w
author_rank: Super Contributor
timestamp: March 01, 2022, 12:23:20 am
content: What baud? Most likely will be fine, google has a lot of information:https://e2e.ti.com/support/interface-group/interface/f/interface-forum/161564/using-cat5-ethernet-cables-for-canhttps://www.reddit.com/r/AskElectronics/comments/d7i6dk/canbus_wiring/https://www.chiefdelphi.com/t/can-geen-yellow-substitute-wire-is-cat5-wire-okay/345691https://www.microchip.com/forums/m166313.aspxUse the right twisted pairs. Try to power the same way POE does if possible.Not sure if double crimping would even work. You can get 1 to 2 splitters.

author: themadhippy
author_rank: Super Contributor
timestamp: March 01, 2022, 12:24:57 am
content: how about scroller cable,https://www.digikey.co.uk/en/products/detail/belden-inc/1502R-010500/7041954

author: nrclark
author_rank: Newbie
timestamp: March 01, 2022, 02:39:28 am
content: I've done it lots of times, and it's always worked great. Of course the plural of "anecdote" is not "data", ymmv, etc.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 01, 2022, 06:46:46 am
content: 2m between nodes, or total?Impedance hardly matters, yeah you can adjust to match the cable, that's fine. A 20% error isn't even much of a problem, and termination being slightly higher than line impedance may even help, somewhat compensating for HF losses in the cable. At worst, the stronger loading on the transmitters will reduce signal level a bit, but you're likely limited on range due to baud rate first, not signal loss.Use whatever crimping is acceptable for the connectors; check the datasheet. Offhand, I would guess using doubled up connectors (on board) would be better than chaining CAT5 into mod plugs. If you have that (design) option, that is.Have seen CAN via smaller mod jacks plenty of times (e.g. 4P4C). Even over common telephone wire (albeit signal only, not also power). Not sure if this is common enough that you can get ready-made cables etc. that way. Maybe not with power included. Anyway, it's a very robust standard, you can get away with a lot. Not that you should plan to, of course, but it means, doing your best at design time, it can deal with quite poor conditions indeed.Quote from: thm_w on March 01, 2022, 12:23:20 amI don't think this is possible, in general at least; but it depends, I guess. There's a few versions of PoE, innit? For example if the remaining pairs are completely unused, yeah, go nuts, use 'em however you like. If it's [common mode] current through the signal pair though, you need some kind of isolation, and that's not generally possible with CAN which is DC coupled. Whereas Ethernet is AC (transformer) coupled, so using transformers as baluns for DC power is perfectly suitable.Tim

author: unscripted
author_rank: Contributor
timestamp: March 01, 2022, 12:36:44 pm
content: Quote from: T3sl4co1l on March 01, 2022, 06:46:46 amTotal.Quote from: T3sl4co1l on March 01, 2022, 06:46:46 amDoubling up connectors would be good, but that's not an option in my design. I need to get away with a scheme using a single connector.

author: SeanB
author_rank: Super Contributor
timestamp: March 01, 2022, 01:07:12 pm
content: Single connector gets harder, as you will then likely have to either make stub cables, 5cm or so long, with a 8P8 plug on the one end, and then use 8 3 way scotchloks to put them into the longer cable, or use telecom style line taps.Otherwise use IDC connectors to put the tap point into a ribbon cable, which will also give you more cores, and for a little more expense twisted pairs. IDC socket and a pin header on the board fits the single connector, and you can polarise with having a 10 wire cable and a block in the one position, with 9 pins on the board, like USB2 headers on PC motherboards use.

author: eugene
author_rank: Frequent Contributor
timestamp: March 01, 2022, 02:28:41 pm
content: I expect it would perform just fine as CAN bus. The only potential problem is that it is solid core so does not tolerate frequent flexing. It is intended to be used in walls and ceilings. You didn't say what your application is...

author: kaz911
author_rank: Super Contributor
timestamp: March 01, 2022, 03:13:41 pm
content: why don't you use Marine CAN cables (Called NMEA 2000?) Cables are purpose built and can take a beating. In the main cable there are 2 signal cables, 2 power cables, shield and easy ways to terminate or T out.it is tried and tested - plenty of connectors available etc.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: May 27, 2022, 03:32:59 am
content: My entire house is wired with Cat5 for CAN. I’ve replaced every wall switch with a small PCB board that has a microcontroller, a CAN transceiver, and a solid state relay. There’s probably at least 100 meters of it in the walls.I also use Cat5 for the CAN bus to my weather station. That run is over 50 meters and runs halfway around the house and 10m up a tower. I use one of the twisted pairs for CAN and one for DC power. It’s been in place and working flawlessly for over ten years.BTW, Cat5 comes in both solid and stranded wire versions. I buy both in 1000 foot spools.

author: Siwastaja
author_rank: Super Contributor
timestamp: May 27, 2022, 02:59:34 pm
content: Use 120ohm resistors. CAN transceivers expect pretty much this value. 100ohms will cause some excess loading; it could cause more harm than good for signal integrity.100 ohm twisted pair for CAN is fine as long as you don't go near the extreme length/baud rate ratings.Of course, if a life support system or a space station depends on the reliability of your network, then you should just buy some 120 ohm cable. For our mere mortals' reliability requirements, it's just fine.

author: CaptDon
author_rank: Super Contributor
timestamp: May 28, 2022, 12:49:18 pm
content: I am a bit surprised that some of the posters on this thread have had the good luck they experienced. We were experimenting with CANBUS sensors on our locomotives and we used 'what we had' for wire and it was an abysmal mess of unreliability until we used real CANBUS wire. I don't recall the cable spec or part number but it had a green and a yellow lead with copper shielding overall and a durable outer jacket. The biggest difference was the ultra low capacitance per foot and this was obvious by the unusually thick insulation of the yellow and green lead. During the experimentation phase we used ARCNET cable and other differential signalling cable that was on hand in our wiring department. None worked well enough to meet our goal until we went to the real CANBUS spec'd cable. Granted, our cabling and noise suppression had to endure 6 squarewave invertors handling 4500 electrical horsepower and that is an EMI nightmare.

author: tszaboo
author_rank: Super Contributor
timestamp: May 28, 2022, 12:52:32 pm
content: I've ran CAN through ethernet cable, and it was hundreds of meters long, with dozens of nodes. At 2m of course it will be fine.

author: voltsandjolts
author_rank: Unknown
timestamp: May 28, 2022, 01:21:05 pm
content: I think at 2m total length you could run it through tin cans, iron railings or conductive paint.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: May 29, 2022, 09:47:17 pm
content: Quote from: CaptDon on May 28, 2022, 12:49:18 pmI think you answered this quite well yourself:Quote

author: eugene
author_rank: Frequent Contributor
timestamp: May 30, 2022, 12:35:22 am
content: What is used in cars? I'm not about to go take mine apart just to find out. I'd be surprised if it's fancy in any way.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 30, 2022, 01:03:53 am
content: Quote from: eugene on May 30, 2022, 12:35:22 amPlain old PVC, twisted pair, not even shielded I would guess. Automotive is a pretty innocuous environment, considering. Cables are tucked away from grubby ESD-laden fingers, ignition noise is a long solved issue, and about the worst of anything is transients from relay contacts opening, a few hundred volts maybe.Typical EMC treatment for automotive CAN is a ~50uH CMC, and a 24V ESD diode. Not much shunt capacitance is usually tolerable (depends on baud rate and number of loads) but might help in some cases (note the CMC basically only applies during TX, except for the one or two priviledged nodes that can terminate the line, CM as well as DM).Locomotives however can have some pretty nasty stuff, EN50121 gives generally industrial sorts of levels for rolling stock and nearby (railway-adjacent or terminal) sites. But things can always be worse right up by the inverter drives, or arcing from the catenary. In which case the standards aren't too much help, you basically need to characterize the beast itself -- and preferably just give it distance and shielding, and use low capacitance isolation anywhere you need to communicate electrically with it.Likely the above example, unless the cable length was quite long, the impedance or loss of the cable didn't matter, just the shielding was paramount and it took that grade of cable to get there.Tim

author: uer166
author_rank: Super Contributor
timestamp: May 30, 2022, 03:10:52 am
content: Quote from: T3sl4co1l on May 30, 2022, 01:03:53 amCorrect, and this includes EVs with ~400Kw inverters. In some cases they're not even always twisted for shorter runs. It's a total non-issue in cars and is what CAN was designed for anyway.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 30, 2022, 04:48:43 am
content: Note that EVs have much better EMC. Trains... I suppose, just get away with it forever? EVs have enough filtering and shielding to keep the traction noise inside. I think, anyways. What was the last teardown I saw, think the inverter was right there on the motor, or nearby anyways? Battery cables themselves also tend to be shielded, and partly for safety for that matter.If nothing else, automotive in general, it still has to meet all the usual automotive standards, so you're not going to get away with zapping everyones' radio reception as you drive by, just because you've got a few bigger IGBTs going a few hundred times faster than usual*.*Ignition is usually IGBT driven, there are special types rated for ignition-y currents at Vge = minimum cranking, with "excessive" internal gate resistance to set the output slew rate (a few µs) hence the low EMI there. The high voltage rating of course (400V+?) leaving plenty of clearance for the important flyback pulse. Vce(sat) being a couple volts matters surprisingly little, as ignition coils are wound quite conservatively, still giving plenty of primary current at, whatever 3-5V applied, indeed they need a ballast resistor (or shorter charging time) to limit current in normal operation.So, IGBTs running at a few 100 Hz for ignition, versus inverter drives at 10s kHz, and I mean, a couple more amps maybe.Tim

author: m k
author_rank: Super Contributor
timestamp: May 30, 2022, 07:05:17 am
content: Quote from: voltsandjolts on May 28, 2022, 01:21:05 pmI've seen industrial installations where cable and connector have been sort of what ever.

author: rvalente
author_rank: Frequent Contributor
timestamp: May 31, 2022, 12:47:27 am
content: On cars and trucks its just a 0.35mm pair with 50ish twists per metre and it can runs up to 1M baud or more, being can 2.0b or even can FD.Profibus which is differential can run up to 13mb in the worst environment and the cable is just two solid copper wires slighted twisted with a aluminum foil shild.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 31, 2022, 01:41:03 am
content: To clarify, CAN is differential too; the fact that it's wired-OR (like I2C, indeed there's a differential I2C which works the same way, albeit with two pairs required, and poorer noise immunity) limits bit times to more than the maximum electrical length between nodes.Profibus I'm not very familiar with, but it looks like it often uses RS485, and it looks like it's multidrop. So, some kind of serial protocol on that, negotiating bus masters, enumerating addresses (or they're hard configured?), etc. Bit times won't be limited by electrical length, but transitions between bus masters must be; but that will be at packet level, so, negligible overhead.CAN was originally developed with RS485 receivers (DI strapped high, DE to TXD, and probably some diodes added), and it should be no surprise that so many of these industrial signaling standards use more or less the same thing; RS485 works very well indeed.Note that RS485 can be driven with AC balance e.g. Manchester encoding, and voila, now you can send it over a transformer -- bingo, you invented Ethernet. Etc.Tim

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 31, 2022, 01:52:44 am
content: Just using 100 ohm termination with any RS-485 or "CAN" transceiver should do the trick indeed without a problem.You could also use LVDS transceivers, over such short lengths.

author: eugene
author_rank: Frequent Contributor
timestamp: May 31, 2022, 03:47:44 pm
content: Quote from: T3sl4co1l on May 31, 2022, 01:41:03 amHow soon we forget about analog phone lines, which are also differential, carry power along with signal (PoE), transformer coupled, and have been successfully transmitting signals many Mm (megameters) for decades. To be fair, there are repeaters, so they don't go Mm all at once.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 31, 2022, 04:49:03 pm
content: Full duplex too!Transformer coupled, even at such low frequencies (500-3000Hz); and even putting many channels on a single  line (FDM).And doing it with toobz at that; the last such transatlantic cable to go in, was what, 1980s? Early 90s? Don't know the exact history. They operated many such lines though, think the claim was over a century equivalent total runtime,zero failures. Impressive!Tim

author: Yashu
author_rank: Newbie
timestamp: October 07, 2022, 11:57:59 am
content: Quote from: Sal Ammoniac on May 27, 2022, 03:32:59 amNice... what specific pinout did you assign? Why the SSR?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 07, 2022, 05:08:05 pm
content: CAT5 will be just fine, as it's officially specced twisted pair wiring.Termination resistors are always determined by the impedance of the actual cable being in use, and not by some other specification.Also don't believe the papers, do your own measurements. If your termination resistors are 20% off, it probably won't matter much, especially with such a short cable. If you do your measurements on a longer spool of cable (who does not have some 20m Ethernet cables lying in some storage bin), then you can also nicely see the cable and termination resistor effects, and cable reflections on impedance mismatch. with a decent scope (50MHz or so) you can even measure the cable length from the time it takes for reflections to return on mismatch. It's quite easy to measure and it's educational to do so.Also, CAN is 1Mbit or so, termination resistors are quite non critical for a 2m cable run. CAN does always need termination resistors to pull the lines together for the passive bits though. But even a single resistor somewhere in the middle of the wire probably works.