First of all thanks Erorus for nice class. I was able to implement OBD read VB program in few hours.
http://www.mp3car.com/vbulletin/engi...-maf-obd2.html
I tried using the MPG calculation in above thread and it seems to be pretty accurate. Many constants are similar to what is shown in this thread but this thread seems to be missing pound to gallon conversion and seems to be off by 10x as well. I see that the fuel trim is used here. I'll try to apply that. Looks like it may give you better estimate for your car rather than looking for ideal values.
The equation I am using is
14.7 g of air / 1 g of gas * 6.17 lb / 1 gal * 454 g / 1 lb * VSS Km / 1 h * 1 Mi / 1.609344 Km * 1s / MAF (100g from OBD) * 100g * 1 h / 3600 s * (0.7812 * (LTFT - 128) + 1)
Which will be
710.7 * VSS / MAF * (0.7812 * (LTFT - 128) + 1)
When cruising I get about 20 MPG and when I press the clutch I get like 105MPG which kinda makes sense.... =P When I calculate MPG when I fuel my car I get about 23MPG so I think this is pretty close.
Erorus, do you know if there is a way to read the OBD data in burst fashion? Or is this the limitation of ELM chip? I tried to tune the time to read the data from OBD but reading those three data takes at least 2.5 s. I kind of want to be able to read all three at the same time to increase the accuracy. In 2.5 second many things can change.
Is there a way to read back the data more quickly?
If not I guess running average or something similar can be implemented I suppose.. =)
Regards