DIY Raspberry Pi OBD2 Dashboard: Building Your Own Car Computer

Inspired by the multi-function displays in modern vehicles and the functionality of devices like the COBB AccessPort, I embarked on a journey in the summer of 2015 to create my own Raspberry Pi Obd2 Dashboard. This project wasn’t just about adding a cool gadget to my Fiesta ST; it was a fantastic opportunity to learn new skills and dive into the world of car diagnostics and DIY electronics.


Image of a 2016 Subaru WRX multi-function screen displaying vehicle data, inspiring the Raspberry Pi OBD2 dashboard project.

My initial vision for this Raspberry Pi OBD2 dashboard involved several key learning objectives:

  • Mastering Python programming to handle data processing and display.
  • Learning the intricacies of wiring a 16×2 OLED display to visualize real-time car data.
  • Understanding how to retrieve OBD-II diagnostic information from my car wirelessly via Bluetooth.
  • Implementing an ignition-switched power supply for seamless integration into the vehicle’s electrical system.
  • Configuring a lightweight, headless Raspbian OS to ensure efficient operation of the OBD2 dashboard.

Sharing my project idea online led to some insightful feedback, including suggestions to use existing apps like Torque Pro. While Torque Pro is feature-rich, I found it a bit too cluttered for my personal preference. Moreover, using my phone as a display on the windshield felt less than ideal and potentially distracting. Another suggestion involved using a pressure transducer for a digital boost display. However, my goal was to leverage the wealth of data available through the OBD-II interface, going beyond just boost pressure to create a comprehensive Raspberry Pi carputer display.

Researching Existing Raspberry Pi Car Computer Projects

To kickstart my project, I researched existing in-car computer projects that displayed vehicle diagnostics and status data. CowFish Studios’ OBD-Pi project was a prominent example, showcasing Raspberry Pi displaying OBD-II data on an aftermarket head unit. However, it used a multi-color LCD and an older Python OBD-II library, which I aimed to improve upon.

CarBerry offered another compelling solution, but their system also targeted LCD head unit output and seemed a bit pricey for a DIY project. Other projects I found were either outdated or lacked sufficient documentation. Therefore, I decided to forge my own path, drawing inspiration from the best aspects of these projects while innovating to create a unique Raspberry Pi OBD2 dashboard.

Gathering Supplies for the Raspberry Pi OBD2 Project

Just as I was beginning this project, the Raspberry Pi 2 was released. I opted for a Vilros Raspberry Pi 2 Ultimate Starter Kit (link is to a newer Pi 3 kit now). Being new to electrical wiring, this kit seemed to provide almost everything needed to start working with the Raspberry Pi GPIO pins.


Image of the Vilros Raspberry Pi 2 Ultimate Starter Kit, containing essential components for beginning Raspberry Pi projects.

In addition to the starter kit, I acquired the following components for my Raspberry Pi OBD2 dashboard:

  • Adafruit 16×2 Character OLED Display: Chosen for its sunlight readability and OEM look.
  • Bluetooth OBD-II Adapter: Crucial for wireless communication with the car’s diagnostic system. (Ensure you get a quality adapter to avoid issues).
  • Bluetooth USB Adapter: To enable Bluetooth communication on the Raspberry Pi.
  • Jumper Wires: For connecting the OLED display to the Raspberry Pi.
  • 5V Voltage Regulator: To safely power the Raspberry Pi from the car’s 12V electrical system.
  • UPS PIco Uninterruptible Power Supply: Providing safe shutdown and reliable power management for the Raspberry Pi carputer.
  • Perspex Plastic Sheet: For crafting a custom housing for the OLED display.

Wiring the OLED Display for Data Visualization

After familiarizing myself with basic Raspberry Pi wiring using tutorials from the starter kit, I moved on to connecting the OLED display. While various LCD options exist, I selected the Adafruit 16×2 character OLED display for its advantages. Its OLED technology simplifies wiring by eliminating the need for a backlight, offers superior readability in direct sunlight, and its display color closely matched the Fiesta ST’s gauge cluster, providing a seamless OEM aesthetic for my Raspberry Pi OBD2 dashboard.


Image of the Adafruit 16×2 OLED display, chosen for its readability and aesthetic compatibility with the car’s interior.

However, documentation for wiring this specific OLED display was limited. Despite Adafruit’s excellent tutorials for other LCDs, OLED support seemed less comprehensive. Undeterred, I used the LCD wiring documentation as a starting point. My initial attempt unfortunately resulted in a damaged display. A quick replacement order later, I was ready for a second try. During the wait, I found a helpful forum post on raspberrypi.org detailing OLED wiring. Following those suggestions proved much more successful.


Image of the second wiring attempt for the OLED display, showcasing successful connection and initial display output.

For detailed instructions and diagrams on wiring an OLED display to your Raspberry Pi for your OBD2 dashboard, please refer to the obdPi documentation.

Establishing Bluetooth and Serial Communication

With a functioning display, the next step was configuring Raspbian to communicate with the Bluetooth OBD-II adapter. This proved to be a significant challenge, as finding documentation for this specific scenario – Bluetooth OBD-II adapter to Bluetooth USB adapter to Python script in a headless Raspbian setup – was difficult. Through trial and error, I eventually achieved a working configuration. (Detailed instructions are available in the “Bluetooth Setup” and “Serial Connection” sections of the documentation).

