Arduino MCP2515 connecting to Volkswagen

Hello,

I'd like to connect an arduino with mcp2515 with my Volkswagen Golf 6, in order to look whats going on in the CAN Bus network :)

This is the MCP2515 breakout is used (chinese clone):|500x400

Therefore I used this script:MCP2515 Example @ Github

I did the wiring like this one:

|500x316

After uploading the source code to my arduino nano, I got the following message:

Entering Configuration Mode Successful! Setting Baudrate Successful! MCP2515 Initialized Successfully! MCP2515 Library Receive Example...

I think everything should be fine. But I didn't see any canbus message there. Which steps do I have to take, to see any message on the CAN Bus. Whats the setting for can bus communication (baud rate, oscillator mhz...)?

Thanks in advance BR, Julian

You probably have an 8 MHz oscillator.

mikb55: You probably have an 8 MHz oscillator.

Yep, thats correct, I already changed it in the CAN.begin function to MCP_16MHZ - same result... Nothing on the canbus

The information from your sketch tells me the SPI and power wiring is all good. There still might be an issue with the INT pin which is commonly wired to pin 2. If you use the following sketch in loopback mode, you should receive the message it sends: http://forum.arduino.cc/index.php?topic=402018.msg3209207#msg3209207
To put the sketch in loopback mode, uncomment the “CAN0.setMode(MCP_LOOPBACK);” line.

If that is all good and you also tried the receive sketch at both 250k and 500k baud rates, then it sounds like you need to send an OBD-II query. Using that same sketch above and leaving the “CAN0.setMode(MCP_LOOPBACK);” line commented, the sketch will send a request for OBD-II PID 0x00. If there is no response, try toggling “#define standard 0” to “#define standard 1”. If there is still no response, your CAN module may be faulty.

Be advised, you will need to edit the sketch so that it is compatible with your CAN module.

Hi

I have the same question likes you

and I finally found the issue !!!

try this code , everthing will be fine :D

while (CAN_OK != CAN.begin(CAN_500KBPS,MCP_8MHz) ) // init can bus : baudrate = 500k { Serial.println("CAN BUS Module Failed to Initialized"); Serial.println("Retrying...."); delay(200); }