Reading My Car’s CAN Bus: From Raw Frames to a Live Dashboard

It started with a driving lesson
I recently learned to drive a car, and somewhere around the third lesson I told to listen to the vibration and engine instead of just rotating the steering. The engine note, the needle, the temperature, that little moment when the car seems to ask for a different gear. Driving turned out to be mostly about understanding the car.
The dashboard tells you only so much. You can see your speed, check the fuel level, watch the temperature, and notice a warning light. But the car knows much more than what it displays. Engine speed, sensor readings, brake status, temperatures, and other information are constantly being exchanged between its electronic systems.
That made me search about how to get data from your car’s ECU and I landed upon OBD scanners and modern automobile upgrades. Well, OBD scanner already exists in market, I wanted to do more. And in our IoT subject we were given a task to make any project related to IoT device. Using this opportunity to explore this domain. (Well Toyota motivated me too!). This project is not done and dusted yet, I may improve it more if time and resources are there. This blog is just for the current update of what was done till yet.
If you haven’t read them already, I have covered the fundamentals of ECU communication, CAN protocol, and CAN transceivers in my previous blogs. They provide some useful background for understanding this project.
CAN & ECU: Behind the Car’s Communication: CAN & OBD-II
CAN Transceiver: Behind the Car’s Communication II: CAN Transceiver
The hardware: small, cheap and safe
I wanted something anyone could build, so I kept it to four things:
An ESP32 DevKit (₹200). It has a CAN controller built in, reads the bus, and sends frames to the laptop over USB. It also has Wi-Fi, which I’m saving for later.
An SN65HVD230 CAN transceiver (₹99). The ESP32 can’t connect straight to a differential bus, so this module converts the car’s signals into 3.3 V logic. Since it is a 3.3 V part, I didn’t need a level shifter.
An OBD-II plug, plus jumper wires and a USB cable.
The total came to ₹593.80. A typical OBD-II scanner in the market is around ₹800, so this is roughly 26% cheaper, and it shows live data on a dashboard you control. Check Flyrobo for getting the components.

The wiring is short: CAN-H and CAN-L go from the plug to the transceiver, the transceiver’s CTX and CRX go to ESP32 pins D4 and D5, and 3V3 and ground are shared.

The board runs in listen-only mode. It never acknowledges a frame and never sends one, so it cannot disturb the car. I made that the default from day one.

The software: a dashboard in the browser
The ESP32 turns each CAN frame into one line of plain text (a format called SLCAN) and sends it over USB. SLCAN (Serial Line CAN) is a protocol that allows a computer to communicate with a CAN bus adapter over a serial connection, such as USB. It converts CAN messages into a text format that can be sent over the serial port.
A small Python program on the laptop decodes those lines, and the dashboard opens in the browser at a local address. It has four views:
Live data: one row per signal, with its value, unit, min and max, and the CAN ID and byte it came from.
Gauges: the same numbers as dials.
Raw CAN: every frame on the bus, with changed bytes lit up in yellow. I used this view the most.
Adapter: connection status, port, speed and frame counters.
There is also a full-screen demo board with big gauges for presentations.
Gauges tab of the dashboard showing engine speed, vehicle speed, gear, coolant temperature, intake temperature and fuel counter The Gauges tab, running on the Honda Brio.
Understanding the Dataflow:

How the dashboard looks like:

How a frame reaches the laptop
On the ESP32, a short loop does the work: receive a frame, write t, then the ID, the length and each data byte as two hex digits, finish with a carriage return, and send that line over USB. In simplified form:
twai_receive(&rx, 0) // get a frame
"t" + ID (3 hex) + length // frame type, ID, length
for each byte: add "%02X" // data bytes as hex
+ '\r' // end of line
Serial.write(msg) // send to laptopThe code was uploaded in the firmware with the Arduino IDE. It lets you push code to the ESP32 over a USB cable, with no extra programmer. (There is a point about which IDE version to use. I’ll get to it in the problems section.)
Why SavvyCAN helped
Because every frame is a plain text line, other tools can read it too. I used SavvyCAN, a free, open-source CAN analysis tool, as a second pair of eyes. It was useful for three reasons: I could load my captured frames into it and check that my own decoding agreed, I could filter by ID to look at one message at a time, and it could plot a byte over time, which makes a speed or RPM signal easy to spot. When my dashboard and SavvyCAN told the same story, I trusted the result a lot more.
How I found the signals
This was the hard part, and honestly the portion where I thought to give up on this project minimum for 100th time. The car doesn’t hand you a list of messages, so reverse engineering is the process: record a lot of traffic and compare it with what the car was doing. You can reuse these steps on any car.

Record. I saved frames while parked, idling and driving. Across my captures there are around 1.3 million frames.
Find the busy IDs. Engine messages repeat every 10 to 100 ms, so counting frames per ID shows which messages are alive.
Find the moving bytes. A byte that never changes is probably a constant or a counter. A byte that moves when the car changes state is interesting.
Use a known event as a reference. The brake pedal was my best friend. When I pressed it, exactly one byte flipped from 00 to 04, at the same moment. That gave me the brake switch with high confidence.
Anchor the scale with a real reading. This turns a raw number into a real unit. The next section shows how.
Mark what is still a guess. The dashboard labels verified and unverified signals differently, and it never fills a gap with an invented number.
Honestly, I relied quite a lot on Claude, GPT, Gemini and Copilot while figuring out what to do and how to approach certain parts of the project.
Raw CAN frames from the dashboard with changing bytes highlighted in yellow The Raw CAN view. The yellow bytes are the ones that just changed.
From bytes to numbers

