Arduino Canbus Dashboard: Difference between revisions

From wikiluntti
Line 31: Line 31:


CAN B - Interior CAN (also known as body CAN): Communication speed 83 kbps
CAN B - Interior CAN (also known as body CAN): Communication speed 83 kbps
=== CAN signal structure (CAN frame) ===
* SOF (Start of Frame) 0 tells the other nodes that we want to talk.
* ID: is used to specify what the message means, and who’s sending it. Defines the priority: the lower the ID, the higher priority.
* RTR (Remote Transmission Request) indicates whether a node sends data or requests data from another node.
* Control contains the Identifier Extension Bit (IDE) which is a ‘dominant 0’ for 11-bit. It also contains the 4 bit Data Length Code (DLC) that specifies how many bytes of data will be in the message.
* Data: The 8 bytes contains the actual information.
* CRC (Cyclic Redundancy Check) is error detection.
* ACK slot indicates if the node has acknowledged and received the data correctly.
* EOF marks the end of the CAN frame.


=== CAN and Arduino ===
=== CAN and Arduino ===
Line 39: Line 50:
Arduino shield
Arduino shield


MCP2515 CAN Module
MCP2515 CAN Module (Controller and transreceiver)
* CAN Protocol version 2.0B  
* CAN Protocol version 2.0B  
* 1 Mbps
* 1 Mbps
Line 45: Line 56:
* an integrated SPI Interface for communication with microcontrollers
* an integrated SPI Interface for communication with microcontrollers
* a 8 MHz Crystal oscillator
* a 8 MHz Crystal oscillator
* 120Ω terminal resistance
* 120Ω terminal resistance to prevent line reflections in the end of the bus.


=== OBD2 ===
=== OBD2 ===

Revision as of 09:00, 4 May 2025

Introduction

Empty

Dashboard is an Instrument cluster or ICM instrument cluster module.

Dashboard

CAN standards

A controller area network bus (CAN bus) is a vehicle bus standard.

  • Differential signaling
  • CRC

ECU Electronic Control Unit

CAN 2.0 (classical CAN)

  • eight bytes
  • a typical baud rate of 500 kbit/s
  • CAN2.0A, CAN2.0B,

CAN FD (releases 2012).

Some de facto standards for mechanical implementation: 9-pin D-sub type male connector

  • pin 2: CAN-Low (CAN−)
  • pin 3: GND (ground)
  • pin 7: CAN-High (CAN+)
  • pin 9: CAN V+ (power)

CAN C - Engine CAN (also known as chassis CAN): Fast communication speeds 125 kbps or 500 kbps

CAN B - Interior CAN (also known as body CAN): Communication speed 83 kbps

CAN signal structure (CAN frame)

  • SOF (Start of Frame) 0 tells the other nodes that we want to talk.
  • ID: is used to specify what the message means, and who’s sending it. Defines the priority: the lower the ID, the higher priority.
  • RTR (Remote Transmission Request) indicates whether a node sends data or requests data from another node.
  • Control contains the Identifier Extension Bit (IDE) which is a ‘dominant 0’ for 11-bit. It also contains the 4 bit Data Length Code (DLC) that specifies how many bytes of data will be in the message.
  • Data: The 8 bytes contains the actual information.
  • CRC (Cyclic Redundancy Check) is error detection.
  • ACK slot indicates if the node has acknowledged and received the data correctly.
  • EOF marks the end of the CAN frame.

CAN and Arduino

Some Arduino boards have CAN capability (like the Arduino UNO R4) or an add-on shields such as the MKR CAN Shield: Can class


Arduino shield

MCP2515 CAN Module (Controller and transreceiver)

  • CAN Protocol version 2.0B
  • 1 Mbps
  • MCP2515 CAN Controller IC and TJA1050 CAN Transceiver IC
  • an integrated SPI Interface for communication with microcontrollers
  • a 8 MHz Crystal oscillator
  • 120Ω terminal resistance to prevent line reflections in the end of the bus.

OBD2

On-Board Diagnostic protocols or the OBD2.

CAN bus and Grafana

Grafana-Athena

https://www.csselectronics.com/pages/telematics-dashboard-open-source

Canbus

MB

General

https://www.benzworld.org/threads/the-230-can-bus-and-how-to-test.1988297/

  • X connector

https://www.benzworld.org/threads/troubleshooting-the-can-bus.1989185/ W220 CAN B

  • X30/6
  • X30/5
  • X30&4
  • green and white cables; clip to open.

CAN NETWORK REPAIR GUIDE.pdf https://mbworld.org/forums/attachments/cl-class-w215-6/easy-can-network-repair-guide-735364/can-network-repair-guide-423584d1578925674

  • Wake-up signal: Door switch, rear SAM, EIS, N70
  • Reference Materials for Further Reading
    • GF00.19-P-0001PP Extended vehicle network function
    • SN00.19-P-0004GH Complete networking (163 as of 9/01)
    • GF54.00-P-0004A Data bus system function
    • GF54.00-P-0005A CAN data bus, function
    • GF54.00-P-0005-01A CAN data bus data telegram
    • GF54.00-P-0005-02A CAN data bus specification
    • GF54.00-P-0005-04A CAN data bus applications
    • GF54.00-P-0999ZZ CAN data bus, contents, function description
  • W203: CAN H 0.65/0.025V, CAN L 4.65/11.0V
  • X30/6. C215/220: A1 - Instrument Cluster
  • W11: Can C & B: A1 ICM Instrument Cluster

Instrument clusters eg dashboard

"The instrument cluster has its own Robert Bosch CAN and not included here"

https://www.benzworld.org/threads/open-source-project-for-w211-219-209-203-owners-to-add-functionality-to-the-oem-instrument-cluster.3047965/

https://github.com/rnd-ash/MBUX-Port

https://github.com/rnd-ash/mercedes-hacking-docs/blob/master/Chapter%207%20In%20Car%20Entertainment.md

  • W203 (C class 2001-2007), W211 (E class 2003-2009), W215 (CL class 1998-2006), W220 (S class 1998-2005), W230 (SL class 2001-2007)
  • Shows the connection diagram!
  • Needs 2x 16Mhz Canbus shields

https://www.benzworld.org/threads/programming-the-instrument-cluster.3133946/

  • W210s with FSS (1998+) https://manual.startekinfo.com/manual/JSP/ic1/1_14/m13.jsp
  • via CAN Bus from Traction systems control module (N47):
  • Odometer, trip odometer
  • Electronic speedometer
  • Low brake fluid level/parking brake indicator (only parking signal is sent via CAN Bus)
  • Warning lamp brake pad wear
  • ABS indicator
  • ETS, ASR, ESP indicator
  • Warning lamp ETS, ASR, ESP


CarCluster https://github.com/r00li/CarCluster

  • VW Polo 5, VW Golf 7, Škoda Superb 2, etc.

https://projecthub.arduino.cc/databus100/digital-speedometer-to-cars-instrument-cluster-via-can-bus-9ee5ca

https://mhhauto.com/Thread-Mercedes-CAN-bus-message-database-and-ID-list?page=2

  • ID200 - speedometer
  • ID210 - TPS position
  • ID218 - Transmission Control Unit
  • ID308 - RPM's
  • ID608 - coolant temperature

https://mbtools.com/guide/bench

  • Wiring (better than the previous)
  • SAE J1850 BUS

Videos

  • Excellent!
  • CAN-BUS shield V1.2 by Electrofreaks electrofreaks.com

https://www.youtube.com/@sciencetrove/videos https://random-science.com/

SimHUB