Raspberry Pi powered dashboard with live OBD stats & graphs and reverse camera support.
(yes there are too many decimal places on the engine load, I've fixed this in the code)
note: composite video is used so I can easily switch outputs with a relay, quality isn't too bad on a small display.
Relays: NC (normally closed, i.e. connected by default when Pi is off), CO (common), NO (normally open)
RPi <<<GPIO>>> PiFace
PiFace relay 0/1 <<<NC>>> RPi video out
<<<CO>>> Display video in
<<<NO>>> Camera video out
<<<GND>>> Ground of all cables
I only had one 12V socket available at the front of the car, and the dashcam was already using this, so I took apart the plug, made a small hole and soldered two extra wires to power the 12V display.
The Pi gets power from a USB socket on the CD player meant for flash disks (it apparently provides adequate current, use a USB voltage/current meter to check you're still getting 5+/-0.25V if you're trying such tricks).
sudo apt update && sudo apt upgrade
pip3 install obd PySimpleGUI keyboard
git clone https://github.com/trishmapow/obd-gui
bluetoothctl
to enter bluetoothctl shellscan on
and scan off
once you see your modulepair [MAC]
where MAC is the address of your OBD moduletrust [MAC]
paired-devices
check your module is listedquit
to exit bluetoothctl shellsudo sdptool add SP
sudo rfcomm connect hci0 [MAC]
you should see 'press ctrl+c for hangup'cd
into obd-gui
python3 gui.py
, if you see the numbers and graph updating, great! Otherwise alt-tab to switch to the terminal and see the errors (or exit the app using alt+f4). I had to make some patches to get my module working, you can find them here. Check the troubleshooting guide and issues in the repo. You may have to dig into the pythonOBD source in ~/.local/lib/python3.7/site-packages/obd
git clone
both pifacecommon and pifacedigital-io, cd
into the directories and run sudo python3 setup.py install
for both modulessudo raspi-config
, under 'interfacing' (iirc)sudo python3 piface.py
from the obd-gui
folder. sudo is required for the keyboard
module to work and emulate keypressesautostart
to /etc/xdg/autostart
. Make any necessary edits to the desktop files.connect.sh
sys.path.append
lines at the top of gui.py
and piface.py
(edit as necessary depending on your Python version, you can run pip3 show obd
to see where your package is installed). This is a quick fix solution, there are cleaner ways if you edit sudoers, etc.The GUI uses the PySimpleGUI library (just about the fastest & easiest way to get a working GUI running). You can adjust the font, refresh rate etc easily by modifying the constants and/or the layout
array.
Contributions are welcome, I made the GUI in a rush and focused mainly on functionality.