Live EV Data via UDS: USB to CAN Interface + python-can
Case Studies / Hochschule Darmstadt
Hochschule Darmstadt (h_da)
Hochschule Darmstadt is a German university of applied sciences. Its Electrical Engineering and IT department researches e-mobility with instrumented test vehicles.
What problem did you solve?
The goal of using the CANedge3 CAN logger and the CANsub.2 CAN bus interface is to record and visualize live EV data in real time. To involve every student in the testing process, our BMW i5 test vehicle is equipped with an integrated PC and three screens.
Within this setup, the CANedge requests the required data, while the CANsub.2 receives and visualizes it. Additionally, the CANedge serves as a reliable backup system. If the vehicle's built-in PC loses power, the CANedge ensures continuous recording so that no valuable data is lost.
How did you solve it?
Both the CANedge3 and the CANsub.2 are connected to the vehicle's OBD2 port via a splitter cable. The CANedge actively requests the UDS data, while the CANsub.2 operates in listen-only mode. We visualize this data through a custom-built dashboard powered by the python-can API. The script also automatically exports the decoded data to CSV for easy analysis.
The BMW sends its UDS responses as CAN FD frames via ISO-TP with extended addressing. We use python-can with the can-isotp and cantools packages to reassemble and DBC decode around 60 parameters. The CANsub.2 connects to the in-vehicle PC via USB, so the setup works fully offline. After the trial, we added three more CANsub.2 units.
Live CAN data for all students in the BMW i5 test vehicle
"The CANedge3 and CANsub.2 are the perfect combination for requesting, storing and visualizing live data"
Custom python-can dashboard with live, decoded UDS signals
What benefit has this led to?
The greatest benefit of combining the CANedge and CANsub is the ability to visualize decoded data live inside the vehicle for all students to see. Using python-can, we developed a custom dashboard that automatically saves the decoded data. This setup also allows us to predefine settings, making the entire system incredibly user-friendly for students.
An additional advantage is that the CANedge automatically starts recording as soon as it is plugged in. If a user forgets to start the recording or if the CANsub's power supply fails, the CANedge guarantees that the raw data is always securely captured.
Why did you choose the CANsub?
We were looking for a cost-effective solution to visualize live data inside the vehicle. The CANedge is ideal for data acquisition because it starts logging automatically upon plug-in. We chose the CANsub specifically because it enables us to decode non-standard ISO-TP protocols using python-can.
— Tim Hauck, Master's Student in Automotive Engineering
Ready to stream live CAN data?
Get your CANsub.2 today!