In essence, the Bluetooth OBD-II adapter is paired with the Bluetooth USB adapter using the Raspberry Pi’s Bluetooth utility. This Bluetooth connection is then mapped to a virtual serial port, accessible in Python through the pyserial library. Finally, by modifying the /etc/rc.local startup file, I automated this pairing process for seamless startup of the Raspberry Pi OBD2 dashboard.

Python Scripts for OBD-II Data Retrieval

With the display and communication established, it was time to develop Python scripts to retrieve OBD-II data from the car and display it on the OLED screen. Initially, I attempted to write scripts from scratch, learning the fundamentals of the OBD-II interface. While I made some progress, I soon realized a more efficient solution was needed. Fortunately, I discovered the excellent python-OBD library!

python-OBD is well-structured, consistently updated, and boasts a responsive author. Leveraging this library, I quickly created a functional script that output OBD-II data to the OLED display.

While the display was functional, as shown by the flashing screen, the code still needed refinement. The next major hurdle was powering the Raspberry Pi carputer reliably in the car.

Powering the Raspberry Pi OBD2 Dashboard

For in-car power management, I initially considered Mausberry Circuits, a company frequently mentioned in Raspberry Pi tutorials. I ordered their 2A car power supply, designed to power the Raspberry Pi when the car is on and initiate a safe shutdown when the ignition is turned off. In theory, it seemed perfect for my Raspberry Pi OBD2 dashboard.

I wired the Mausberry switch into my car’s fuse box using fuse taps.


Image showing the Mausberry circuit wired into the car’s fuse box using fuse taps for power supply.

Initial tests suggested the switch was working correctly. However, after about 30 seconds, it would cut power, forcing an unexpected Pi shutdown. Troubleshooting various fuse combinations, wires, and even direct battery connection yielded no improvement. Suspecting a faulty switch, I used a multimeter to test it and confirmed my suspicion.


Image of multimeter testing the Mausberry switch, revealing power delivery issues.

Despite reaching out to Mausberry, I received no response after weeks of waiting. Giving them another chance, I ordered a second switch (this time the 3A version). After another anxious wait, the new switch arrived.


Image showing the swapping of Mausberry switches, hoping to resolve the power issue.

Unfortunately, the new switch exhibited the same issues. Frustrated with the lack of communication and persistent problems, I sought an alternative. I discovered the UPS PIco from Pimodules. After confirming with Pimodules that the UPS PIco was suitable for car applications, I ordered one.


Image of the UPS PIco unboxed, a promising alternative power solution for the Raspberry Pi OBD2 dashboard.

The UPS PIco setup guide was excellent and easy to follow. The UPS PIco utilizes a small LiPo battery to provide backup power during ignition shutoff, triggering a safe shutdown after a few seconds. It also offers optional cooling fan support and provides voltage and battery level monitoring. Status LEDs clearly indicate power source (5V or battery). Thanks to the clear documentation, I had the UPS PIco configured and working perfectly within an hour. After months of power-related frustration, I finally had a fully functional and reliably powered Raspberry Pi OBD2 dashboard system!


Image of the Raspberry Pi, OLED display, and UPS PIco connected and functioning, ready for car installation.

Installing the Raspberry Pi OBD2 Dashboard in the Car

With the UPS PIco handling power management, I needed a separate voltage regulator to step down the car’s 12V to 5V for the Raspberry Pi. I used this regulator from Amazon and wired it into the system.


Image showing the voltage regulator wiring, ensuring safe 5V power delivery to the Raspberry Pi from the car’s 12V system.

Installation began by threading the OLED display cable through the dashboard from the glovebox.


Image of the OLED display cable being carefully routed through the car’s dashboard.


Image of all components prepared for installation in the car, marking the final integration stage.

I chose to position the OLED display below the gauges for easier cable routing.


Image showing the OLED display positioned beneath the car’s gauges for optimal visibility.

Finally, it was time for a test drive! The entire Raspberry Pi OBD2 dashboard system worked perfectly as intended. After weeks of testing, and ironing out minor bugs, the system proved reliable.

Crafting an OLED Display Housing

With the core functionality complete, I focused on aesthetics. The exposed green OLED PCB against the dashboard looked unfinished. Using perspex plastic from Home Depot and a Dremel, I created a simple housing for the display.


Image of cutting perspex plastic to create a custom housing for the OLED display.


Image of test fitting the initial pieces of the perspex housing around the OLED display.


Image ensuring pin accessibility on the OLED display after initial housing construction.


Image of painting the perspex housing black for a more integrated and stealthy look.


Image of assembling the perspex housing around the OLED display, nearing completion.


Image of the completed OLED display housing installed in the car, providing a clean and finished appearance to the Raspberry Pi OBD2 dashboard.

Future Enhancements for the Raspberry Pi Carputer

This project, born from a simple idea, evolved into a challenging and time-consuming endeavor. Countless hours were spent in the garage, wrestling with electronics, code, and unexpected issues. This Raspberry Pi OBD2 dashboard project was a significant learning experience, teaching patience and the value of perseverance.

To some, this might seem like a minor project, but for me, it represents a testament to sticking with a challenge and reaping the rewards of overcoming obstacles. The result is a functional and personalized Raspberry Pi carputer that enhances my driving experience.

I am excited about the future of this project and have a long list of potential improvements planned. Thank you for following this journey!


Image of the completed Raspberry Pi OBD2 dashboard installed and displaying vehicle data in the car, showcasing the successful DIY car computer project.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *