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-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


All times are GMT -8. The time now is 07:15 PM.

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