This project is suitable for cars with OBD2 protocol ISO 15765 11 bits
500 Kb/s, most European car has this protocol. The application reads data of
the ECU using CAN. The MCP2515 module drives the CAN BUS. The circuit supply
is from the car 12V and a 78L05 regulator that supply the Arduino and the
CAN module. It is preferred to take the 12V from a connection that switches
off when the engine is off, you can take 12V from the obd2 plug, pin 16 and
add a switch. You need also a ground connection to the car ground.
compiling the code you need to install a lib from GitHub. I left the
debugging in the code for help in adding features. The code requests the
data twice every second. The request is an address 7DF, number of bytes,
service #, PID and padding 5 bytes of 0x55. The reply from the ECU is
address 7E8, number of bytes, 0x41, PID and 2 bytes of data. The data is
calculatedRPM = (byte1*256+byte2)/4.
Lib for the Arduino can be
downloaded from GitHub: Download a lib from GitHub: https://github.com/projects22/MCP_CAN_lib
install the lib and open example obd_tachometer.
The application was tested on Renault Twingo II
reading only current data, no fault codes included. The bluetooth obd2 plug
is from Ebay, it has ELM327 IC that connects to all
OBDII protocols. The computer's bluetooth pairs with the OBD-II plug and
connects to the app via COM Port. On windows computer you can find the
COM port number in 'device manager' and enter the port to the VB app. If you use OBD-II USB you can enter
the port number of that. In
Android the port connects automatically.
Included OBD-II - Simulator VB6
app to simulate the car ECU, it is useful for development or testing the
app. When it receives a request the simulator reply with a text messege
similar to a response by the ECU. To use the simulator You need a
software that creates COM Port pair like "com0com". You can also run the
simulator on another PC and connect the PCs with a null cable or
The VB6 app takes bytes A and B and calculates the
The Android app was made using MIT App
Inventor which is an easy way to make Android apps.
http://appinventor.mit.edu/explore/ and can be downloaded from
. The apk file has to be manually installed to the Android device. The .aia file can be imported
install the MIT App Inventor, the app can be modified to your needs.
can find the parameter IDs of data request. A request is 2 hexadecimal
numbers and the ELM response is several bytes that contain the data. Every
car responds to different request, the app has only 12 popular requests,
others can be added.
The bluetooth plug used:
If you buy it locally, make sure it's ELM327 V2.1
You are free to use the circuit diagram and the VB software with no