Windmill Software Ltd |
![]() June 2007 |
Interfacing a vehicle's On Board Diagnostics |
Regularly Logging a Vehicle's Fuel-Consumption, Emissions, Location, etcWith Windmill you can use your laptop to log and display your vehicle's fuel consumption, emissions, location and other parameters. Recently manufactured vehicles will have an On Board Diagnostics (OBD) system. This monitors vehicle conditions and components that are related to vehicle emissions. The US and Canada has the OBDII system, Europe the EOBD system and Japan the JOBD system. You can interface this system to your PC and use Windmill to automatically collect the data at regular intervals. To connect your OBD system to the PC you need an interface. Although the On Board Diagnostics are standard across cars, the interface isn't: you need to buy an interface that matches your vehicle. You connect the interface between the car's 16-pin diagnostic port and, if you plan to use the free Windmill software, to the computer's COM port. (There are interfaces that connect to other PC ports - the USB port for example - but the free software reads the PC's COM port.) You now need some software to request data from the OBD system, read the response and log and display the data. If you wish to perform real-time calculations on the data, for example to see current fuel consumption, the software needs to be able to channel the data to a spreadsheet or similar program. Windmill software can do all these things. You can choose either the free Windmill 4.3 software or the more recent Windmill 6 COMIML. With Windmill you can interface several different devices, so you could add a GPS receiver to record location alongside your fuel consumption and emissions data. Using Windmill 4.3 Software | Getting the data into Excel | Application Story: Real-Time Fuel Consumption Monitoring | Understanding PIDs and the OBD Message Structure Using Windmill 4.3 Software
After you have entered your configuration settings with ConfIML and SetupIML, you don't need to use these again and can go straight to the logging and display programs. More details on entering the configuration settings are below. Run the Windmill ConfIML programThis detects and saves a record of the hardware you want to use. You need to add the LabIML ASCII instrument handler and enter your instrument's communication settings. To do this
Run the Windmill SetupIML programHere you can name your channel, set its units, enter a scale and offset, and so on.
Open Windmill DDE Panel
Getting the data into ExcelThe data collected is in hexadecimal format which you need to convert to decimal. To do this you will need a spreadsheet like Excel. You can use the Windmill Logger program to collect data, and after collection has finished import it into Excel. Alternatively, you can collect data with Excel in real-time (detailed on our Excel page). Use Excel's HEX2DEC command to convert to decimal. Application Story: Real-Time Fuel Consumption MonitoringDownload the Step-by-Step Guide. Robert Kwiatkowski designed a real-time fuel consumption monitoring system for his truck. He connected his laptop to the On Board Diagnostics system of his Ford Expedition, used Windmill to collect data from the truck and Excel to calculate and display his current fuel consumption. Most vehicles do not have a fuel flow sensor, therefore he used the Mass Air Flow (MAF) sensor and the
Vehicle Speed Sensor (VSS) to calculate miles per gallon (MPG). Vehicles use the oxygen sensors to feedback data to the vehicle's electronic control module (ECM) and control the air to fuel ratio. This ratio is set at the chemically ideal value of 14.7 grams of air to every gram of gasoline. He could use the known values to convert the MAF to Gallons of fuel per hour (GPH) and then calculate miles per gallon (MPG). Here are the steps to make the conversion:
The expression for GPH is: MAF * 0.0805 Robert Kwiatkowski has produced a step-by-step guide to replicating his system which he has kindly made available here. Understanding PIDs and the OBD Message StructurePID stands for parameter identification number. It is a hexadecimal number. For most PIDs (including all listed below) the value returned is also a hexadecimal number. One hexadecimal number is contained in each byte returned. So for a 1-byte message 2 characters would be returned, for a 2-byte message 4 characters would be returned.
PID Description Number of bytes Scale Offset Units
returned
05 Engine Coolant Temperature 1 byte 1 -40 oC
0A Fuel Pressure 1 byte 3 kPa
0B Intake Manifold Pressure 1 byte 1 kPa
0C Engine RPM 2 bytes 0.25 rpm
0D Vehicle speed 1 byte 1 km/h
0E Timing advance 1 byte 0.5 -64 degrees
0F Intake air temperature 1 byte 1 -40 oC
10 MAF air flow rate 2 bytes 0.01 g/s
11 Throttle position 1 byte 0.3922 %
1F Run time since engine start 2 bytes 1 s
23 Fuel Pressure (diesel) 1 byte 3 kPa
2F Fuel Level Input 1 byte 0.3922 %
33 Barometric pressure 1 byte 1 kPa
46 Ambient air temperature 1 byte 1 -40 oC
For a full list see an OBDII PID table. Commands to Reqest Data: The Prompt String Need More Information?Try these pages. |
Home | Windmill Programs | Monitor | On-Line Shop | Free Literature and Software Demos | Contents | Search
| Copyright Windmill Software Ltd 2007 PO Box 58, North District Office, Manchester, M8 8QR, UK. E-mail: sales@windmill.co.uk, Tel: +44 161 833 2782 http://www.windmill.co.uk/library.html Designed by Studholme.net |