Jump to content

Python OBD2PY

Python Panda

Recommended Posts


I'm going to put all the old information here just for historic information for the growth of this system.





UPDATE: 09/14/2020 I am in the process of registering a new car finally. I own it out right and will start continuing this development. A full build out of the system will be added once I get to a decent progress on it. This will be running on a Raspberry Pi 2 that I have sitting in my room.



OBD2PY was a small baby of mine when I had cash to burn on Raspberry Pi and Raspberry Pi accessories like touch screens and what not. I haven't touched this in roughly 5 years. Today I dusted it off removed all the old GUI system which was TKInter and replaced it with a very basic GUI made in Kivy. Right now if you run it will do absolutely nothing. I needed a small break from making Orion+ into python. So I decided to do this before work today. I got exactly where I wanted to with switching out the old GUI with the new one. PLEASE NOTE NOTHING WILL BE DISPLAYED CURRENTLY RIGHT NOW AS IT IS BROKEN DUE TO THE NEW GUI!



OBD2PY is a carputer. The project is heavily based off of pi2go. I removed the QT GUI system to use TKInter originally. Now after 5 years, I am back to this project. It was completed and working before the new edits to the new GUI system. I have ripped out the old TKInter GUI system in place to use Kivy. As Kivy is able to be ported compiled into almost every operating system including phone.


What is OBD2?

On-board diagnostics (OBD) is an automotive term referring to a vehicle's self-diagnostic and reporting capability. OBD systems give the vehicle owner or repair technician access to the status of the various vehicle subsystems.


In short it is the information newer cars are able to display on the dash such as temps of oil and coolant, oil pressure, mpg, miles till empty, fuel filter life, oil life, etc etc. Cars made from 1996 and newer are all OBD2 compliant. Meaning you will be able to use this program with them. It is also used to pull codes to know what is wrong with your hcar when the check engine light comes on.



OBD2PY currently is able to grab the vehicle speed, rpm, coolant, oil and intake temperature, along with the engine load. 



Coming Soon

After I get the basics working again, listed above, I will be adding in more advanced features. These features will consist of MPG/LPG, Trip Distance (Total since last reset, since car started), Engine Time (Driving hours, Idle Hours) logging and saving thigns to sqlite database, fuel level in tank. Eventually the app will be abler to pull codes (check engine light) and save them so you can research them at a later date.



All source code can be found here. It will be updated to a usable state once I have found my OBD2 to usb cord. I'm hoping to have the basic features up and running again by the end of May. Depends on how long it takes me to find my OBD2 to usb cord.


Current Version


Based on Major.Minor.Build


What you will need

All libraries needed to run this program can be found in the requirements.txt file. You will also need a OBD2 to usb cable. This is the one i bought originally.  Though there are others out there you can buy as well.




I updated a bunch of the GUI system and error handling today. The GUI still has a lot of work to go. Especially with having huge amounts of empty space.



This is the main screen. The GUI for this screen is still being worked on. As you can see there is huge amount of empty space. Once I have the sizing down the empty space will be gone and the window size will be scaled down. As you can tell you will be able to see your speed, rpm, oil, coolant and intake temp along with the engine load.



There is a timer using kivy.clock.Clock. It executes the connection to the serial device(OBD2 to USB). If the pyserial is not installed or if the application can't find the serial device it will have pop ups show up with correct information. To close the popup you just have to click a space on the app that is not the popup. I may add in a button to close it later.





Lastly is the settings area. This was a little tricky as i never used the built in settings system for Kivy. It is actually really nice. I really enjoy it and will most likely use it once I get to the client of pyOtion+ (eventually lol). If the first to options are set to off, Speed will be shown in KPH which is actually the default value given when pulled from the cars system. Yes the car computer (all cars) are actually metric by default. This also means if use fahrenheit is off it will use Celsius. Which again is the default value pulled from the cars obdii system... Gotta love America and not using the metric system by default lol.




Link to comment
Share on other sites

You do sales of this system? I'd buy one from you. Total hardware costs plus roughly 40%, before you include shipping. The whole idea sounds really cool, and I'd def put it in a car. Have you tested it in a vehicle yet? A video would be pretty cool too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...