All Projects → brian03079 → piObdDashboard

brian03079 / piObdDashboard

Licence: MIT license
WIP Dashboard application that collects and displays realtime car telemetry information such as speed, rpm, throttle, etc using a raspberry pi. A short clip of it running can be found here: https://www.youtube.com/watch?v=rTwZY9AT3mg&ab_channel=BrianChan

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to piObdDashboard

ELMduino
Arduino OBD-II Bluetooth Scanner Interface Library for Car Hacking Projects
Stars: ✭ 274 (+730.3%)
Mutual labels:  obd, obd2, obdii
ecu-simulator
OBD-II ECU Simulator
Stars: ✭ 24 (-27.27%)
Mutual labels:  obd, obd2
obdii
The repo contains the Python code developed for the Connected Car OSS work
Stars: ✭ 18 (-45.45%)
Mutual labels:  obd2, obdii
Nissboard
🚗 Nissan Consult/OBDII Realtime Dashboard
Stars: ✭ 20 (-39.39%)
Mutual labels:  obd, obd2
laravel-startkit
Laravel Admin Dashboard, Admin Template with Frontend Template, for scalable Laravel projects. It is to save your time when You start with new scalable Laravel projects with many features Bootstrap, cooreui, infyom admin Generator, roles and permissions, translatable models, spatie media and much more
Stars: ✭ 55 (+66.67%)
Mutual labels:  dashboard-application
iso15765-canbus
Implementation of ISO15765-2 in C
Stars: ✭ 36 (+9.09%)
Mutual labels:  obd2
elmobd
A Go library for talking to cars over OBD-II
Stars: ✭ 139 (+321.21%)
Mutual labels:  obd2
Smashing
The exceptionally handsome dashboard framework in Ruby and Coffeescript.
Stars: ✭ 2,765 (+8278.79%)
Mutual labels:  dashboard-application
vwradio
Reverse engineering Volkswagen car radios
Stars: ✭ 53 (+60.61%)
Mutual labels:  obd
uds
Python package for communication via UDS (Unified Diagnostic Services) protocol. The package supports typical buses (i.e. CAN, Ethernet, LIN, FlexRay, K-Line) with possible extensions to any bus.
Stars: ✭ 18 (-45.45%)
Mutual labels:  obd
OBD.NET
C#-Library to read data from car through an ELM327-/STN1170-Adapter
Stars: ✭ 135 (+309.09%)
Mutual labels:  obd
AndrOBD-Plugin
AndrOBD plugin development project
Stars: ✭ 38 (+15.15%)
Mutual labels:  obd
awesome-automotive-can-id
🚜 unpretentious attempt to collect CAN IDs and payloads for various car brands/models in one place.
Stars: ✭ 104 (+215.15%)
Mutual labels:  obd2
evDash
EV dashboard - software for small dev boards connected to the car via obd2 BLE4 or CAN bus.
Stars: ✭ 83 (+151.52%)
Mutual labels:  obd2
RejsaCAN-ESP32
ESP32 board with CAN interface, runs on 12V power (with auto shutdown)
Stars: ✭ 88 (+166.67%)
Mutual labels:  obd2
pyobd
pyOBDII remake - better than ever!
Stars: ✭ 115 (+248.48%)
Mutual labels:  obd2
QtDigitalInstrumentCluster
Qt OBD II Digital Instrument Cluster
Stars: ✭ 37 (+12.12%)
Mutual labels:  obd2
carloop
Carloop OBDII reader
Stars: ✭ 21 (-36.36%)
Mutual labels:  obd2
CarPC
React App designed to run on a raspberry pi and make driving my car more fun.
Stars: ✭ 19 (-42.42%)
Mutual labels:  obd2
strados
Transform OBD2 data from your car into human readable data
Stars: ✭ 27 (-18.18%)
Mutual labels:  obd2

Raspberry Pi OBD Dashboard

Background

Out of curiosity and for fun, I thought it would be neat to make a digital "dashboard" for my car using a raspberry pi. I originally wanted a way to read and graph information like speed and engine RPM but eventually expanded the features to include temperature, gps, air quality monitoring, etc.

Overview

Showing the data Video demonstration (older version of the app but helps demonstrate the graphing)

Main Features

  • Info such as vehicle speed, RPM, idle, runtime, etc.
  • Graphing of speed and RPM to track driving habits
  • Cabin temperature + humidity monitoring
  • Diagnostic Trouble Codes (DTC) statuses
  • GPS monitor
  • Air quality monitor
  • Vehicle orientation + acceleration statuses

Program structure

The dashboard is a combination of python3 apps which run in the background and send information to web pages that is then displayed to the user. There are two web pages:

  • A primary one that mainly shows telemetry data about the car itself such as speed, rpm, engine statistics
  • A misc web page that shows GPS, air quality, orientation/acceleration, and logging information

