Digital Cluster with OBDII Readings (2021)
For some time now, I've been meaning to create my own "non-professional" digital cluster that could work with my car. I obtained an ELM327-based bluetooth OBDII-CAN reader, which you can find easily online. The module in question, ELM327 uses AT commands in order to bring CAN frames or device configurations to you. The module is very cheap, therefore it comes with some constraints. For example, you can not monitor all CAN messages, which I would have wanted. Instead, you have to request specific data and parse the output. This forces you to periodically send and receive data from the same socket, hence drastically lowering performance. Furthermore, ELM327 module itself is sometimes unable to send data in time. Possible future work would involve replacing ELM327 with high speed USB2CAN converters.
First and foremost, I started by developing a userspace bluetooth socket driver that would open rfcomm device either based on its MAC address or device path. Then, I introduced several functions wrapping Linux chardev API with device and communication specifics. After that came the implementation of the basic AT protocol. I have come to find out that Wikipedia is not a bad source for learning about OBD II PIDs and DTCs. I have implemented API to receive vehicle speed, vehicle RPM, engine load, turbo pressure (Manifold Absolute Pressure, MAP) and coolant liquid temperature.
After having developed the API, I spent some time on redesigning the user interface that I developed earlier. I used Adobe Fireworks and Qt in the design of the application. As you can see in the provided image, I have designed a style with many gauges on top of each other. Design and the Qt application dates a several months back. However, the bluetooth-rfcomm-elm327 API took me only last Friday.
All in all, I would say there is still room for improvement, as I have selected one of the worst CAN readers which sometime causes latency or connection issues inevitably. Still, you can see for yourself how it looks in a real car from the following videos: