MegaSquirt Flow Bench

To properly set up an engine with MegaSquirt, we need to know the injector size, and it also helps to know injector dead time. In some cases, manufacturers can provide this information. However, if you have unknown injectors, or you can’t find a spec sheet for the injectors you have, or you just want to test your injectors without sending them somewhere and not being able to drive your car for a week, you can use MegaSquirt’s test settings to estimate these answers. Here’s a detailed step-by-step to accomplish this.

To do this, you will need to maintain fuel pressure at the fuel rail with the injectors removed from the engine. In some cases, you can simply remove the entire rail from the engine with the inejctors still installed. Leave the fuel inlet and outlet connected. You should zip-tie the injectors into the rail, to prevent the rail from pushing them out.

If MegaSquirt is not triggering your fuel pump relay, you will need a means to power on the fuel pump.

You will also need a graduated cylinder that measures up to 50 or 100mL, in one mL increments. Note that 1mL = 1cc.

Here is an example of how you should set up your home-made flow bench:

In TunerStudio MS, you can find the test modes in the “CAN-bus/Testmodes” drop-down. Select “Output Test Mode - Inj/Spk.” We will be using the bottom section, titled “Injector Testing.”

Flow Rate

MegaSquirt’s test mode allows you to set:
* Output Interval (in miliseconds)
* Injector Testing Mode
* Injector Channel
* Pulsewidth (in miliseconds)
* Number of injections

The output interval is how far apart you want your injector pulses. You’ll see that if you decrease this number, the RPM that is being simpulated increases. For this test, this value is not very important–60ms is fast enough for you to get the data you need.

Because injectors don’t open or close instantly–the difference of which we call “dead time”–to accurately calculate flow rate, we need to minimize the proportion of time spent with the injector spent partially open. So we will use a large pulse width. The largest value allowed is 65.535ms, but to simplify the math, we want to use 60ms pulsewidth. While precision here isn’t imperative (after all, injectors are typically manufactured in round numbers–you’d buy a 550cc/min injectior, not a 553cc/min injector), we can also add in an assumed dead time. For saturated (high-z) injectors, which have a resistance typically between 10 and 16 ohms, or for low-z injectors with resistor packs, add 1ms; for peak-and-hold (low-z) injectors with drivers, add 0.6ms.

For the total number of injections, this is where having an idea of the injector volume can be helpful. You don’t want to under-fill your graduated cylinder (on mine, the lowest value is 10mL, so I need more than that to be able to estimate the volume), and you really don’t want to over-fill it and have gasoline spilling everywhere. To get a reasonable estimate for the number of pulses, you can use this formula.

Let:
* V = volume
* r = the expected flow rate of your injectors in cc/min
* n = number of pulses
* w = pulse width in ms
* d = expected dead time

\[V = \frac {n * r * (w - d)} {(1000 * 60)}\] (Volume is number of pulses times how much fuel comes out in each pulse, converted from cc/min to mL/ms.)

\[V * (1000 * 60) = n * r * (w - d)\] \[n =\frac {V * 1000 * 60} {r * (w - d)}\] Since I wanted about 20mL of gasoline to come out, and I expected my peak-and-hold injectors to be around 440cc/min, and w - d = 60 (see how the math simplifies now?), I get: \[n = \frac {20 * 1000 * 60} {440 * (60.6 - 0.6)} = \frac {20 * 1000 * 60} {440 * 60} = \frac {20 * 1000 } {440 } = 45.45\] Another tip here: round up to the nearest 10.

So I set the interval to 60ms, pulsewidth to 60.6ms, and request 50 injections. Now we’re ready to test each injector. I recommend doing this one at a time, to avoid spills and other catastrophy if something goes wrong (note that there is a “stop” button if you need to interrupt the test). Set “Injector Testing Mode” to “One” and select the injector you want to test. Note that the injector channel is not likely to align perfectly with the cylinder number, but is rather the firing order. For my L6 even-fire engine, which fires 1-5-3-6-2-4, that means cylinder 1 is A, 2 is E, 3 is C, 4 is F, 5 is B, and 6 is D.

Place the nozzle of the injector into the graduated cylinder, turn the fuel pump on (convenient button at the top of the screen if you’re using MegaSquirt to trigger your fuel pump), ensure you have the appropriate pressure at the rail (and no leaks, of course), and then press “Start.”

With my settings, it takes about six seconds for the test to run. Record the volume of the output from the graduated cylinder after each pass (and pour the, hopefully clean, fuel back into your tank).

Because there is likely some variation in volumes between your injectors, average the readings. In my case, the average was 27.625. Now, using our formula from earlier, we can calculate the actual flow rate, r.
\[V = \frac {n * r * (w - d)} {(1000 * 60)}\] \[V * (1000 * 60)= n * r *(w - d)\] \[r = \frac {V * (1000 * 60)} {n *(w - d)}\]

\[r = \frac {27.625 * (1000 * 60)} {50 *(60.6 - 0.6)} = \frac {27.625 * 1000 * 60} {50 * 60} = \frac {27.625 * 1000} {50} = 552.5\] Accounting for measurement error and possibly being wrong by a little bit on the dead time, I arrive at 550 cc/min. So the injectors that I thought were 440cc/min are actually 550 cc/min. Now I know why my car was constantly running rich and fouling out my spark plugs!