A CAN frame gives me bytes, not values like RPM, km/h, or volts. So the next step was figuring out which bytes represented a particular signal and how to convert them into something meaningful. Here’s a frame captured from the Brio:
t 17C 8 00000BB800000000Read it:
t – standard CAN frame
17C – CAN ID
8 – eight data bytes
00 00 0B B8 00 00 00 00 – actual data
Bytes 3 and 4 hold the value. Many signals use two bytes, so the raw value is:
raw = high_byte x 256 + low_byte
raw = 0x0B x 256 + 0xB8 = 11 x 256 + 184 = 3000The Brio uses a scale of 1 RPM per bit for this signal, meaning each increment in the raw value represents 1 RPM. So the engine was running at 3,000 RPM.
The raw number alone isn’t enough, though. Different signals use different scales, which I had to identify by comparing the captured data with what the car was actually doing.
Alto vehicle speed. A 16-bit value on ID 0x314, scaled by 1/114 km/h per bit. At a steady 60 km/h on the speedometer the raw value was 6831:
v = 6831 / 114 = 59.9 km/hThat matches the speedometer, which is why I trust the scale. One honest caveat: speedometers usually read a few percent high, so the true speed may be 5 to 8 percent lower.
Brio vehicle speed. Also 16 bits, on a different ID, at 0.01 km/h per bit. A raw 1666 gives 16.66 km/h. This is still a best estimate until I do a steady-speed run.
Alto engine speed. Scale of 0.303 rpm per bit, so a raw 8800 gives about 2666 rpm. Three independent anchors agree with this, but I want a real tachometer reading before I call it confirmed.
Battery voltage and throttle. Voltage on the Alto uses a 0.1 V scale, so a raw 131 reads 13.1 V, which is a normal charging voltage with the engine running. Throttle is a byte scaled to 0 to 100 percent: raw / 255 x 100, so a raw 64 is about 25 percent, a gentle cruise.
The reason these formulas differ is that each signal is encoded differently by the vehicle. There isn’t one universal conversion formula for every CAN message. Finding the correct bytes, scale, and offset for each signal is what makes reverse engineering the data interesting and what makes verification important.
I’ll share a reel in a few days showing the dashboard in action, which should make all of this a little easier to visualize. I'm keeping the smoothing filter and the bus-capacity maths for a Part 2, so this post stays readable.
Problems I ran into (so you don’t have to)
Nobody tells you about these, so here is my list of small things that cost real time:
Use a data cable, not a charging cable. Some USB cables only carry power. The ESP32 lights up, and the computer sees nothing. If your board powers on but never shows up as a port, swap the cable before you doubt anything else.
Use an older Arduino IDE. The newest version kept throwing an MD5 hash error that I could not solve, and it made me properly mad. An older version uploaded the code without any fuss. If you hit that error, don’t burn an evening on it like I did.
Copy the wiring exactly. Once I moved a single wire from pin 6 to pin 5 on the OBD plug, and I was sure the whole project was broken. It was one wire. Pin 6 is CAN-H and pin 5 is ground, so check each wire against the diagram, one by one, before you start debugging the code.
Thicken the jumper-wire ends that go into the OBD plug. A thin jumper wire sits loosely in the plug’s pin sockets, and you get drop-outs or unreliable data. I added a little solder to build up those ends so they fit snugly. After that, the connection felt solid.
Be gentle with the hardware. These boards and wires are delicate, so handle them with your soft hands (unlike your usual nature). A pulled jumper wire snaps inside its sleeve, and you won’t spot it until the data goes missing.
This began as curiosity while driving a car I longed for. It has become a working dashboard, a method for finding signals in raw bus data, and a growing list of numbers I can check against a real car. It is not finished, and I’d rather tell you that than polish it up.
This is a college minor project that grew into something I genuinely care about, and I know it can go further. What improvements would you make? And what else could a device like this be used for? Maybe a driving coach, a trip log, a simple fault alert, a fleet tracker, or something I haven’t thought of. Tell me in the comments. If you’ve built something similar, I’d really like to hear from you.
The project has currently been tested on two vehicles: a Maruti Alto 800 and a Honda Brio, simply because these were the cars available to me for testing. However, it is adaptable as possible across Maruti and Honda vehicles, rather than limiting it to these two models.
Making it reliable across different models, generations, and ECU configurations will require testing on more vehicles, validating signal mappings, and accounting for differences in the data they transmit. So, if anyone has a Maruti or Honda they’d be willing to let me experiment with, I’d be happy to expand my testing.
And if this project somehow makes it to a BMW, Mercedes, or Range Rover Autobiography, I shall consider it a major research milestone and absolutely not a personal achievement. (Manifesting a salary package that supports this).



Comments