One for the electronics wizards.

GHA

Well-Known Member
Joined
26 Jun 2013
Messages
12,552
Location
Hopefully somewhere warm
Visit site
With new day tank going in I want to have the pump switch off when the tank is full, there's a sender which steps up resistance as the tank fills, highest setting 190ohms.
http://tektankslimited.com/s3-25-waterfuel-sender-25cm-1604-p.asp
Would the circuit below work as a trigger for a relay?(or a Transistor or something to trigger a relay) The 171ohm resister at the top represents the sender.
Or is there a better way?
Also, I want to do similar as the resistance steps up to make a led gauge of how full the tank is, would the best way be to just put more op amps in with different resistor values? Or is there an easier way?

Tia as ever :)




op%20amp2.jpeg






op%20amp1.jpeg
 
I don't qualify as a wizard but, for your meter you should look at the LM3914. It's cheap, designed for exactly this type of application, and has 10 comparators on board. It would be easier than using 10 op amps.
FWIW, if I were using an LM3914 I would use 9 steps for the meter and use the tenth to trigger the "full" circuit. You could probably use the tenth step to both switch on an LED and trigger the full circuit if you wanted. No real need for a separate op amp.
 
I don't qualify as a wizard but, for your meter you should look at the LM3914. It's cheap, designed for exactly this type of application, and has 10 comparators on board. It would be easier than using 10 op amps.
FWIW, if I were using an LM3914 I would use 9 steps for the meter and use the tenth to trigger the "full" circuit. You could probably use the tenth step to both switch on an LED and trigger the full circuit if you wanted. No real need for a separate op amp.

Fantastic :cool:

Looks like just the job, just need a 5v supply.
Thanks !

lm3914voltmeter.jpg
 
You'll need to check that. The 5V is the signal, which will come from the tank sensor. The supply voltage is shown as 6.8-18volts. But it's sometime since I played with one. If you download a datasheet I think you will find tons of information and alternative circuits for the IC.
 
As the sensor is basically just a 10 step variable resistor I'm thinking some sort of voltage divider will be needed to convert that into a voltage? Datasheet says input can be from 1.2v to V+.
 
I don't know. The sensor may be a potential divider in its own right, or it may be that it would form one half of a potential divider.
You will also need to check if the sensor is logarithmic or linear, but I would guess it would be the later.
 
Fantastic :cool:

Looks like just the job, just need a 5v supply.
Thanks !

You can also use the LED drive to change from a dot display to a solid bar as the tank is nearly full, plus relay drive, see op note for chip.
If you use that circuit you need the gauge to read from zero empty, if you fit a pull up resister to ref hi, and sink ref lo with a resistor you can use a value above 0 for empty.
LED drive should be around 10 ma.

Brian
 
I don't know. The sensor may be a potential divider in its own right, or it may be that it would form one half of a potential divider.
You will also need to check if the sensor is logarithmic or linear, but I would guess it would be the later.
Sensor is basically a series of 20ohm resistors which get connected by reed switches triggered by a float, so very low resolution liner a I suppose. Datasheet says ref voltage set by Vref =1.25(1+r2/r1)
So if I had a 45ohm resistor in series with the sensor and a 5v voltage regulator then between the resistor and sensor should go from 0v - 4v?
 
This is why I used a microcontroller for my fuel gauge, so the readout can be calibrated.

Fancy :)

For ours, TekTanks arranged for the sender people to make a custom sender with the reed switches positioned at appropriate irregular heights, so that it read linear capacity directly. Only cost about a tenner over the standard price, with Tek providing the offsets from their computer system.

Pete
 
You need it to get to 5V to trigger all the outputs, IIRC.

Note that if you use this circuit, the display may not be linear. This is why I used a microcontroller for my fuel gauge, so the readout can be calibrated.
4
From the data sheet it looks like it goes down to 1.2v?

And a rectangular tank so should be OK for a linear display.

Ta
 
Think I see what you eat now, I can't figure out how to convert the linear increasing resistance into a linear change in voltage :(

Maybe a constant current source something like this?

Just fit a separate reference, then you can have any zero value you like, fit sender into a voltage divider, as resistance increases voltage increases.

We use LM3914 AND LM3915 in that format in this display.

View attachment 38775

Brian
 
Last edited:
, fit sender into a voltage divider, as resistance increases voltage increases.
That's where I'm struggling - being a bit of a novice to all this and self taught from Google :)

So if you have a, say, 45ohm resistor in series with the sender and put them between 5v,
Empty tank the sender resistance is zero so voltage between the 45ohm and sender is 0/(0+45) * 5=0, half full it's 90/(90+45)*5=3.33v, full it's 180/(180+45)=4v. I can't figure out how to get the voltage directly proportional to the sender resistance.

But must be a way??

Tia
 
That's where I'm struggling - being a bit of a novice to all this and self taught from Google :)

So if you have a, say, 45ohm resistor in series with the sender and put them between 5v,
Empty tank the sender resistance is zero so voltage between the 45ohm and sender is 0/(0+45) * 5=0, half full it's 90/(90+45)*5=3.33v, full it's 180/(180+45)=4v. I can't figure out how to get the voltage directly proportional to the sender resistance.

But must be a way??

Tia

Forget about the internal ref.

The internal drive to LED's on 3914 are linear, the tank sender is linear, so it's just a matter of matching them.

Let us say there is a 1K resistor above and below the tank sender, empty would give 2.5 volt, say full is 200R. then the voltage above would be 2.73.

If you set 3914 ref lo at 2.5 volt and ref hi 2.73 volt, you now have a linear read-out.

Above is a rough guide, be back later going to see if I still have a boat.

Brian
 
Forget about the internal ref.

The internal drive to LED's on 3914 are linear, the tank sender is linear, so it's just a matter of matching them.

Let us say there is a 1K resistor above and below the tank sender, empty would give 2.5 volt, say full is 200R. then the voltage above would be 2.73.

If you set 3914 ref lo at 2.5 volt and ref hi 2.73 volt, you now have a linear read-out.

Above is a rough guide, be back later going to see if I still have a boat.

Brian
OK, thanks, maybe something like this?
With the 2.5v to pin 4, V-lo, 2.73v to pin 6, V-hi and the bottom 2.62 from the sensor to pin 5 sig.

Thanks for your help, good luck with the boat!

Voltdiv.jpeg
 
Think I see what [Nigel meant] now, I can't figure out how to convert the linear increasing resistance into a linear change in voltage :(
Exactly. The voltage will always be in the ratio of the variable resistance to the total. Therefore non-linear. I did wonder about using an LM317 as both the regulator and the voltage source, but I think the problem remains.
 
Last edited:
OK, thanks, maybe something like this?
With the 2.5v to pin 4, V-lo, 2.73v to pin 6, V-hi and the bottom 2.62 from the sensor to pin 5 sig.

Thanks for your help, good luck with the boat!

About.

You need a 1K2 from pin 7 to ground, sets LED drive current, how bright, link pin 8 to ground, pin 9 open circuit sets dot mode.


Brian
 
Voltdiv.jpeg


Just got round to a bit of soldering and it works, hurrah! Using the Lm3914 to provide 5v then the above, move the sender float and the LEDs follow, magic :) . So big thanks for the help, forum at it's best :cool:
 
Top