While we have the fuel rail out and our test set up, let’s also estimate our actual injector dead times, which isn’t imperative but will help with the tuning process.

Dead Time

In the previous test, we used a large pulse width so that any injector dead time would have a minimal impact on our readings. To estimate dead time, though, we want to amplify its contribution to the test so that we can easily observe it.

The approach we’re going to take is to estimate how much fuel should come out if there were no dead time at all, observe how much fuel actually comes out, and then calculate the necessary time difference to account for the variation.

_ Tip: For accuracy here, calculate the rate for each individual injector, and adjust the number of pulses accordingly. _

Injector dead time is dependent on voltage, so if possible, connect your car to a charger while running this test. The test screen also outputs the voltage during the test, so watch that and record the value.

Let:
* r = flow rate in cc/min
* w = pulse width in ms
* n = number of pulses
* E = expected volume of fuel if there were no dead time
* A = actual volume of fuel
* d = dead time

If there is no injector dead time, then: \[E = n * w * \frac{r} {1000*60}\] (Number of pulses times how much fuel comes out in each pulse converted to mL/ms.)

But there is injector dead time. So: \[A = n * (w - d) * \frac {r} {1000*60}\]

So: \[E - A = n * w * \frac {r} {1000*60} - n * (w - d) * \frac {r} {1000*60}\] \[E - A = n * w * \frac {r} {1000*60} - n * w * \frac {r} {1000*60} + n * d * \frac {r} {1000*60}\] \[E - A = n * d * \frac {r} {1000*60}\] \[d = \frac {E - A} {n * \frac {r} {1000*60}} = \frac {(E - A)*(1000 * 60)} {n * r}\]

As mentioned before, we want to amplify the impact d has on this reading, so we want a very small pulsewidth here. For peak-and-hold injectors with a driver, use something like 1.5ms; for saturated injectors (or peak-and-hold with a resistor pack), use 2ms.

With such a small pulsewidth, though, we need a lot of pulses to get a reading. Using our earlier formula, we can estimate how many pulses are required to get a certain volume of fuel.

\[n = \frac {V * 1000 * 60} {r * w}\]

We know that a lot of our pulsewidth will be eaten up with dead time, so aim for having a larger volume of fuel in this test. In my case, I want about 30mL of fuel, and I’m using 1.5ms pulsewidths for my peak-and-hold injectors. \[n = \frac {30 * 1000 * 60} {550 * 1.5} = 2181.8\] Round up.

For this test, I’m requesting 2182 pulses of fuel. If I leave the output interval at 60ms, the test will take 132 seconds (2182 1.5ms pulses plus 2181 pauses of 60ms). Ain’t nobody got time for that. So I dropped my output interval to 20ms, which simulates my L6 running at 6010rpm, and reduces the test time to only 45 seconds. I’d encourage you not to push your injectors beyond what they might actually experience in the real world.

Since we’re requesting so many pulses, note that there is a pulse counter gauge on the right. It’ll stay pinned at the 1000 marker if there are over 1000 pulses left, but becomes useful after that.

After running the test, I observe 18mL of fuel.

\[d = \frac {(30 - 18)*(1000 * 60)} {2182 * 550} = 0.60\] So my injector dead time is 0.60. While my test was running, by battery tender kept the system at 12.2V.

TunerStudio wants the dead times to be set at a certain voltage, so now we have to adjust for voltage differences. If you have the means to adjust the voltage while performing the test (after all, the car runs at over 13.8V if your alternator is working), that would allow you to input the adjustment curve, as well. But for those who don’t, you can use one of the provided voltage curves.

Using Curve 1 in the dead-time menu, you can see the percent by voltage. In my case, 12V has a dead time of 124% of the provided value, and 14.4V is 76% of the dead time. You can get the percent per volt with the standard slope formula:

\[m = \frac {y2 - y1} {x2 - x1}\]

\[m = \frac {76 - 124} {14.4 - 12} = \frac {-48} {2.4} = -20\]

So for every increase of one volt, dead time decreases by 20% in this curve.

To find the voltage that TunerStudio considers to be 100%, use the equation of a line:

\[y = mx + b\] In our case, y is the percent dead time, m was calculated previously, and we need to find b by plugging in one of the points.

\[124 = -20*12 + b\] \[124 = -240 + b\] \[b = 364\]

So my curve is: \[y = -20*x+364\] Find y when x is your test voltage (in my test, 12.2): \[y = -20*12.2 + 364 = -244 + 364 = 120\] Take your estimated dead time and multiply it by 100 over your tested voltage dead time percentage. In my case, I calculated a dead time of 0.60 for injector #1, and 12.2V is 120% dead time, so:

\[0.60 * \frac {100} {120} = .50\] So the estimated dead time at 100% is 0.50ms. This is the value I’ll put into TunerStudio.

You can set a single dead time for all injectors, or you can set them individually. Since we have everything set up to test them individually, why not?

For best accuracy, use the actual flow rate for each individual injector from our previous test (for setting up the engine parameters, we wanted just the average), and adjust n, the number of pulses, based on the indidivual flow rates. You can also re-calculate E, the expected volume, after rounding n up, to get better precision.

Conclusion

After all of this, you should be able to properly test your injector flow rates (to identify mystery injectors, or to simply diagnose or test performance levels), and set a more realistic injector dead time.

If you have any questions, or have an idea for an article, feel free to email me at r.sherwoodjr@gmail.com.

Return to Index