#5863
[quote="robot"]
The Torque discussion indicates a formula of AC-40, which indicates you grab the 1st and 3rd bytes, multiply them, and subtract 40.
[/quote]
Looks more like you take the 29th byte and subtract 40.
Mode 2 PIDs should be the same like Mode 1 PID according to wiki, I haven't really found documentation how the OBD2-mode is encapsulated in the Torque PID field.
#5864
Anybody else have a problem with vibration noise?  My Mustang is set up for autocrossing so the shock settings are rather stiff.  The accelerometer noise is about an order of magnitude larger when the car is moving than when it's stopped.  That's a problem if I want to sample the accelerometer and gyro at a high rate and do sensor fusion to interpolate position and speed between gps updates.  Has anyone tried using a lower frequency Low Pass Filter setting on the MPU-6050?  I'm not sure how one would go about doing that during the init cycle.

It doesn't look like it's possible to add vibration isolation to the device directly, so the alternative would be an extension cable and remote mounting with vibration isolating materials.

Edit:  Setting the LPF turned out to be fairly simple.  I put the following lines in MPU6050.cpp after line 158 that clears the 'sleep' bit:[code] // Set the LPF to 21 Hz
MPU6050_write_reg (MPU6050_DLPF_21HZ, 1);[/code]
#5865
[quote="vivimice"]
Hi, @stanleyhuang

How much current while the adapter consumed when it is idle ?

Or, is there any way to put the adapter into power-saving mode. Since I don't what to plug/unplug the adapter every time when i start/stopped the engine, otherwise the battery may drained out if I park the car for a few days or weeks.

Thanks in advance.
[/quote]

[quote="r0tor"]
With the power consumption issues while the car if off and the fact that it seems I must always plug in my adapter after the ignition is ON - is it possible to rewire the adapter so it receives power from the arduino 5V pin rather then supply it?

this way the arduino could be wired to a switched 12V circuit and the kit would automatically have its power cut when the ignition is OFF, and automatically first establish communications when the ignition is ON
[/quote]

Have these questions been answered yet? I am looking to buy one of these but it won't do me much good if I have to unplug it when the car is off like other OBD2 adapters I've tried. Would it be possible to sell a "passive" version that requires power from another source? I can easily provide switched 12V or 5V from somewhere else in my car, then I wouldn't need to worry about current draw when the ignition is off.

Thanks!
#5867
[quote="stanleyhuang"]
When in idle, it consumes about 30mA.
[/quote]

That's 0.7 Ampere hours / day.  For your average car battery, that would discharge the battery by as much as 10-20% in a month, possibly much less because the battery capacity increases as the current decreases.  Obviously, that's not a problem for a daily drive.
#5868
[quote="dookie454"]
I cannot get any of the code to verify, even the RPM Led UART example...  I use IDE 1.0.3 and 1.5.5, both have same errors..  Any suggestions?    I made sure OBD.cpp and OBD.h are included...    thanks


OBD.cpp: In member function 'void COBDI2C::begin(byte)':
OBD.cpp:333: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'virtual void COBDI2C::write(char*)':
OBD.cpp:369: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'bool COBDI2C::sendCommand(byte, uint8_t, byte*, byte)':
OBD.cpp:378: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'virtual byte COBDI2C::receive(char*)':
OBD.cpp:390: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'bool COBDI2C::btReceive(byte*, byte)':
OBD.cpp:429: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'bool COBDI2C::gpsQuery(GPS_DATA*)':
OBD.cpp:438: error: 'Wire' was not declared in this scope
[/quote]

Hi

I have the exact same error.
I'm using :
[list]
[*] Freematic ODB-II Adapter for Arduino - Model A (UART) bought here
[url=http://arduinodev.com/store/index.php?route=product/product&manufacturer_id=8&product_id=30]http://arduinodev.com/store/index.php?route=product/product&manufacturer_id=8&product_id=30[/url]
[*]Arduino Mega 2650 (last model)
[*]Arduino IDE v1.0.5
[*]Latest OBD library downloaded on GitHub (I even tried to revert to older versions without success). And I'd rather mention that I installed the library correctly.
[/list]

Please someone help me !

I also noticed that my cable colors are [b]DIFFERENT[/b] from the one found on your website.
I have
[list]
[*]red (obviously VCC)
[*]black (obviously GRND)
[*][b]WHITE[/b]
[*][b]YELLOW[/b]
[/list]
Which one is TX and which one is RX ? is the white one supposed to be the blue one ??


Thanks in advance for your help.
#5869
[quote="AlienSKP"]
[quote="dookie454"]
I cannot get any of the code to verify, even the RPM Led UART example...  I use IDE 1.0.3 and 1.5.5, both have same errors..  Any suggestions?    I made sure OBD.cpp and OBD.h are included...    thanks
OBD.cpp: In member function 'void COBDI2C::begin(byte)':
[b]OBD.cpp:333: error: [size=12pt]'Wire'[/size] was not declared in this scope[/b]

[/quote]


I also noticed that my cable colors are DIFFERENT from the one found on your website.
I have
[list]
[*]red (obviously VCC)
[*]black (obviously GRND)
[*]WHITE
[*]YELLOW
[/list]
Which one is TX and which one is RX ? is the white one supposed to be the blue one ??
Thanks in advance for your help.
[/quote]
Seems pretty much self explaining to me.
[code]#include <Wire.h>[/code]
And you're good to go, also you shouldn't include OBD.cpp, just OBD.h and Wire.h.

On my Freematics V2 with I2C Output yellow is yellow and white is blue, so I guess should be the same for you.
#5870
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()  {
  kmh=0;
  temperature=0;
  rpm=0;
  charge=0;
 
  display.begin();
  display.setContrast(50);
  display.clearDisplay();
 
  // start communication with OBD-II UART adapter
  obd.begin();
  // 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);
  obd.read(PID_HYBRID_BATTERY_PERCENTAGE, charge);

  //Display data
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(3,0);
  display.print(kmh);
  display.setCursor(53,0);
  display.print(temperature);
  display.setTextSize(1);
  display.setCursor(10,16);
  display.print("km/h");
  display.setCursor(53,16);
  display.print("Temp");
  display.drawLine(0, 25, 83, 25, BLACK);
  display.setCursor(0,28);
  display.setTextSize(1);
  display.print(rpm);
  display.println("rpm");
  display.setCursor(0,38);
  display.print(charge);
  display.print("%");
  display.display();

  delay(100);

}
[/code]

Thanks!
#5871
[quote="alf"]
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()  {
  kmh=0;
  temperature=0;
  rpm=0;
  charge=0;
 
  display.begin();
  display.setContrast(50);
  display.clearDisplay();
 
  // start communication with OBD-II UART adapter
  obd.begin();
  // 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);
  obd.read(PID_HYBRID_BATTERY_PERCENTAGE, charge);

  //Display data
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(3,0);
  display.print(kmh);
  display.setCursor(53,0);
  display.print(temperature);
  display.setTextSize(1);
  display.setCursor(10,16);
  display.print("km/h");
  display.setCursor(53,16);
  display.print("Temp");
  display.drawLine(0, 25, 83, 25, BLACK);
  display.setCursor(0,28);
  display.setTextSize(1);
  display.print(rpm);
  display.println("rpm");
  display.setCursor(0,38);
  display.print(charge);
  display.print("%");
  display.display();

  delay(100);

}
[/code]

Thanks!
[/quote]

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
#5873
[quote="DeWitt"]
[quote="alf"]
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()  {
  kmh=0;
  temperature=0;
  rpm=0;
  charge=0;
 
  display.begin();
  display.setContrast(50);
  display.clearDisplay();
 
  // start communication with OBD-II UART adapter
  obd.begin();
  // 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);
  obd.read(PID_HYBRID_BATTERY_PERCENTAGE, charge);

  //Display data
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(3,0);
  display.print(kmh);
  display.setCursor(53,0);
  display.print(temperature);
  display.setTextSize(1);
  display.setCursor(10,16);
  display.print("km/h");
  display.setCursor(53,16);
  display.print("Temp");
  display.drawLine(0, 25, 83, 25, BLACK);
  display.setCursor(0,28);
  display.setTextSize(1);
  display.print(rpm);
  display.println("rpm");
  display.setCursor(0,38);
  display.print(charge);
  display.print("%");
  display.display();

  delay(100);

}
[/code]

Thanks!
[/quote]

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
[/quote]

Thank you! I'll try it tomorrow.
  • 1
  • 5
  • 6
  • 7
  • 8
  • 9