CAN-BUS adventures

23/12/2020: An educational aid that I am building has a communication requirement which I have currently been using serial to satisfy. CAN-Bus however is the ideal solution for a number of reasons I won’t go into here other than to say it is an automotive course. Using the Seeedstudio CAN-Bus shield would have been ideal however it wouldn’t fit on the shield I already had in place on the Mega 2560. I tried the serial CAN-Bus module but it was not reliable for reasons I never got to the bottom of. So, what to do?

I bought some of the cheap CAN-Bus modules from Amazon but I had a lot of trouble getting them to work properly including masks and filters however basic send and receive worked ok. I had to use a different library as they would not work with the Seeedstudio libraries, so again, what to do now?

The plan…..

  • Find out why the cheap modules aren’t working and
  • Work out a way to add this to my training aid

On reviewing the hardware of each the main differences were the crystal speed (cheapy 8Mhz vs Seeedstudio 16Mhz) and the transceiver chip model. The Seeedstudio version also has 4 status LEDs and I’m a sucker for this sort of thing.

So last night I cobbled together a version of the Seeedstudio pcb minus a few features e.g. the sd card and would you believe it, it worked first time. This opens up some interesting possibilities which I will get on to soon.

Next I plan to replace the cheapy boards 8Mhz crystal with a 16Mhz one. If that doesn’t make them work with the Seeedstudio library I’ll change the transceiver chip. At this point they should be pretty much identical and work like a charm.

More soon