Hi, i've recently bought this OBD adapter (model A UART) to use on a 2013 Toyota Auris. I'm using arduino UNO R3 and a Nokia 5110 screen to display data. I'm trying to display 4 PIDs: rpm, coolant temp, speed and hybrid battery percentage. It works but the refresh rate is very slow: about 5 seconds. Additionally, it also has a delay on data reading of about 5-10 seconds. What's wrong? Here is the code:

[code]#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
// Adafruit_PCD8544(SCLK, DIN, D/C, CS, RST);
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);

COBD obd;
int kmh;
int temperature;
int rpm;
int charge;

void setup()  {
  // start communication with OBD-II UART adapter
  // initiate OBD-II connection until success
  //Protocol 6: ISO 15765-4 CAN 11 bit 500 kbaud
  while (!obd.init(6));

void loop() {
  //Read data
  obd.read(PID_RPM, rpm);
  obd.read(PID_COOLANT_TEMP, temperature);
  obd.read(PID_SPEED, kmh);

  //Display data
  display.drawLine(0, 25, 83, 25, BLACK);




I would try commenting out all the PID's except RPM and see if that updates at the correct rate.  Then add the others one at a time.  The long delay between readings sounds like one of the PID's isn't being supplied by the ECU or it's incorrectly defined.

DeWitt Payne

Thank you! I'll try it tomorrow.

I've commented out all the PIDs except RPM and it updates very fast, about ten times per second. The same happens with the other PIDs: if I only read one PID at a time, it works well. The problem occurs when I read two or more PIDs at a time. I've tried to add a delay between reading one PID and another with no success. What could be wrong?
Hi Stanley,

more ore less 2 years ago I bought one of yours obd2 to ttl adapter and I had some problems from the first time I tried it.
I wrote to you too, but the problem wasn't solved, then I had no time to work on it for a long time, and now I decided to try again.

I try to explain my problems:
when I connect it to the obd2 port of my car, the car get crazy saying "brake failure, stop immediately" while the engine is off and won't start again if I turn the key.
I think that something brings some car circuit to reset, anyway if I remove the adapter from the obd2 port, I close and re-open the car the problem disappears.

My car is a 2007 Volvo V50 (CAN bus) and I read that such a problem can be caused by a 12V-GND short circuit, for example.
I tested the connector, and there is no short circuit between pin 16 and 4 or 5, and pin 4 and 5 are connected.
What can I do more than that?

Hi Stanley, thank you for going on with the library!  :D
ABout my need on Fault Codes:
I seen you added

[code]void COBD::clearDTC()
receive(0, 1000);

That will do the reset. DO you have code also for getting the trouble codes? I aim to clear codes only on certain faults.
Thank you!
I am having problems with reading data after the car has been turned off and then back on again.  Originally, in my code it was set up in the examples like this:

void setup()

void loop()

This code worked correctly for me and I received the RPM values but if I turned my car off, when I restarted it no data was received until I reset the Arduino.  Once I reset the Arduino, it worked again but it is rather annoying and cumbersome to have to reset the Arduino every time I start my car.  I saw in the OBD library that there are functions such as "recover".  Could you please explain to me or help me understand how I can code this so that I do not have to reset the Arduino every time I turn off/on my car.

I also tried this but it didn't seem to help.

void setup()

void loop()
  if(obd.read(PID_RPM,RPM))  {
  else  {

I appreciate any feedback or help that you can provide.  I really enjoy using this product and want to be able to use it even more efficiently!  Thank you!
I'm not very familiar with OBD-II, but the rpm example sketch should work, or it's broken :?

conors891 wrote:I am testing the rpm example sketch on the website here http://arduinodev.com/hardware/obd-kit/ . My obd.init() keeps failing. Does anybody know how I can further troubleshoot. I'm using a 2008 ford focus and a 2000 fiat punto. Fails on both. Any help would be appreciated thanks

Looking at connecting this up to a TI tm4c123gg microcontroller. Wondering if the board will be compatible with the odb2 reader? I realize that the library will have to be written from scratch, so I'm also wondering how much time is involved with creating a basic library to grab tach readings?

Hi everyone,
I bought an obd-II uart adapter and noticed my cables colors are different from those published on the website.
In particular i have:
-red and black with coupled ends
-green and white with separated ends

while on the website I found:
-red (+) and black (gnd) separated
-yellow (rx) and white(tx) coupled (?)
(ref: http://freematics.com/pages/wp-content/uploads/2014/08/ArduinoTelematicsKit1-Wiring-1024x599.jpg )

I tried googling around but with no luck, I hope some of you can help me figure out this problem.
Thanks in advance,

  • 1
  • 5
  • 6
  • 7
  • 8
  • 9