CAN bus with MCP2515 and TJA1050 receiver

Hello all,

I'm working on a project in which I want to read CAN bus messages in my Peugeot 207. I've tried using this module, but can't get it to work with my car.

It connects alright with the Arduino, but I'm just not getting any messages. I tried different baud rates but to no avail. Right now I'm seeing bit timing calculators so I'm thinking maybe I need to try some different timings? Could the timings in the MCP_CAN librarybe the problem?

However, I don't understand these calculators, are they for the CAN chip (MCP2515) or the transceiver (because I also see calculators for the MCP2551 transceiver)?

Check that whatever library you are using allows an 8MHz clock to be selected.
Some libraries assume the MCP2515 is used with a 16MHz crystal which will give the wrong timings.

Look at the CAN bus waveform with an oscilloscope to determine the shortest pulse width, use this to calculate the true data rate.

The diagram you linked to is incorrect. Connect the ground of the CAN bus board to the vehicle ground via the same connector that carries the 2 signal wires.

Try swapping the CAN L and CAN H wires.

mikb55:
Check that whatever library you are using allows an 8MHz clock to be selected.
Some libraries assume the MCP2515 is used with a 16MHz crystal which will give the wrong timings.

The library should support 8MHz, and I used the 8MHz parameter. But maybe the timings are not right? I don't really understand those timing calculators however.

mikb55:
Look at the CAN bus waveform with an oscilloscope to determine the shortest pulse width, use this to calculate the true data rate.

I don't have a scope, but might be worthwhile to buy a cheap Chinese DIY kit.

mikb55:
The diagram you linked to is incorrect. Connect the ground of the CAN bus board to the vehicle ground via the same connector that carries the 2 signal wires.

I'll try that. But shouldn't I connect to the signal ground?

mikb55:
Try swapping the CAN L and CAN H wires.

Already tried that, but my instruments went crazy. The ECU's didn't seem to like that :wink: