Home - Blog

Can Bus Shield: Understanding all About this Automotive Controller 

In the day, automobile tech was not as advanced as it is now. Various innovations came with one of them being the Can bus shield. With it, modern vehicles are now more intelligent. Information such as the actual engine rpm and vehicle speed through the car electrical circuit is now available.

Hence, its popularity is no surprise due to its reliability and medium communication speed. Subsequently, we discuss the Can-bus capabilities and how to use them with microcontrollers.

1. What is the can bus?

The Can-Bus shield is an industrial controller found in modern machine tools. A good example involves onboard diagnostics, which uses a valid message from mini motors or a TIPM to operate electronic functions. 

A Can-bus shield V2 chip

(A Can-bus shield V2 chip).

https://commons.wikimedia.org/wiki/File:CAN_BUS_Shield_V2.jpg

2. Features

The Can-bus shield has several features that make it unique and effective. They include:

  • The CS pin is compatible with TF card data storage and has an SD card slot for message storage.
  • Normally, its standard pinout has a changeable chip select pin. 
  • It uses CAN version 2 remote frames with a data speed of 1MB per second.
  • Also, its default pinout uses an industrial standard sub-D connector with nine pins.
  • Furthermore, it allows a CAN and OBD-II pinout selectable feature.
  • In addition, it has a replaceable INT pin.
  • Another great feature is the support for a standard frame, two receiving methods, and compatibility with Arduino standard interface. 
  • Still, it has grove Can-bus module connectors for UART and I2C.

3. Hardware and software

A. Hardware

  1.   DB9 power interface.
  2.   V_OBD.
  3.   Led Indicators:
  •       PWR: 
  •       TX.
  •       RX. V_OBD.
  •       INT
  1.   Terminals – For CAN_L and CAN_H.
  2.   Arduino UNO Pinout.
  3.   Serial Grove connectors.
  4.   I2C Grove connectors.
  5.   ICSP pins.
  6. MCP2551 Can-bus controller – CAN transceiver of high speed.
  7. MCP2515 Can-bus controller – Singular CAN controller integrated with an SPI interface.
A Can-bus shield with Arduino Uno

(A Can-bus shield with Arduino Uno).

https://commons.wikimedia.org/wiki/File:Arduino_Uno_with_CAN-bus_shield.JPG

B. Software 

Generally, the software is compatible with Arduino standard interfaces like the Arduino Uno, Arduino Leonardo, or Arduino MEGA. 

4. How Can-bus Shield works?

https://www.youtube.com/watch?v=PEI5EWSgaRk

(This video takes you through how a Can-bus shield works). 

5. Can Bus Shield Entry-level Operation

To begin operating the Can-bus shield, you need to follow the steps below.

Materials needed

  • 2 CAN-bus shields for CAN-bus SPI communication.
  • 2 Seeeduino V4.2 microcontrollers.      
  • Jumper wires for the connection of Can-bus shields and Seeeduino controllers. 

Hardware connection

Firstly, you must place the two Can-bus shields in the Seeeduino version 4.2.  Afterward, you connect these two CAN-bus shields with jumper wires. Connect them thus: 

CAN_L to CAN_L and CAN_H to CAN_H. 

Software Installation

For software installation, you must consult the Arduino library for the Can-Bus. After that, set one node as Master while the other functions as Slaver.

Code

Upload the appropriate code to the Arduino IDE to finish programming your Can-bus shield. 

A serial monitor showing sent and received data between two Can-bus shields

(A serial monitor showing sent and received data between two Can-bus shields).

Source: https://commons.wikimedia.org/wiki/File:Working_CAN_Bus_SEEED_shield.png

6. FAQ 

Is Can-bus Shields compatible with Arduino?

Yes. The controller is fully compatible with Arduino Uno, Arduino MEGA, and Arduino Leonardo.

How to Change SS Pin?

Follow the few steps below: 

  • First, use a knife to cut the copper cable between digital ten and CS.
  • Next, solder the copper wire to connect it to D9.
  • Afterward, go to the library and change the SS pin accordingly. 

CAN-BUS Shields init fails

For Can-bus shield V1.1 to Can-bus shield V2 and upward, you need to modify the code thus:

MCP_CAN CAN(9); // Set CS to pin 9.

Conclusion

In summary, the CAN Bus Shields are great for automotive applications. However, with the help of an Arduino microcontroller, it runs on codes to control several elements on your car dashboard.

So, constructing and programming awesome projects with the Can-bus shields module got easier. Therefore, contact us if you need professional assistance in building projects like these. Welcome to contact us.

Hommer Zhao
Hi, I am Hommer, the founder of WellPCB. So far, we have more than 4,000 customers worldwide. If you have any questions, you can feel free to contact me. I really appreciate any help you can provide.

Services