Skip to content
OBD-II library and sketches for Arduino
C++ Objective-C C
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead, 3 commits behind stanleyhuangyc:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bikelogger Update datalogger.h Aug 19, 2015
datalogger Reference data logger sketch for Freematics OBD-II UART Adapter May 8, 2017
esplogger Update May 24, 2017
gpslogger Update GPS logger sketch Aug 19, 2015
libraries
megalogger Renaming read() to readPID() in OBD library Jul 6, 2016
megaloggerHD Merge branch 'master' of https://github.com/stanleyhuangyc/ArduinoOBD Jul 6, 2018
nanologger Update README.txt Mar 23, 2018
nanotimer
simple_obd_display Added simple OBD data display example sketch Oct 10, 2017
tester Updated tester May 7, 2017
utilities Changed acceleration threshold for brake points Feb 24, 2016
README.md Modified README to reflect repo goal Dec 11, 2018

README.md

Arduino OBD-II Adapter Library & Sketches

This is fork of the original repository, aimed at adding functionality to the OBD library. Please only submit issues against the libraries/OBD component.

Please see the Freematics repository for any other components

Wishlist

  • Ability to dynamically add/remove INIT commands
  • Advanced statistics calculation like current gear

Original README.md

(C)2012-2018 Freematics.com

OBD-II Adapter for Arduino is a product that works as a vehicle OBD-II data bridge for Arduino (literally all embedded platforms) with open-source Arduino library provided. Besides providing easy-to-use OBD-II data access, it also integrates 9-DOF motion sensor and voltmeter for measuring vehicle battery power. The adapter draws power from OBD-II port and convert it to 5V for powering attached device.

Related Products

Image

About the library

Most commonly use PIDs are defined in OBD library as followings.

Engine

PID_RPM – Engine RPM (rpm)
PID_ENGINE_LOAD – Calculated engine load (%)
PID_COOLANT_TEMP – Engine coolant temperature (°C)
PID_ENGINE_LOAD – Calculated Engine load (%)
PID_ABSOLUTE_ENGINE_LOAD – Absolute Engine load (%)
PID_TIMING_ADVANCE – Ignition timing advance (°)
PID_ENGINE_OIL_TEMP – Engine oil temperature (°C)
PID_ENGINE_TORQUE_PERCENTAGE – Engine torque percentage (%)
PID_ENGINE_REF_TORQUE – Engine reference torque (Nm)

Intake/Exhaust

PID_INTAKE_TEMP – Intake temperature (°C)
PID_INTAKE_PRESSURE – Intake manifold absolute pressure (kPa)
PID_MAF_FLOW – MAF flow pressure (grams/s)
PID_BAROMETRIC – Barometric pressure (kPa)

Speed/Time

PID_SPEED – Vehicle speed (km/h)
PID_RUNTIME – Engine running time (second)
PID_DISTANCE – Vehicle running distance (km)

Driver

PID_THROTTLE – Throttle position (%)
PID_AMBIENT_TEMP – Ambient temperature (°C)

Electric Systems

PID_CONTROL_MODULE_VOLTAGE – vehicle control module voltage (V)
PID_HYBRID_BATTERY_PERCENTAGE – Hybrid battery pack remaining life (%)

Additional defines can be added to access other OBD-II PIDs.

Directory Descriptions

libraries - all Arduino libraries needed for OBD-II adapter and kits

samples - several simple sketches for testing purpose

nanologger - OBD-II data logger working with 128x64 monochrome OLED display (for Arduino Nano)

megalogger - OBD-II and GPS data logger based on 320x240 TFT LCD display (for Arduino MEGA)

megaloggerHD - OBD-II and GPS data logger based on 480x320 TFT LCD display (for Arduino MEGA)

tester - a testing sketch for OBD-II communication and capability

utilites - useful utility source code for development

You can’t perform that action at this time.