Problems with reading with Arduino OBD-II Logger Kit #3

Inquiry and support for Freematics products
Gobla
Posts: 6
Joined: Fri Aug 08, 2014 3:24 am

Problems with reading with Arduino OBD-II Logger Kit #3

Post by Gobla »

Hi,

I've received the logger a few days ago but I am still struggling to read out a single car. I've successfully uploaded the firmware and after connecting the kit to the OBD port I get the screen stating the following:

- ACC check
- GPS check (searching)
- OBD error/cross

I've tried to connect with the following cars with either no key, key to acc2 and with a running engine:

- Alfa 156 1.6 2003 (EOBD/OBD2 certified CAN 500 kbit (29 or 11), with and without adapter cable to switch pin 6 to 1 and 14 to 9 pin 7 to 12, the rest was unmodified)
- Fiat Punto 2005 (EOBD/OBD2 certified CAN 29 /500 kbit with and without previous adapter cable)
- Fiat Panda 2003 (with and without previous adapter cable)
- Toyota Prius 1.5 (EOBD/OBD2 certified CAN 11 / 500 kbit no adapter cable).

Any reason why this might not work? I can image some of these cars not working due to strange pinout but I find it odd that none of these work so far.

Kind Regards,
Gobla
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by stanley »

Are you using I2C version or UART version adapter?
Gobla
Posts: 6
Joined: Fri Aug 08, 2014 3:24 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by Gobla »

I2C
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by stanley »

Please check if config.h has correct setup.
Gobla
Posts: 6
Joined: Fri Aug 08, 2014 3:24 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by Gobla »

My config looks like this:

Code: Select all

#ifndef CONFIG_H_INCLUDED
#define CONFIG_H_INCLUDED

/**************************************
* Choose model of OBD-II Adapter
**************************************/
// OBD_MODEL_I2C for I2C version
// OBD_MODEL_UART for UART version
#define OBD_MODEL OBD_MODEL_I2C
#define OBD_PROTOCOL 0 /* 0 for auto */

/**************************************
* Data logging options
**************************************/
// enable(1)/disable(0) data logging (if SD card is present)
#define ENABLE_DATA_LOG 1
#define SD_CS_PIN SS

/**************************************
* Data streaming options
**************************************/
// enable(1)/disable(0) data streaming
#define ENABLE_DATA_OUT 1

// uses software(1)/hardware(0) serial for data streaming
#define USE_SOFTSERIAL 0

// this defines the format of data streaming
// FORMAT_BIN is required by Freematics OBD iOS App
#define STREAM_FORMAT FORMAT_CSV

/* Default streaming baudrates:
   9600bps for BLE
   38400bps for BT 2.1
*/
#define STREAM_BAUDRATE 9600

// outputs debug information
#define VERBOSE 0

/**************************************
* GPS configuration
**************************************/
#define USE_GPS 1
#define GPSUART Serial2
#define MAX_GPS_PROCESS_TIME 50 /* ms */
#define GPS_BAUDRATE 38400 /* bps */
//#define GPS_OPEN_BAUDRATE 4800 /* bps */

/**************************************
* Accelerometer & Gyro
**************************************/
#define USE_MPU6050 1
#define ACC_DATA_RATIO 160
#define GYRO_DATA_RATIO 256

/**************************************
* Timeout/interval options
**************************************/
#define OBD_MIN_INTERVAL 20 /* ms */
#define ACC_DATA_INTERVAL 200 /* ms */
#define GPS_DATA_TIMEOUT 2000 /* ms */

/**************************************
* LCD module (uncomment only one)
**************************************/
LCD_SSD1289 lcd; /* 3.2" SSD12389 based TFT LCD */
//LCD_ILI9325D lcd; /* 2.8" ILI9325 based TFT LCD */
//LCD_ILI9341 lcd; /* 2.4" ILI9341 based SPI TFT LCD */
//LCD_Null lcd;

#endif
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by stanley »

Looks all good. Since ACC has tick, the MPU6050 onboard is connected via I2C. Can you try any newer cars?
Gobla
Posts: 6
Joined: Fri Aug 08, 2014 3:24 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by Gobla »

I have no newer car available to test this on right now. So I have to get back at this in a few days/weeks.

In the meanwhile is there an option to show the RAW commands that are send and received with the car?
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by stanley »

You can modify the code and outputs anything you want to know via Serial.
Gobla
Posts: 6
Joined: Fri Aug 08, 2014 3:24 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by Gobla »

I've figured it out!
Using your latest code and some modifications I got it working like a charm.

First of all the protocol was KWP2000Fast so in config.h I used:

Code: Select all

#define OBD_PROTOCOL PROTO_KWP2000_FAST


Futhermore the init is slightly different (obd.cpp)

Code: Select all

const char *initcmd[] = {"ATZ\r","ATE0\r","ATL0\r"};


And I added the following code in obd.cpp after the first "while (available()) read();" in bool COBD::init(byte protocol)

Code: Select all

           write("ATSH");
           write('08110F1');
           write('\r');
           receive(buffer);
           delay(50);
   while (available()) read();


Source on these init codes: http://www.mp3car.com/engine-management ... p2000.html

So this works for the alfa 156, but possible ALL ECU's in Fiat, Alfa, Lancia with the ECU: Bosch M1.5.5
Mcsquizzy
Posts: 8
Joined: Fri Oct 10, 2014 11:25 am

Re: Problems with reading with Arduino OBD-II Logger Kit #3

Post by Mcsquizzy »

Do you think you could post the OBD.cpp file you used?
Post Reply