OBD-II CAN Bus GPS Dev Kit

Introduction


The OBD Ⅱ Slaver allows you to hack your vehicle with the integrated OBD port and output all the data via serial interface. It supports the CAN bus protocol, integrates micro SD card slot. On top of that, with the help of a build-in Atmega32U4, it's compatible with arduino. Which means you can code it like a ardunio, then just plug it into your car's OBD port, you will get the output data via the Type C USB port or you can store all the data into your micro-SD card (TF card), easy-peasy.

This Serial CAN Bus module is based on MCP2551 and MCP2515, which can provide can baud rate from 5kb/s to 1Mb/s.

One more thing, we integrate the GPS module, you can even track your car with this fantastic little module. It is obviously that you will love it, happy hacking!

CAN BUS PRODUCTS LIST OF LONGAN LABS


We have made a lot of can bus products, you can get more information through the following list, so as to choose a product suitable for you.

PRODUCT NAME LINK PRICE MCU CHIP PROTOCOL
Serial CAN Bus Module LINK $14.9 ATMEGA168PA MCP2515 CAN2.0
I2C CAN Bus Module LINK $14.9 ATMEGA168PA MCP2515 CAN2.0
OBD-II CAN Bus Dev Kit LINK $17.9 ATMEGA168PA MCP2515 CAN2.0
OBD-II CAN Bus GPS Dev Kit LINK $29.9 ATMEGA32U4 MCP2515 CAN2.0
OBD-II CAN Bus Basic Dev Kit LINK $19.9 ATMEGA32U4 MCP2515 CAN2.0
CAN-FD Shield LINK $8.9 NO MCU MCP2517FD CAN-FD
CAN Bus Shield LINK $5.9 NO MCU MCP2515 CAN2.0
CANBed LINK $19.9 ATMEGA32U4 MCP2515 CAN2.0
CANBed-FD LINK $19.9 ATMEGA32U4 MCP2517FD CAN-FD
CANBed M0 LINK $19.9 ATSAMD21 MCP2515 CAN2.0
CANBed M4 LINK $24.9 ATSAME51 - CAN-FD

Features


  • ODB Ⅱ port
  • Uart to CAN Bus communication
  • Build-in Atmega32U4
  • Integraded GPS module
  • Integraded Micro-SD(TF) card
  • AT command support
  • Up to 115200 Uart baud rate (default 9600)
  • Up to 1Mb/s CAN Bus baud rate
  • TX and RX led indicator
  • Easy-to-use Arduino library

Specifications


Parameter Value
MCU Atmega32U4
(with Arduino Leonardo bootloader)
Clock Speed 16MHz
Flash Memory 32KB
SRAM 2.5KB
EERROM 1KB
Operate Voltage 5V
Input Interface OBD-II
Output Interface USB Type C

Hardware Overview


Part List

  • OBD Ⅱ Slaver(Base board) x 1
  • GPS Board x 1
  • Plastic Case x 1
  • Screw Driver x 1

Pin out

Base Board

1.OBD-II Connector:

On-board diagnostics (OBD) is an automotive term referring to a vehicle's self-diagnostic and reporting capability. OBD-II is an improvement over OBD-I in both capability and standardization. The OBD-II standard specifies the type of diagnostic connector and its pinout.

2.Reset Button:

Reset the on-board Atmega chip, please note that the button had been canceled in the latest version.

3.78L05:

Provide a stable 5V to the whole system.

4.Atmega32U4:

The master of the entire module, mainly used to store data on the TF card or transfer data to the computer through the type C cable. In addition, since it's arduino compatible, you can use it to implement some simple controls, such as triggering a buzzer alarm when the speed exceeds a certain value.

5.MCP2515:

Microchip Technology’s MCP2515 is a stand-alone Controller Area Network (CAN) controller that implements the CAN specification, version 2.0B. It is capable of transmitting and receiving both standard and extended data and remote frames. The MCP2515 has two acceptance masks and six acceptance filters that are used to filter out unwanted messages, thereby reducing the host MCUs overhead. The MCP2515 interfaces with microcontrollers (MCUs) via an industry standard Serial Peripheral Interface (SPI).

6.MCP2551

High-Speed CAN Transceiver:The MCP2551 is a high-speed CAN, fault-tolerant device that serves as the interface between a CAN protocol controller and the physical bus. Typically, each node in a CAN system must have a device to convert the digital signals generated by a CAN controller to signals suitable for transmission over the bus cabling (differential output). It also provides a buffer between the CAN controller and the high-voltage spikes that can be generated on the CAN bus by outside sources (EMI, ESD, electrical transients, etc.).

7.2x8Pin Female Header for GPS module

See the GPS section for specific pin definitions.

Attention

It should be noted that when assembling the GPS module, please align the white triangle on the development board and the module, otherwise the GPS module may be damaged.

8.CAN RX/TX Indicator

9.Power LED

A.Type C USB connector for programming

B.User LED, connect to D13

C.TF Card slot

D.120Ω resister

ISO 11898 requires a cable with a nominal impedance of 120 Ω; therefore, you should use 120 Ω resistors for termination. If you place multiple devices along the cable, only the devices on the ends of the cable need termination resistors. Figure 1 shows an example of how to terminate a high-speed network.

So if you use this slaver on the end of the CAN bus, you need to solder a 120Ω resister between the two pad, if not just leave them alone. For more detail about the CAN bus protocol, please refer to the NI CAN Physical Layer and Termination Guide

E.ICSP pads for burning bootloader

GPS Board

1.GPS Antenna

2.2x8Pin header

3. GPS module

4. External Antenna Port

NEO-6 modules are designed for use with passive and active13 antennas.

Parameter Specification
Antenna Type Passive and active antenna
Minimum gain 15 dB (to compensate signal loss in RF cable)
Maximum gain 50 dB
Maximum noise figure 1.5 dB

Assembly and Hardware Connection


Assembly

It is assembled when you get the development board. If you disassemble it, you can reassemble it by following the steps.

Step 1.
Please check each part.

Step 2.
Mount the base board to the bottom housing.

Step 3.
Insert the GPS board on the baseboard.

Attention

When inserting the GPS board, be careful to align the white triangles of the GPS and Base boards.

Step 4.
Close the top cover and fix it with screws.

GPS Usage


The GPS Module use serial port to output the GPS data, you just need to connect this module to your PC via the USB type C cable, using any serial tool such as putty, you will be able to get the GPS data.

Please upload below code to the board,

void setup()
{
    pinMode(A3, OUTPUT);
    digitalWrite(A3, HIGH);         // power on

    Serial.begin(9600);
    Serial1.begin(9600);
}


void loop()
{
    while(Serial1.available())
    {
        Serial.write(Serial1.read());
    }
}

The open your serial monitor,

CAN BUS Usage


Arduino Code

We provide an arduino library for the dev board.

There're many examples for the library, which is consist of,

  • send - How to send a frame to CAN Bus
  • recv - How to recv a frame from CAN Bus

HOW TO GET DATA FROM THE CAR


There's an OBDII_PIDs sketch in the library. Open the sketch and upload it to the board.

Then open the serial monitor, input a PID, then you will get reponse from vehicle, the input should be end with '\n'.

Reference