Physical layer properties
The CAN Basics Training Course provides a practical approach to understanding how CAN works. By giving real world examples, common practices, and an in-depth look at DBC files, Bryan Hennessy gives a real-world walkthrough of CAN.
Presentation by Bryan Hennessy. Recorded as part of a ‘live’ training session in January 2019.
Bryan Hennessy: [00:00:00] So physical layer properties. We’ll talk about now. We’ll start and take much more detail about the physical layer and then we’ll move to data link.
So CAN_Low/CAN_High. Every CAN system is just two wires. CAN network has only two wires and they’re called CAN_Low and CAN_High. These are the most generic names. Different industries might call them different things. In NMEA they call it, I think, slightly different names for them, but these are the most common names I’d use, is CAN_Low and CAN_High.
We’re going to talk about the structure of a CAN bus which is defined by DeviceNet, originally. In the specification, they have the most thorough specification that defines the structure of a CAN bus. Bit-wise arbitration is a big subject. I’ll go over differential signaling. I want to make sure everybody understands what differential signaling is as opposed to single-ended because that’s what CAN uses. Then that kind of leads into, [00:01:00] I’ll just mention, measurement to ground reference as opposed to differential signaling.
This is a slide I made to really show how simple a CAN network is. I hung four ECUs off it. It could be two. It could be three. It could be 50. And they could be displays, they could be sensors, they could be anything. I just call them ECUs for sake of argument. That’s all a CAN network is. That simple. There’s two wires, or two nodes those engineers mostly call them, within that CAN network: CAN_Low and CAN_High, period, end of subject, that’s what it is, with two terminators that are both 120 Ohms. It’s really that simple.
Now, some different standards have power ground and shield carried along with those, like the NMEA 2000 standard. The NMEA wanted to have power and ground. So here’s my NMEA network. These are resistors in just expensive packages and they’re [00:02:00] 120 Ohms across CAN_Low and CAN_High, that’s all these are. This is my trunk cable and these are drop cables. That’s it. That’s a complete CAN network that’s alive right there sending data.
So, I could connect something else here if I had it, if I wanted to, just plug it in and go. Point is, there’s five wires in there because NMEA 2000 says we are going to send power ground and shield along with CAN_Low and CAN_High. Other standards may power the devices somewhere else, not via the CAN network, or other standards may not cover how you power the devices, like J1939 doesn’t have any provisions for powering devices, it’s done elsewhere, but that just depends on the application.
Summary of the physical layer of a CAN network. It’s, again, trunk and drop cable [00:03:00] with multiple devices connected to the same two wires. Terminators on each end, 120 Ohms. Two-wire network with differential signaling. That I’ll get into and show you more of when we get to bit-wise arbitration next. Different wires, different gauges, different links on the trunk cable, different links on the drop cables. Those are specified depending on the rate of the data by different industries.
So, NMEA 2000, which I taught for many years, is very specific on what the speed is. It’s always 250 kilobits per second. It’s always a maximum trunk cable and a maximum drop cable, drop cable of six meters maximum. These are things that are specified in NMEA 2000. It’s interesting to study NMEA 2000 versus J1939 because NMEA 2000, they try to use CAN for industry that wants to be able to [00:04:00] plug and play different devices on a boat at any time and have it reliable. That’s a very difficult thing to do with any standard.
Whereas, J1939, engineers design a network in a vehicle, usually a truck, and then they test it extensively for weeks and months and every different aspect you possibly can and then reproduce them 5000, 10000, 100,000 times exactly the same in different vehicles. Very tested, very secure and all very similar. So to look at those two applications of CAN and think, “Wow, that’s a big difference,” and the difference is it’s a lot more reliable in a truck than it is in a boat. I can tell you that from experience, because using the term plug-and-play in any industry that has something as complicated as a CAN network, to me, is very dangerous. I made that clear to the NMEA [00:05:00] when I was on the board of directors there, and I didn’t make any friends by doing that because they put a lot of money into advertising NMEA 2000 as plug and play and it cost a lot of people a lot of money to try to change the customers’ perceptions that were received by that message. But that’s a whole another story.
So, as far as physical layer, again the most important thing to remember is it gets 1’s and 0’s across the network, period. That’s its job.