Page 1 of 1

Measuring Injector Pulsewidth

Posted: Wed Jan 23, 2019 1:36 pm
by jsflanagan
I've been wanting to measure my fuel injector pulsewidth for quite some time for use in fuel consumption calculations and for backing out a fuel map for the day when I convert this engine to a megasquirt. I tapped a wire of the number 1 injector and hooked it up to a pulse input. Then I set the channel as a pulsewidth measurement, medium timer speed, logged at 20hz. It appears that the signal is sort of inverted as when I'm at idle the pulse width "fuel" channel on my log is higher than when at higher speed/load. The reported signal also appears to be a bit slow to change, I need to go run again with the time speed changed, but I'm still not sure this will fix my issue. I checked the pulsewidth on my oscilloscope and it looks to be just under 4 msec at idle, sadly I forgot to actually measure the pulsewidth with the scope.

Anything else I should be trying / looking at to get this logged correctly? I checked the forums but hadn't seen where anyone else had measured pulsewidth yet on the racecapture. It's and RC Apex by the way. Pics to come in subsequent post.

Posted: Wed Jan 23, 2019 7:12 pm
by ferg
The signal to a fuel injector is typically a low-going pulse -- as the other side of the injector is connected to permanent power. If the measurement is of the high pulse (injector closed), then you need to so some math with the engine cycle time to determine the fuel pulse width. This is assuming sequential fuel injection, where there is one fuel pulse per cycle.

First, figure out the cycle time (the time for two revolutions of a 4-stroke engine).

Cycle Time [sec] = 60 [sec/min] / (Engine Speed [Rev/Min] / 2).

Then subtract the measured pulse width from the cycle time to get the "on" pulse width.

Fuel Pulse Width [sec] = Cycle Time [sec] - Measured Pulse Width [sec]

Add that math to a Lua script for a new Fuel Pulse Width channel.

I've done this before with other systems for endurance racing, were multiply the Fuel Pulse Width by a scale factor and add them up to determine fuel consumption. It can work amazingly well (+/- 1/2 gal accuracy per tank).

Posted: Thu Jan 24, 2019 2:02 am
by jsflanagan
David,

What you said matches what's going on in my data, it's picking up the other part of the pulse which explains the inverted nature of this.

I too have used this on a Motec and found it very accurate when properly calibrated by weighing out ones fuel jugs for volume. Hoping to do the same here. Will post it up once I get the calculations all working. Thanks

-Scott

Posted: Thu Jan 24, 2019 4:50 pm
by ferg
OK, looks like the pulse width timer is overflowing as well (the jaggies that increase while you are increasing the RPM). Perhaps Brent will tell us if there is a way to directly measure the low-going pulse width.

Posted: Sun May 12, 2019 2:46 am
by jhawley
Did you ever get this calculation sorted out?

Posted: Sat Jun 08, 2019 7:05 pm
by tylerjw
I also want to do this. I'm going to wire mine up and see if I can figure it out... let me know if any of you figured this one out.

Posted: Fri Jun 28, 2019 8:55 pm
by brentp
Hi, At the moment, measuring pulse width is not supported in the firmware. There is some hardware support for this, so it might be possible in the future.

One option would be to use an arduino + CAN bus shield - you can measure it in the arduino and broadcast data that RaceCapture can pick up.