Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 05-21-2008, 08:41 PM   #161 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Is your code posted somewhere? I've got the rs232 elm thing and a serial duino, I could at least see if it works any better for me, especially if it works with a guino compatable LCD hookup. Eventually I'd like to dissect my rs232 thing and package the elm chip with a duino, but for now it is rs232.

Edit: you might want to start a guinobd thread or something to collect the obd bits.

__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 05-21-2008 at 08:49 PM..
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-21-2008, 11:24 PM   #162 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: St. Louis
Posts: 28

silverciv - '01 Honda Civic EX 2dr
90 day: 36.13 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Well, I never got past a few tests.

I was using some test code which simply requests RPM when a button is pressed. It also uses my serial LCD using the software serial library.

Before I experienced some hardware problems, I could send ELM specific commands and receive the output but, the OBD commands would result in "BUS INIT:...>" with no error or anything but then the next command would do the same thing.
Code:
#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3
#define fButtonPin 4
#define keyWait 200

SoftwareSerial LCD = SoftwareSerial(rxPin, txPin);

void setup() {
  // define pin modes for tx, rx, led pins:
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  
  // start serial connections
  LCD.begin(9600);
  Serial.begin(9600);
  
  // setup button and turn on the internal pull-up resistor
  pinMode(fButtonPin, INPUT);
  digitalWrite(fButtonPin, HIGH);
  
  // set ELM to formated data
  Serial.println("ATFD");
  // turn off command echo
  Serial.println("ATE0");
  
  LCD.print("?a?fELM OUT:?n");
  // reset the ELM
  Serial.println("ATZ");
}

void loop() {
  char temp;
  // if there is something waiting on the serial connection, get that and send to LCD
  while(Serial.available()) {
    temp = Serial.read();
    LCD.print(temp);
  }
  
  // if the front button was pressed, send the ELM command
  if(digitalRead(fButtonPin) == LOW) {
    delay(keyWait);
    LCD.print("?a?f"); // clear the LCD and reset cursor
    Serial.println("010c"); // ask for the engine RPM
  }
}
__________________
  Reply With Quote
Old 05-21-2008, 11:28 PM   #163 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Quote:
Originally Posted by jmonroe View Post
It also uses my serial LCD using the software serial library.
Aha! The serial LCD is conflicting with the serial elm323?

Edit, oops, no different pins. Let me see if I can adapt it to the parallel lcd...

Edit 2: That SoftwareSerial looks handy.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 05-21-2008 at 11:36 PM..
  Reply With Quote
Old 05-21-2008, 11:39 PM   #164 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: St. Louis
Posts: 28

silverciv - '01 Honda Civic EX 2dr
90 day: 36.13 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
That SoftwareSerial looks handy.
It doesn't work very well for receiving because it doesn't have Serial.available(). Instead, Serial.read() waits till it has input.
__________________
  Reply With Quote
Old 05-22-2008, 12:38 AM   #165 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Ok, well I'm getting something.
the first 010c gives me the BUS INIT:

but the subsequent 010c calls are giving me a string with some hex numbers on the end that seem porportional to RPM. There are some strange characters in the string, but definately a rpm signal too.

Hmm... Have you tried any other OBD devices on your car lately?

edit, also, the E0 is being reset to E1 by the ATZ.

Edit, also the bus can take a little while to initialize.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 05-22-2008 at 01:03 AM..
  Reply With Quote
Old 05-22-2008, 10:04 AM   #166 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: St. Louis
Posts: 28

silverciv - '01 Honda Civic EX 2dr
90 day: 36.13 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
The only OBD device I have used on my car was the ELM323 connected to a computer and it worked with no problems.

I hope to do some work on it tonight.

So, you were using the Serial Freeduino with the RS232 connector connected directly to the ELM's output. I may have to get a Serial Freeduino to give that a shot if I can't get my Deciema with MAX233 to work.
__________________
  Reply With Quote
Old 05-22-2008, 10:14 PM   #167 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: St. Louis
Posts: 28

silverciv - '01 Honda Civic EX 2dr
90 day: 36.13 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
I got my hardware working again. If others are attempting the same thing, make sure you note that the MAX233 needs to have the internal capacitors wired differently than the MAX233A.

I am still getting the same issue with bus initialization. I don't get an OK or FAILED. I just get the prompt character again and then it repeats on the next command.

dcb, could you post the code that you used or message it to me.
__________________
  Reply With Quote
Old 05-27-2008, 12:52 AM   #168 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
I couldn't PM it to you, it was too big, it was basically your code grafted over mpguino for all the parallel lcd stuff. Given the strange characters I saw, I wonder if a test with laptop receiving the data from the duino via the softwareserial object, instead of the lcd, might help narrow down the problem.

I'm sure you have tried other pins for SoftwareSerial.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 05-27-2008, 10:54 AM   #169 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: St. Louis
Posts: 28

silverciv - '01 Honda Civic EX 2dr
90 day: 36.13 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
I couldn't PM it to you, it was too big, it was basically your code grafted over mpguino for all the parallel lcd stuff. Given the strange characters I saw, I wonder if a test with laptop receiving the data from the duino via the softwareserial object, instead of the lcd, might help narrow down the problem.

I'm sure you have tried other pins for SoftwareSerial.
Hmm, I don't get any strange characters. My communication with the ELM appears to be perfect but, the ELM's communication with the car ceases to work when I am connected to the arduino, it works just fine however, when connected to the PC.
__________________
  Reply With Quote
Old 05-28-2008, 10:16 PM   #170 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
I just wonder if there is a way to rule the softwareserial out.

Like teach pin 13 LED morse code instead and send the data there without the LCD or anything else but the elm connected?


__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
SuperMID - Fuel Economy Display SVOboy Instrumentation 25 05-15-2015 10:16 PM
How to calculate MPG / fuel economy formula MetroMPG DIY / How-to 29 11-25-2013 07:47 PM
What features on your ULTIMATE fuel economy instrumentation? MetroMPG Instrumentation 41 05-12-2012 02:14 PM
Why SUV fuel economy is so much more important than small car fuel economy... SVOboy General Efficiency Discussion 30 02-23-2009 07:26 PM
Basic EcoDriving Techniques and Instrumentation SVOboy Instrumentation 2 11-17-2007 12:38 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com