Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 16
61  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 30, 2012, 11:38:21 am
And when I put these:

ATWS


ELM327 v1.3a

>ATDPN
A3

>0100
41 00 BF 9F F9 91

>
62  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 30, 2012, 11:35:39 am
For BMW 3 series 2004.

When I put ATZ, then ATSP0, then 0100 I get these:

0100
SEARCHING...
41 00 BF 9F F9 91
41 00 80 00 00 00

>

So we know it was the car, and not the board.
63  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 29, 2012, 12:40:58 pm
I don't know but can have a look.

64  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 29, 2012, 11:23:13 am
I bought an OBDII to DB9 cable from eBay. I have checked the pins and are exactly like this one:

http://www.sparkfun.com/products/10087

However on the OBD connector, pin 5 is connected to pin 4. Pin 5 on the OBDII connector is not connected to pin 1 of the DB9 connector.
65  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 29, 2012, 10:44:48 am
Hi,

I am sure my car has OBDII, all the Golf MK4's have them.

I am can try tomorrow with my brother's 2004 BMW 3 series and his Jaguar XF 2008.

Thanks.
66  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 29, 2012, 10:15:35 am
This is what I get:

ATWS


ELM327 v1.3a

>

ATDPN
A

>

0100
CAN ERROR

>
67  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 29, 2012, 07:34:48 am
When I do the above test I get:

0100
CAN ERROR

>

 smiley-cry
68  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 28, 2012, 04:56:47 pm
Thanks,

I will try it tomorrow.

I have always either had the key turned to ON or had the car running when testing everything smiley

Thanks.
69  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 28, 2012, 12:34:51 pm
Ok,

With the Arduino's terimnal, baud rate set at 9600 and with "carriage return" set.

When I put ATZ I get this back:

ATZ

ELM327 v1.3a

>

When I put ATRV I get this back:

ATRV
12.8V

>

When I put ATSP0 I get this back:

ATSP0
OK

>

When I put 0100, however, I get this back:

0100
SEARCHING...
UNABLE TO CONNECT

>
70  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 28, 2012, 12:23:29 pm
I've also used the Arduino's serial monitor. When I type something and press enter, I don't get any packets back.

I have crossed the RX and TX lines also.
71  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 28, 2012, 06:18:42 am
Thank you all of you for your prompt and useful replies.

I have been trying to use a Terminal Emulator program to see what packets I get back from my car without any success.

I use the "Tera Term" on Windows 7, I successfully connect to my FTDI Basic, but when the emulator window appears, I cannot type anything.

I know this is an issue altogether, but would help to see what others have experienced or what terminal emulator they use.

Thanks.
72  Using Arduino / Networking, Protocols, and Devices / Re: OBDII to UART Issues on: June 26, 2012, 05:54:28 pm
I've used the code form this page and modified it, since I'm not using a serial LCD.

http://www.sparkfun.com/tutorials/294
73  Using Arduino / Networking, Protocols, and Devices / OBDII to UART Issues on: June 26, 2012, 05:09:48 pm
Hi everyone.

I am using an OBDII to UART device from Sparkfun: http://www.sparkfun.com/products/9555

My wiring is the same as this but I am not using a serial LCD. I am wiring it using the LiquidCrystal library.


My car is a Golf Mk4, year 1999.

The issue is I cannot get live data such as speed or RPM from the ECU. With everything connected to the OBDII port of the car and the Arduino powered with my laptop and the car switched on, I get 0 for speed no matter if I drive the car or not and always 832 for the RPM  smiley-confuse

Here is the code I am using:-

Code:
#include <LiquidCrystal.h>

LiquidCrystal lcd(26,28,30,32,34,36);

//This is a character buffer that will store the data from the serial port
char rxData[20];
char rxIndex=0;

//Variables to hold the speed and RPM data.
int vehicleSpeed=0;
int vehicleRPM=0;

