Diagnosis of your car with Raspberry Pi «Soloelectronicos

OBD-II PID (differential on board parameters IDs ) are codes used to request data from a vehicle, which is used as a diagnostic tool that has traditionally reserved to the automotive technicians who use PID with a scan tool connected to the vehicle’s OBD-II connector.»

  • the technician enters the PID
  • the analysis tool sends it to the vehicle network controlador-area (CAN) stop minibus, VPW, PWM, ISO, KWP. (After 2008, CAN only)
  • a device on the bus recognizes the PID as one is responsible, and reports the value for that PID to the bus
  • the scan tool reads the response, and shows it to the technician

an OBD-II adapter works in a certain way as a USB mouse that we use with the computer, since it is connected to the control unit of the car and converts data that reads in information we can process from our mobile.

these adapters can be found easily on the internet and at prices that start at 6 euros and will rise up to several hundred, depending on the quality and quantity of options that we need. But for a fully ‘ amateur’ use, we have enough with the cheapest. That Yes, before you buy it must check the switchboard of your car has standard 16-pin connection and is compatible with this interface.

adapters ODB2 bluetooth

 elm37

some vehicle units can support more or less functions than others, but in any case don’t forget that your application needs a Bluetooth OBD2 adapter to work.

these adapters are small and are connected to taking diagnostic in the car that gives her access to phones. One of the adapters used is the OBD2 ELM327 model which works as well as other similar devices of much greater size and still quite lower price (as for example the adapter Scantool.net, OBDKey and PLX Kiwi adapter).

model ELM 327 is classic reader parameters of engine and error codes OBD II mini, in transparent plastic small tamaño(otros modelos mayores estorban en la zona de los pedales) that is able to send data via Bluetooth and can be purchased at very reasonable prices.

to use it, connect the device to the connector that often bring almost all modern cars alongside the main ones which is usually under the steering wheel.

then you have to install the Torque application on your smartphone (free version or payment) and automatically when you run it you should begin to see the app in a vast amount of information on the operation of your vehicle.

users overwhelm the impressive volume of data provided for application is 100% configurable to display you prefer. In fact offered data are almost similar to a machine diagnosis of any shop in their hands, providing in addition to a host of informative parameters on the State of consumption, temperatures, engine, trouble shooting etc

in a nutshell these are some ELM327 OBD2 adapter combination utilities along with the Torque:

  • read diagnostic codes generic and specific manufacturer, and show its meaning (over 3000 generic definitions of the code in the database).
  • delete trouble codes and turn off the MIL (“Check Engine” light)
  • show the current data of the sensor

according to car model you can see more or less data, because that does not depend on this device in his. In fact, there are users who have not managed to make them work with certain models of vehicles, but instead on other models works perfectly:

by the way, this version of the ELM327 can be purchased for less than € 6 with of sent our here (Amazon.es)

adapters ODB2 USB

there are many examples of enthusiasts who are using these adapters ODB2 not only from Android devices but even from PC standard , but and if it could be used from other devices like for example from a Raspbery Pi?

as in effect from pistonheads.com shows us how it is possible from an RPi reading his motorcycle through a Reader USB OBD-II data using as datalogger for a bike because it fits perfectly under the seat

to do this, use a USB cable-> OBD2, which supports many different versions of the standard port OBD2

the RPi takes power connection micro USB to be feeds at the same time of the battery (it is certainly to do it from the ignition key / off, but this take much more work and there is a danger of damaging the bike wiring) so the user opto by buy a switch and a fuse that ends in a female USB port which allows you to turn off the IPPB at the end of a journey

the following is the code the library-based python develops in 2009 called pyobd. This was the basis for what I wanted to do, finding some errors in the code because, in general, it was written to be used by an application GUI graphics that came with it. As the author didn’t want a GUI application, obviously, under your seat is under your repository and began to work on making it more resembles a datalogger

work this in its repository: https://github.com/roflson/pyobd

thanks to the excellent work of Salgar, Martin wanted to going too far by also connecting a camera, using the OBD data for overlay mph rpm, temperature and the position of the throttle on the video taken with the camera plate really building a device very interesting

in a nutshell the development process of the new tool was very similar to the previous adaptation of Salgar, based also on a USB adapter to the interface cable OBD2 ELM 327 ELM327 USB can-bus Scanner 1.5V type by about £10 available at amazon.com or amazon.co.uk . (in Spain an is not)

another important element is connect the camera to your Raspberry Pi 2 using the proprietary connector specific

compatible with the Raspberry Pi2 affordable model is the camera module Raspberry Pi de SainSmart which costs about €14

then once you purchase the hardware I download the software to get your repository, github, https://github.com/roflson/pyobd as the basis for the new program (software salgar is a fork of a project called pyobd, https://github.com/peterh/pyobd which is an application based on GUI to read OBD-II data).

use this new software as the basis for a program that would be connected through the OBD-II interface, interviewing car which sensors supported and then read the sensor data in a loop every 0.5 seconds by typing them on the screen so the RP2 not only records video, also records the dynamic data superponiendolos to the video author then serving a double function

download and run

the author finally  has put at the disposal of all users their sw so that you can directly download the code from github at https://github.com/martinohanlon/pyobd

in a nutshell, these are the installation instructions:

if “pica you” curiosity in the video we can see the Rp2 with sw in action

Be the first to comment

Leave a Reply