Continue to Site

# lm3914? fuel gauge

Status
Not open for further replies.

#### haris_216

##### Member
hello all. I am posting here to describe you my problem in case somebody has any idea. my car has, like most cars, analog dash instruments, fuel gauge included. that gauge, due to the strange shape of the fuel tank, is pretty inaccurate. it's not a big problem unless you are an accuracy freak which probably is my case. the sender from the tank consists of a float attached to a potentiometer which sends different voltage readings depending on float position. unofotunately although the output is linear comparing to float movements, it is not regarding fuel quantity. I was thinking to use lm3914 with 10 led display as fuel gauge. given the cars' 40 lit tank capacity, each led could represent a 4 lit of fuel. So my questions are: if I get into the procedure of adding to the empty tank 4 lit and then write down the sender's voltage output, is there any way to connect those reading (given that they won't be linear) with a linear display output?
and second: I know the alarm function of 3914 when "going up". is there any way that I can have whole bar blinking on the "way down"? for example whole bar start blinking when 3rd lead goes off and have only two leds lit?
thanks to all that took the time to read my big post and thanks in advance to all that might take the time to think into it

given the non-linear nature of your fuel tank, it may be better to use a small micro with inbuilt ADC and use a look up table. A lot more work, but in the long run easier than trying to linearise non-linear data for an LM3914

I did a similar thing for a flap indicator for an aircraft which used a non-linear rehostat as a position indicator, but I didn't use an LM3914. I made my own LM3914 equivalent out of 8 LM339 comparators. This gave me the opportunity to make the steps monotonic, but non-equal.

I recorded the voltage out of the sender at steps of 5deg out of a total travel of 40deg. I created a voltage divider with 9 resistors (8 taps) where the voltages at the taps correspond to the 5deg steps. Note the B-source at the bottom of this simulation. Note the coefficients in the polynomial that describes the voltage of this source vs time. Note that in the simulation, 1 degree of flap travel = 1 sec.

You could do the same by filling your tank 1 gal at a time, and recording the voltage across the sender at each point. Put the points into EXCEL, and use the least-squares curve fit function to find the coefficients of a quadratic or higher order polynomial function through your points. You can then evaluate that polynomial at eight equal steps, and that will lead to a similar non-equal step voltage divider...

#### Attachments

• FlapIndicator.gif
86.1 KB · Views: 756
• FlapIndPlot.gif
26.7 KB · Views: 465
Last edited:
thanks a lot to both of you for quick reply. I do appreciate it. as I am not that experienced in the electronic field, I am gonna need some study to do in order to follow your leads but your suggestions do make sense. thanks for pointing me the way.

Fill your tank 1 galllon/liter at a time. Using an accurate digital voltmeter, record the voltage across the fuel tank sender as each gallon/liter is added. Also record the battery voltage with the engine stopped, key on while you are making the tests. Finally record the voltage with the engine reved up. Post your results. I will fit the curve and compute the nine resistors assuming you want the eight bars to read F,7/8,3/4,...1/8, and then go out when the tank is empty...

thanks a lot Mike for your offer. I have seen your posts and helpful guidance to other topics around and I must say that I admire all the time and effort you put into helping around. I sure will use your help for which I thank you in advance. I will do so, if not a problem, in sometime from now as at present the daily use of the car for the work, don't permit me to "play" with it as much as I'd like. you think that if measurements is litre related rather than gallon would cause you a problem?

oops sorry. was running too fast. am canceling the "litre question" as it is already answered. sorry

Liter or gallon becomes the independent variable for the curve fit, so it really doesn't matter. With liters, you will get more points, and a better fit.

The give you an idea of what we will do, here is the raw data for the flap pot vs flap position.

#### Attachments

• FlapXLS.gif
36.6 KB · Views: 393
Status
Not open for further replies.

Replies
52
Views
6K
Replies
2
Views
2K
Replies
1
Views
1K
Replies
14
Views
3K
Replies
1
Views
891