Pump controller driven by variable-resistance fuel level sender


Joined Sep 9, 2010
Wayneh - I built your circuit from post 29 -- not the one with the two comparators. But I made a colossal mistake in describing the requirements. The voltage from the fuel sender is 7.5 V when EMPTY and 1.9 V when full. I described it backwards in my initial post. To fix that, I put an inverter on the output of the comparator.
There are lots of ways to do that. Sounds like you've got one working. But just using the N-channel MOSFET below the load, instead of the P-channel above it, would do it and may be simpler.
The main difficulty, however, was tweaking things. My breadboard power supply has 13.0 volts, not 12. And on the boat, the circuit will be fed from the boat's main DC system, which could be anywhere from 12 V to 14 V. So some way to adjust things was needed.
Yeah, that's what I was getting at in #34. The system voltage will vary in the real world and some tweaking will be needed once you see how it's working on the boat.
So I modded the circuit and put a 50K trim pot (set at about 26.5K) in place of R4 and a 1K trim pot (set at about 420 ohms) in place of R2. The R4 pot adjusts the lower (cut-in) threshold and the R2 pot adjusts the upper (cut-out) threshold.
I'm confused by this. The variable pot should be ~50K and replace R5 (in the circuit in either #29 or #39). This adjusts the hysteresis. I suppose if you have it working by tweaking the pull-up resistor, that's OK. Check the specs of your comparator to see if it can sink the current fed to it through that small a resistance at the pull-up.
Oh -- and there was a mistake in the drawing. R1 and R7 are shown as "100". They should be "100K". I assume it was a typo -- the circuit didn't work at all with 100 ohm resistors in there, but works like a charm with 100K resistors.
Yes those were residual from simulating the sender. You can remove them completely.
While testing, I didn't actually put in the MOSFET and relay. I just hooked up the output line to an LED. Made it much easier to adjust the trim pots while swinging the float arm of the fuel level sender back and forth. I could see the LED turn on and off out of the corner of my eye while focusing on the adjustments, etc.
Good move.
Thanks to everyone for all the help! Now to build the final circuit board, seal everything up in a watertight enclosure, and install on the boat. Just as soon as the metal shop finishes fabricating my tank.
Be sure to come back and report how it turns out.


Joined Nov 23, 2015
Design 832 Fuel Pump.PNG [
View attachment 111723
I have a fuel tank that will be filled by a 12V fuel pump. The pump needs to turn on when the tank is empty and turn off when the tank is full. As the tank empties, the pump should stay off until the tank reaches empty. There are zillions of circuits that do this, but they all rely on binary switches that sense full and empty conditions. But my tank has a fuel level sender (Moeller makes it) that is a variable resistance driven by a simple swing arm with a float. When the tank is full, the arm is roughly horizontal. As the tank empties, the arm swings down until it hangs vertically when the tank is completely empty. The swing arm drives a variable resistance with 33 ohms meaning empty and 240 ohms meaning full. The fuel level sender is connected to a gauge that sends 12 V through the sender.

My thought was to add a 200 ohm resistor in series with the fuel sender to create a voltage divider. The voltage drop across the sender will then tell me what the fuel level is. My calculations tell me that when the voltage drop is 1.7 volts, the tank is empty, and when it is 6.5 volts, the tank is full.

So -- what I need is a circuit that activates a relay when the circuit's input voltage is 1.7 volts (or less), and keeps the relay active until the input voltage reaches 6.5 volts. It then must turn the relay off and keep it off until the voltage drops to 1.7 volts again. What I don't want is a pump that runs whenever the voltage drops below 6.5 volts, because it would kick on and off constantly. In my application, it takes about three hours to empty the tank, and about 10 minutes to fill it. So my pump only needs to run for about 10 minutes out of every three hours.

I would want to be able to tweak the limit voltages of course -- the fuel level sender's resistances may be slightly out of spec.

I have looked at various parts (comparators, window comparators, etc.), but I can't figure out how to rig them up so that the pump stays off while the tank drains, and only kicks in when it's empty. Again, this is trivial if you have binary "full" and "empty" switches, but I want to use my existing fuel level sender.

FWIW, I'm not concerned about start-up conditions. For example, suppose the pump was running and the tank was rising to about half full when I turn the system off. When I turn it back on again, the pump can stay off -- no need to "remember" that it was in its "fill" cycle previously. The only thing that matters is that while the system is energized, the pump turns on at 1.7 and turns off at 6.5. But it would be a nice feature to have the pump *always* turn on when the system is energized, then of course turn off when the tank is full. That way whenever I start a trip, my tank will be full.

BTW, the fuel tank is a "day tank" on a sailboat. The day tank is supplied from the main fuel tank. The day tank feeds the engine. If you're interested in sailboat auxiliary diesel engines and why I would want a day tank, let me know and I'll explain.

Circuit suggestions?
Just a starting point ...
Last edited:


Joined Nov 23, 2015
Design 833 voltage comparator with hysteresis.PNG
View attachment 111724 [

I never tried designing a voltage comparator with hysteresis before. Does this work?

Thinking ...
Desired trigger points, 1.7 V and 6.5 V.
So op amp power must be 1.7 V above the high trigger point. A convenient 8.2 V.
What resistor paralleled with a 10K gave me 1.7 V considering 8.2 V over all?

When the input is low (below 6.5 V) the motor should be on, output of the op amp high, putting the 3.6K in parallel with the upper resistor. This gives us the 6.5 V ytip point.
When the input is above 6.5 V (tank is full) the output of the op amp goes low putting the3.6K in parallel with the lower resistor giving us the 1.7 V trip point.
When the input goes below 1.7 V (tank is empty) the output goes high again.

An op amp was chosen instead of an LM393 type so the output could go actively high. Any voltage comparator that goes actively high would work also.
Last edited: