Help with building your Speeduino, installing it, getting it to run etc.
By kettlekev
From searching the forum this has come up a few times but a while ago and I can't see any resolution?

The end goal would be to add consumption to the serial output so that Apps like RealDash can read it directly.

So before I start, has it been done yet? I can't see anything in the manual.

So assuming not, on a sequential fire engine is it fairly simple? (probably not and I am sure I am missing something).

If I know the fuel injector pulse with (opening time) and I know the injector flow rate, I can calculate a fuel flow for each cylinder. So a 100 cc/min injector on a 50% opening (duty cycle) in one minute has flowed 50cc. Obviously this only works on constant throttle which isnt reality (not sure how to fix this).

If I can then measure speed with the VSS sensor in miles/minute.

The final calc would be if I have driven for 1 minute and used 50cc of fuel and I have traveled one mile then my fuel consumption is 50cc/mile.

If my tank is a 100cc volume tank then I can calculate I will run out of fuel in 2 minutes or 2 miles as I use 50cc/mile.

If this can be added the serial string the Realdash can take it and use its internal calculators?

OR buy a fuel flow meter and use that as an analogue aux input? Would that work? I assume I would also have to measure fuel return and do a subtraction?

OR just run a capacitive fuel level sensor into an analogue input on speedy?

Sounds too simple. What am I missing?
User avatar
By jonbill
I've not done it, but I think it is basically as you say.
The fun part I imagine is working out sampling and averaging strategies that give accurate and useful results.
By dazq
You would also need to take dead time of the injectors into account too.

The idea of a pair of flow sensors would work fine , many OEM have done it this way (I had a late 90s ford escort with travel computer that had mechanical injection that used two flow sensors).
User avatar
The calculations can be found in TunerStudio and documentation, which can calculate instant and cumulative economy now, but of course resets at shutdown. If your dash program has memory, then it can hold accumulated values.

Alternatively, I would think a universal add-on (Arduino Nano) could tap injector signals with latency calibrations (and other data) to accumulate and average both instant and accumulated economy by volume or %, etc.

It doesn't have to be in Speeduino code, and would be both more powerful and configurable as a standalone add-on for any ECM type or even carbs. My immediate thought is the little GPIO, perfect to do lots of stuff similar to this. ;) @dazq's thread here. The GPIO could also then output fuel level, low-warning, speed, gear, and other info to gauges, LEDs or tablets.

BTW - yes, I would push to not have it in code, as if we are adding stuff to code, it should be stuff that is to run the engine better, e.g., ICIT for individual-cylinder ignition timing trims, and other engine-function purposes. ;)
By kettlekev
Guys, great advice thanks.

I was wondering if the capacitive fuel tank sensor would be enough with some good Nano code in that for a known tank size I can calculate flow/min and as it would give a total fuel value then a range calc is possible. Any flaw in this plan?

I will try to work out what RealDash offers as calculated fields and memory and probably go down the separate Arduino Nano route or similar.

I'm adapting a speeduino for a Vtec 400HP turbo Classic mini AWD. Lots of fun..... :D
By apollard
Fuel tanks are not shapes that lend themselves to level to volume conversions. They are too complex shaped.

A fuel cell might work for level to volume conversion.
By ric355
It's been done as a pull request a long time ago but was never integrated. This change counts 'injection seconds' since the engine was started and that can be used as the basis for consumption calculations.

I have this in my custom firmware, together with an extension that puts injection seconds onto the serial3 feed. I then calculate the MPG in my digital dash.

For this to work properly, you must have the injector voltage correction mode set to 'open time only' otherwise you won't get very good results. You will need to tune the injector flow rate you use in your MPG calculations to get an accurate figure. You can do this by doing standard MPG calculations from a full fuel tank / refill, and then back calculating the flow rate from the logged injection seconds and actual fuel used.
User avatar
kettlekev wrote: Sat Nov 25, 2023 9:02 amI was wondering if the capacitive fuel tank sensor would be enough with some good Nano code in that for a known tank size I can calculate flow/min and as it would give a total fuel value then a range calc is possible. Any flaw in this plan?
That's a workable plan, and I had a Nano calculate the fuel level for accurate gauge some years ago. It calibrated each 1/4 tank, so odd tank shape was not a big deal. Reading from the sensor, calibrations, slosh buffer (rolling average) made for a good tank level gauge, with the ability to add range and consumption. Calibration was amazingly accurate as the tank is filled by measured increments pausing to hit a cal button, and the calibrations set for as many divisions as you like for odd tank shapes.

Else, if you just need a tank gauge, there are several smart-phone apps that provide a graphic gauge that tracks distance and divides capacity. Easy stuff if that's all you need.
Can bus problem with STM32

I placed a 120 ohm resistor on the speeduino side […]

How bad did I mess up my PCB

It's probably recoverable. Take a look at the sche[…]

Suzuki RE-5 EFI Conversion

check the relay is clicking, and the fuse. Check t[…]

That’s awesome! Congrats! So you were still[…]

Still can't find what you're looking for?