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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 02-15-2009, 10:20 AM   #311 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
When the RPM goes to 0, I save all trip data into the EEPROM, no need of a button cell, and EEPROM can be saved 100'000 times.

Also for the CAN version I can put it in sleep mode and it will be woken up when there is activity on the bus. It will draw a few µA only.

__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 02-16-2009, 09:00 PM   #312 (permalink)
EcoModding Lurker
 
Join Date: Oct 2008
Location: nova scotia
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
RPM will never reach zero

The RPM will never reach zero with the configuration I have. I am using the iso version(not using elm chip), and as soon as the car is shut off, the communication stops with the obduino and the obduino "freezes". (I guess the ecu doesn't run when you put the car to acc.)

I assume this is because it is getting stuck trying to receive a data packet from the car and that it can not go any father or save the data once the car is shut off because it will always be waiting for a packet.

looking at the code in the receive data function there is a line of code that is something like while(receive()==-1).

Would it be hard for there to be a timeout function added. and upon failure it will save its trip data and reset itself so it can attempt to reinitialize with the car?
  Reply With Quote
Old 02-17-2009, 09:16 AM   #313 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
Interesting, on my car when I shut down the engine, the ECU still answer for maybe 5 seconds before giving a timeout.

Yes in the receive function, a timeout should be inserted in the while, something like:
Code:
int iso_read_byte()
{
  byte t=0;
  int b;

  while(t!=500 && (b=serialRead())==-1)
  {
    delay(1);
    t++;
  }
  return b;
}
and the result of the function should be tested, if it's -1 it's a timeout
__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Old 02-17-2009, 11:46 AM   #314 (permalink)
EcoModding Lurker
 
Join Date: Oct 2008
Location: nova scotia
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
Thanks for the quick reply, I will test it out.

Just a side not, the limit should be less then 256 not 500 if we are going to use a byte for t.
  Reply With Quote
Old 02-17-2009, 12:19 PM   #315 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
lol yes you are right for the type, put either an int or put the limit to 255
__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Old 02-17-2009, 09:53 PM   #316 (permalink)
EcoModding Lurker
 
Join Date: Oct 2008
Location: nova scotia
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
I just modified it to this, and now it saves the trips and will even resume reading the data once the car is turned on.

Code:
int iso_read_byte()
{
  int b;
  byte t=0;
  while(t!=250 && (b=serialRead())==-1) {
    delay(1);
    t++;
  }
  if (t>=250) {
    b = 0;
  }
  return b;
}
*Bug* This works great. The only problem is that once the car is turned off, throttle position is going to be reported as 0. this means that engine breaking will no long be accounted for. That should be taken into consideration else where in the code if you use this (i.e. reset the throttle position minimum value when ever the car is started up again.)

Last edited by electromike; 03-03-2009 at 08:07 AM.. Reason: found a bug
  Reply With Quote
Old 02-19-2009, 08:41 AM   #317 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Rochester, NY
Posts: 4

The Altima - '97 Nissan Altima GXE
90 day: 20.34 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
I'm currently porting this software to the Sanguino under the Arduino version 0013 software. But, I'm having trouble getting the MCZ33290EF interface IC. Mouser and Digikey are sold out, and the best estimate was a May delivery time. Does anyone know where I can get one of these
  Reply With Quote
Old 02-19-2009, 09:19 AM   #318 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 Posts
You can get up to 2 of them for free from Freescale Electronics as a "sample."

Last edited by Nevyn; 02-19-2009 at 09:19 AM.. Reason: grammar police
  Reply With Quote
Old 02-21-2009, 06:07 PM   #319 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Toronto, ON
Posts: 1

Passat - '09 VW Passat
Last 3: 29.89 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all,

I'm pretty new with arduino coding, and have been away from coding in general for a few years. I just downloaded version 121 of the source code and tried compiling it but I get an error:
In function ‘void params_save()’:
error: invalid conversion from ‘const void*’ to ‘void*

with reference to this line:
eeprom_write_block((const void*)&params, (void*)0, sizeof(params_t));

Can anyone lend a hand? I haven't changed the code and am tried to compile for ISO. I tried Arduino-0011 to 0013.

Thanks.
__________________

  Reply With Quote
Old 02-22-2009, 06:23 AM   #320 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Rochester, NY
Posts: 4

The Altima - '97 Nissan Altima GXE
90 day: 20.34 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Justin K View Post
Hi all,

I'm pretty new with arduino coding, and have been away from coding in general for a few years. I just downloaded version 121 of the source code and tried compiling it but I get an error:
In function ‘void params_save()’:
error: invalid conversion from ‘const void*’ to ‘void*

with reference to this line:
eeprom_write_block((const void*)&params, (void*)0, sizeof(params_t));

Can anyone lend a hand? I haven't changed the code and am tried to compile for ISO. I tried Arduino-0011 to 0013.

Thanks.
Heh, I'm having the same problem using 0013A on Mac OSX. My friend successfully compiled for the Arduino Duemilanove on version 0012 under Windows XP though...

__________________
Man, I hate winter.

Last edited by CranberrySauce; 02-22-2009 at 06:25 AM.. Reason: clarification
  Reply With Quote
Reply  Post New Thread


Tags
obd2

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1061 01-17-2020 01:37 AM
Just some quick info on Scangauge vs. MPGuino NoCO2 OpenGauge / MPGuino FE computer 4 06-01-2015 04:58 PM
All New Nissan Models to Feature Fuel Efficiency Gauge MetroMPG General Efficiency Discussion 6 11-18-2008 04:57 PM
Vacuum gauge problems :( DifferentPointofView Instrumentation 3 05-14-2008 11:04 PM
Will Scan Gauge work on mine? bennelson Instrumentation 9 02-19-2008 10:04 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