Built to order

ESP32 CAN Bus Project with CAN FD Data Logging using ESP32-C5

This project builds an ESP32-C5 CAN FD data logger that reads frames from a vehicle or industrial CAN bus, stores them with timestamps on a microSD card, and serves a live CAN log viewer dashboard over dual-band Wi-Fi 6. It uses the ESP32-C5's two on-chip CAN FD controllers with an external CAN transceiver, so both classic CAN and CAN FD traffic up to a 5 Mbps data phase can be captured, filtered and decoded in the browser. Suitable for B.E./B.Tech final-year projects in Electronics, Electrical and Computer Engineering.

Chat on WhatsApp — get a quotation

IoT & Embedded C/C++ firmwareHTML · CSS · JavaScript dashboardMicroSD card loggingESP32-C5ESP-IDF 5.5CAN FD ISO 11898-1CAN transceiverWi-Fi 6 dual-bandHybrid
ESP32 CAN Bus Project with CAN FD Data Logging using ESP32-C5 — project thumbnail preview
More project photos (2)

The problem

Vehicles and industrial machines communicate over the Controller Area Network (CAN) bus, and the newer CAN FD variant carries up to 64 data bytes per frame at a data-phase rate of up to 5 Mbps, far beyond classic CAN's 8 bytes at up to 1 Mbps. Engineers who need to debug or reverse-engineer that traffic usually rely on expensive PC-based analysers, which students rarely have access to. This ESP32-C5 CAN bus project closes that gap with a compact, low-cost logger built around the ESP32-C5, the first ESP32 with two on-chip CAN FD controllers and dual-band Wi-Fi 6. The node connects to a live CAN bus through a CAN transceiver, captures every frame with a timestamp, writes the log to a microSD card, and serves a live CAN log viewer dashboard over Wi-Fi so frames can be watched, filtered and downloaded as CSV from any browser. The build demonstrates embedded networking, real-time frame handling and automotive diagnostics in one working prototype.

SYSTEM FLOW

7 components 6 connections

Live flow
Drag to explore
100%
sensorCAN Bus

CAN_H/CAN_L pair; frames carry ID, length and up to 64 bytes.

Follow the working sequence

How it works

A CAN bus is a two-wire differential pair, CAN_H and CAN_L, shared by every node on the network, and any node can transmit a frame carrying an identifier, a length and up to 8 bytes of data in classic CAN or up to 64 bytes in CAN FD. In this project the bus wires reach the prototype through a screw terminal into a CAN transceiver, which converts the differential bus signal into logic-level receive and transmit lines for the ESP32-C5. The chip's on-board CAN FD controller checks each frame against its hardware filters, timestamps it, and hands it to the firmware, which writes it to the microSD card as a CSV row and forwards it over Wi-Fi 6 to the log viewer dashboard in the browser. The dashboard then renders the live frame table, decodes the standard IDs it recognises, and lets the user filter or download the log.

  1. The prototype connects to the CAN bus through the CAN_H/CAN_L screw terminal, with a 120 Ω termination resistor fitted at each end of the bus.
  2. The CAN transceiver converts the differential bus signal to logic-level RX/TX lines for the ESP32-C5's on-chip CAN FD controller.
  3. The controller receives each frame, checks it against the configured hardware ID filters, and timestamps it with approximately 1 ms resolution (design target).
  4. The firmware writes accepted frames to the microSD card as CSV rows: timestamp, CAN ID, frame type, DLC and data bytes.
  5. The same frames are pushed over dual-band Wi-Fi 6 to the log viewer dashboard, which renders the live frame table in the browser.
  6. The dashboard decodes recognised standard IDs (for example J1939 engine and diagnostic frames) and shows bus load, CAN FD share and error-frame counts.
  7. The user filters by CAN ID or frame type, pauses the stream, or downloads the session as a CSV file for offline analysis.

Tech stack:

  • ESP32-C5
  • ESP-IDF 5.5
  • CAN FD · ISO 11898-1
  • CAN transceiver (TCAN-series)
  • microSD card logging
  • HTML · CSS · JavaScript dashboard
  • Wi-Fi 6 dual-band
  • C · C++ firmware
