Advice With CANBUS

Hi

I am looking for a way to transmit 1 CANBUS message. I have looked at the CAN library and don't understand it very well and don't know which board to use.

So my questions are:

Which would be the best board to use with Arduino IDE?

Would I Require any additional hardware?

Are there any good examples that would help?

Thank you

With CAN and Arduino, the easiest way is to use a CAN module with a Microchip MCP2515. This is an external CAN controller and most modules also have a CAN transceiver on board which will create the physical signals on the wire. If you look for a module and find one that is available in your country post us a link and we can check whether it is the right one for you.

If the module does not have termination resistors you will need two 120Ohm resistors and some wires. Check Wikipedia CAN bus. There are some good diagrams and explanation of the basics.

Then you can choose almost any Arduino compatible microcontroller you like. The MCP2515 is controlled via a SPI interface. So, the Arduino board of your choice needs that.

You should get two of each. CAN only works when you have two nodes. You cannot even send a single message for test without a second working CAN node. Every message on the bus in acknowledged by at least one other node and you should not debug your first steps on a working system e.g., your car.

Most Arduino libraries come with examples. Once you installed the library go to File -> Examples -> LibraryName and you should find them. There are plenty of examples and questions about CAN in this forum. Use Google to find them e.g. "CAN site:arduino.cc"

Thank you klaus_k. Would this board work.

ullisees:
Would this board work.

Yes, if you want to support Arduino you can use that. It is designed to work on a Arduino MKR board.

But on Amazon you can get a set of 3 MCP2515 modules for around $10 or Euro.

Hi

I got the MKR CAN board.

Can i use this board with a Arduino Nano as i have lots of them available. Would i need to change or add anything to the CAN library examples to make the MKR CAN shield work with the Nano

Thank you

ullisees:
Hi

I got the MKR CAN board.

Can i use this board with a Arduino Nano as i have lots of them available. Would i need to change or add anything to the CAN library examples to make the MKR CAN shield work with the Nano

Thank you

I hope you know what you are doing...

The MKR CAN shield pinout does not match up to the Nano (obviously!)


The Nano hardware SPI pins are on 10,11,12 and 13.

In terms of the library, though I have not used that particular one, IMHO no modding should be required since the CAN chip on the MKR board is a MCP2515, which is the library target.

hope the helps...

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.