OBD-Pi, i.e. vehicle self-diagnosis based on the Raspberry Pi

Step 1: Required materials
To complete this project you will need:
o Raspberry Pi Model B or B +
o Car stereo (must have an AUX socket)
o Bluetooth adapter
o Car charger
o USB or Bluetooth adapter based on ELM327.
o RCA cable
o Keyboard (optional)
Step 2: OBD II
OBD (On-Board Diagnostics) is a standard system in cars sold after January 1, 2002 (in Poland). It provides access to data on the condition of individual vehicle systems (engine, gearbox, ABS, etc.). Vehicles compliant with the OBD-II standard should have a socket approximately 0.6 meters from the steering wheel. The connector itself has 16 pins and looks like the picture below.
Step 3: PyOBD
PyOBD (also known as pyOBD-II or pyOBD 2) is open source software designed to work with the ELM327 chip. For example, it allows information from the injection controller (ECU) to be displayed or to reveal fault codes. Various tests and readings of multiple statuses are also possible. The amount of information available depends on the car itself.
Step 4: Installing the software
Programming takes place here via the Raspian system with network access enabled. Communication with the computer is carried out using the USB TTL converter, however, it is allowed to use other methods of data exchange.
Before installing, you should enter the following commands:
This command pulls the latest package list:
sudo apt-get update
They are updated here:
sudo apt-get upgrade
Now we remove packages unused by any applications:
sudo apt-get autoremove
Finally, we restart the system:
sudo reboot
We continue by installing the programs necessary for the correct operation of the device.
sudo apt-get install python-serial
sudo apt-get install bluetooth bluez-utils blueman
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev
sudo apt-get install git-core# sudo reboot
Then we download OBD-PI from this link or using the commands:
cd ~
git clone https://github.com/Pbartek/pyobd-pi.git
Step 5: Connecting the Equipment
1. First, insert the Bluetooth to USB adapter for the Raspberry Pi together with the SD card.
2. Connect the OBD-II adapter to the corresponding socket in the car.
3. We connect the Raspberry Pi with the car radio via the RCA cable.
4. We power the raspberry using a car charger.
5. Log in to Rpi and enter the command:
startx
6. Run BlueZ (Bluetooth service), and then pair the ELM327.
7. We communicate with SPP - we should see this notification: "Serial port connected to dev / rfcomm0"
8. Open the terminal and enter the following commands:
cd pyobd-pi
sudo su
python obd_gui.py
Step 6: Data Logging
The actual reading of data in real time can sometimes be troublesome. So it is possible to collect and save various information and to read it later. To start downloading data, enter:
cd pyobd-pi
python obd_recorder.py
The saved data will be available at the path:
/ home / username / pyobd-pi / log /
source: http://www.instructables.com/id/OBD-Pi/?ALLSTEPS
Comments
As a curiosity, I will add: in many newer cars, some or all signals from the OBD connector are also available in the cube from the factory radio, so you can hide the adapter entirely behind the radio and... [Read more]
What is the RCA cable connected for? [Read more]
RPi transmission to the monitor. [Read more]
Right, we have CAN not only on Radio. Good point. Many of the buried modules have sufficient communication lines for diagnosis. [Read more]
It is a pity that there is no project that would not require an intermediary like ELM327 or STN11xx. Especially ELM327 is known for its low speed, but also STN11xx can be too slow. The best solution would... [Read more]
Only CAN diagnostics comes from the gateway module, and there are several CAN buses in the car, the one from the radio does not include the engine, etc. Only the necessary data is sent between the buses... [Read more]
This is not entirely true. Not all cars have a gateway. Not all cars have several different CAN buses. Not every radio has a CAN connected or other diagnostic option. [Read more]
By adding to the list: Some radios have (had) K-line. [Read more]
What speed you want to achieve, STN is enough to refresh data at ~ 10fps. Of course, if you want to display xx values, this speed will eventually start to drop, the fault is not the interface but the PCM,... [Read more]
Regarding even the fast CAN and the VCDS interface with the EDC16 ECU, the reading of the parameters in the TURBO tripping also crashes ... for a slow transfer from the computer .. I was reading 4 values... [Read more]
That's why he writes that it would be best to do it natively on RPi, and even better on some ARM that has CAN support as standard (add only SAE J1850 support and others if needed). [Read more]
A more practical device would be plugged into the OB socket or permanently installed with one function. - CLEAR ALL DTC. For the average user, having the same self-diagnosis is unnecessary. [Read more]
It looks nice on such a large and legible display [Read more]
Cool but ... basically what is it for? Because the author didn't write it. Who needs these opaque numbers on the screen? Besides, they are distracting and can cause an accident ... [Read more]
Falso... Cada vez hay mas coches con GATEWAY, que a demas, esta protegida. Mas redes CAN, algunas son dobles, gracias a SENT, LIN... los vehiculos tienen mas unidades de control. [Read more]
people have been developing can hacker with arduino for years. It's even easier to retrieve information via the can-bus. [Read more]