Parameter Value
Controller ESP32-C5, 32-bit RISC-V single-core, up to 240 MHz (datasheet value)
CAN controllers 2 × on-chip CAN FD controllers, ISO 11898-1:2015 (datasheet value)
CAN transceiver External 5 Mbps-capable CAN FD transceiver, TCAN-series (datasheet value)
Classic CAN rate Up to 1 Mbps (standard)
CAN FD data phase Up to 5 Mbps (transceiver-dependent, datasheet value)
CAN FD payload Up to 64 bytes per frame (ISO 11898-1)
Wi-Fi Dual-band Wi-Fi 6, 2.4 GHz and 5 GHz, 802.11ax, up to 150 Mbps (datasheet value)
Logging microSD card, CSV format (timestamp, CAN ID, type, DLC, data bytes)
Timestamp resolution Approximately 1 ms (design target)
Dashboard Single-page web app served by the ESP32-C5, live frame table + filters + CSV download
Second CAN bus Available via the second on-chip CAN FD controller (header fitted)
Power supply 5 V via USB-C, approximately 150–250 mA expected during logging
Wi-Fi range Approximately 20–30 m indoors on 2.4 GHz (expected); shorter on 5 GHz

Project features

The logger's strongest capabilities are its dual CAN FD capture, its timestamped SD-card logging, and its live browser dashboard. Two on-chip CAN FD controllers let one ESP32-C5 watch a CAN FD bus and keep a second bus in reserve, while the external transceiver handles the physical CAN_H/CAN_L signalling. Every captured frame is timestamped and written to a microSD card as CSV, so a full drive or test session can be replayed later, and the same frames stream live to a Wi-Fi dashboard where they can be filtered by CAN ID, separated into classic CAN and CAN FD traffic, and downloaded. Together these make the project a complete, demonstrable CAN diagnostics tool rather than a bare breakout board. The OLED display and the second-bus header round out the build: the display shows the latest frame without a laptop nearby, and the spare controller keeps the design open to a gateway or bridge extension later.

  • [Dual CAN FD capture] The ESP32-C5's two on-chip CAN FD controllers (ISO 11898-1:2015) capture classic CAN frames and CAN FD frames with up to 64 data bytes per frame, at up to 1 Mbps classic rate and up to a 5 Mbps CAN FD data phase.
  • [Timestamped SD-card logging] Every frame is written to a microSD card as a CSV row with timestamp, CAN ID, frame type, DLC and data bytes, so a whole test session can be stored and analysed offline.
  • [Live CAN log viewer dashboard] A single-page web app served by the ESP32-C5 shows frames as they arrive, with filters by CAN ID and frame type, CAN FD/classic separation, bus-load display and one-click CSV download.
  • [Dual-band Wi-Fi 6 streaming] The dashboard is served over 2.4 GHz or 5 GHz Wi-Fi 6 (802.11ax), so the viewer works from a laptop or phone near the test setup without cables.
  • [Hardware frame filtering] The CAN FD controllers filter by CAN ID in hardware, so the firmware can watch only the IDs a test needs instead of processing every frame on the bus.
  • [Second bus ready] The ESP32-C5's second CAN FD controller is wired out to a second transceiver header, so a two-bus gateway or bridge setup can be added without changing the controller.
  • [On-board frame display] A small OLED shows the latest CAN frame ID, DLC and data bytes on the prototype itself, so the logger can be checked at a glance without opening the dashboard.

What is included

  • Working ESP32-C5 CAN FD logger prototype (board, CAN transceiver, microSD module, OLED display, wired and tested)
  • Complete firmware source code (ESP-IDF 5.5) with CAN FD configuration and logging code
  • CAN log viewer dashboard (single-file HTML/CSS/JS) served by the ESP32-C5
  • Circuit and wiring documentation, including termination and transceiver connections
  • Sample logged CSV file from a test session on a two-node CAN bus
  • Project report PDF (background, CAN FD theory, methodology, results, limitations)
  • Project abstract PDF
  • PPT presentation for final review
  • Viva Q&A preparation document (CAN vs CAN FD, arbitration, termination, filtering, ESP32-C5 features)

