Arduino Due

If you want to hook up an Arduino Due to your CAN-bus and use it with CanZE, you need the following things:

  • an Arduino Due or Taijuino (of course!)
  • a CAN tranceiver
  • a Bluetooth tranceiver
  • a SAE J1962 connector

The wiring scheme has to be done like this:DueI personnaly use a SN65HVD230 transceiver and a HC-06 Bluetooth module:



When starting to sniff the CAN-bus, I used a CanDIV shield hooked up to an Arduino Leonardo, but the chip on this shield as well as the Arduino Leonardo were both not fast enough to handle Zoe’s 1600 frames per second. But, the CanDIY shield had nicely mounted RJ45 connectors … and that’s the reason why I left it there, but disconnected the circuit.

The 10uF capacitor you see on the image make sure the Arduino Due is being reset properly on each power up. As a matter of fact I run into the problem that when power was applied, it did not start as expected. This is an old but still very effective hack to trigger a reset when power is being applied.

The actual firmware is here:

Please note, that catching free-frames works fine, but the request-response ISO-TP frame do not get always an answer and thus timeout quite often.

Dependent library:

11 comments on “Arduino Due
  1. Borut says:

    Do you have a firmware for arduino due

  2. wiebel says:

    The following may be of interest, also supplying, this “generous amount of storage”.

  3. igor says:

    Hi there…
    is it possible to use the due to read the vehicle speed pid , and see it through serial monitor?
    if it is possible what changes do i have to make in the sketch for that?(I’m kind of noob in all obd arduino stuff)

    Thank you very much.

    • Bob Fisch says:

      Yes, that is possible.

      Just insert an IF-statement on the PID you need, then do something with it.

      • Igor says:

        Sorry for the noob question…
        But where do I insert it and how

        • Bob Fisch says:

          in the loop() method …

          • Igor says:

            Still can’t get it :/
            I know it’s too much to ask,
            But could you post a printscreen with of the modified sketch, or send it to my email?

            I would really appreciate it..

          • Bob Fisch says:

            Please go to the method “loop()” (there is only one) and add the code in order to intercept a given PID (code: if (your condition goes where) { Serial.println(‘This will be written to the serial line …’); }).

            If you never wrote a line of code, please start with simpler things. This is not a tutorial on how to lean coding …


          • Igor says:

            Ok, I’ll try that,
            Thank you very much for the help 🙂

  4. ZoeDoktor says:

    It may be helpful: In a factory-new Bluetooth (BT) HC-06 element the Baud Rate has to be reset to the fast one CanZE uses (BT_SPEED ~ 1.3 MegaBAUD). Default is 9.6 Kilobaud fot the HC-06. After setting the new rate, the HC-06 remembers it, even after power off.

    I needed two days of testing to understand why my Samsung Android could not receive any data, despite established BT connection.

    So adding a few primitive lines at the start of the Arduino programme (sketch), immediately at the beginning of the “void setup ( )…. “, structure helped.

    See code. Add it immediately following the “void setup ()” line in the existing “CanZE.ArduinoDue.ino” programm file.

    // establish BT connection first with the HC-06 breakout
    // initialise the BT connection, it is said that the Baudrate must be set very quickly, within 1 sec of powerering up
    #ifdef USE_BT
    // default speed
    Bluetooth.begin(9600); // if the HC-06 is “new” and at default “factory settings”
    // now code for BT highest speed at BT_SPEED

    Resetting the Arduino DUE once again after power up, during the already established BT connection with the Samsung, also helped.

    Additionally I found that providing 5V power to the HC-06, instead of 3.3V improved the reliability of the it´s signals.
    It is also practical, as the Arduino DUE has one 5V and another 3.3 V power supply pin. 5V power the BT, 3.3V the CAN Transceiver.

Leave a Reply