The pages are hosted using a node server running on the pi. When the pi is started, an entry in /home/pi/.config/lxsession/LXDE-pi/autostart :

@bash /home/pi/piObdDashboard/startApps.sh

automatically executes a bash script which prepares and starts the background apps and browsers to begin showing data to the user. One of the apps that is started is called obdMisc.py which can optionally detect button presses which can restart and shutdown the pi.

Hardware requirements

Primary Page:

  • Raspberry Pi 4. A Pi 3 might be fast enough, but I still recommend a Pi 4 because of the big performance upgrade. If you use a Pi 3 you may need to adjust the update intervals in the python3 apps.
  • SD Card. Any decently fast one should be fine.
  • LCD panel with minimum resolution of 1024x600 and small enough to be mounted in the car (optional if you are using your phone to connect to the pi via phone hotspot sharing).
  • Windshield mount or a way to secure the display
  • OBD usb cable. This is how we will be getting the car's data. Bluetooth ones should work, but I opted for a usb cable for better security, reliability, and not having to worry about battery drain when the car is off.
  • OBD extension cable. This prevents your legs from bumping into the USB OBD adapter and allows you some more wiggle room for mounting the pi.
  • DHT22 temp/humidity sensor
  • Power and video cables for the pi and display
  • Cigarette socket to usb adapter with recommended output of 15w. Optional if your car already has a usb port that meets these power requirements. Many ports will only supply 500 milliamps (2.5 watts) which is not nearly enough for the Pi 4.

Misc Page:

Note that if you want to display both pages, you will need 2 screens. Its also possible to modify the pages to have a button to switch between the pages which i will probably implement at a later date.

Optional (If you want to be able to easily shutdown the pi or restart the apps):

  • Jumper wires
  • Breadboard
  • Button switches

There are cleaner ways to implement this but it was the cheapest solution.

Hardware Setup

Mount the Pi and Display in the car to your liking. The rest of this sections goes over how to connect the various sensors to the pi :))

OBD functionality:

Attach the OBD extension cable to the car's OBD port. This varies depending on the car but is often around the driver's side footwell area. Next, plug the USB OBD adapter into the extension cable, and then into one of the Pi's usb ports

Temperature/Humidity sensor:

TODO

GPS

TODO

Orientation sensor:

TODO

Pi Setup

This section automatically assumes that you have installed and booted into Raspberry Pi OS. Lets first make sure that everything is updated before installing any packages:

$ sudo apt update
$ sudo apt full-upgrade

Next, open up preferences and make sure under the interfaces tab that everything is set to 'Enabled' except for the serial console by going to:

Preferences -> Raspberry Pi Configuration -> Interfaces-> Serial Console (set to off)

The serial console needs to be disabled or it will end up interfering with the gps software. However, if you arent using the GPS then this doesn't matter.

Disable Screen blanking so as the pi is displaying data the screen does not turn off:

Preferences -> Raspberry Pi Configuration -> Display -> Screen Blanking (set to off)

Software Installation

(if you dont have certain sensors, you can just skip that software)

NVM, Node.js:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
$ nvm install stable

Node.js dependencies:

$ npm install socket.io
$ npm install express

OBD (for retrieving car data):

$ pip3 install obd

Networking for the python apps:

$ pip3 install "python-socketio[client]"

Orientation sensor:

$ pip3 install adafruit-circuitpython-bno055

Air Sensor:

$ pip3 install adafruit-circuitpython-pm25

Temperature Sensor:

$ pip3 install adafruit-circuitpython-dht

GPS:

$ pip3 install gps
$ sudo apt install gpsd gpsd-clients python-gps
$ sudo systemctl stop gpsd.socket
$ sudo systemctl disable gpsd.socket

'Unclutter' app which removes the mouse cursor when idle:

$ sudo apt install unclutter

Finally, lets clone the dashboard repo:

$ git clone https://github.com/brian03079/piObdDashboard.git 

Once inside the repo, you can copy the autostart file to

/home/pi/.config/lxsession/LXDE-pi/autostart

Or if you already have an autostart file there, then simply append

@bash /home/pi/piObdDashboard/startApps.sh

to the end of your existing autostart file. The '@' annotation simply tries to rerun the command if it fails the first time, but isn't required. Note that depending on what apps you want to start or omit, you may need to comment out some of the python files or lines in startApps.sh and restartApps.sh.

Running the Apps

At this point you should be able to test if things are working by manually running the '.sh' files. If you want to test running an individual program, run the node server followed by the name of the python program you want to run. Then open a browser and point it to whichever page that that program sends data to. TODO

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].