Android Oscilloscope
OBD2 Engine Rev Counter
OBD2 Diagnostic app
TFT Clock and Thermometer
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
PETIT FAT bmp Display
TFT Timer, Thermometer
TFT Oscilloscope
SD Talking Clock
Android Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
LED Thermometer
LED Timer
LCD Timer
TFT 10MHz Counter
100KHz Counter For PC
1MHz Counter For PC
8 Digits LED Counter
Scope Screen Counter
LCD Module Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
USB TFT display BMP
USB DS18B20 Sensor
USB Thermometer
USB Meter
USB Oscilloscope
USB Input-Output
USB Input-Output Android
USB 16x2 LCD
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial
Serial Thermostat
MCP3201 on LPT
Analogue Signal to LPT
LCD Display on LPT
Water Softener
HP Stream 7 docking
3.7V to 5V
Solar Charger
Infrared Decoder
PIC Music
Code Lock
Code Lock with LCD
HOME   Technical Tips

REV COUNTER ANDROID B4A

A rev counter connected to OBD2 Bluetooth diagnostic plug with ELM327. This RPM meter works with all OBD protocols. The Android program is written using B4A (basic for Android). The Android device, phone or tablet, have to be paired with the BT plug. The display is digital and traditional analogue. The app request data from the car ECU every 0.5 sec. The app APK file, has to be transferred to the device and when opened it instructs how to be installed. B4A code is included, if you want to edit the code free IDE can be found at    https://www.b4x.com/.
The Bluetooth plug I used:
https://www.ebay.co.uk/itm/Mini-ELM327-V2-1-OBD2-II-Bluetooth-Diagnostic-Car-Auto-Interface-Scanner-UK/192143114420?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2648
If you buy it locally, make sure it's ELM327 V2.1

REV COUNTER ANDROID APP INVENTOR

A rev counter connected to OBD2 Bluetooth diagnostic plug with ELM327. This RPM meter works with all OBD protocols. The Android program is written using MIT App Inventor. The Android device, phone or tablet, have to be paired with the BT plug. The display is digital and traditional analogue. The app request data from the car ECU every 0.5 sec. The app APK file, has to be transferred to the device and when opened it instructs how to be installed. .aia file is the app and can be modified in the MIT App Inventor.
The Bluetooth plug I used:
https://www.ebay.co.uk/itm/Mini-ELM327-V2-1-OBD2-II-Bluetooth-Diagnostic-Car-Auto-Interface-Scanner-UK/192143114420?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2648
If you buy it locally, make sure it's ELM327 V2.1

LCD OBD-2 Tachometer

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 MCP2 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.
For 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 i calculatedRPM = (byte1*256+byte2)/4.
Lib for the Arduino can be downloaded from GitHub:   Download a lib from GitHub, install the lib and open example obd_tachometer.

OBD-2 Application

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 bluetooth.
The VB6 app takes bytes A and B and calculates the readable data.
The Android app was made using MIT App Inventor which is an easy way to make Android apps.  The apk file has to be manually installed to the Android device. The .aia file can be imported if you install the MIT App Inventor, the app can be modified to your needs.
In here  https://en.wikipedia.org/wiki/OBD-II_PIDs#Bitwise_encoded_PIDs  you 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:
https://www.ebay.co.uk/itm/Mini-ELM327-V2-1-OBD2-II-Bluetooth-Diagnostic-Car-Auto-Interface-Scanner-UK/192143114420?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2648
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 limitations.

   

Circuit Description
See also Technical Tips

MCP2515 CAN driver https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313.TR1.TRC0.A0.H0.Xmcp2515.TRS0&_nkw=mcp2515&_sacat=0
LCD 16 x 2 module https://www.ebay.co.uk/sch/i.html?_osacat=0&_odkw=mcp2515&_from=R40&_trksid=p2334524.m570.l1313.TR2.TRC1.A0.H0.Xlcd+16x2.TRS0&_nkw=lcd+16x2&_sacat=0
OBD2 plug https://www.ebay.co.uk/sch/i.html?_osacat=0&_odkw=lcd+16x2&_from=R40&_trksid=p2334524.m570.l1313.TR1.TRC0.A0.H0.Xobd2+plug.TRS0&_nkw=obd2+plug&_sacat=0
10K pot can be replaced by 470 ohm to GRD.



  



moty22.co.uk  2008-2020