Making a non-linear resistance look linear

Hi,

I'm planning to fit a fuel tank with a contents gauge. The sender that the tank manufacturer will put in is essentially a variable resistor, which reads 180 ohms when the tank is full, and 0 ohms when it is empty with, presumably, a linear resistance in between. There is a gauge that connects to this - presumably an ammeter and a means of passing current through the sender?

My problem is that the tank is not square, and so the height of the sender float is not directly proportional to the amount of fuel actually remaining. More unfortunately, it's actually "the wrong way round", so that when the gauge reads half-full there will actually be significantly less than half a tank of fuel left - perhaps a quarter or less.

I've wired up a couple of PICs and so on in my time, but have very little experience with basic analogue electronics. Is it possible to build a passive circuit (perhaps a network of resistors?) that will "convert" the resistance of the sender so that it's proportional to the amount of fuel remaining rather than the height of the sender float?

Some sketches of the tank here:

formatting link
Note that the lame attempt at isometric projection actually makes the tank seem squarer than it is - the slope is in fact very pronounced indeed, it's basically wedge-shaped in all three dimensions, plus a sneaky little change of gradient in one side.

This shape means the perfect correction is probably quite complex - but all I really want to do is pin 3/4, 1/2, 1/4 in their right places. I can pour water through the tank before installing it, to measure the "observed" resistance at those points.

Note the "orientation" of the sender is indeed 0 ohms when empty - I believe the other way round is normal in the US but I haven't made a mistake! I could special-order the American sender if required, but it would then make my gauge read backwards unless flipped again as part of the circuit.

Thanks for any help or suggestions,

Pete

Reply to
Pete Verdon
Loading thread data ...

On a sunny day (Sun, 31 Jan 2010 23:09:51 +0000) it happened Pete Verdon wrote in :

sender -> [PIC, ADC in, lookup table, PWM DAC out] -> analog meter.

Reply to
Jan Panteltje

Thanks, but I'm hoping to avoid using a PIC. It would be possible, but I don't own a programmer, and it's a very long time indeed since I did any C or Assembler. Having a processor running continually just to make the fuel gauge work also seems like overkill to me.

Pete

Reply to
Pete Verdon

On a sunny day (Sun, 31 Jan 2010 23:46:16 +0000) it happened Pete Verdon wrote in :

PIC programmers can be made with about 3 $ in parts, I use one like that. A small PIC uses less then 1.5 mA for an application like this. Any analog solution will cost more parts then the programmer + PIC together.

Reply to
Jan Panteltje

Hmm. Looking at some of the hair-raising suggestions being proposed for an analogue solution, you might have a point :-)

Pete

Reply to
Pete Verdon

t.

ther.

The gauges you are talking about use quite a bit of current, having a sensor and gauge circuit resistance of 100-300 Ohms power to ground. A micro based circuit should use less current, especially if used with a voltmeter type gauge. For a micro look at PicAxe, $20 will get you running with an easy to use Basic interpreter.

Westach makes gauges that can be adjusted for zero and span. Also they offer fluid level sensors, from Centroid Products, that can be creatively bent to help linearize the output. Centroid offers both current and voltage output sensors with digital or analog displays. Both companies are worth calling about your application.

Calibrating a sensor with exposed resistive element in water vs fuel can affect you readings since the water is most likely conductive from contamination.

Reply to
BobS

Late at night, by candle light, Pete Verdon penned this immortal opus:

I missed the OP, so I may be off target here. Most fuel gauges I've seen don't worry too much about absolute linearity. The actual readings seem to be "full", "empty" and "time to think about filling up". In-between you just give it the occasional glance to see if it's still OK.

- YD.

--
Remove HAT if replying by mail.
Reply to
YD

That's all I need, but the shape of the tank (wedge shaped in two dimensions) is such that the non-linearity is rather extreme.

Pete

Reply to
Pete Verdon

The more extreme, the better table lookup is.

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com
Reply to
Don Lancaster

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.