06-29-2008, 03:50 PM
|
#31 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
Man I love the energy you guys are putting into this
Quote:
Originally Posted by tom43571
In the mpguino forum they used the pulse width but last I read it was innacurate in terms of MPG.
|
FYI, Yoshi has been reporting mpg results within 1% on a prius by monitoring pulse width.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
06-29-2008, 06:30 PM
|
#32 (permalink)
|
EcoModding Lurker
Join Date: Jun 2008
Location: USA
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
If I'm not mistaken, I think you guys are confusing measuring pulse width off the injectors (MPGuino wasn't obdii was it?) with what I'm talking about. The "Pulse width" I'm carrying on about is the J1850-PWM OBDII protocol. The J1850 protocol uses VPW (a single wire) or PWM (a balanced bus 2-wire) at the physical level to send the bits. My car (1998 mustang) uses the PWM flavor of the J1850 protocol.
It should be every bit as accurate as a scanguage, because it's pulling the same information and running the same formula against it (calculating based on speed and MAF reading from the OBDII port rather than reading off the injectors).
|
|
|
06-29-2008, 07:04 PM
|
#33 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
Correct, mpguino hooks up directly to the fuel injector, no obd involved. Same technique as Yoshi's supermid basically.
I would think an obduino could possibly improve on the scangauge accuracy if it is a concern, by cranking up the polling rate and/or taking more variables into account as available on certain cars.
Keep up the good work guys
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
|
|
|
06-29-2008, 08:44 PM
|
#34 (permalink)
|
Liberti
Join Date: Feb 2008
Location: California
Posts: 504
Thanks: 0
Thanked 7 Times in 7 Posts
|
Like Nate posted, the only way to universally determine MPG via OBDII is to use the MAF sensor (or convert to MAF via the MAP & IAT sensors). The equations are posted earlier in this thread.
Fuel injector pulsewidth is not a standard OBD-II PID...
Great work guys. I wish I could contribute code as this is a project I really want to see hit fruition.
- LostCause
|
|
|
06-29-2008, 09:06 PM
|
#35 (permalink)
|
EcoModding Lurker
Join Date: Jun 2008
Location: ohio
Posts: 41
Thanks: 1
Thanked 0 Times in 0 Posts
|
Sweet. I think I get it now. Please correct me if im wrong, VPW uses k-line and 12v while PWM uses k and L-line plus 12volt. I wish I had some hardware here to get going on this. Does this mean that the VPW will be using only 2 pins of the OBD(Pins 7 and 16)?
|
|
|
06-29-2008, 09:58 PM
|
#36 (permalink)
|
EcoModding Lurker
Join Date: Jun 2008
Location: USA
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
actually, the K and L lines are for ISO only I believe, pwm uses J1850 bus+ and bus-, which are 2 seperate lines (pins 2 and 10), and VPW just uses the the J1850 bus+ (pin 2). K and L lines are on pins 7 and 15 for ISO, and I dunno much about CAN.
I also now know how you can have a -5v, lol. That was confusing the hell out of me. it's measured in reference to each other, so an active drive high is 5v on bus+ and 0v on bus-, and a drive low just swaps the polarity. This is getting intense, lol. So far the only code I've driven is the SOF, but I've set up the arrays for converting hex to binary and such.
My code will only support J1850, since I don't have anything else to test with, but if someone wants to add my code to theirs to make it more comprehensive once I get something working, that's cool by me.
|
|
|
06-30-2008, 12:58 AM
|
#37 (permalink)
|
EcoModding Lurker
Join Date: Jun 2008
Location: ohio
Posts: 41
Thanks: 1
Thanked 0 Times in 0 Posts
|
N8THEGR8 are you using the freeduino and the MCZ33290EF chip or are you using your previous OBDII project for all of this? Im just trying to get on the same page as you, I am going to be using the freeduino setup and was thinking of hooking it up based on the schematic on post 9 when the hardware arrives.
|
|
|
06-30-2008, 10:10 AM
|
#38 (permalink)
|
EcoModding Lurker
Join Date: Jun 2008
Location: USA
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
yeah, I guess I shoulda explained myself, lol. I'm doing this on an arduino single sided serial that I built from scratch ( MasterNater: Arduino Finished!!! and MasterNater: SO MUCH DONE!!!). Just your basic, plain jane arduino.
Since the arduino can drive +/-5v with the digital and analog pins, I'm *attempting* to do this without any additional hardware (no mcz chip, just connecting the arduino 100% directly to the OBDII port), that's why I was stating that it'll only work on pwm and vpw systems, but my code should be easy to add to someone elses project that does run ISO to get it running multiple protocols.
Do you know which protocol your vehicle uses? because you might want to consider that in order to direct which way you go. You can look up the model and year here: ScanTool.net - Resources - Compatible Vehicles
I've finished the method for converting hex to binary, now I should just be able to loop through the array of bits to drive the data, hopefully. I still don't know how successful I'll be, as I still kinda feel like I'm fumbling in the dark, lol.
|
|
|
06-30-2008, 10:44 AM
|
#39 (permalink)
|
OBDuino coder
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212
Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
|
The MCZ33290EF is for ISO K line only, I am working on it, n8thegr8 works on the PWM/VPW stuff that I don't have a clue about
I received my OBD-II plug, yeah waiting for the remaining...
BTW n8thegr8, in my code I posted on page 1, I use some function like iso_write_data() or iso_read_byte() whatever, maybe it would be good to have only one generic program that does the calculation/display/etc so we will not work on the same thing? And you can work on pwm_read_data() or pwm_write_byte() and so on.
EDIT: I updated the code on first page to my latest version. It should display instant gasoline consumption, in L/100 or US MPG. Too bad I can not test it LOL.
__________________
2013 Hyundai Sonata Hybrid
Last edited by Magister; 06-30-2008 at 03:23 PM..
|
|
|
06-30-2008, 04:28 PM
|
#40 (permalink)
|
EcoModding Lurker
Join Date: Jun 2008
Location: USA
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
Interesting, that sounds like a good idea. I updated my code on page 2 as well with what I have so far if you want to take anything from it. I haven't even compiled it yet, and I'm the kind of coder that throws crap together and lets the debugger sort it out, lol, but it's lookin good to me so far. It's pretty rough, but I commented it so you can get an idea of what i'm *trying* to do, lol. Maybe we could create a header file containing our common data/functions? or maybe start a google code project page, lol. hrmmmm....damn, I'd really like to start testing this.
|
|
|
|