Fuelly Forums

Fuelly Forums (https://www.fuelly.com/forums/)
-   Experiments, Modifications and DIY (https://www.fuelly.com/forums/f9/)
-   -   OBDII CarPC MPG Calculator (https://www.fuelly.com/forums/f9/obdii-carpc-mpg-calculator-6286.html)

Fourthbean 10-04-2007 05:51 AM

OBDII CarPC MPG Calculator
 
2 Attachment(s)
Some of you may have seen my previous thread about my CarPC, things are going well and I am ready to start working on the code to get MPG calculated out of the sensor data from my OBDII port.

HERE is a link to the other thread if you want to know what I am working with here.

The important part is the scanner, which is an ElmScan 322 from www.scantools.net. This device is for my 2000 Saturn SL.

I have found a perl program that was last updated in 2003 which should do basic polling of data from the port (I don't really know what is going on, just guessing here). This program and source can be found HERE I will also attach the zip in case the site goes down.

This program does not appear to pull any data involving injector pulses. I am going to try and hook up to my obdII port while running a program like Hyperterminal to see if I can tell what all data is coming out of it. I have not had much of a chance to mess with it yet but I am hoping to get some support on the programming side as this is quite new to me :).

Also, if you think I should start with a different program let me know. I could change.

Another I had considered was JDash, it is based on Java but the programmer said that his program did not do anything but look at realtime data so calculating values off of the data that came in was beyond it. Not sure if that is a limitation of Java or just his program or what. I am not knowledgeable enough to know.

Something cross platform would be great in case someone else here wanted to run something on a Windows machine and could put to use some of what we figure out here.

Here is a section of the code, this is what appears to be the extent of the data that this perl script is programmed to grab, this is from the .ini file:

Code:

# Enable PID = 1, Disable PID = 0

$PID01 = 1;                # Number of trouble codes and test information
$PID03 = 1;                # Fuel system status
$PID04 = 1;                # Engine load %
$PID05 = 1;                # Coolant temp
$PID06 = 1;                # Short term fuel trim %, Bank 1
$PID07 = 1;                # Long term fuel trim %, Bank 1
$PID08 = 1;                # Short term fuel trim %, Bank 2
$PID09 = 1;                # Long term fuel trim %, Bank 2
$PID0A = 1;                # Fuel Pressure
$PID0B = 1;                # Intake manifold pressure
$PID0C = 1;                # Engine RPM
$PID0D = 1;                # Vehicle speed
$PID0E = 1;                # Timeing advance degrees
$PID0F = 1;                # Intake air temp
$PID10 = 1;                # MAF air flow
$PID11 = 1;                # Absolute trottle position
$PID12 = 1;                # Sec. air status
$PID14 = 1;                # Oxygen sensor voltage, Bank1, sensor 1
$PID15 = 1;                # Oxygen sensor voltage, Bank1, sensor 2
$PID16 = 1;                # Oxygen sensor voltage, Bank1, sensor 3
$PID17 = 1;                # Oxygen sensor voltage, Bank1, sensor 4
$PID18 = 1;                # Oxygen sensor voltage, Bank2, sensor 1
$PID19 = 1;                # Oxygen sensor voltage, Bank2, sensor 2
$PID1A = 1;                # Oxygen sensor voltage, Bank2, sensor 3
$PID1B = 1;                # Oxygen sensor voltage, Bank2, sensor 4

My main goal here is to get instant/trip/tank etc. MPG figures. Of course once instant and trip is figured out everything else should be just moving code around I would think. Of course a nice front end would be nice but something that showed up in a terminal window is just fine for now :).

Google findings
https://www.circuitcellar.com/avr2004/wabstracts
MPG = VS * 71.07 / MAF

where VS = vehicle speed in kph (mode 01 PID 0D)
and MAF = air flow rate (mode 01 PID 10)

skewbe 10-04-2007 06:25 AM

I don't know if all those values will be available, but anyway

just looking at Vehicle Speed/MAF will get you in the ballpark with some fudge factors to turn Vehicle speed into miles and MAF into gallons.

You might be able to tune MAF by determining the AF ratio, but I dont know if PID14 is available and if it is it could be even more logic to make sense out of the pulses.

Fourthbean 10-04-2007 07:39 PM

Does anyone know what the Scangauge uses to measure MPG? I am considering that it also uses the MAP sensor as you must adjust it initially to get it right and modding for lean burn does not show up on the scangauge.

skewbe 10-04-2007 08:02 PM

I don't know about the scangauge and am loathe to so blatently reverse engineer it, but there is tons and tons of obd <-> computer stuff online, here is a visual basic mpg function:
https://www.mp3car.com/vbulletin/engi...tml#post605372

I just googled for mpg obdii and scanned a little bit to find it.

You might want to cut and paste that function into a text file so you can refer back to it.

Fourthbean 10-05-2007 12:56 AM

Thanks for the help so far. I wasn't meaning to imply reverse engineering, however I haven't looked at any documentation for the Scangauge so was curious if they had mentioned what values they use to calculate MPG off of.

I found some documentation for the ELM chip I am using, basically the port can be told to monitor everything happing in the car. It will send codes in hex with the second part of the first byte being the identifier to what that value relates to and then the rest being the relevant information. Seems pretty easy to decode and this perl script makes it look fairly simple.

The question is, will I be able to make it work. lol

I am currently trying to get this perl program to open my serial port. As although it was written in "cross platform" perl the command to open the serial port is for dos :(. I have sent an email to the developer hoping I can get some help and I am currently trying some other ways inside the code to open the port.

skewbe 10-05-2007 04:17 AM

Hmm

For the com port, try editing obd.ini and changing:
$COM_PORT = "com1";
to:
$COM_PORT = "/dev/ttyS0";

skewbe 10-05-2007 04:22 AM

Mp3car.com isn't working this morning? Anyway that mpg function was factoring in MAF, Vehicle Speed, and Long Term fuel trim.

skewbe 10-05-2007 04:43 AM

I'll shut up shortly and give you a chance to look at things, just wanted to mention that if MAF is not available then you can get close by properly combining Manifold absolute pressure, RPM, and air intake temperature and a config variable for engine displacement. Humidity will be left out of the equation.

Also if your com port is not com1 (i.e. com2) then you will need to change ttyS0 (i.e. ttyS1).

Fourthbean 10-05-2007 07:21 AM

I noticed the com1 and I think I tried changing it, however the problem I am having is this part of the .pl file:
Code:

#
#    Subroutines
#


sub open_tty                              # Open Com port and remove echo (ate0)
{
  system ("mode com1 baud=9600 parity=n data=8 stop=1 rts=off dtr=off >NUL");
  open DEV,"+>$COM_PORT" or die "Failed to open communication port\n";
  $ofh = select(DEV); $| = 1; select($ofh);
  print DEV "ate0\n";
  select(undef, undef, undef, 0.5);
  $jnk = <DEV>;

}

It is calling the command "mode" from the system. Which I cannot find for linux. So I am hunting around trying to find something that will work in it's place. I still haven't found anything that will allow me to connect to the serial port and see the codes like I can in hyperterminal in Windows.

I found code HERE showing how to access a serial port but could not get it to work for me :(. I set the Serial port to /dev/ttyS0 and also tried /dev/ttyS2 (seems those are the only valid ones on my system, though I cannot remember how I figured that out).

I also changed all the parameters to the correct ones for my obdII scanner. When running just that logger.pl perl script it acts like it is working (no error messages) but nothing gets written to the log file. I sent the command ATMA and also tried ATMA\n for it to hit enter after the command to no avail.

I will be working more on it soon, just wanted to keep this thread updated so that I know where I am at. And so that if anyone had anything to add they could.

I remember seeing that thread while doing my OBDII searching. I will have to do as you say and grab the values for later use in calculations. Thanks.

skewbe 10-05-2007 04:01 PM

man stty

Fourthbean 10-05-2007 07:02 PM

Wow, you are awesome. I just got an email back from the developer and he said to look at stty also.

Thanks!

skewbe 10-06-2007 01:11 AM

:o thanx,

BTW, the MPG function I mentioned has a bug, they never convert tSpeed from kph to mph.

ref: https://prj.perquin.com/obdii/ under the "Tester Commands" section

Fourthbean 10-06-2007 07:36 PM

Using your advice with the command stty I got to the point of seeing the raw traffic from the scanner with minicom. I put the command into the perl script and it doesn't complain about it but it errors trying to find readable codes. I will work more on it later.

cfg83 10-06-2007 08:52 PM

Fourthbean -

Can you tell me which you bought? Did you buy this one for GM products? :

ElmScan VPW Scan Tool - P/N: 420300
https://www.scantool.net/products/pro...products_id=12

Thanks,

CarloSW2

Fourthbean 10-06-2007 09:23 PM

Yes, that is the one I bought. And I opted for no case to knock off 15 bucks from the price (I am cheap).

Fourthbean 10-19-2007 03:59 AM

I have been poking around and it looks like what I need is to find what PID coming from my OBDII port is the injector duty cycle/pulse width or something of the sorts. Looks like it should be there, but it is not published anywhere so I will need to find it :(.

The scanner I have can be set to monitor all parameters being spat out from the port, so I guess I would need to turn that on and log it and then decipher and eliminate until I could find what I need (assuming it is there somewhere). Might be a bigger job than I think.

skewbe 10-19-2007 05:33 AM

Yes logging would be good.

Look for the following PIDS coming out of your computer:
$PID07 (fuel trim)
$PID0D (Vehicle Speed)
$PID10 (MAF)


if you don't have PID10 (MAF) then look to see if you have:
$PID07 (fuel trim)
$PID0D (Vehicle Speed)
$PID0B (Manifold Pressure)
$PID0F (intake air temp)
$PID0C (RPM)

cfg83 10-20-2007 01:40 AM

Fourthbean -

In the "scantool" program I can run in DOS or Windows, I get source code. The BOLD values are the ones I am receiving from elmscan in scantool :

Code:

static SENSOR sensors[] =
{
  // formula                        // label            //screen_buffer  //pid  //enabled // bytes
  { throttle_position_formula,    "Absolute Throttle Position:",    "", "11",      1,    1 },
  { engine_rpm_formula,            "Engine RPM:",                    "", "0C",      1,    2 },
  { vehicle_speed_formula,        "Vehicle Speed:",                  "", "0D",      1,    1 },
  { engine_load_formula,          "Calculated Load Value:",          "", "04",      1,    1 },
  { timing_advance_formula,        "Timing Advance (Cyl. #1):",      "", "0E",      1,    1 },
  { intake_pressure_formula,      "Intake Manifold Pressure:",      "", "0B",      1,    1 },
  { air_flow_rate_formula,        "Air Flow Rate (MAF sensor):",    "", "10",      1,    2 },
  { fuel_system1_status_formula,  "Fuel System 1 Status:",          "", "03",      1,    2 },
  { fuel_system2_status_formula,  "Fuel System 2 Status:",          "", "03",      1,    2 },
  // Page 2
  { short_term_fuel_trim_formula,  "Short Term Fuel Trim (Bank 1):",  "", "06",      1,    2 },
  { long_term_fuel_trim_formula,  "Long Term Fuel Trim (Bank 1):",  "", "07",      1,    2 },
  { short_term_fuel_trim_formula,  "Short Term Fuel Trim (Bank 2):",  "", "08",      1,    2 },
  { long_term_fuel_trim_formula,  "Long Term Fuel Trim (Bank 2):",  "", "09",      1,    2 },
  { intake_air_temp_formula,      "Intake Air Temperature:",        "", "0F",      1,    1 },
  { coolant_temp_formula,          "Coolant Temperature:",            "", "05",      1,    1 },
  { fuel_pressure_formula,        "Fuel Pressure (gauge):",          "", "0A",      1,    1 },
  { secondary_air_status_formula,  "Secondary air status:",          "", "12",      1,    1 },
  { pto_status_formula,            "Power Take-Off Status:",          "", "1E",      1,    1 },
  // Page 3
  { o2_sensor_formula,            "O2 Sensor 1, Bank 1:",            "", "14",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 2, Bank 1:",            "", "15",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 3, Bank 1:",            "", "16",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 4, Bank 1:",            "", "17",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 1, Bank 2:",            "", "18",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 2, Bank 2:",            "", "19",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 3, Bank 2:",            "", "1A",      1,    2 },
  { o2_sensor_formula,            "O2 Sensor 4, Bank 2:",            "", "1B",      1,    2 },
  { obd_requirements_formula,      "OBD conforms to:",                "", "1C",      1,    1 },
  // Page 4
  { o2_sensor_wrv_formula,        "O2 Sensor 1, Bank 1 (WR):",      "", "24",      1,    4 },    // o2 sensors (wide range), voltage
  { o2_sensor_wrv_formula,        "O2 Sensor 2, Bank 1 (WR):",      "", "25",      1,    4 },
  { o2_sensor_wrv_formula,        "O2 Sensor 3, Bank 1 (WR):",      "", "26",      1,    4 },
  { o2_sensor_wrv_formula,        "O2 Sensor 4, Bank 1 (WR):",      "", "27",      1,    4 },
  { o2_sensor_wrv_formula,        "O2 Sensor 1, Bank 2 (WR):",      "", "28",      1,    4 },
  { o2_sensor_wrv_formula,        "O2 Sensor 2, Bank 2 (WR):",      "", "29",      1,    4 },
  { o2_sensor_wrv_formula,        "O2 Sensor 3, Bank 2 (WR):",      "", "2A",      1,    4 },
  { o2_sensor_wrv_formula,        "O2 Sensor 4, Bank 2 (WR):",      "", "2B",      1,    4 },
  { engine_run_time_formula,      "Time Since Engine Start:",        "", "1F",      1,    2 },
  // Page 5
  { frp_relative_formula,          "FRP rel. to manifold vacuum:",    "", "22",      1,    2 },    // fuel rail pressure relative to manifold vacuum
  { frp_widerange_formula,        "Fuel Pressure (gauge):",          "", "23",      1,    2 },    // fuel rail pressure (gauge), wide range
  { commanded_egr_formula,        "Commanded EGR:",                  "", "2C",      1,    1 },
  { egr_error_formula,            "EGR Error:",                      "", "2D",      1,    1 },
  { evap_pct_formula,              "Commanded Evaporative Purge:",    "", "2E",      1,    1 },
  { fuel_level_formula,            "Fuel Level Input:",              "", "2F",      1,    1 },
  { warm_ups_formula,              "Warm-ups since ECU reset:",      "", "30",      1,    1 },
  { clr_distance_formula,          "Distance since ECU reset:",      "", "31",      1,    2 },
  { evap_vp_formula,              "Evap System Vapor Pressure:",    "", "32",      1,    2 },
  // Page 6
  { o2_sensor_wrc_formula,        "O2 Sensor 1, Bank 1 (WR):",      "", "34",      1,    4 },  // o2 sensors (wide range), current
  { o2_sensor_wrc_formula,        "O2 Sensor 2, Bank 1 (WR):",      "", "35",      1,    4 },
  { o2_sensor_wrc_formula,        "O2 Sensor 3, Bank 1 (WR):",      "", "36",      1,    4 },
  { o2_sensor_wrc_formula,        "O2 Sensor 4, Bank 1 (WR):",      "", "37",      1,    4 },
  { o2_sensor_wrc_formula,        "O2 Sensor 1, Bank 2 (WR):",      "", "38",      1,    4 },
  { o2_sensor_wrc_formula,        "O2 Sensor 2, Bank 2 (WR):",      "", "39",      1,    4 },
  { o2_sensor_wrc_formula,        "O2 Sensor 3, Bank 2 (WR):",      "", "3A",      1,    4 },
  { o2_sensor_wrc_formula,        "O2 Sensor 4, Bank 2 (WR):",      "", "3B",      1,    4 },
  { mil_distance_formula,          "Distance since MIL activated:",  "", "21",      1,    2 },
  // Page 7
  { baro_pressure_formula,        "Barometric Pressure (absolute):", "", "33",      1,    1 },
  { cat_temp_formula,              "CAT Temperature, B1S1:",          "", "3C",      1,    2 },
  { cat_temp_formula,              "CAT Temperature, B2S1:",          "", "3D",      1,    2 },
  { cat_temp_formula,              "CAT Temperature, B1S2:",          "", "3E",      1,    2 },
  { cat_temp_formula,              "CAT Temperature, B2S2:",          "", "3F",      1,    2 },
  { ecu_voltage_formula,          "ECU voltage:",                    "", "42",      1,    2 },
  { abs_load_formula,              "Absolute Engine Load:",          "", "43",      1,    2 },
  { eq_ratio_formula,              "Commanded Equivalence Ratio:",    "", "44",      1,    2 },
  { amb_air_temp_formula,          "Ambient Air Temperature:",        "", "46",      1,    1 },  // same scaling as $0F
  // Page 8
  { relative_tp_formula,          "Relative Throttle Position:",    "", "45",      1,    1 },
  { abs_tp_formula,                "Absolute Throttle Position B:",  "", "47",      1,    1 },
  { abs_tp_formula,                "Absolute Throttle Position C:",  "", "48",      1,    1 },
  { abs_tp_formula,                "Accelerator Pedal Position D:",  "", "49",      1,    1 },
  { abs_tp_formula,                "Accelerator Pedal Position E:",  "", "4A",      1,    1 },
  { abs_tp_formula,                "Accelerator Pedal Position F:",  "", "4B",      1,    1 },
  { tac_pct_formula,              "Comm. Throttle Actuator Cntrl:",  "", "4C",      1,    1 }, // commanded TAC
  { mil_time_formula,              "Engine running while MIL on:",    "", "4D",      1,    2 }, // minutes run by the engine while MIL activated
  { clr_time_formula,              "Time since DTCs cleared:",        "", "4E",      1,    2 },
  { NULL,                          "",                                "", "",        0,    0 }
};

CarloSW2

Fourthbean 10-20-2007 11:11 PM

That looks to be in line with what I was getting in windows with scantool. I haven't had a chance yet to log any data from the port, the thought of sorting through it all makes me squeamish :).

I guess a good way would be to get a filter to get rid of any EPA set pid values and then sort through the rest to see what is available.

I am currently working on getting the computer set up to the point I can listen to something on the way to work. So that has taken higher priority for the moment.

cfg83 10-21-2007 12:27 AM

2 Attachment(s)
Fourthbean -

Quote:

Originally Posted by Fourthbean (Post 77610)
That looks to be in line with what I was getting in windows with scantool. I haven't had a chance yet to log any data from the port, the thought of sorting through it all makes me squeamish :).

I guess a good way would be to get a filter to get rid of any EPA set pid values and then sort through the rest to see what is available.

I am currently working on getting the computer set up to the point I can listen to something on the way to work. So that has taken higher priority for the moment.

No problem, I am doing my own contortions. One problem I am having is that the elmscan doesn't seem to "sync" or connect to the OBDII port. If the red LED is flashing, I am connected and ready to gather data. If the red LED is solid, then the PC is unable to connect to the elmscan. I can get the flashing red LED maybe one time in 30 connects (aka plug it into the car's OBD II socket). I submitted a ticket into the scantool support service.

I am hoping this freeware offers datalogging I can post-process, until I can (hopefully) get my own program running :

https://www.obd2crazy.com/wOBDv140/index.html

Here is an example image of my car :

Attachment 998

CarloSW2

cfg83 10-25-2007 10:09 AM

Fourthbean -

I did a "repair return" on mine because I couldn't get it to work reliably. I am guessing that they won't find anything wrong with it. Depending on how things work out, I may try to use a PDA for datalogging. My wife has old Palm Pilots and a newer color m130 I could use for this (she's not using it).

CarloSW2

Fourthbean 10-26-2007 04:58 AM

Hopefully they can get you fixed up, I know that I have run mine for a couple 40 minute runs with no problem. I hope nothing comes up like what you are dealing with.

PDA sounds nice, much easier than a laptop. I had a very small 3lb laptop that I was using in the passenger seat but I really couldn't look a it safely while driving. A PDA up high on the dashboard ought to be much better.

I currently have my screen installed where my radio was. And a full size desktop computer sitting in the floorboard of the back seat. I am awaiting the inverter I bought on ebay so that I can run it for more than the 15 minutes a 175 watt inverter can handle.

cfg83 04-07-2008 11:31 PM

6 Attachment(s)
Fourthbean -

Quote:

Originally Posted by Fourthbean (Post 78487)
Hopefully they can get you fixed up, I know that I have run mine for a couple 40 minute runs with no problem. I hope nothing comes up like what you are dealing with.

...

They were great. They couldn't find any problem, but they replaced it anyway. Very classy. I think I figured out what was wrong. My PC has too many apps running. As a result, they are probably fighting for the COM1 port. Here is what I did :

1 - I bided my time and found an obsolete 2.5" 4GB hard disk for $10. This way, if I crash the disk proving the system, I don't care because the hard disk is worthless anyway.

2 - I installed a base XP OS on the 4GB hard disk in my laptop. That way, there is no contention for the COM1 port.

3 - I downloaded the "scantool v1.13" software that comes with it. Since it comes with source code, I could customize it after ...

4 - ... I downloaded the "allegro" game programming library for Windows/XP :

https://alleg.sourceforge.net/wip.html (download all422.zip)

5 - I used my trusty Visual C++ version 6.0 to compile Allego. I procastinated doing this because I expected it to be a PITA. It in fact was easier than I thought. This is the power of gamer-programmers. They are edge and MAKE IT WORK! Pssst: But, you don't need to compile it. There are also pre-compiled binaries at the URL in Step 4. Stooopeed me did it the hard way.

6 - Once I had the library, I made a Visual C++ 6.0 project for the scantool software and customized it for my SW2 :

Still working on the color pallete, :o :
Attachment 1253


These are the only variables that are available for my Saturn :
Attachment 1254


4 - But the really big thing is that I got it to log data. I am logging in 1 second increments. I post-processed this to be one minute increments in this example result :

Code:

YYYMMDD,HHMMSS,Absolute Throttle Position (%):,Engine RPM:,Vehicle Speed (MPH):,Calculated Load Value (%):,Timing Advance (Cyl. #1) (?):,Intake Manifold Pressure (inHg):,Short Term Fuel Trim (Bank 1) (%):,Long Term Fuel Trim (Bank 1) (%):,Intake Air Temperature (? F):,Coolant Temperature (? F):,O2 Sensor 1/Bank 1 (V):,O2 Sensor 2/Bank 1 (V):
20080407,201137,13.367,2021.100,52.533,46.817,35.150,17.542,1.088,-7.000,71.900,170.133,0.518,0.721,
20080407,201242,8.130,1952.400,54.867,30.302,37.975,11.647,-0.082,-7.367,74.783,186.950,0.537,0.621,
20080407,201348,13.787,1964.333,55.350,48.922,36.117,19.197,0.623,-7.000,80.067,190.000,0.590,0.710,
20080407,201455,11.310,1886.717,53.233,39.983,39.208,15.507,1.322,-5.495,87.533,190.000,0.481,0.732,
20080407,201601,16.863,1900.667,53.817,53.895,27.317,21.542,-1.065,-2.300,95.667,190.000,0.389,0.638,
20080407,201709,13.510,1953.183,55.133,45.238,37.333,17.980,-0.237,-2.300,103.133,190.000,0.471,0.669,
20080407,201814,8.403,1908.133,53.733,29.813,41.208,12.020,-1.097,-3.200,105.000,190.000,0.354,0.671,
20080407,201919,8.272,1777.917,50.000,31.502,35.792,12.173,-0.502,-4.167,105.000,190.000,0.346,0.718,
20080407,202023,10.620,1863.317,52.800,38.110,39.350,14.567,0.650,-2.300,105.000,190.000,0.283,0.574,
20080407,202128,7.085,1562.167,52.383,35.080,30.592,14.065,2.123,-5.700,106.533,190.500,0.517,0.616,
20080407,202234,11.227,1724.267,49.000,42.093,32.433,15.575,0.395,-5.617,105.367,190.133,0.452,0.541,
20080407,202339,8.697,1782.100,50.017,36.640,35.825,14.210,1.973,-2.640,107.000,190.000,0.461,0.551,
20080407,202446,9.245,1394.267,44.483,41.762,25.108,16.237,0.217,-6.210,106.833,191.033,0.502,0.572,
20080407,202549,10.242,1607.800,50.583,41.063,30.183,16.167,2.068,-5.530,105.567,190.500,0.352,0.396,
20080407,202653,7.198,1347.733,42.583,33.838,23.225,13.590,0.687,-7.867,106.267,191.833,0.483,0.436,
20080407,202758,8.723,1548.133,43.383,39.198,30.417,15.017,-0.398,-5.953,109.467,190.133,0.606,0.500,
20080407,202901,10.207,1615.150,45.067,38.272,30.058,15.563,0.347,-3.800,111.000,190.000,0.407,0.405,
20080407,203003,10.637,1653.900,46.233,41.332,33.733,15.853,-0.970,-2.300,111.200,190.000,0.565,0.496,
20080407,203104,8.885,1590.700,44.533,38.265,33.633,15.340,0.365,-2.300,112.000,190.767,0.559,0.539,
20080407,203207,12.003,1580.317,48.100,42.422,23.208,16.358,0.420,-5.190,113.600,191.600,0.429,0.404,
20080407,203307,13.262,1574.500,48.517,44.165,23.692,17.822,0.033,-5.460,114.333,191.500,0.488,0.551,
20080407,203409,11.132,1537.083,48.250,42.305,24.108,17.785,1.690,-4.510,112.967,190.800,0.431,0.626,
20080407,203515,17.900,1854.267,52.183,55.985,24.950,23.225,-1.523,-2.300,112.800,192.000,0.459,0.630,
20080407,203622,16.592,1829.983,54.367,49.727,25.608,21.535,-0.722,-4.170,112.000,192.000,0.464,0.731,
20080407,203724,7.418,1364.150,41.400,34.622,22.500,15.088,1.102,-5.190,111.017,191.550,0.321,0.272,
20080407,203829,13.582,1543.383,46.683,46.947,21.217,19.203,-2.012,-6.230,111.533,192.083,0.474,0.498,
20080407,203934,8.992,1511.517,48.533,38.937,23.875,16.125,1.495,-7.893,111.733,192.000,0.522,0.300,
20080407,204037,6.512,1385.333,44.033,31.723,26.550,12.637,2.392,-6.220,110.500,190.667,0.499,0.524,
20080407,204148,4.633,1420.150,48.117,26.790,26.808,11.128,2.470,-8.820,108.467,190.867,0.561,0.520,
20080407,204253,5.087,1332.000,43.350,29.773,25.800,11.532,2.833,-9.665,105.033,190.333,0.484,0.562,

I used this to make a *simple* RPM vs MPH chart that shows my engine on coasting :

Attachment 1255


My long term goals are :

1 - Testing only. At this point, I want to see the behavior of mods like my EFIE, the IAT resistor mod, and maybe some aero mods.

2 - Get a solid state hard disk. I can get a 2GB hard disk for $60 right now. If I run the 4GB until it crashes, the price will be lower by then.

CarloSW2

Fourthbean 04-09-2008 11:47 AM

That's great, you got much further than I did. I was trying to do everything from Linux and could barely get the serial port open and a program reading the info from it :(. I wimped out and bought a scangauge 2.

If you are looking for a cheap solid state drive you can look at compact flash to ide adapters for laptops. I had my old p3 set up with a 2GB compact flash card before it was stolen.

cfg83 04-09-2008 12:59 PM

Fourthbean -

Quote:

Originally Posted by Fourthbean (Post 95617)
That's great, you got much further than I did. I was trying to do everything from Linux and could barely get the serial port open and a program reading the info from it :(. I wimped out and bought a scangauge 2.

If you are looking for a cheap solid state drive you can look at compact flash to ide adapters for laptops. I had my old p3 set up with a 2GB compact flash card before it was stolen.

Yeah, Linux is better, but I just went with "what I knew".

I have a CF card, but I don't think my circa 2003 BIOS can boot to the flash-card and/or the card isn't "smart enough" to mimic an IDE drive. I may return to the flash card route (I have a savvy friend who can help me). Well see.

It was plain luck that I got it to work. I expected all sorts of allegro nightmares, but it was almost slam dunk. The scantool source code is well written.

I just realized that *if* I could define an MPG algorithm for all the data inputs, I could create an ##.# MPG LCD in my rear window. That is something that other GasSavers have wanted to have in the past.

CarloSW2

GasSavers_RoadWarrior 04-09-2008 02:10 PM

CF was designed to the IDE protocol, there's a lot of older hardware using them with the adapters, which are basically just connection adapters, not interfaces.

cfg83 04-09-2008 03:24 PM

RoadWarrior -

Quote:

Originally Posted by RoadWarrior (Post 95628)
CF was designed to the IDE protocol, there's a lot of older hardware using them with the adapters, which are basically just connection adapters, not interfaces.

Ok, then maybe I'll give it another whack. I do have a connection adapter lying around.

CarloSW2

lukasio10 04-21-2009 04:55 PM

No PID01 10 available?
 
I don't have PID01 10 available and i would like to calculate the MPG or any form of that gas consumption on my Saturn 2000 SL? Can i obtain that using different values out of my car?

Lucas

dopeti 02-09-2011 01:29 AM

Re: OBDII CarPC MPG Calculator
 
Quote:

Originally Posted by skewbe (Post 77394)
Yes logging would be good.

Look for the following PIDS coming out of your computer:
$PID07 (fuel trim)
$PID0D (Vehicle Speed)
$PID10 (MAF)


if you don't have PID10 (MAF) then look to see if you have:
$PID07 (fuel trim)
$PID0D (Vehicle Speed)
$PID0B (Manifold Pressure)
$PID0F (intake air temp)
$PID0C (RPM)

if I do not have MAF, how can I calculate the fuel consumption from these values?

orbywan 05-21-2011 12:17 PM

Re: OBDII CarPC MPG Calculator
 
Wow, you guys are way more advanced at this than I. I'm trying to find something that will calculate mpg from an OBD1 port, I'm guessing there isn't enough data from an OBD1, but am not familiar enough with the process to know.

I'm doing some aerodynamic changes to my RV and it would really help to have an mpg calculator on board for short term testing.

By the way Carlos, the Saturn aero mods are working out great, I never answered your last question which was, do the clear headlight covers diminish the light coming from the headlights. Saturn stock headlights aren't exactly flame throwers and I don't notice them being any worse so I'd have to say no. The grille block off plate made a big difference and so far, zero overheating. Hottest weather so far has been 102 degrees with the A/C on in traffic, no problem.

I'm looking at the cost effectiveness of various molding procedures, if I can do it reasonably I may offer an aero kit for the 97 to 2000 SC2's. Blocking off the grille, covering the headlights, and taking off the side mirrors resulted in an 18% increase in mileage. After several weeks of tweaking map settings, O2 feedback settings, and installing an A/F gauge to monitor the results, and getting zero net gains because the computer kept jumping all over my attempts to 'tune' it, this is good stuff. Bolt it on and forget it. I like it.

Next up is a full belly pan and a modified windshield wiper base. I'm building a truncated (partial) boat tail for my RV. If that tests out with good results I may try that on the Saturn as well. I'm taking it as far as I can looking fairly stock for the most part before I dive into the make it uglier than hell mode. :)

theholycow 05-22-2011 03:27 AM

Re: OBDII CarPC MPG Calculator
 
Quote:

Originally Posted by orbywan (Post 160930)
Wow, you guys are way more advanced at this than I. I'm trying to find something that will calculate mpg from an OBD1 port, I'm guessing there isn't enough data from an OBD1, but am not familiar enough with the process to know.

There is no standard for OBD1 interfaces/protocols so there's a large variety, too large (and with too few customers) to bring a product to market. Also, as you suggest, plenty (most? all?) of OBD1 interfaces do not carry the necessary information.


All times are GMT -8. The time now is 06:34 PM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2025, vBulletin Solutions, Inc.