Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

Components and supplies

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
Arduino UNO
×1
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
SparkFun CAN-BUS Shield
×1
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
Male-Header 36 Position 1 Row- Long (0.1")
for SparkFun CAN-Bus shield
×1
SparkFun OBD-II to DSUB-9 cable
intended for international "makers"
×1
OBD-II to DSUB-9 cable
intended for german (or european) "makers"
×1
CANdiy-Shield v2 CAN-Bus Shield
IO voltage selectable between 3.3V and 5V, so you can use this shield with 3.3V boards!
×1
Arduino Box for Arduino
out of stock @Arduino store, but you still find it at some distributors ;-)
×1

Apps and online services

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
Arduino IDE

About this project

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

Intention

I am driving an electric car - a smart for two electric drive. The health of the traction battery is essential and is maintained by a battery management system (BMS). It will monitor all 93 cells during charge / discharge and cares about an equally voltage level balance. Normally only service tools can read information from this ECU.

The car is equipped with a GSM modem for accessing status data like state of charge (SOC), the available range and other simple information. For a certain time the modem was in extended mode gathering diagnostic information about the car. Curious about the content I tried to sniff into the CAN bus to know what was transmitted.

Inspired by similar projects for other electric cars - like the Nissan Leaf - I recorded the complete CAN bus traffic while driving or while charging the car. First sniffed streams really included those diagnostic data - but how to decode it?

You will find details about the CAN bus sniffing and reverse engineering in a separate article here.

What is Needed

Get the required hardware. On modern cars the physical layer is done via CAN bus. At least two CAN bus shields are available - see component list. You have to connect to the cars diagnostic port - the OBD-connector, so buy a cable or make your own. NOTE: there are two standards for OBD to DSUB-9 cables - pick the right one! See pictures below:

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

When you make your own cable, it is a good idea to use an old twisted pair networking cable. Use one of those paired wires for CAN-H and CAN-L. This will improve signal integrity. Also DO NOT exceed 1 m in length, to minimize signal reflections.

Get Started

Step 1

Prepare the hardware and find a nice case for the boards.

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

Step 2

Download the project from my github repository. See details there for installation. Compile the code and flash it to the Arduino.

Step 3

Connect to the car and power it up. Start the diagnostics session and get useful info about your battery pack...

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

Step 4

Use a spreadsheet program and find out correlating data. For example compare the SOC (State of Charge, from the dashboard) with the real SOC from the BMS. Or plot the cell-voltages and see that some cells are limiting the pack while charging, because they reach the cut-off limit at first...

ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit
ED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

Step 5

Improve the code if you want - do your own hacking. The Spakfun shield has a SD-card reader, so you could build your own CAN bus logger.

Or you build a nice frontend / app displaying the data...

I hope this tool will be helpful - Have fun!

Code

ED_BMSdiag Arduino Software
https://github.com/MyLab-odyssey/ED_BMSdiag.git

Schematics

for Sparkfun CAN-Bus shieldED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kitfor CANdiy-shieldED BMSdiag – Arduino CAN‑BUS & OBD‑II Diagnostic Kit

Manufacturing process

  1. Web‑Controlled DMX Lighting System – Arduino Master Controller
  2. Build a Bluetooth‑controlled Arduino Spybot
  3. Wireless Arduino Programming Shield with HC-05 Bluetooth – No USB Needed
  4. High-Performance 2.8” TFT Shield for Arduino Nano – 320×240 SPI Display
  5. Arduino-Driven GrowBox Controller – Open-Source Firmware & Hardware Guide
  6. Smart Domotic Greenhouse: Automated Climate Control with Arduino
  7. J.A.R.V.I.S. – Smart Home Virtual Assistant Powered by Arduino
  8. Arduino UNO Web-Enabled Servo Control with PHPoC WiFi Shield
  9. Smart Herb Box Eco System: Alexa‑Enabled Indoor Gardening Kit
  10. Master Arduino Shields: Complete Guide to Adding Functionality