Home

Awesome


name: USB-CAN Analyzer category: bzurl: oldwikiname: prodimagename: surveyurl: sku: 114991193


enter image description here

The USB-CAN Analyzer is a cost-effective high quality and easy to use USB to CAN adapter. Compared with the 50$ or more expensive CAN Bus Analyzer, CAN Bus Tester, or CAN Bus Sniffer, the USB-CAN Analyzer only needs half the price, but it is even more convenient and easy to use. You can just communicate your CAN Bus device with your computer via the USB cable, then this tiny case will work as your can bus analyzer tool, can bus diagnostic tools, or can bus scanner.

<p style="text-align:center"><a href="https://www.seeedstudio.com/USB-CAN-Analyzer-p-2888.html" target="_blank"><img src="https://github.com/SeeedDocument/wiki_english/raw/master/docs/images/300px-Get_One_Now_Banner-ragular.png" /></a></p>

Features

Hardware Overview

enter image description here

You can see an onboard green jumper cap as the following figure shown. When you add this jumper on, a 120Ω terminating resistor will be added to the circuit. Conversely, when you remove the jumper cap, the resistor will not be added into the circuit. Normally, you need to keep this jumper cap because the CAN device under test and the CAN analyzer are at the ends of the CAN network. If you want to know more, please check 120-ohm terminating resistor page from NI.

Software in winwdows

Basic Function

Enhanced Function

4 working mode

Advanced function

Getting Started

Materials required

Raspberry piUSB-CAN AnalyzerArduino BoardCAN-BUS Shield V2
enter image description hereenter image description hereenter image description here
Get ONE NowGet ONE NowGet ONE NowGet ONE Now

Also we need to two male to male jumper and power cables to power those boards.

Hardware Connection

USB-CAN AnalyzerCAN-BUS Shield V2
CAN_0_LCANL
CAN_0_HCANH

!!!Tip You can find the silkscreen at the back of the shield.

Software

Install driver

1.For Linux

Get the CH341SER driver code. and install all linux kernel drivers

git clone https://github.com/SeeedDocument/USB-CAN-Analyzer.git
cd ~/USB-CAN-Analyzer/res/Driver
unzip CH341SER_LINUX.ZIP
cd /CH341SER_LINUX
make load 

!!!Tip It is not required for Raspberry to install this driver . Because OS of Raspberry has installed this driver

2.For Windows

You should click the link to get driver and double-click to install it

Communicate with Arduino CAN BUS Shield

For Arduino CAN BUS Shield, we provide the Arduino Code, if you don't know how to use Arduino, please check here.

Arduino Code for CAN BUS Shield:

// demo: CAN-BUS Shield, send data
// loovee@seeed.cc

#include <mcp_can.h>
#include <SPI.h>

// the cs pin of the version after v1.1 is default to D9
// v0.9b and v1.0 is default D10
const int SPI_CS_PIN = 9;

MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin

void setup()
{
    Serial.begin(115200);

    while (CAN_OK != CAN.begin(CAN_500KBPS))              // init can bus : baudrate = 500k
    {
        Serial.println("CAN BUS Shield init fail");
        Serial.println(" Init CAN BUS Shield again");
        delay(100);
    }
    Serial.println("CAN BUS Shield init ok!");
}

unsigned char stmp[8] = {0, 0, 0, 0, 0, 0, 0, 0};
void loop()
{
    //send data:  id = 0x00, standrad frame, data len = 8, stmp: data buf
    stmp[7] = stmp[7]+1;
    if(stmp[7] == 100)
    {
        stmp[7] = 0;
        stmp[6] = stmp[6] + 1;
        
        if(stmp[6] == 100)
        {
            stmp[6] = 0;
            stmp[5] = stmp[6] + 1;
        }
    }
    
    CAN.sendMsgBuf(0x00, 0, 8, stmp);
    delay(100);                       // send data per 100ms
}
// END FILE

For USB-CAN Analyzer , we provide two way that include windows and linux .

1.For Linux

cd ~
git clone https://github.com/kobolt/usb-can
cd ~/usb-can
gcc -o canusb canusb.c
./canusb -d /dev/ttyUSB0 -s 500000 -b 9600

we assume that you only inset one USB to TTL on your raspberry.

2.For Windows

You should click the link to get software.

Resources

Tech Support

Please submit any technical issue into our forum or drop mail to techsupport@seeed.cc

<br /><p style="text-align:center"><a href="https://www.seeedstudio.com/act-4.html?utm_source=wiki&utm_medium=wikibanner&utm_campaign=newproducts" target="_blank"><img src="https://github.com/SeeedDocument/Wiki_Banner/raw/master/new_product.jpg" /></a></p>