OBD-II Adapter (UART) doesn't work on ISO9141-2

Inquiry and support for Freematics products
Post Reply
giulio
Posts: 11
Joined: Tue Aug 19, 2014 7:17 am

OBD-II Adapter (UART) doesn't work on ISO9141-2

Post by giulio »

I tried to make the adapter working on my motorcycle (protocol ISO9141-2) by running the simple RPM program provided as example but it doesn't work. I double checked all the wiring and all is perfect. No reading from the ECU, with motor on, off, at high rpm, at low rpm... nothing.

I made another attempt: I've inverted the logic of the program to turn on the led 13 when RPM are lower than 3000 and turn it off at higher values. Again no results, the led stays off :cry:

I thought that maybe the problem is located in the initialization phase, so I modified the program to turn on the led during the init (the setup function) and turn it off at the end (see code below).
After uploading the program, I can see clearly the led turning on and off but after... nothing happens.
As further step I have inserted also other debug "flashing led code" inside the IF statement but no results, as I understand the instruction obd.read(PID_RPM, value) always returns the false value.

Please note that I can read OBD2 codes on my motorcycle by using my notebook and a simple (freeware) program. Maybe the adapter does not work on protocol ISO9141-2???
Any clue?

Code: Select all

/*************************************************************************
* Sample sketch based on OBD-II library for Arduino
* Distributed under GPL v2.0
* Visit http://freematics.com for more information
* (C)2012-2014 Stanley Huang <stanleyhuangyc@gmail.com>
*************************************************************************/

#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>

COBD obd;

void setup()
{
  // we'll use the debug LED as output
  pinMode(13, OUTPUT); 
  digitalWrite(13,HIGH); // debug: turn the led ON when init starts

  // start communication with OBD-II UART adapter
  obd.begin();
 
  // initiate OBD-II connection until success
  while (!obd.init()); 
  digitalWrite(13,LOW);  // debug: turn the led OFF when init ends
}

void loop()
{
  int value;
  if (obd.read(PID_RPM, value)) {
    // RPM is successfully read and its value stored in variable 'value'
    // light on LED when RPM exceeds 3000
    digitalWrite(13, value < 1800 ? HIGH : LOW);
  }
}
dcolemans
Posts: 5
Joined: Thu Sep 25, 2014 3:06 am

Re: OBD-II Adapter (UART) doesn't work on ISO9141-2

Post by dcolemans »

I don't see any reply to your question/problem. I just got my OBD-II I2C Adapter and am relying on on ISO9141 protocol (2004 Prosche Boxster S 986), and trying the test RPM program also. My symptom is that when first plugged in the adapter does its blue flashing for a few seconds and then quits. I tried it several times and on occasion, if I rev the engine to 3000 before the blue flashing quits, the pin 13 LED does light up. I got this to work a couple of times, but not reliably. The problem could be related to yours.

So it sort of works. Anyone with any ideas here? Stanley?
Last edited by dcolemans on Sat Oct 04, 2014 11:34 am, edited 1 time in total.
kyr
Posts: 5
Joined: Sat Sep 13, 2014 5:40 am

Re: OBD-II Adapter (UART) doesn't work on ISO9141-2

Post by kyr »

I am afraid I have a similar problem with ISO9141-2. I have the V2 with the embedded GPS. It works ok when I plug it in, but sometimes it simply stops logging, due to the init() function. In any case, when I switch the engine off and then ON, it never initiates again. I am afraid it has to do with the ISO9141-2 protocol.
I will test in another car, to see if this happens as well.

BR
stanley
Site Admin
Posts: 1034
Joined: Sat Mar 01, 2014 3:15 am

Re: OBD-II Adapter (UART) doesn't work on ISO9141-2

Post by stanley »

You mean it works for a very short time after plugged in?
dcolemans
Posts: 5
Joined: Thu Sep 25, 2014 3:06 am

Re: OBD-II Adapter (UART) doesn't work on ISO9141-2

Post by dcolemans »

My adapter works for a short time (a few seconds) and than stops working. Sometimes it works long enough for me to see that the LED sketch does light the LED at 3000 RPM. So it does have communication and does get the RPM data for a short time. Any ideas why it would stop after a few seconds?
Post Reply