![]() |
ElmScan + Customized Scantool Software = data logging!
1 Attachment(s)
Hello -
Last year I got one of these gizmos that interfaces the OBD-II to a PC : ElmScan VPW Scan Tool - P/N: 420300 EDIT: URL BELOW IS DEAD LINK BECAUSE PRODUCT NO LONGER OFFERED http://www.scantool.net/products/pro...products_id=12 http://ecomodder.com/forum/attachmen...1&d=1233886788 Quote:
1 - 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. I have an easy-to-swap hard disk, so I can pop the "base OS" hard disk in, go to work, and swap my "regular OS" back in when I am done. 2 - Installed a base XP OS on the 4GB hard disk in my laptop. That way, there is no contention for the COM1 port. 3 - 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 : Allegro - Download - Latest version (download all422.zip) 5 - Used my trusty Visual C++ version 6.0 to compile Allego. I procastinated doing this because I expected it to be a PITA. In fact it 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 : http://img166.imageshack.us/img166/7...overhs3.th.jpg These are the only variables that are available for my Saturn : http://img528.imageshack.us/img528/1...nsw2so8.th.jpg 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): http://img528.imageshack.us/img528/8...hartcj1.th.jpg My long term goals are : 1 - Testing only. The Scangauge is still my main man. At this point, I want to see the behavior of mods like my EFIE, the IAT resistor mod, and maybe some aero mods. I wanted this gizmo because I couldn't see the fuel trim or the 02 sensor with my ScanGauge I. Also, no data logging with the ScanGauge. 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. 3 - Define an algorithm that uses the data I am collecting to display real time MPG (Help Me Please :o !!!!!!). CarloSW2 . |
Quote:
PID 07 -> xx Long term fuel trim Bank 1 % x*(100.0/128)-100 PID 0b -> xx Intake Manifold Pressure kPaA x PID 0c -> xx xx Engine RPM RPM x*0.25 PID 0d -> xx Vehicle Speed km/h x PID 0f -> xx Intake Air Temperature C X-40 lastScanTime=now (milliseconds) onScanEvent{ time=now-lastScanTime lastScanTime=now distance=speed(pid0d) * time "airMoles"=some PV=NRT thing, http://en.wikipedia.org/wiki/Ideal_gas_law * V=rpm(pid0c)*displacement*volumetric efficiency, P=pid0b, T=Pid0f oxygen=airMoles* 20% ? stiochfuel=oxygen/14.7 fuel=stoichfuel*fuelTrim(pid07) litersPer100KM= fuel converted to liters/distance converted to km MilesPerGallon= distance converted to miles/fuel converted to gallons } ref: http://prj.perquin.com/obdii/ ref: http://en.wikipedia.org/wiki/Ideal_gas_law |
dcb -
*Arf*, that's really hard. Time to do more homework. CarloSW2 |
Sorry. Try out the opengauge freeduino signal processor then. Let us know if it works :)
(then teach it to read your cruise control switches on an analog port) |
dcb -
Quote:
CarloSW2 |
The guino isn't going to help too much with an obd mpg effort. The guino/opengauge efforts currently look directly at the injector and the speed sensor, and bypass all the obd business. It is much easier to record how long the injector has been open than it is to get mpg out of an obd port, excepting that you have to tap some wires.
|
1 Attachment(s)
Hello -
I noticed this commercial program from Australia. It is designed to work with the ElmScan hardware. It also claims to be able to deduce instant-MPG from OBD II data, which is what I have been looking for : OBD 2007 - Installation Guide http://www.glmsoftware.com/Documenta...de20080822.pdf Quote:
Attachment 1659 Question: What do you think? Does the equation they are using look valid to you? CarloSW2 |
Using only the MAF data is an approximation of fuel economy assuming the car's always running at stoich. That's probably what the SGII does.
However, for vehicles with broad band sensors, their program supports adjustments from the equivalence ratio which should make reported fuel consumption more precise. |
Thank you for the thread here... I think I have an idea now why my Scanguage isn't calibrating well: My MAF is failing, and thus, it's not reporting accurately, throwing the SG's tracking off.
On the A4 (or MkIV) TDI engines, the MAF sensor is notorious for failing out. I know from the slight lack of power, that mine is failing out again. So, time to sleep, so I can book more hours at work, and buy a new MAF for my car :P |
Hello -
(apologies in advance for some of my "custom" acronyms. I am "programming" the variable names in the post) I am trying to determine an approximate Instant MPG calculation for my scantool software. All of the following is based on this OBD 2007 documentation blurb : OBD 2007 - Installation Guide http://www.glmsoftware.com/Documenta...de20080822.pdf - Page 15 of PDF Quote:
- Intake Manifold Pressure (MAP) units: inHg - Vehicle Speed units: MPH Here are my constants/conversions : - AFR = Air/Fuel Ratio = 14.64 Source: http://www.glmsoftware.com/Documenta...de20080822.pdf - "DOG" = Density of Gas (g/cm3) = (0.71 +0.77) / 2 = 0.74 Source: Gasoline - Wikipedia, the free encyclopedia - "M2K" = Convert Miles to Kilometers = 1.609344 Source: Convert miles to km - Conversion of Measurement Units - "KML2MPG" = Convert KM/L to MPG = 2.35214583 Source: WikiAnswers - How many km to 1 litre of gas - "SPH" = Seconds Per Hour = 3600 - "MPL" = Milliliters Per Liter = 1000 Steps to convert with example inputs from real OBD II data logging : - Intake Manifold Pressure (inHg) = 17.542 - Vehicle Speed (MPH) = 52.533 1 - Convert MPH to KMH => MPH * M2K = 52.533 * 1.609344 = 84.54366835 KMH 2 - "FFG" = Calculate FuelFlowGrams/Sec => MAP / AFR = 17.542 / 14.64 = 1.198224044 FFG 3 - "FFL" = Calculate FuelFlowLitres/Second => (FFG / DOG) / MPL = (1.198224044 / 0.74) / 1000 = 0.001619222 FFL 4 - LPH = Calculate Liters Per Hour => FFL * SPH = 0.001619222 * 3600 = 5.829198051 LPH 5 - KML = Calculate KiloMeters / Liter => KMH / LPH = 84.54366835 / 5.829198051 = 14.50348189 KML 6 - Calculate MPG => KML * KML2MPG = 14.50348189 * 2.35214583 = 34.11430445 MPG The MPG number looks "ballpark" correct to me, subject to programming and testing. The most iffy part to me is step 3, where I divide by 1000 to get the "FFL". I am doing this because in step 2, it is not clear that the FFG is in Liters. Also, the OBD 2007 algorithm calls for a MAF sensor. In my S-Series Saturn, I *think* I have a MAP sensor. My question here is, what's the difference? Do I need to convert from MAP to MAF? Based on the steps above, here is the output I get. This is based on the data logging from thread #1 : Code:
,,INPUT,INPUT,STEP 1,STEP 2,STEP 3,STEP 4,STEP 5,STEP 6, CarloSW2 |
All times are GMT -4. The time now is 01:52 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com