In this tutorial we'll talk about DBC files, also known as CAN bus databases. In particular, we’ll cover structure, syntax, examples and practical applications within J1939 and OBD2 data logging. A DBC file is a text file that contains information for decoding raw CAN bus data to 'physical values' or human-readable form. It is today the de facto standard for storing CAN bus decoding rules. To understand what 'raw CAN data' looks like, consider this CAN frame from a truck. If you have a DBC that contains decoding rules for the CAN ID, you can 'extract' parameters (aka signals) from the data bytes. A signal could be EngineSpeed. To understand how DBC decoding works, we will explain the DBC syntax and provide step-by-step decoding examples. Let’s start with a real CAN DBC file example. What you see here is a demo J1939 DBC file that contains decoding rules for speed and engine speed. You can view our full article and copy this information into a text file, rename it to e.g. j1939.dbc and use it to extract speed and RPM from trucks, tractors and other heavy-duty vehicles. At the heart of a DBC file are the rules that describe how to decode CAN messages and signals. Each CAN message is described by a CAN ID, name and length and a variable number of signals. For each signal, the DBC specifies the details required to decode the data. For details, see our full intro article. To understand how DBC decoding works, let’s look at how to extract the signal EngineSpeed from the CAN frame that we looked at previously. In practice, most raw CAN data log files contain 20-80 unique CAN IDs. As such, the first step is to map each CAN ID to the relevant conversion rules in the DBC file. For 11-bit CAN IDs, you can directly lookup the decimal CAN ID in the DBC. For 29-bit CAN IDs, however, the DBC file will contain 32 bit message identifiers and you will need to apply a mask to match the IDs. Next, use the DBC bit start, length and endianness to extract the relevant bits from the CAN frame data payload. In this example, the start bit is 24 and the bit length is 16. The EngineSpeed signal is little-endian and we therefore need to reorder the byte sequence from 6813 to 1368. Next, we convert the hex string to decimal and apply the standard linear conversion used in most CAN decoding. As evident, the engine speed physical value is 621 rpm. The previous steps take outset in 1 CAN frame. In practice, you'll decode raw data with millions of CAN frames, timestamps, several unique CAN IDs and often hundreds of signals. To handle this, software is used to decode raw CAN data into human-readable form by loading the data log files and the DBC file. The output may be simple CSV files - or for example visual plots and dashboards. To better understand how DBC decoding works, check out our online DBC editor playground in our full article. Here you’ll also find raw CAN bus data samples from a truck and car, including DBC files. The data samples are recorded with the CANedge, which let you log raw CAN data from any CAN based application to an SD card. Using the free and open source software tools, you can easily process and visualize your data - for example in asammdf or in browser dashboards. Our article also goes through software tools that you can use to edit DBC files and tools for processing raw CAN bus data using DBC files. DBC files and the related tools are important for many practical use cases. For example, proprietary DBC files are often used by OEMs for decoding their CAN data either for development or blackbox logging. In heavy-duty vehicle fleet management, the J1939 DBC enables decoding of data across vehicle brands & models - also for aftermarket users. Similarly, the OBD2 protocol lets you log data across car brands - and here, our OBD2 DBC file lets you easily decode standard OBD2 PIDs. Finally, DBC files are also key to setting up prediction models for analyzing physical values from machines/vehicles in predictive maintenance applications. Check out our full article to learn more about DBC files - and like or subscribe if you enjoyed this video!