Clone
3
Home
Erick Ahmed edited this page 2026-06-20 10:48:04 +02:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

What is this about

This project is related to my Bachelor's thesis on the subject of Automotive Connectivity for my degree in Vehicle Engineering. The projects aims to build a functional CAN data logger, built around an STM32 microcontroller.

Overview

The objective is to specifically read CAN data on the Komatsu PC210NLC-8 heavy duty excavator that functions on the SAE J1939 CAN bus standard. But ideally the logger will be compatible with any J1939 (or any other standard) bus, as it reads everything incoming from the buses (if programmed, it could filter out specific IDs) then sends everything via serial and saves it to an SD card. The logger attaches to a J1939 network comprised of 1 or 2 CAN buses (500 kbit/s and 250 kbit/s, as per standard), and logs all CAN messages (serial and microSD). The firmware uses CMSISRTOS v2 (FreeRTOS) to manage multiple tasks: CAN reception, logging, serial send, microSD write and heartbeats etc..

Main Features

  • Two independent CAN interfaces based on the TJA1050 (in silent mode)
  • Acceptall filtering (logs every CAN frame)
  • J1939ready (29bit extended identifiers)
  • LED indicators:
    • Blinks on each received CAN message (per bus)
    • Heartbeat LED to show system alive
  • RTOS task separation for reliable, nonblocking operation
  • Data logging via serial interface

Planned Future Features

  • Data logging to FAT32 microSD card (CSV format)

Quick Start (summary)

  1. Build the firmware with STM32CubeIDE or Makefile.
  2. Connect the board to a J1939 network via CAN transceivers.
  3. Insert a formatted microSD card.
  4. Power on the logger starts recording immediately.
  5. Remove the SD card and view logs on a PC.

or:

  1. Power on the logger starts recording immediately.
  2. Connect a listening device on serial interface and read logs.

See the other wiki pages for hardware setup, software architecture, and detailed usage.