Well, hello everybody. My name is Eric Carmen
with Enovation Controls Technical Services. Today we're going to be talking about the physical
and electrical characteristics of a CAN data bus. We will also be reviewing some
troubleshooting techniques for the most common problems you're
likely to encounter in the field. Before we begin, we should probably have a
brief discussion on what a CAN data bus is. CAN stands for controller area network and it's
basically a two wire high-speed data bus that allows multiple devices to communicate with each
other. This is a multi-master data bus. What that means is that any device connected to the network
can take control of the bus and transmit data. To help demonstrate some of the
principles we're going to learn today, we have this panel behind us that has
all the major components that you'll find in your typical CAN data bus.
Let's zoom in to get a closer view. This panel is a physical representation of
what you'll commonly see on a CAN data bus. We have a main bus, sometimes
referred to as a backbone, and then along the backbone we
have different devices stubbed out. We have an ECOM controller that we're going to use to transmit data and monitor all
the devices that are on the bus. We have stubbed out on stub number
two an XMD valve controller. And then, on stub number
three, we have a PV380 display. On the far ends of the data bus, we have a
termination resistor located all the way on the left and all the way on the right. A CAN bus
has to be terminated on the far ends of the bus. So, we've laid it out to give you a physical
representation of what that should look like. The CAN network uses a bus topology. What
that means is you have a main harness or backbone and then each device is stubbed
out or daisy chained as you go along. In this example we're using yellow
and green twisted pair wire. This is the minimum requirement for a CAN data
bus. You can also use twisted shielded pair which is more optimal but it's a
little bit more difficult to manage. You can use pretty much any wiring technique
on the CAN data bus in this example we're using a terminal strip to split off to the
ECOM control and then for the other two stubs we're using the Deutsch triangular
connector system along with a splitter. For the termination resistors we're also using
Deutsch termination plugs which have a built-in 120-ohm resistor that's encapsulated in
epoxy to keep it nice and watertight. That pretty much covers all the
physical aspects of a CAN data bus. Now let's talk about some of
the electrical characteristics. The two signal wires are referred
to as CAN Low and CAN Hi. The voltage that you'll measure
on these two wires is going to be 2.5 volts when there is no data being broadcast, and then CAN Low will switch
between 2.5 and 1.5 volts and CAN Hi will switch between 2.5
and 3.5 when it's broadcasting data. Let's take a look at the oscilloscope to
get a better view of what this looks like. I have the oscilloscope connected to CAN Hi
on channel 1 and CAN Low on channel 2 and on the panel I have the XMD and the PV380
and the ECOM cable all broadcasting data. What we're seeing now on the oscilloscope are the data packets being broadcast
at various time intervals. I have the oscilloscope set up for 1
volt per division so you can see that the baseline for CAN data is sitting at
about 2.5 volts for CAN Hi and CAN Low. Let me separate the two signals so you
can see what I'm talking about here. I'm going to raise channel 1 up a little bit. Now I'll bring it back down so it's at the
same voltage reference as channel number 2 and as you can see in the time in between the
packets the voltage is sitting at 2.5 volts. Now let's take a closer look at the actual data
packet. I'm going to change our horizontal scale, and this is pretty much what the message
looks like. I'm going to freeze-frame this now so you can get a better view.
As you can see when data is active CAN Hi goes between 2.5 and 3.5 volts and
CAN Low goes between 2.5 and 1.5 volts. If you look at the average voltage or the mean
voltage that the oscilloscope is measuring, we have about 2.9 volts on CAN
Hi and 2.14 volts on CAN Low. This is pretty easy to see what's going on
when you have an oscilloscope connected, but more than likely all you have is a multimeter. What does the voltage look like
when you have a multimeter? As you can see, most of the time the
voltage is at 2.5 volts DC with periodic transition on CAN Hi to 3.5 volts
and on CAN Low down to 1.5 volts. When you're measuring this with a multimeter,
it's going to average these voltages together. So, you're going to get something just roughly a little bit above 2.5 on CAN Hi and
a little bit below 2.5 on CAN Low. So right now, the average voltage
is about 2.56 on CAN Hi and then we'll switch over to CAN Low and
the average there is about 2.5. Now typically when you're measuring
these voltages with a multimeter CAN Hi is going to be
somewhat greater than CAN Low. How much of a difference you'll
see depends on the bus loading. Right now, we're not sending a lot of data
on the bus so there's not a whole lot of difference between CAN High and CAN Low because
most of the time it's sitting there at 2.5 volts. Let's take a look at what happens when you disconnect everything from the
network except for one device. I'm going to unplug the ECOM cable and
the XMD and let's see what happens. Well, as you can see, there's a flood of data
on the network now. That's because the CAN controller in the PV380 is trying to synchronize
with another device and there's nothing there. We can use this to our advantage because
the voltage you're going to measure with the multimeter now is going to be much
higher on CAN Hi and much lower on CAN Low. Let's take a look at what the
voltage looks like on CAN Hi and what we have now is 2.9 volts and
then on CAN Low we have 2.1 volts. It's much easier to determine what the average
voltage is on the data bus when you have just one device connected. This will become
important when we get into troubleshooting. The next thing we need to talk about
are termination resistors. We've already mentioned that at each end of the bus
you have to have a 120-ohm termination resistor as we have located here and here.
Well, let's talk about why that is so. The CAN bus is a high-speed data bus and as
a signal propagates down the line if it is not terminated part of that signal will reflect
back and then interfere with the next data signal coming down the line, and what that could do is
disrupt communications and the bus could fail. So, you may ask, "well what about
the stubs? The stubs don't have a termination resistor what
about reflections there?" Well, the same thing holds true for the stubs.
A certain amount of signal will reflect back, however, if you keep the stubs short
enough then that won't cause a problem. If you have a really long stub
relative to the length of your CAN bus, then that could pose a problem. The general rule of thumb is to keep
the stub length as short as possible. I'm going to link an application
article from Texas Instruments that discusses the topic of termination
resistors and signal reflections. For the purposes of this conversation, the rule is the CAN data bus has
to be terminated on both ends. Now, let's take a look at what
that resistance would look like. I've turned the power off and I have a multimeter set to measure resistance and I
have it connected to the PV380. You can make your connection
to any place along this bus, and you should measure the same resistance. So, what we show here is about 60 ohms which is
the parallel combination of two 120-ohm resistors. This leads us into the next part of our
conversation which is troubleshooting. The first step in troubleshooting a CAN data
bus is measuring the termination resistor, so you want to pick the most
convenient spot to plug into the CAN bus and measure between CAN Hi
and CAN Low and you should see 60 ohms. If the termination resistor is missing you'll only measure 120 ohms. I'll unplug one of
these terminators to demonstrate that. As you can see the resistance
is now close to 120 ohms. If you had three termination
resistors in the network it would be the parallel combination of
three resistors which would be 40 ohms. That's not as bad but it's also not as desirable
so you'd want to correct that situation. So, if you're only seeing 120 ohms
now, you're going to have to figure out where on the data bus are we
missing the termination resistor. A physical inspection is usually
the best way to do that, however, if the harness is really complicated and difficult
to get to if you can tap into the harness midway somewhere then you can tell on which side of
the harness is missing the termination resistor. I'll demonstrate that here by unplugging
one of the connectors on the backbone. Now what we're measuring is about
27 kilohms on the multimeter. We're measuring this half of the
backbone and it looks like there's no termination resistor installed, so we know
the problem is on this half of the harness. If I move my leads over to measure the resistance
on this half of the harness, as you can see we have roughly 120 ohms, so we know that this
half of the harness is properly terminated. So, you'd want to find the far end of this half
of the harness and add a termination resistor. One thing to keep in mind is that some
devices, like our Murphy PowerView color displays, have a built-in termination
resistor that is software selectable. So, if that's the case, you're not going
to see that resistance when you measure it on the bus because it only becomes
engaged once the display is powered up. In that instance you'll want to look at the
data sheet for the device that's connected. The next most common problem you'll
encounter is a problem in the harness itself where somebody has wired
CAN Hi and CAN Low backwards. Let's go ahead and swap CAN Hi and CAN Low on
our XMD valve controller and see what we get. Typically, the starting point is going to be to
measure your voltages somewhere on the harness. Right now, you can see that CAN
Hi is measuring 2.4 and then CAN Low is measuring 2.6. Now that's
opposite of what it should be. CAN Hi should always be higher than CAN Low. You can't always go by this voltage
because remember that every device on the network is contributing
a voltage of some kind, so they all contribute a voltage on the network
and may give you a misleading reading. The only real way to determine what is going on is
to isolate the bus to only one device at a time. For this example, I'm going to
disconnect the PV380 and then the ECOM controller and let's see what we get. Now the only device that's left on the
network is the XMD valve controller, and as you can see, we have 3 volts on
CAN Low and roughly 2 volts on CAN Hi. So, we know that is backwards
of what it should be. The next step in this process would be to unplug
the connector from the XMD and verify that it's pinned out properly, and if that's not the
cause of the problem then you'll just have to investigate further up to harness to find out
where CAN Hi and CAN Low have been reversed. The next type of failure mode is if you're
missing one of the CAN data signals. If you have a display like the PV380 and you lose
one of the data signals, you're going to get an error that'll tell you that there's a problem with
the CAN bus so that's really easy to diagnose. What if you had a device that didn't have a
display and didn't have any LED indications to tell you that there was a problem
with the CAN bus? What would you do then? Well, let's demonstrate that. You're
basically going to go through the process of elimination and go through all
the various steps and in this instance you'll just have to unplug the connector and then
measure the CAN voltages on the connector. When we measure CAN Hi you can see
that we have 2.55 volts and then when we measure CAN Low we have 0, so that
tells us that there's a wire disconnected and we would investigate what
the cause of that would be. The last failure mode we're going to
talk about is if one of the CAN ports on one of the devices is shorted to ground
either due to a lightning strike nearby or somebody welding on the unit or some other
factor that has caused the output to fail. And typically, it fails in the shorted
to ground condition so what that means is either CAN Low will be shorted to ground or
CAN Hi will be shorted to ground on that device. To simulate that I've taken a 47-ohm resistor and connected it between CAN Low and
ground on the output of the PV380. So right now, we're measuring voltages on CAN
Hi and as you can see it's like 0.2 volts, which right away we know there's a problem, and
then CAN Low is also measuring about 0.1 volts. I only shorted CAN Low, so why is
CAN Hi also showing low voltage? Well, remember CAN Hi and CAN Low are connected together through this 120-ohm resistor
here and 120-ohm resistor over here, so whenever there is a problem on CAN
Low it will show up on CAN Hi as well. So, in an instance like this, what
we want to do is disconnect the termination resistors, which I'll do right here. Now the CAN signals are isolated from each
other, and as you can see we have 0.027 volts on CAN Low and 2.5 volts on CAN Hi so we
know the problem is on CAN Low however we don't know which device the problem exists in, so once
again the only way to accurately determine which device is causing the problem is to isolate
the bus and connect one device on at a time. So we already know that the
problem is with the PV380 but I'm going to disconnect everything except
for the ECOM cable and see what we get. Okay so we saw that the problem was on CAN Low so
let's return our measurement to measure CAN Low. Okay, right now we have 2.09 volts
which is perfect for CAN Low, so now let's add the devices back on one
at a time until we see the problem return. We're going to plug the XMD back in and our CAN Low voltage is still looking really
good, now let's plug in the PV380. And now we see that CAN Low has dropped down to 0.027 volts so that tells us
that the PV380 has a problem. The next step in confirming that the PV380
indeed does have a problem, what we want to do is turn power off and take a resistance
measurement of the CAN port on the PV380. Okay, now I have power turned off and
I'm going to simulate unplugging the connector on the PV380 and now I'm
going to measure resistance between CAN Low and ground and see what we get.
And as you can see, we have 50 ohms. The impedance should be in the megaohm
range between any of the CAN signals and ground on the device. So, let's move
over to CAN Hi and see what we get there. CAN Hi is measuring 28 kilohms. The
measurement should be in the megaohms region but there's a reason
why we're seeing 28 kilohms. The internal resistance between CAN Hi and CAN
Low is roughly 28 kilohms. Let's measure that. So that's about 28 kilohms. Since we have a short
between CAN Low and ground what we're measuring here is their internal resistance between CAN
High and CAN Low and then the short to ground that's why we're seeing about 28 kilohms when
we measure a resistance on CAN High to ground. On a good device that should be megaohms.
Let's take a look at what that would look like. Right now, I'm measuring the internal
resistance between CAN High and CAN Low on the XMD and as you can
see it's roughly 28 kilohms. Next, let's measure the resistance between
CAN High and ground and as you can see, we're measuring an open circuit and
that is the correct measurement. Between ground and CAN Low
we also have an open circuit. Let's go back and measure resistance
between CAN Low and ground on the PV380 and as you can see, we're
measuring 50 ohms which indicates that the CAN port has been blown on the
PV380 and it would need to be replaced. Well, that about wraps up this tutorial.
We hope that you found the troubleshooting information beneficial for you. For
more information on this and many other subjects, please visit our site at
enovationcontrols.com. We'll see you then.