Page 3 of 5
Re: Arduino ...
Posted: 03 Dec 2014, 14:00
by BertieWells
Thats very cool, if i had a diesel van then i would be building a system for them rather than petrol it comes down to how easily i can test and develop the thing. No bias against diesel ... honest
I think i will try both HT lead and a sensor on the crankpully. And if the latter turns out to be simple to impliment then so much the better

Re: Arduino ...
Posted: 04 Dec 2014, 09:02
by BertieWells
I dont think it would be difficult to have the update speed dependant on the speed of the engine. For example when on tick over you only need a slow update speed. When i get a chance i will have a look in the engine bay and see if its possible to mount a sensor near the crank pulley. It would be good to see some pictures of this particular area of your van (petrol and diesel) to see if this is the way to go.
Re: Arduino ...
Posted: 08 Dec 2014, 11:22
by Hacksawbob
add a fuel flow meter and get mpg figures?
Re: Arduino ...
Posted: 08 Dec 2014, 11:27
by BertieWells
Cracking idea
Re: Arduino ...
Posted: 08 Dec 2014, 11:28
by CJH
Hacksawbob wrote:add a fuel flow meter and get mpg figures?
Good idea. How does a fuel flow meter work, given that there's a return line to the tank? Is the flow rate back to the tank so low that it can be ignored, or does the meter measure the difference between flow and return?
Re: Arduino ...
Posted: 08 Dec 2014, 11:30
by BertieWells
The meters i have seens you connect in series with a hose pipe or something similar. The flow rotates a disk connected to a hall sensor. You can then interperate the number of turns of the disk as an amoun fo fluid passing

Different sensors might work differently ofcourse.
Re: Arduino ...
Posted: 09 Dec 2014, 07:02
by Hacksawbob
There's a mpguino project out there that might be worth a look. I cant find any info after a quick look on fuel flow meters. One method is to calibrate your system on brim measurements.
Re: Arduino ...
Posted: 09 Dec 2014, 07:45
by mrhutch
flow rate is not the best way to do this..
you would have to measure flow from fuel pump and also the return line.. Fuel rail stays pressurised to allow injectors to "pop"
If you know the pressure of the fuel rail, and the length of pulse for injection, plus the size of nozzles you should be able to work out volume of liquid injected . So pressure sensor on fuel rail would be needed.
Re: Arduino ...
Posted: 09 Dec 2014, 08:00
by irish.david
Hi,
Next year i've got all sorts of plans to add a more modern control and feedback system to my van using lots of Arduinos dedicated to various functions (heating control, eber control, engine readouts, etc) and linking them all usings their built in I2C bus. Got a few sketches on the go already but still have a bit of a way to go.
BertieWells code looks pretty good but a slight improvement might be to change the formula that calculates the RPM to include the static value for Interval, which would look like this.
RPM = (((spikecount * (1000 / Interval)) / 2) * 60);
or to reduce the calculations for the Arduino slightly:
RPM = ((spikecount * (500 / Interval) * 60);
This way, if you wanted to muck about with different time intervals, all you'd need to do is change the value of interval at the top and everything would work with the new interval.
Another approach could be to use the interrupt function built into the Arduino to count a set number of spikes over a time period and work out the RPM from that. That way the all you'd need to do is figure out how many spikes you need for an accurate reading and then the display would update quicker the higher you revved.
Dave
Re: Arduino ...
Posted: 09 Dec 2014, 08:32
by BertieWells
Irish.David,
That looks good andis more or less along the lines what i was thinking. Because the accuracy of the reading varys over different engine speeds (which way depends how you calculate it) i was going to have "interval" vary using fuzzy logic. ie if the engine speed is between this and that then interval should = this. Or i guess the map function could be used to creat a more continious variable. It would calculate what interval should be from the last reading made of engine speed.
Re: Arduino ...
Posted: 09 Dec 2014, 09:57
by irish.david
My inital thought was to do some sort of variable interval based on the previous reading of the RPM, or try to measure the time between the first two spikes and set the timing interval based on that, but when you think about what's actually going on it's just a roudabout way of trying to collect a minimum amount of spikes to get an accuate reading. By using a longer interval for slower engine speeds you're catching more spikes to get a more accurate reading, so why not just say that you need a minimum of 10 spikes for an accurate reading and go from there.
You could use something like this for the sketch:
//
(declaring variables)
int MinSpikes = 10;
(loop)
Interval = EndTime - StartTime;
RPM = ((MinSpikes * 60000) / 2) / Interval;
//
EndTime and startTime are the millis values recorded at the first spike and the final spike after the MinSpikes counter has reached the chosen value. If you find it's not accurate enough you just increase the value of the MinSpikes variable at the top of the sketch, or if you want it to update faster you decrease the value and everything works from there
I think either method will need to use the interrupt method of measuring the input as the duration of the spikes is pretty short and the program loop speed might not be fast enough to catch it without an interrupt.
Dave
Re: Arduino ...
Posted: 09 Dec 2014, 10:19
by CJH
mrhutch wrote:flow rate is not the best way to do this..
you would have to measure flow from fuel pump and also the return line.. Fuel rail stays pressurised to allow injectors to "pop"
If you know the pressure of the fuel rail, and the length of pulse for injection, plus the size of nozzles you should be able to work out volume of liquid injected . So pressure sensor on fuel rail would be needed.
Not sure this would be applicable to a carbed setup though. I can't really see an alternative to fitting two flow meters - one in the supply side and one in the return side - and subtracting the return from the flow. I've no idea what these meters would cost, so maybe this makes it a bit impractical, but on the plus side they could both be mounted near the corresponding tank spigots so the wiring to the dash would be quite short. And it would be a common setup whatever fuelling system you have.
Re: Arduino ...
Posted: 09 Dec 2014, 11:55
by CJH
CJH wrote:I can't really see an alternative to fitting two flow meters - one in the supply side and one in the return side - and subtracting the return from the flow.
Hold on - I suppose the flow rate on the supply side is directly proportional to the rpm for a mechanical pump, isn't it? Or does the flow rate go down if there's some back pressure? If it's a fixed relationship with rpm, it should be possible to measure/calibrate that once, and thereafter just measure the amount being returned to the tank.
Re: Arduino ...
Posted: 09 Dec 2014, 13:25
by tonytech
For fuel economy just have a sensor on throttle position....
Closed = good fuel economy.
Open = awful fuel economy.
Simple.
Actually I had a golf with an eco meter that sensed manifold vacuum.
Not sure how that worked, but an idea.
Re: Arduino ...
Posted: 25 Jan 2015, 18:24
by BertieWells
Hi Guys,
A bit of an update. Really nothing useful here but i now have installed in my van variable colour/brightness dash lights.
When you turn your lights on a little start up routine plays. After that you have control over brightness and colour using a single momentary button.
Colours at the moment are:
Red, Green, Blue, Purple, Turquoise, Yellow, White.
Brightness:
Off, 3 stages of on and full on.
A short click changes the brightness where as a slightly longer press (>1/5 sec) changes the colour.
Here is a video of them working
I was wondering if you guys have any feed back on them?
Things i plan on changing is:
Have the brightness changeable from the original brightness variable resistor.
Being able to save your last colour and brightness settings when the lights are off to be loaded up when you turn your lights back on.
Enjoy
Rob
If there is interest for having one of these please pm me
