How to read CAN communication by Arduino and self-made circuit

The following summarizes how to read CAN communication using an Arduino and a self-made circuit.

We hope this will help those trying to read CAN by building their circuits.

TOC

How to read CAN communication using an Arduino

Parts list

I used these parts, as shown below.

Parts I used
  • Arduino Uno
  • MCP2515
  • MCP2551
  • Oscillator(Murata, 16MHz, 3pins, CSTLS16M0X53-B0)
  • Ceramic condensers (Murata, 15pF, 1.5kV dc, 500V ac, DE11XRA150KA4BQ01F) 2 pcs
  • Registers(10 k ohm) 2pcs
  • OBD coupler

What is OBD2?

OBD2 stands for On Board Diagnostics.

OBD2 has been mandatory since October 2008, and most cars are equipped with OBD2.

OBD2 complies with ISO 15765-4 and SAE J2284, so the CAN pin assignment is the same. In my car, it is shown in the following picture.

The line reading 500 kHz CAN is shown below.

Perhaps you didn’t read it and are unsure if you are making proper contact.

I have the CAN wiring out of the OBD coupler as follows.

If you have a tester, you can hit the above terminals and find that they indicate approximately the following values.

The circuit diagram

I built the circuit based on this GitHub.

引用:https://github.com/autowp/arduino-mcp2515

Although the capacitor’s capacitance and the oscillator’s frequency are different, this is not a problem because the oscillator’s frequency can be set as high as 16 MHz.

Adruino setting

Please download the necessary files as described in GitHub.

Once installed, select the CAN_read downloaded from Examples.

I have changed some settings to see the CAN coming out of OBD2 above.

The settings I have changed
  • The CAN come out of OBD2 is 500 kHz, so set the frequency to 500 kHz.
    (The default setting is 125 kHz.)
  • Set MCP_16MHz

The above is reflected in the red underlined area of the following image.

All other settings are defaults.

After making the above settings, connect the CAN High and Low sides of the OBD.

When I started the engine, I could see the CAN signal successfully, as shown below.

Let's share this post !

Author of this article

I am an engineer working for an automotive company in Japan.

Comments

To comment

TOC
閉じる