void setup(){

  lcd.begin(4, 20);   

  Serial.begin(9600);
 
  //Clear the old data from the LCD.
  lcd.clear();
 
  //Put the speed header on the first row.
  lcd.setCursor(0,0);
  lcd.print("Speed: ");

  //Put the RPM header on the second row.
  lcd.setCursor(0,1);
  lcd.print("RPM: ");

  //Wait for a little while before sending the reset command to the OBD-II-UART
  delay(1500);

  //Reset the OBD-II-UART
  Serial.println("ATZ");

  //Wait for a bit before starting to send commands after the reset. 
  delay(2000);
 
  //Delete any data that may be in the serial port before we begin.
  Serial.flush();
}


void loop(){
  //Delete any data that may be in the serial port before we begin. 
  Serial.flush();

  //Query the OBD-II-UART for the Vehicle Speed
  Serial.println("010D");
  //Get the response from the OBD-II-UART board. We get two responses
  //because the OBD-II-UART echoes the command that is sent.
  //We want the data in the second response.
  getResponse();
  getResponse();
  //Convert the string data to an integer
  vehicleSpeed = strtol(&rxData[6],0,16);
  //Print the speed data to the lcd
  lcd.setCursor(10,0);
  lcd.print(vehicleSpeed);
 
  lcd.setCursor(16,0);
  lcd.print("km/h");
  delay(100);
 
  //Delete any data that may be left over in the serial port.
  Serial.flush();

  //Query the OBD-II-UART for the Vehicle rpm
  Serial.println("010C");
  //Get the response from the OBD-II-UART board
  getResponse();
  getResponse();
  //Convert the string data to an integer
  //NOTE: RPM data is two bytes long, and delivered in 1/4 RPM from the OBD-II-UART
  vehicleRPM = ((strtol(&rxData[6],0,16)*256)+strtol(&rxData[9],0,16))/4;
  //Print the rpm data to the lcd
  lcd.setCursor(10,1);
  lcd.print(vehicleRPM);

  //Give the OBD bus a rest
  delay(100);
 
}



void getResponse(void){
  char inChar=0;
  //Keep reading characters until we get a carriage return
  while(inChar != '\r'){
    //If a character comes in on the serial port, we need to act on it.
    if(Serial.available() > 0){
      //Start by checking if we've received the end of message character ('\r').
      if(Serial.peek() == '\r'){
        //Clear the Serial buffer
        inChar=Serial.read();
        //Put the end of string character on our data string
        rxData[rxIndex]='\0';
        //Reset the buffer index so that the next character goes back at the beginning of the string.
        rxIndex=0;
      }
      //If we didn't get the end of message character, just add the new character to the string.
      else{
        //Get the new character from the Serial port.
        inChar = Serial.read();
        //Add the new character to the string, and increment the index variable.
        rxData[rxIndex++]=inChar;
      }
    }
  }
}


Any ideas at all? Anyone has had any experience with this at all?
74  Using Arduino / General Electronics / Re: AFR Controller and LCD issues on: June 16, 2012, 02:18:02 am
There's also a black negative cable from the AFR controller, which I've connected to GND of the Arduino board.
75  Using Arduino / General Electronics / AFR Controller and LCD issues on: June 15, 2012, 03:03:40 pm
Hi everyone.

I have an Innovate LC-1 AFR controller for my car. It has a wire which outputs 0-5 volts suitable for calculating AFR (Air Fuel Ratio) with a microcontroller or be connected to a gauge or something. This wire is connected to one of the analog inputs of my Arduino Duemilanove.

I have set my Arduino Duemilanove up with a 20x4 blue LCD and used the LiquidCrystal library to print some stuff on it, including the AFR value that I get from the controller.

The problem is, with the above setup, after a while the LCD shows unreadable characters. Restart the Arduino and everything is fine for a while again.

When I disconnect the AFR 0-5 volts output wire from the Arduino analog input, everything seems to be fine.

What could be the issue here? Anyone has ever experienced anything like this before?

Someone told me I can use an OpAmp, but unsure how to or even why I should?

Any help is appreciated. Thanks.
Pages: 1 ... 3 4 [5] 6 7 ... 16