Kevin - CAN bus problems and success

Last year when I was working through the electronic systems for Kevin I decided to implement a CAN bus to allow the various boards to talk to each other, this is the same system thats used in cars and allows for a wide range of independent systems to talk to each other over a single data connection. The CAN system is also very robust as it was designed for vehicles and safety systems, it can operate in a noisy environment and deal with mis transmissions and various other issues, the wikipedia article is definitely worth reading.

Unfortunately my plans for this system run aground when I couldn't get two boards to successfully talk to each other. I tried for days to identify the problem, the issue I had was that I didn't know where the problem was, the software, the CAN controller, transceiver or the transmission line. In the end I gave up and left the project to sit.

Last week I saw a demonstration of the Saleae Logic Analyser, it looked kind of useful but then I saw its ability to decode the transmitted data, something which is apparently common for these devices but I had never seen it before. It can decode all kinds of transmitted data and tell you what it is sending, this includes CAN data.

I couldn't afford the Saleae device so I went for a cheap alternative on eBay, this allowed me to continue to debug the system and confirm the can controller was generating the correct data. I could see the data I wanted to send being decoded in the logic analyser, this meant that the issue was with the transmission line or the CAN transceiver which interfaced with the line. It turned out it was both! The transceiver was faulty, only transmitting on one channel, and I didn't have the required termination resistor on the data line. Once these were solved the data started to flow!

With these issues behind me I am free to carry on with these systems and hopefully start building out the electronics on Kevin.