Introduction
Back in the summer of 2015, my quest to enhance my Fiesta ST with a boost gauge led me down an unexpected path. Inspired by the multi-function display in the 2016 Subaru WRX, showcasing real-time vehicle data such as boost pressure and MPG, and influenced by the functionality of the COBB AccessPort, I conceived a project: to construct my own digital car dashboard. My vision was to use a Raspberry Pi as the heart of this system, turning it into a custom Raspberry Pi Obd2 Dashboard.
Alt Text: 2016 Subaru WRX multi-function display showing real-time vehicle data, inspiration for Raspberry Pi OBD2 dashboard project.
This idea wasn’t just about replicating existing solutions; it was about embarking on a learning journey. To bring this Raspberry Pi OBD2 dashboard to life, I knew I needed to delve into several key areas:
- Python programming: To control the system and process data.
- OLED display integration: Wiring and programming a 16×2 OLED screen to visualize the data.
- OBD-II data retrieval: Establishing Bluetooth communication to extract diagnostic data from my car’s OBD2 port.
- Ignition-dependent power supply: Ensuring the system powers on and off with the car’s ignition.
- Lightweight Raspbian OS configuration: Setting up a streamlined, headless operating system for optimal performance.
Sharing my initial concept on online forums and communities sparked some interesting feedback. One common suggestion was to simply use existing smartphone apps like Torque Pro. While I acknowledged the capabilities of Torque Pro and similar apps, they didn’t quite align with my vision. I found their interfaces to be somewhat cluttered for my preference. Furthermore, using my phone as a dedicated display would mean sacrificing it for calls and music, and mounting my 5″ Nexus on the windshield felt like it would obstruct my view too much.
Another suggestion involved using a pressure transducer for a digital boost display. While intriguing, my ambition was to access a broader spectrum of vehicle data. The OBD-II interface offered precisely that – standardized access to a wealth of information beyond just boost pressure, making it the ideal data source for my Raspberry Pi OBD2 dashboard.
Researching Existing OBD2 Dashboard Projects
My research led me to explore existing projects that aimed to create in-car computer displays for vehicle diagnostics and status information. CowFish Studios’ obdPi project stood out as a well-documented example. However, their approach utilized a multi-color LCD and an older Python OBD-II library.
CarBerry’s offering also caught my attention with its polished design. Unfortunately, CarBerry was also configured for LCD head unit output, and the overall cost, including shipping and accessories, exceeded my budget for this DIY project.
Several other projects seemed either outdated or lacked sufficient documentation. Ultimately, I decided to draw inspiration and guidance from the best aspects of these projects, forging my own path to build a unique Raspberry Pi OBD2 dashboard.
Essential Supplies for Your Raspberry Pi Car Dashboard
As I was starting this project, the Raspberry Pi 2 had just been released. I opted for a Vilros Raspberry Pi 2 Ultimate Starter Kit (the link now directs to a newer Pi 3 kit). Being new to electrical wiring, I believed this kit would provide almost everything needed to get started with GPIO wiring for the Raspberry Pi, crucial for connecting the display to my Raspberry Pi OBD2 dashboard.
Alt Text: Vilros Raspberry Pi 2 Ultimate Starter Kit, containing components needed for starting a Raspberry Pi project, like building an OBD2 dashboard.
Beyond the starter kit, I also acquired these components for the Raspberry Pi OBD2 dashboard project:
- Adafruit 16×2 Character OLED Display: For displaying vehicle data.
- USB Bluetooth Adapter: To interface with the OBD-II Bluetooth adapter.
- OBD-II Bluetooth Adapter: To read data from the car’s OBD-II port. Important: Invest in a quality adapter to avoid compatibility issues. My first adapter was a cheap knock-off and proved unreliable.
- Mausberry Car Power Supply Switch (Initially): To manage power to the Raspberry Pi based on ignition status (later replaced).
- UPS PIco (Alternative Power Supply): A more reliable power solution with battery backup for safe shutdown.
- DC-DC Voltage Regulator: To step down the car’s 12V power to 5V for the Raspberry Pi.
- Fuse Taps: To safely draw power from the car’s fuse box.
- Various wires, breadboard, and connectors: For prototyping and wiring.
- Perspex plastic: For creating a custom housing for the OLED display.
Wiring the OLED Display to the Raspberry Pi
With the basic wiring principles under my belt thanks to the starter kit tutorials, I proceeded to wire the LCD for my Raspberry Pi OBD2 dashboard.
While numerous LCD options exist for the Raspberry Pi, I selected the Adafruit 16×2 character OLED display for several compelling reasons. Being an OLED, it simplified wiring by eliminating the need for a backlight. Its superior readability in direct sunlight was a significant advantage for an in-car display. Finally, the display’s color was a near-perfect match to the Fiesta ST’s gauge screen, aiming for a factory-integrated aesthetic for my Raspberry Pi OBD2 dashboard.
Alt Text: Adafruit 16×2 OLED character display, chosen for Raspberry Pi OBD2 dashboard project due to sunlight readability and color match.
The primary challenge with this OLED display was the scarcity of online wiring documentation specifically for it. Adafruit provides excellent guides for their other LCDs, but resources for this particular OLED seemed limited. Undeterred, I used the LCD documentation as a general guideline for wiring the display to my Raspberry Pi OBD2 dashboard.
My initial attempt unfortunately resulted in a fried display. After a quick exchange with Amazon, a replacement display was on its way. While waiting, I discovered a helpful forum post on raspberrypi.org that specifically addressed wiring this OLED display. Following the suggestions there, my second attempt was much more successful.
Alt Text: Successful second attempt at wiring the Adafruit 16×2 OLED display to the Raspberry Pi for OBD2 dashboard project.
For a comprehensive guide and wiring diagrams for connecting an OLED display, please refer to the obdPi documentation.
Establishing Bluetooth and Serial Connections
With a working display in place, the next step was to configure Raspbian to communicate with the Bluetooth OBD-II adapter, a crucial link for the Raspberry Pi OBD2 dashboard to get vehicle data.
This phase involved considerable trial and error due to limited documentation for my specific setup: a Bluetooth OBD-II adapter communicating with a Bluetooth USB adapter on a headless Raspbian system, controlled by a Python script. However, I eventually achieved a functional 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 adding commands to the /etc/rc.local
startup file, I automated this pairing process to occur on system boot, ensuring seamless operation of the Raspberry Pi OBD2 dashboard every time the car starts.
Python Scripts for OBD-II Data Acquisition
With a functional display and communication channels established, the next critical step was developing Python scripts to retrieve OBD-II data from the car and display it on the OLED screen of my Raspberry Pi OBD2 dashboard.
Initially, I started with the basics, attempting to understand the intricacies of the OBD-II interface and write scripts from scratch. While I made some progress, I soon realized the need for a more robust and efficient solution. Fortunately, I discovered the excellent python-OBD library!
python-OBD is not only exceptionally well-structured but also actively maintained with regular updates. The author is also highly responsive to user feedback and inquiries.
Leveraging python-OBD, I rapidly developed a working script that successfully outputted data to the OLED display, bringing my Raspberry Pi OBD2 dashboard closer to reality.
[Demonstration of working script on OLED display would be ideal here, but text based format limits this.]
As the flashing display indicated, the code was still in its early stages. However, it was functional enough to move on to the next challenge: powering the Raspberry Pi reliably in the car environment.
Powering the Raspberry Pi in a Car Environment
Numerous Raspberry Pi tutorials mentioned Mausberry Circuits, leading me to order one of their 2A car-based power supplies.
Mausberry car switches are designed to use both ignition-dependent and always-on 12V sources. They provide power to the Raspberry Pi when the car is on and initiate a “safe shutdown” sequence when the ignition is turned off. In theory, these switches seemed like the perfect power management solution for my Raspberry Pi OBD2 dashboard.
I wired the switch into my car’s fuse box using fuse taps.
Alt Text: Wiring the Mausberry car power supply circuit into the car’s fuse box using fuse taps for the Raspberry Pi OBD2 dashboard project.
Initial tests seemed promising. However, after approximately 30 seconds of operation, the switch would abruptly cut power to the Pi, forcing a hard shutdown. Extensive troubleshooting, including trying different fuse combinations, wires, USB cables, and even direct connection to the car battery, yielded no improvement. Suspecting a faulty switch, I used a multimeter and found that the Mausberry switch itself appeared to be the source of the problem.
Alt Text: Testing the Mausberry car power supply switch with a multimeter to diagnose power cut issue for Raspberry Pi OBD2 dashboard.
Attempts to contact Mausberry for support went unanswered for weeks. Giving them the benefit of the doubt, I ordered a second switch (this time the 3A version). After a period of silence, the new switch arrived, but unfortunately, it exhibited the same power cutoff issues.
Frustrated with the unreliable Mausberry switches and the lack of customer support, I sought an alternative. I discovered the UPS PIco from Pimodules. Contacting Pimodules directly, I inquired about the UPS PIco’s suitability for car applications. Their prompt and affirmative response led me to order one.
Despite the wait due to international shipping and customs, the UPS PIco arrived and immediately impressed me with its build quality.
Alt Text: Unboxed UPS PIco module from Pimodules, a reliable power supply solution for the Raspberry Pi OBD2 dashboard project.
The setup guide was exceptionally clear and easy to follow. The UPS PIco utilizes a small 450mAh LiPo battery to provide backup power in case of power loss, enabling a safe shutdown of the Raspberry Pi. It includes scripts to trigger this shutdown after a short battery runtime. The UPS PIco also offers optional cooling fan support and provides voltage and battery level monitoring. Status LEDs clearly indicate whether the UPS is running on 5V or battery power.
Thanks to the excellent documentation, I had the UPS PIco configured and working flawlessly within an hour. After months of power-related frustrations, I finally had a reliable power solution for my Raspberry Pi OBD2 dashboard, ready for in-car installation.
Alt Text: UPS PIco module connected and functioning, providing stable power and safe shutdown for the Raspberry Pi OBD2 dashboard project.
Installing the Raspberry Pi OBD2 Dashboard in the Car
With the UPS PIco replacing the Mausberry circuit, I needed a separate voltage regulator to step down the car’s 12V to 5V for the Raspberry Pi. I sourced this regulator from Amazon and proceeded to wire everything together for in-car installation of my Raspberry Pi OBD2 dashboard.
Alt Text: Wiring a DC-DC voltage regulator to step down car’s 12V power to 5V for powering the Raspberry Pi OBD2 dashboard.
First, I carefully routed the OLED display cable through the dashboard from the glovebox to the gauge cluster area.
Alt Text: Routing the OLED display cable through the car dashboard for installing the Raspberry Pi OBD2 dashboard display.
Alt Text: All components prepared and ready for installation inside the car for the Raspberry Pi OBD2 dashboard project.
I decided to position the OLED display just below the main gauges, simplifying cable routing and mounting for the Raspberry Pi OBD2 dashboard screen.
Alt Text: Positioning the OLED display unit below the car’s main gauges for the Raspberry Pi OBD2 dashboard installation.
Finally, the moment of truth – a test drive!
Success! The entire Raspberry Pi OBD2 dashboard system functioned as expected. After several weeks of testing, while minor software bugs remained to be ironed out, the system proved to be stable and reliable.
Crafting a Housing for the OLED Display
With the core functionality complete, I turned my attention to the aesthetics of the Raspberry Pi OBD2 dashboard. The exposed green OLED PCB against the car’s black dashboard looked somewhat unfinished. To address this, I decided to fabricate a simple housing from perspex plastic, a perfect excuse to finally acquire a Dremel tool.
Alt Text: Cutting perspex plastic to create a custom housing for the OLED display of the Raspberry Pi OBD2 dashboard.
Alt Text: Test fitting the first cut perspex pieces to ensure proper fit for the OLED display housing for the Raspberry Pi OBD2 dashboard.
Alt Text: Ensuring accessibility to the OLED display pins while designing the perspex housing for the Raspberry Pi OBD2 dashboard.
Alt Text: Painting the perspex housing black to match the car’s interior for a seamless look for the Raspberry Pi OBD2 dashboard.
Alt Text: Assembling the custom-made perspex housing for the OLED display unit of the Raspberry Pi OBD2 dashboard.
Alt Text: The completed OLED display housing installed in the car, providing a clean and integrated look for the Raspberry Pi OBD2 dashboard.
Future Enhancements for the Raspberry Pi OBD2 Dashboard
This project, which began as a simple idea, evolved into a significant learning experience. It transformed from a casual afternoon thought into one of the most challenging and time-consuming projects I’ve undertaken. Countless hours were spent in the garage, battling both freezing temperatures and scorching heat, wrestling with Python code, and occasionally questioning my sanity.
A special thanks to my incredibly patient girlfriend, who, despite my constant presence surrounded by electronics and wires (and a few jokingly concerned comments about “bomb-making”), remained supportive and encouraging throughout the entire Raspberry Pi OBD2 dashboard build.
While some might view this project as trivial, it became a valuable lesson in perseverance. It’s a testament to the rewards of sticking with a project, even through numerous setbacks. The satisfaction of seeing the final result makes all the challenges worthwhile.
I am excited about the future possibilities for this Raspberry Pi OBD2 dashboard and have already compiled a substantial list of potential improvements and features to add.
Thank you for following along this journey!
Alt Text: The completed Raspberry Pi OBD2 dashboard installed and displaying vehicle data in the car, a successful DIY project.