Using 2x MCP2515 on 1x arduino, how?

hi there,

is it possible to use 2x MCP2515 on 1x arduino uno (what i have but if its not working, which one would i need?)

i have a project with a vehicle gauge cluster, which has multiple functions via can-bus. i want to install a gauge from another vehicle onto my car.
the problem is, that i have to separate the both can-bus because the gauge cluster is sending can bus datas which let my transmission control to throw out an error and stopping working.

so the idea was to have 1x mcp2515 connected to my vehicles can-bus, translate the can-bus signals with the arduino and send the datas via the other mcp2515 to the gauge cluster.

if there is anyone known a project with similar idea (using 2x MCP2515), please let me know. BIG THANKS!

From a hardware standpoint, MCP2515 uses an SPI interface so yes, the Uno should be able to support multiple buses. Each transceiver chip needs its own chip select line, the other three SPI pins are shared with all SPI devices.

definitely possible!

but what you might find is that depending on the bus load and the number of messages that need to be passed/translated across, the UNO might not be powerful enough to handle the processing.

if that is the case you would require a more powerful processor like the DUE which that built in 2 CAN ports (would still need to wire up the CAN transceivers to those ports)

hope that helps....

thx for the tipp with the DUE. i will try to get this realised with ardino uno first and if its not powerful enought the due is good idea.
are the codes between UNO und DUE different or is it easy to change the code after i have it, that it works with DUE too?

have a look this example code

the library to use the built in CAN on DUE would not be the same as the one you are using with the CAN shields (obviously!), so any part of your code dealing with receiving/transmitting CAN messages would need to be adjusted accordingly.

other than that whatever else you are doing on the UNO should be compatible with the DUE IMO

hope that helps...

i have ordered a DUE and 2x of these can transceivers now, which are shown in the link you send me first.

i will directly go the route with the DUE.

by the way, the UNO i have with the can-bus shield will be usefull to test the whole setup by replaying the sniffed vehicle datas.

just a care point about the CAN transceivers you purchased; make sure those are the 3.3V version! (the DUE is a 3.3V board)

Good luck!

yeah, they are the 3.3v version. good advise.

got the stuff and allready tested. unfortunatelly i have problems to send can bus messages.

maybe someone can have a look here: Problems with sending can bus message using arduino DUE

which section would be the correct one for problems like that?

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