Skip to main content

Posts

Showing posts from December, 2021

Learning CAN BUS Communication for OBD2 (and building the communication device)

I always wanted to know how CAN bus worked. I've heard about it in the context of automotive communication back to the early 2000s, when my friend who worked at Halfords, used to regale tails of accidents involving screws and CAN bus wiring, leading to all kinds of unrelated systems suddenly changing their behaviour. I had absolutely no idea how it worked, but understood that it was some kind of network allowing data to be fed around the car using fewer wires than a conventional toggle switch and relay type system. Fast forward many years when I first ECU swapped my first Chimaera for the GEMS control unit, I was introduced to the concept of OBD2 and PIDs (Parameter IDs). I understood that the data was brought in using packets at a reasonably high refresh rate, and that the network was bi-directional; if an error code was sent to my OBD reader, I could send back messages to clear the error. Cool! Moving to my current Chimaera project, I knew that I wanted to use the PIDs output by