Reading the OBD – Part 1

Several years ago, I read somewhere about the on-board diagnostic (OBD) systems in cars and got excited.  There’s a whole heap of stuff your car is just dying to tell you, and all you have to do is know how to listen in!  I had dreams of a dash-mounted display, showing all sorts of engine parameters and other car information while I drove.  At the time, I didn’t know much about developing for microcontrollers, and couldn’t find a lot of information about the protocol, so the project fell aside.

A couple years later I got a new car, a Mazda 3.  Like most newer cars, this one had a more standard OBD interface based on the Controller Area Network (CAN) bus.  The CAN bus is a communication protocol designed for efficiency, reliability, and robustness.  We had studied the CAN bus in school, writing programs for CAN-controlling microprocessors.  I again got excited, because this time I knew what was needed to access the car electronics.

After a bit more looking, I was again disappointed.  Even though the CAN communication protocol is a freely-published standard, the information sent across it is not.  There are standards for automotive CAN, but they are not freely available.  Unfortunately, standards companies charge several hundred dollars for access to their standards.  This fee is nothing for a company selling millions of dollars in products based on these standards, but is a high barrier for any hobbyist just trying to figure out how something works.  The expense, combined with not knowing exactly which standard (or standards) I needed to access to be able to decipher the CAN bus derailed my efforts a second time.

A few months ago, I found a blog entry of a similar hobbyist who also had a Mazda3.  This time, I wasn’t taking no for an answer.  I had previously assumed that there were layers to the CAN protocol, much like the TCP/IP stack.  Even if you could read the data-link layer, you had no idea what was going on in the layers above, and especially not in the (probably proprietary) application layer.  However, this guy had figured it out.  An individual CAN message wasn’t just a fragment of a larger communication, but stood on its own, independent of the messages around it.  I intended to repeat his experiment with my own hardware.

I’ve had some success with this project, and am planning to write up the details in several future posts.  However, for the time being, if anyone knows of any source of freely-available information about automotive CAN standards, please post it up!  I’d love to see it.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: