I though about using a known-value resistor shorted to +5v to create my own voltage divider for the arduino. But I'm afraid that this may damage the existing dashboard indicator when the variable resistor value gets too low. What do you think?
That looks great. You’ve made a lot of progress.
Your existing fuel gage may have a resistor in line already or it would draw a lot of amps when close to grounded. Do you get a varying voltage on that wire with everything hooked up at different fuel levels? Maybe you could filter that to be Arduino compatible.
I’m sure you realize, but that pull up resistor shouldn't pass enough current to get the tank sender hot.
There are many topics here on liquid level gages. There are also some on motorcycle gear shift indicators.
Fuel tanks in vehicles are never uniform in horizontal and vertical dimensions.
In cars they are fitted in the vicinity of the rear axle and differential gear and change cross section with every centimeter of heigth.
The fuel gauges built into cars and motor bikes are just "estimators" which becomes obvious when a fully refueled car doesn't seem to consume gasoline the first 100 to 150km and then rapidly decreases in tank indication.
To get an accurate readout about the actual fuel amount in the tank you will have to remove the tank and fill it up liter by liter and measure fuel level height. Thereafter you might calculate for tank content.
Using air pressure inside the tank will lead to misreadings when the fuel level gets low and you are driving hard turns exposing the pressure hose to air before the tank is empty.
Better use the float connected to a variable resistor for that purpose. The software should evaluate "readings" at certain time intervals to make sure the fuel reaches highest and lowest level to compensate for errors when driving curves.
Boncuk
Boncuk
Yes there is I looked into it. I built a dash guage system for my car I looked into mpg but didnt fancy the maths. Most cars have obd connectors, you can get data from this, they call them pid's, you request a pid and the ecu returns it, one of the pids is engine load, this directly tells you the amount of air is entering the engine, at the same time you can get the pid for the lamda, this tells you the air/fuel ratio, knowing these 2 pieces of info you can calculate the amount of fuel entering the engine, eg a 2 litre engine at wide open throttle will use 1 litre of air per rev, at perfect fuel/air ratio of 14.7:1 the amount of fuel would be 1/14.7 about 0.06l (at less than wide open throttle you multiply the maximum amount of air by the load %), from the obd you can also get the rpm and road speed pids for the car, then you can work out the mpg.
You could just ignore the fuel/air ratio and assume its 14.7:1, most engines are pretty good now, or you could go the other way and take air temp (density) and fuel temp into consideration. This is how manufacturers do it to get dashboard mpg. I might have got a couple of details wrong there its a while since I looked into it but the gist is correct. Or you could always fork out 40 quid and buy yourself a digi dash which does this and a whole load of other things from the obd connector.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?