Limitations & prerequisites

  • Needs access to a real CAN bus, or a second node acting as a test transmitter — the logger cannot demonstrate live traffic on its own; a second ESP32-C5 node is supplied as the test transmitter in the demo setup.
  • CAN FD needs proper 120 Ω termination at both ends of the bus; with only one terminator fitted, the build showed intermittent error frames at 500 kbps until the second terminator was added.
  • 5 GHz Wi-Fi gives a cleaner, less congested link than 2.4 GHz but noticeably shorter range indoors, so the dashboard is best used near the test setup on 5 GHz.
  • Decoding of vehicle-specific signals (speed, RPM, gear) depends on knowing that bus's ID map or DBC file; the dashboard decodes only standard IDs it recognises and shows the rest as raw data bytes.
  • Sustained logging at very high bus loads is limited by microSD write speed; the design target is continuous logging at typical test-bus loads, not at a fully saturated 5 Mbps data phase.
  • This is an academic prototype, not a certified automotive diagnostic tool, and it must not be permanently installed in a road vehicle.
  • The prototype is powered over USB-C and is not designed for direct connection to a vehicle's 12 V system without a separate regulated supply.

Frequently Asked Questions

Is this project suitable for a final-year project?

Yes, for Electronics, Electrical and Computer Engineering students, because it demonstrates embedded systems, the CAN and CAN FD protocols, real-time firmware, SD-card data logging and a Wi-Fi dashboard in one working build, and the viva discussion can cover arbitration, bit timing, termination, frame filtering and the ESP32-C5's dual CAN FD controllers. The report and Q&A document are written around exactly those topics.

What CAN hardware is needed to test it?

You need a live CAN bus or a second node that transmits frames, because a logger on its own has nothing to capture. The demo setup includes a second ESP32-C5 node programmed as a test transmitter that sends classic CAN and CAN FD frames on a schedule, so the logger can be demonstrated on a bench without access to a vehicle. Any other CAN transmitter, such as a second development board, works the same way.

Why the ESP32-C5 instead of a regular ESP32?

Choose the ESP32-C5, because it is the first ESP32 with two on-chip CAN FD controllers and dual-band Wi-Fi 6, so CAN FD capture needs no external SPI CAN controller and the dashboard can run on the cleaner 5 GHz band. A regular ESP32 has only a classic CAN controller and 2.4 GHz Wi-Fi. That means a regular ESP32 cannot capture CAN FD frames at all, which is the whole point of this project.

Does the dashboard need internet?

No. The ESP32-C5 serves the dashboard itself over Wi-Fi, so a laptop or phone only needs to join the logger's Wi-Fi network or the same local network to open it, and internet is not required for logging, viewing frames or downloading the CSV file. The logger keeps working fully offline, which also makes it usable in a lab or workshop with no internet access.

Can it log CAN FD frames with 64 data bytes?

Yes. The on-chip CAN FD controllers accept frames with up to 64 data bytes, and the CSV log records the full payload of every frame, not just the first 8 bytes, and the dashboard shows long payloads in full, including the 16-byte and 64-byte frames used in the demo data. Classic CAN frames are still limited to 8 data bytes, and the dashboard marks each frame's type so the two are easy to tell apart.

Can it decode vehicle signals like speed or RPM?

Only the standard IDs it recognises, such as J1939 engine frames; every other frame is shown as raw data bytes with its CAN ID and DLC. Decoding a specific vehicle's signals needs that vehicle's ID map or DBC file, which lists what each CAN ID and byte position means. Adding a DBC file for a known vehicle is listed as a customisation the build can be extended with.

Components & software requirements
  • ESP32-C5
  • ESP-IDF 5.5
  • CAN FD · ISO 11898-1
  • CAN transceiver (TCAN-series)
  • microSD card logging
  • HTML · CSS · JavaScript dashboard
  • Wi-Fi 6 dual-band
  • C · C++ firmware
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation