CAN-DAQ: An Open-Source, Cost-Effective Data Capture Device and Software for Automotive Research
Description
The CAN-DAQ (Controller Area Network Data Acquisition) system is an open-source, cost-effective platform for automotive data acquisition and analysis. Modern vehicles generate large volumes of CAN bus data, yet affordable and reliable tools for academic and research applications remain limited. CAN-DAQ facilitates real-time data capture from vehicle subsystems—including powertrains, safety systems, and sensors—enabling applications such as electronic control unit (ECU) development, hardware-in-the-loop (HIL) testing, and in-vehicle network security analysis. The system supports standard CAN baud rates of 125 kbps, 250 kbps, 500 kbps, and 1 Mbps, and is compatible with any CAN Database Container (DBC) file for automatic signal decoding and interpretation. A central feature of CAN-DAQ is its real-time graphing functionality, which provides high-resolution visualization of vehicle parameters based on DBC definitions, while robust data logging and storage facilitate long-term trend analysis and diagnostic evaluations. The core hardware is built around the ESP32-S3 DevKitC1, selected for its robust performance and future-proof connectivity options such as USB-OTG, Wi-Fi, and Bluetooth, ensuring both longevity and flexibility over older alternatives. Communication with the CAN bus is achieved using an MCP2561 CAN transceiver, preferred over the obsolete MCP2551 because of its simpler upgrade path to the MCP2561FD. The transceiver is integrated with the ESP32-S3 to support CAN 2.0 communication across standard baud rates. Embedded firmware, developed in C++ with the ESP-IDF framework, configures the ESP32-S3's TWAI (Two-Wire Automotive Interface) and manages real-time CAN data acquisition as well as USB communication. In parallel, the PC-side software is implemented in Python using Tkinter and Matplotlib for plotting, while the Cantools library is used to parse incoming CAN messages according to definitions provided by a user-supplied DBC file. The design also incorporates a USB 2.0 interface via a micro-B connector with data transfer rates up to 3 Mbps to ensure reliable, high-speed communication with a host PC. To safeguard data integrity, the hardware disables the ESP32’s debug log output using a pull-up resistor on GPIO46. The MCP2561 transceiver’s standby (STBY) pin—unused by the default software—is tied to ground with a 10 kΩ resistor for stability, while also being routed to GPIO 4 for potential future customization. The complete design is implemented on a compact printed circuit board (PCB) created with KiCAD. This integrated solution, combining advanced hardware, efficient firmware, and comprehensive PC-side software, is demonstrated in research environments for real-time parameter monitoring and data-driven system analysis, providing a versatile platform for automotive diagnostics, industrial automation, and cybersecurity research.
Files
Steps to reproduce
To reproduce the CAN-DAQ system, a detailed workflow is provided using the technical files and documentation included in the repository. First, the printed circuit board (PCB) is fabricated using the supplied Gerber files, which may be sent to any local PCB manufacturer. Alternatively, factory assembly may be utilized by employing the provided bill of materials (BOM) and pick-and-place files. Once the bare PCB is produced, the MCP2561 CAN transceiver and the ESP32-S3 DevKitC breakout board are mounted onto the board. In addition, CAD files—in STL and STEP formats—are provided to 3D-print a two-part protective enclosure designed to shield the PCB from contact with conductive surfaces. Subsequently, the completed CAN-DAQ unit is connected to a target CAN bus using a standard DE9/DB9 connector. The unit is then linked to a computer via a micro-B USB cable through the UART port. Proper power supply is confirmed by the illumination of the red LED on the device. The firmware is then flashed onto the ESP32-S3 using the ESP32-IDF environment. It is essential to install any necessary drivers for the USB-to-UART bridge as specified in the relevant datasheets. The firmware configures the ESP32’s TWAI controller for CAN 2.0 communication at standard baud rates and enables real-time data acquisition and USB communication. On the software side, a standalone executable is provided for Windows, macOS, and Linux. When launched, the software guides the user through a setup process to create a new data logging session or retrieve an existing session for export as CSV. During the protocol configuration stage, the user supplies a CAN Database Container (DBC) file that defines the structure and interpretation of incoming CAN messages. Additionally, the configuration includes the selection of appropriate CAN bus and USB/UART baud rates, with a default of 1 Mbps for the USB/UART interface. Finally, live data monitoring is initiated via the graphical user interface. The system captures and displays real-time CAN data, while continuously logging all received messages to a database for further analysis. Figures and screenshots provided in the documentation illustrate the assembly, configuration, and monitoring processes, thereby ensuring that all steps necessary to reproduce the CAN-DAQ system are clearly defined.
Institutions
- VIT University