Summary

CAN communication busses have become increasingly common in both OE and aftermarket applications, and particularly in the world of aftermarket standalone ECUs, we’re seeing more and more devices which communicate via CAN. This communication will require a properly designed CAN bus though if you want trouble free operation. In particular one of the common failing points is a CAN bus that either doesn’t have any terminating resistors, or one that has been fitted with multiple terminating resistors in the wrong locations. In this webinar we’ll find out what a terminating resistor is, how the CAN bus should be constructed, and see how to add terminating resistors where necessary.

 

00:00 - Welcome along to another one of our webinars.
00:02 This time we're going to be looking at CAN termination resistors.
00:07 We're going to find out what they are, why we need them and then we're going to have a look at a quick easy way of adding one in.
00:13 It's not going to be difficult to do and it's going to be a nice reliable way of doing so.
00:19 As usual we're going to be having questions and answers at the end of this webinar.
00:23 And because this webinar is a relatively simple topic, it's likely this might be a little bit shorter than our usual.
00:30 So I'd urge you to jump in pretty quickly if you do have any questions, ask those in the comments, the team will transfer those through to me and we'll deal with those at the end.
00:39 So what is a termination resistor and why are you going to need to know about these? Well let's start by talking about CAN itself and what that is.
00:49 So CAN communication is a communication method that's been common now in OE applications for a number of years and probably over the last five or six years, we've seen CAN really start getting integrated into our aftermarket standalone ECUs as well.
01:08 As well as a range of aftermarket standalone modules such as wideband CAN based controllers, maybe CAN based expansion modules and the like.
01:20 So CAN essentially is a really simple two wire communication bus, and it runs around our car and information from all of the modules is placed onto that bus.
01:32 And what this means is that if our ECU for example is communicating all of its available channels of data out onto that CAN bus, all of that information can then in turn be received and displayed by the likes of maybe an aftermarket dash display.
01:49 And the nice thing about the CAN bus is that because it is a well known standardised protocol, communication protocol, this means that it is the same regardless whether you're using a product from maybe Haltech, maybe Link, MoTeC, AEM, it doesn't matter, provided we know the template that the particular product is communicating with, or in other words what board rate or speed it's communicating at, what address and the make up of each of the messages it's being sent, we can decode, let's say a MoTeC E888 expansion module in a ECU Master ADU aftermarket dash display or any of another wide range of combinations.
02:35 So it's really flexible and allows us to not just stay locked down to one particular range of products.
02:42 Now as I've mentioned, it is a really simple two wire bus.
02:46 It runs around our car and we're going to terminate each of the modules that we want to transmit or receive on that CAN bus onto the bus.
02:55 This is where things get just a little bit tricky.
02:57 Not too tricky but we do need to give some consideration to the way our bus is constructed.
03:03 There are some general best practices in constructing our CAN bus to make sure that we're not going to end up with communication problems.
03:11 Now this is probably a good time to also mention that if you want to learn a little bit more about what CAN is itself, then as an HPA member you do have access to our webinar archive and if you search in our webinar archive, I think we've currently got either two or three other webinars that cover CAN in a little bit more detail, in other words, what the actual CAN bus messages look like, we've also got a webinar in there that shows a really basic run down on how we can go about reverse engineering a factory CAN message to display for the likes of that webinar.
03:45 I think it was wheel speed and engine coolant temperature from a factory Nissan 350z.
03:50 Here we're not really focusing on that aspect of the CAN bus, we're looking more about how we physically construct the wiring of the CAN bus.
03:57 So what we need to do for a start is know what that CAN bus is supposed to look like.
04:02 So what we'll do is we'll head across to my laptop screen.
04:05 And this is a recommended CAN bus setup, I think this came out of a MoTeC instruction manual but essentially the technique is the same for any CAN bus construction.
04:20 So what we've got here is the bus itself.
04:22 So this is a twisted pair of wires, it's really important to have that twisted pair for noise rejection there.
04:29 And off the top of my head I think it's recommended to have a twist ratio of something like one twist per 20 millimetres or thereabouts.
04:37 Not that that is super critical, as long as we've got that twisted pair in there.
04:41 And what we do is then connect each of our individual modules onto that central bus, so for example here we've got a CAN device, this could be anything at all.
04:53 In this case we've got four MoTeC lambda to CAN modules, so these are a wideband air fuel ratio controller that communicates that information via CAN.
05:03 We've got our ECU here and we've got a datalogger and of course in this instance all of those products are communicated to and programmed via a laptop computer that communicates via CAN as well.
05:18 So the idea here is each of those modules just connects onto that central CAN bus.
05:23 There is a recommendation there of how far away from that central CAN bus we mount each of the individual nodes or devices, around about 500 millimetres is the recommendation for that limit.
05:35 And then what we can see is at the end we've got our terminating resistors.
05:41 Now MoTeC recommend a 100 ohm resistor there.
05:44 The majority of CAN buses actually end up recommending 120 ohm.
05:49 I've used 100 ohm, I've used 120 ohm, it doesn't seem to be that super critical on whether you're using one or the other.
05:58 So this is MoTeC's recommendation.
06:00 Obviously best practice, we're always going to use the recommendations of the particular manufacturer you're dealing with.
06:06 So those terminating resistors, that's what we're dealing with today.
06:10 Why are they there and what do we need to do with them? So first of all, why we need the terminating resistor.
06:17 So we need to understand that that two wire bus is communicating all of those messages and essentially they are, each wire, our CAN high and our CAN low are transmitting an opposing message.
06:29 And what we need is those terminating resistors at the end of the bus because they absorb the signal energy in the bus, ensuring that it isn't reflected back into the bus which could end up causing communication problems.
06:43 So that's why our terminating resistor is there.
06:47 As an added little complexity there, if you are dealing with a CAN bus that's under about two metres in length, generally we're only going to need a terminating resistor at one end of that bus.
06:59 Now designing your CAN bus, which really we're not going to focus on too much in this webinar, but there are a few little tricks that are worth keeping in mind here.
07:09 And we need to consider the way our bus is going to be run so that we can essentially have all of those nodes coming off that bus and keeping in mind that we're trying to keep the nodes within about 500 millimetres of the bus.
07:23 Now that can get a little bit tricky if, for example, if we jump back across to my laptop here.
07:29 Let's say that these four lambda to CAN units are actually mounted out in our engine bay which is quite likely to be exactly what we're going to be doing.
07:37 Obviously our ECU and our datalogger, we're most likely going to be having those in the passenger compartment.
07:44 So we can't easily lay out our CAN bus exactly as it's shown here in this particular diagram because we're going to have a massive run for our four LTCs from the CAN bus, which is running inside of the cabin out into the engine bay.
07:58 That's probably almost certainly going to be more than 500 millimetres in length.
08:02 So sometimes a little bit of thought needs to go into this and what we can do here is essentially run our CAN bus out into the engine bay and then just simply double back on itself and come back into the cabin.
08:15 And there we've got an uninterrupted CAN bus.
08:18 We're still following our best practice recommendations and then we can terminate our LTCs or any other modules that are in the engine bay off that CAN bus without breaking our recommendations on that maximum distance from the CAN bus.
08:30 So we've got the recommendations, the understanding there of how that needs to be designed.
08:37 The other consideration we've got here is that some modules that we're going to be buying, some CAN based modules, will have a built in terminating resistor, some won't.
08:49 And some will have a software selectable built in terminating resistors.
08:53 So this is a little bit complex because we do need to understand how that affects things.
08:57 First of all, if we are dealing with a device that has a non selectable built in terminating resistor, this is going to be basically a deal breaker for us because that is our limiting factor.
09:10 So essentially that defines where abouts in the CAN bus that particular product needs to go.
09:17 It's obviously going to want to go at one end of the CAN bus, we can't really do too much about that.
09:23 For the other options, that gives us a bit more flexibility.
09:25 We can either choose to select the software selectable terminating resistor, turn that on if we want to have that at the other end of the CAN bus.
09:34 Or we can disable that completely.
09:37 So it just pays to take note of that because you can waste a lot of time tracking down frustrating CAN bus communication issues if you aren't aware if there's a terminating resistor in the device you're dealing with.
09:49 Obviously a really easy way to check that is to use your multimeter and before everything's wired up, physically just go across the CAN high and CAN low terminals on the particular unit or device you're dealing with and check and see if you've got that terminating resistor built in.
10:04 OK so what we're obviously going to need to do then, let's assume that everything that we're adding to that CAN bus has no built in terminating resistor.
10:13 So we're essentially trying to build up a CAN bus that looks a little bit like what we've got on that MoTeC diagram.
10:20 So we need to add our own terminating resistor.
10:22 So I'm just going to go through that.
10:24 As I've said, this is going to be a reasonably short demonstration here so if you've got any questions, I'll just mention that this is a pretty good time to ask them.
10:33 So we'll jump across to our overhead shot, and nothing particularly out of the ordinary here.
10:39 We've just got a simple 120 ohm resistor.
10:42 Now actually if you are really eagle eyed and you do know your colour coding on resistors that well, you'll probably actually spot that I'm lying to you and that is a 220 ohm resistor.
10:54 Don't worry, do as I say here, not as I do, this just happened to be what I had quickly on hand here in the workshop and it's going to be absolutely fine for our demonstration.
11:04 OK so what we need to do is have a easy way of terminating this resistor and adding it into our wiring harness.
11:13 And we obviously want to make sure that that's going to be done in a reliable way that's going to last a long time and not be subjected to vibration.
11:20 So the way we're going to do this is a little bit controversial because any of you who have followed us for a while will know that we are pretty vocal on our dislike for solder.
11:31 We're not going to be using solder unless it's absolutely necessary.
11:34 This is one of those areas where I'd say that this is the easiest way of doing it.
11:38 But there are a couple of caveats around this because we are going to be dealing with the downsides that solder brings.
11:45 So what we've got is our terminating resistor here, just back on our overhead camera.
11:50 And we've got the thin little legs on our resistor.
11:53 So what we're going to do is just simply cut those to a suitable length.
11:56 And if we get our terminating resistor out of the way here and we'll have a look at the one that I've perpared earlier.
12:04 So what I've got here on this particular resistor is I've just soldered two 22 gauge white wires onto this.
12:13 So we've cut our legs down, we've soldered one to the base of the resistor here.
12:16 And then what I've done here, and this is quite important, is I've twisted or bent the other leg of the resistor back through 180 degrees, I've cut it so that it finishes halfway down the body of the resistor and then I've soldered to that as well.
12:30 Now the reason I've done this is this is going to ensure that there's no chance of getting electrical conductivity between these two, they can't short out together.
12:39 The other thing here is that this is going to provide us with strain relief.
12:43 So that's what we're going to do there, pretty straightforward.
12:45 No rocket science involved in doing this.
12:48 However we've now got the situation where we've added solder into our wiring harness.
12:54 And obviously when we solder any components in our wiring harnerss, the big concern, which is why we don't like to use solder, is that you're going to end up with a brittle area where our solder joint finishes and that solder is also going to tend to wick up our wire.
13:12 So what this means in turn is that if the finished terminating resistor is exposed to vibration, over time there is the potential for that to fail.
13:21 That is absolutely the case but we can deal with this pretty adequately by providing good strain relief.
13:29 So how we're going to do this, we're going to strain relieve it and we're also going to electrically insulate that as well, and we're going to do this by using a section of ECL double wall heat shrink.
13:40 So I'll just grab a section of that if I can pick it up and we'll have a quick look at that on our overhead camera.
13:46 Anyone who's followed any of our wiring courses will probably already be pretty familiar with SCL heat shrink.
13:53 So it is a semi rigid heat shrink.
13:55 It is glue lined, so what we're going to do is recover this down using our heat gun, we're going to place that over our terminating resistor and what that's going to do when it's recovered is it's going to have the adhesive basically ooze out a little bit providing a little bit of environmental protection there for moisture and dirt or dust ingress and it's also, because it is semi rigid, going to do a really good job of strain relief.
14:20 So let's just get out heat gun going here and we'll quickly shrink that down.
14:26 We want to make sure that is is nicely located over our terminating resistor.
14:45 Now once that's recovered, while everything's still nice and hot, I'm also just going to use a pair of pliers here just to crimp the ends down on our heat shrink, our SCL, and that's just going to seal the ends there.
15:00 So let's have a quick look at that under our overhead camera.
15:03 So we've got a nice little terminating resistor.
15:06 It is protected, we've got our SCL heat shrink that's nice and rigid so what that's going to do is mean that basically once this is actually fully cooled, if we try and flex that, it's not going to move and that's going to give that vibration resistance, it's going to protect us against the solder joints failing there and of course it is electrically insulated as well.
15:29 Now what we've got here is a couple of little ends there, free ends of our wire there, and what this allows us to do then is strip those back and we've provided enough length there that we can then terminate these along with our CAN high and CAN low wires in the terminal that's going to go into whatever component we are terminating.
15:52 So this just basically gets piggy backed in parallel with our CAN high and CAN low.
15:57 And you do need to be a little bit sensible here when you are selecting the wire size for your CAN bus.
16:03 There is no current draw as such so we don't need a heavy gauge wire, we can use 22 or even 24 gauge wire quite happily there.
16:11 And that way it's quite easy to fit those into most of the conventional terminals that we'll see on maybe the likes of an AMP superseal 1.0 connector that's so common on most of our aftermarket ECUs.
16:24 So what we're going to do then is splice that in, wire it in, terminate, crimp that in I should say in parallel with our CAN high and CAN low.
16:32 And while it maybe isn't the nicest example in the world, one I just quickly shot a photo of before we started here, this is exactly how that's installed in our MoTeC E888 in our Toyota 86.
16:46 So excuse the mess, everything is currently going back together but what we've got here is exactly what we've just looked at, that is our terminating resistor there.
16:55 And what we would do with that, after everything is complete, is we would also cable tie that together with the rest of the harness and that just provides a little bit further strain relief, we obviously don't want that just vibrating around on its own, we want that connected rigidly and securely to the rest of our harness.
17:15 So pretty simple solution and obviously this is not the only way to install a terminating resistor, it's just a technique that I've found to be really effective, really easy to do and quite reliable.
17:28 Remember again as well we do have those other CAN webinars that you can find in our archive.
17:35 So if you are interested in learning more and a little bit deeper about what a CAN bus is and what those messages actually look like as well as how to decode them, please check those after this webinar.
17:46 For now we'll head across and have a look at our questions.
17:49 If you've got any more, please feel free to keep asking them.
17:59 MV Auto has asked, what else will be on that CAN bus? DME, ECM dash, wideband to CAN module, if only the DME have 120 ohm resistors you should need to keep on the 120 ohm resistor feature in your dash.
18:11 That's actually a good point, I'll come back to that.
18:14 You should check the dash, what the resistance of the CAN circuit is.
18:17 60 ohms no need, I think 120 ohm value you need the internal resistor on that is my guess.
18:24 Yeah so that's a really good point there, I mean I have talked very briefly about the fact that MoTeC in their documentation do recommend 100 ohm.
18:31 Most others I've found seem to recommend 120 ohm.
18:36 And yeah I haven't honestly found that CAN buses are that sensitive or that fussy.
18:42 But it would probably be a good suggestion there to make sure that you're matching whatever your existing terminating resistors are.
18:49 And it's one of those things where there is best practice on how you can construct your CAN bus.
18:57 Obviously we've look at that diagram of what that should look like.
18:59 But at the end of the day you can make up a temporary CAN bus while you're testing products on the bench and you'd actually be quite surprised at what you can get away with in terms of not having the wires twisted as they should be, the length of the harness, the length of the CAN bus not matching the recommendations that I mentioned.
19:18 Maybe no terminating resistors, maybe more terminating resistors than you should have and sometimes you'll get away with it.
19:25 However if we follow best practice on our CAN bus construction, then we can be confident that once we install everything into the car it's all going to work as expected so don't take any shortcuts there but a really good point there from MV Auto, thanks for bringing that up.
19:39 Alright no more questions on that so far.
19:42 If you do have any further questions that crop up after this webinar has aired, please feel free to ask those in our forum and I'll be happy to answer them there.
19:50 Thanks for joining us and I look forward to seeing everyone next week, cheers.