Home > CAN Bus > The Physical CAN bus

The Physical CAN bus

I made some long overdue progress on my Smart House project that uses CAN bus. Up till now, the physical bus were two scrap wires I twisted together and soldered on a couple pins for plugging into breadboards. This wasn’t going to be an option once it was time to run the actual wires through my house, since it will be more than a few feet. A search for a single twisted pair, around 18 AWG and unsheathed yielded nothing, unfortunately. I settled on some security cable, which is two conductor 22 AWG, shielded and sheathed, as well as readily available for cheap at any hardware or big box home store.

Noisy noise on CAN bus.

For a test bus, I randomly cut a piece 12 feet long and soldered on 120 ohm resistors to each end, then connected to the K-node and SpartaNode. Of course it didn’t work, and probing with an oscilloscope showed a nice 60 Hz wave causing interference. The wave was present with or without power on and also near or far from other wires. The interference wave’s amplitude varied from about 1 volt peak to peak, to over 3V when moved around and was superimposed on any CAN messages on the bus. I suppose Murphy’s electrical law was in effect; the one about a wire being an antenna when you don’t want it to be.

How to get cap values.

The good news is the book, CAN System Engineering, held the solution. By using three capacitors per end, all the 60 Hz wave was removed and a crisp CAN message was able to travel just like in the test setup. The values of the capacitors are the same for both ends and depend on the length of the bus. For mine, I needed a 68pF cap between the CAN High and Low wires, and two 220pF caps from each to ground. I soldered these to the board (but just realized I shouldn’t have, d’oh) and added a place to connect the cable shield. The two nodes are still showing a communication error, so the same CAN message is being repeated for a response, but the at least you can see it’s nice and clean looking. I suspect it is a software issue.




  1. Alex
    May 31, 2012 at 10:19 am

    Thats really strange: the interference should not have caused the CAN bus to fail. It is built specifically to compensate for such common mode errors.

    Maybe it was transmitting and receiving just fine and it only didn’t work because of the software error you mentioned?

    • May 31, 2012 at 10:32 am

      The CAN transceiver IC was shot, they’re very temperamental. I was getting some other errors on the bus though from either an inaccurate clock or too much noise. The message would still get through, but the error counter would suddenly go up, then count back down per spec.

  2. rcaron
    May 31, 2012 at 10:24 am

    Why shouldn’t you have soldered those caps to the board?

    • May 31, 2012 at 10:33 am

      Their values are based on the length of the cable and this is only a test setup. I’m planning on running a longer cable through the walls and basement of my house.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: