Measuring Injector Pulsewidth

All sensor specific discussions! Temperature, pressure, steering angle, brake and throttle, etc. Post adaptations of OEM-style sensors, and also your clever DIY hacks and custom designs here too!

Moderators: JeffC, rdoherty, stieg

Post Reply
jsflanagan
Posts: 7
Joined: Mon Mar 23, 2015 11:50 pm

Measuring Injector Pulsewidth

Post 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.

ferg
Posts: 36
Joined: Mon Dec 03, 2018 7:56 pm
Location: Paso Robles, California
Contact:

Post 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).
David Ferguson
Veracity Racing Data
Autosport Labs Preferred Dealer
https://veracitydata.com

jsflanagan
Posts: 7
Joined: Mon Mar 23, 2015 11:50 pm

Post 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
Attachments
IMG_20190108_191255.jpg
IMG_20190108_191255.jpg (249.75 KiB) Viewed 57 times
pulsewidth.JPG
pulsewidth.JPG (255.54 KiB) Viewed 57 times

ferg
Posts: 36
Joined: Mon Dec 03, 2018 7:56 pm
Location: Paso Robles, California
Contact:

Post 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.
David Ferguson
Veracity Racing Data
Autosport Labs Preferred Dealer
https://veracitydata.com

jhawley
Posts: 2
Joined: Wed Apr 11, 2018 1:48 pm

Post by jhawley »

Did you ever get this calculation sorted out?

tylerjw
Posts: 10
Joined: Sat Jan 05, 2019 7:21 pm

Post 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.

brentp
Site Admin
Posts: 5925
Joined: Wed Jan 24, 2007 6:36 am

Post 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.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply