Help with low fuel level circuit

Discussion in 'General Electronics Chat' started by iwasnevy, Dec 30, 2010.

  1. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Hi all
    Sorry if this has been asked before, I searched and all I could find were discussions dealing with tying into a typical float-on-an-arm type factory sending unit.

    I'm not afraid of electronics, I can read a schematic, I understand the basics, and can design and build simple circuits, but I could use some help here cause this is a bit over my head and I don't know exactly what I'm looking for.

    I need to make a low fuel light circuit (automotive type application, in case it's not obvious!) which drives an LED. This application DOES NOT use a typical fuel level float on an arm supplying a resistance which varies with the fuel level, but instead uses a thermistor (?) which is cooled by the fuel surrounding it. When the fuel level drops below the thermistor, it heats up and it's resistance goes down (or up?)

    (Before anyone jumps about using something that heats up in a fuel tank, it's perfectly safe - simple chemistry here, it can't explode or incinerate...)

    Hondas have historically used this method to illuminate a standard filament bulb in the dash. One problem with the old honda circuits that drove a bulb - it was a direct driven current/resistance circuit, so as the thermistor heats, the bulb comes on slowly, dim at first and then brightening. If you take a fast corner, the bulb goes out as fuel sloshes over and cools off the sensor. This will be used on a motorcycle, where fuel will be sloshing around even more. in 2010, we can do better than that...

    Here's what I have in mind - as best as I can explain - a comparator circuit, where when the voltage drop across the thermistor reaches a threshold, it latches a circuit into an ON state to illuminate an LED, and stays latched until voltage is removed (ignition cycled). The reason for this is to avoid the light continuously turning on and off when the fuel level is right at the level of the thermistor.

    Ideally, the voltage drop is "buffered" by a capacitance circuit of some sort so it's not latching on falsely when fuel uncovers the sensor for a short period of time (such as when taking a corner or going through a long curve on the road) - so the voltage drop would need to stay low (high?) consistently over the course of maybe 2+ minutes before the circuit would latch on.

    I understand principles and generally what the basic electronics components do and how to use them, but I don't have the direct experience or knowledge to know what specifically to use or how to to put it together, so saying "use a voltage divider" doesn't do much for me, (while I can imagine that it's probably two resistors in series, I really wouldn't know it if it bit me!) I need hand-holding, more specific help or pointers to existing schematics...

    beenthere's suggestion in this thread:
    http://forum.allaboutcircuits.com/showthread.php?t=9053
    was the closest I could find, but while I followed what he was saying, I don't know how to use his suggestion to do what I'm looking for.

    Any help, direction or resources would be greatly appreciated, and I'd even pay someone to design this *relatively* simple circuit for me.

    TIA!
  2. marshallf3

    marshallf3 Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    2,358
    Location:
    Oklahoma City, OK. Large enough to be modern but p
    I just rely on the reserve switchover on my motorcycle petcock. When I have to hit it I know I've only got about 40 or so miles to go so I just fill up as soon as I can. This sometimes presents a difficulty as I have to seek out a station that sells GOOD 100% gasoline, the E10 ethanol stuff doesn't run as well nor is it very carb friendly on the 32 year old bike I have. It will work in a pinch but I tend to keep it out of there as much as I can - same as with my car. Luckily we've got that option down here, may cost 5 - 10 cents more a gallon but after years of calculating mpg I come out ahead by using 100% gasoline and my car's OBD-II computer will actually sense if I'm using Premium gas and advance the timing a few degrees thus I benefit from that as well, again offsetting the additional cost.

    You present a problem that's very difficult to deal with. I've been trying to come up with a gas gauge for my bike but I'll be darned if I'm going to make a hole in the tank to run wires through. Given time I'm going to try to mount some sort of ultrasonic device on the exterior of the tank hidden "under the frame hump" so to speak. The idea is that through hitting it with some pulses and looking at the return results I may be able to calculate how much of the total volume of the tank is air and how much is liquid by the change in the resonant frequency.

    Some people have made a Tee connection to the supply line and run it up in an inconspicuous area with a tiny orifice as a termination for the tube then made marks on it. Of course you've got to stop and look but it will give you a general idea of where you're at. Another method some have looked into has been a very precise pressure sensor but I've never heard if it was ever even tried nor put into practice. In theory it should work but again, without a large damping circuit, you'd need to stop before you'd get an accurate reading.

    The thermistor idea has extreme drawbacks on a bike as you've noted, and just a small splash onto the device will cool it back down.

    Motorcycle tanks present a problem as they're formed quite differently from that of a car but I really think that, once I get some experience in programming microcontrollers, my ultrasonic method will work out pretty well. It's been used on a much larger scale to do the same thing so I don't see why it couldn't work on a cycle tank as well.
  3. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Thanks for the reply. The whole point of doing this is to eliminate the reserve and not have to deal with running out of fuel and switching the petcock. Trying to bring this into the 20th century here...

    As far as implementation, that's easy - there are provisions there already in the factory petcock with very little modification. The "reserve" pickup (really, just a short tube) will become the sole fuel outlet. The thermistor will go inside an aluminum tube which replaces the main "pickup", at the same height. (These pickup tubes are soft plastic, so I don't want to put a warm thermistor in them.) The tube will have a few smallish holes drilled in it's length so it essentially acts as a baffle. Hopefully this will eliminate most of the physical splash-over effect, and the capacitance circuit should buffer the rest so that once the light is on, it means it.
  4. marshallf3

    marshallf3 Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    2,358
    Location:
    Oklahoma City, OK. Large enough to be modern but p
    By all means give it a try if you can sneak in through the petcock. After that all you'd need is a simple comparator circuit. You could even use a tiny LM35 or LM335 in the TO-92 case and achieve the same results without the heating but then you'd be dependent on the outside air and gas still in the tank temperature differentials.
  5. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Comparator circuit - got it. So the thermistor would be one of two resistors in a voltage divider, which would feed into a comparator circuit. The comparator circuit would then trigger a latching circuit, right? So far so good :)

    I know the thermistor takes a bit of time to heat up, from my experience, about 15 - 30 seconds or so depending how much current I'm drawing through it. In my mind, that's too short of a time - a long curve in the road would be enough to allow the thermistor to heat up and trigger the circuit.

    So how do I get a buffer in there so that it's not triggering the comparator every time the thermistor gets uncovered? Enough so that the thermistor has to be uncovered for, say a couple of minutes.

    I need to study a voltage divider circuit I guess. What I would need is for a capacitor to trigger the comparator once it's discharged, because it'll take no time to charge, but some time to discharge. So I need a voltage divider to charge the capacitor when the thermistor resistance is high (cold) and discharge the capacitor when it's low (warm).

    Am I on the right track? Help?

    I'll draw up a schematic of how I *think* it should be, once I get a chance to mull this over a bit.
  6. KMoffett

    KMoffett Senior Member

    Joined:
    Dec 19, 2007
    Messages:
    2,334
    Location:
    Minneapolis MN USA
    What's the possible temperature range of your fuel? With a thermistor and a resistor as a voltage divider feeding the comparator, the actual temperature of the fuel might be an issue in setting a reference voltage level. If you can use two heated thermistors in series as the divider, one always in the fuel and one at the low-alarm fuel level, the circuit will self-compensate for running in a Death Valley summer or in an International Falls, Minnesota winter. ;)

    Ken
  7. marshallf3

    marshallf3 Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    2,358
    Location:
    Oklahoma City, OK. Large enough to be modern but p
    You are on the right track but remember you'll need to isolate the divider network from the buffer cap with a diode, then you can program the discharge time of the cap by putting a little resistance in parallel with it.

    KMoffett's suggestion is also a valid one as you're dealing with a complicated problem here.
  8. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    I suppose theoretically, it could be anywhere from < -10ºc to 50ºc, although I'll guarantee I won't be riding if it's that cold! The thermistor is 'reading' an upper temp threshold, so if I set the voltage trigger to be anything above, say 65ºc, I think I would be ok. I have a feeling it's not going to be an issue - I remember the honda ones, when they were uncovered, they got very hot to the touch, enough so that there was the hissing sound of evaporation when it was submersed in the fuel. I could always just experiment with some warm water to find that threshold. For that matter, I could just run to the junkyard and yank a thermistor out of a honda and measure it's range and just use that. Then I know I have the "right" one and can work from there.

    You're saying so that the cap can't feed voltage back into the divider network, when the voltage in the divider drops below the voltage in the cap, right?

    --|(---|<----

    I think I'm getting this. hopefully I'll have some time to sit down this weekend and wrap my head around it and draw up a schematic. Then redraw it once you all tell me all the ways it won't work :)

    I can't believe I couldn't find a discussion like this on google. Seems that this would be something someone's done before.

    Thank so far for the help - I love a good challenge!

    And happy new year!
  9. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Ok, here's my first attempt, tell me if I'm thinking of this capacitor thing wrong.

    [​IMG]

    (Just to get an idea of how this should work, I used the specs for the thermistor from beenthere's suggestion in the other thread I referenced earlier.)

    Here's how I figure it - When the thermistor R2 is cold, it's resistance is high (>250 Ω) and the voltage at Vout 1 is high (>485 mV), charging the capacitor C1.

    When the thermistor R2 is hot, it's resistance is low (<100 Ω) and the voltage at Vout 1 is low (< 175 mV), and the voltage divider's output is below the potential in the capacitor C1 and C1 begins to discharge through Vout 2.

    Once C1's voltage at Vout 2 drops below the threshold (175 mV), it triggers the comparator input at Vout 2 (which I don't have in the schematic yet).

    So what am I missing? Anything? A resistor to ground between C1 and the comparator so it has somewhere to discharge? am I placing the capacitor in the circuit correctly?
  10. marshallf3

    marshallf3 Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    2,358
    Location:
    Oklahoma City, OK. Large enough to be modern but p
    First of all the diode is backwards in your schematic, the cap should go to ground and there should be a high resistance bleeder resistor across it. It was also mentioned that it might be of help if you had a dual thermistor setup so you could better sense the temp difference between the air and the liquid.

    Start with this but it's going to take some time to get all the values correct, especially since we don't know what your output will be driving.

    http://www.innoengr.com/examples/fuel_level.jpg
  11. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Ha! I knew I had the diode in right the first time, but I can never remember which way it goes, and I let google change my mind and I reversed it.

    Is this better?

    [​IMG]

    I know none of the values are filled in - at this point, I'm just trying to figure out what I need for the circuit and how to make it work.

    The output from the voltage divider/cap feeds a comparator, and when the cap discharges and Vin drops below Vref, the comparator's output goes high and turns the transistor on to illuminate the LED. R2 and R3 determine the Vref threshold.

    I need to put a latching circuit in between the comparator and Q1, so that once the LED is on, it doesn't turn off if Vin goes back to high. I don't know where to start - any suggestions?

    What else do I have backwards?

    Thanks all for your help, I know I'm a total noob at this.
  12. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Actually, now that I look at this, the LED would be on when the ignition is first turned on until the cap charges, so I'd have to reverse the whole voltage divider...

    I bet this would be a lot simpler without the "buffer", and I bet the baffle around the thermistor in the tank would more than suffice.

    Found a couple latching circuits that use transistors. I'll mull on this for awhile and post a revised schematic.
  13. marshallf3

    marshallf3 Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    2,358
    Location:
    Oklahoma City, OK. Large enough to be modern but p
    Don't use a 741 as they're wildly variable with temperature changes, use a modern comparator IC. Most have an open collector output but that's easy enough to get around. Think about your circuit a little longer and it will be obvious how to make the LED not come on until it's supposed to. Besides that you can keep the whole thing operating off of 12V and not need a 5V supply which I don't know why you've got in there anyway.
  14. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Thanks for the tip - I'll look for something else for the comparator. I have another homebrew circuit on this bike which is running on a 5v regulated supply. Since the bike's voltage can vary between ~13.5 to ~14.7v, and since I'm comparing mV in this circuit, I figured it would be more stable on the 5v supply. I was thinking I should feed the thermistor from this same 5v, but again, It probably doesn't really matter and I'm probably over-thinking it.
  15. marshallf3

    marshallf3 Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    2,358
    Location:
    Oklahoma City, OK. Large enough to be modern but p
    You're correct, I think you need to feed the thermistor part off of the regulated supply as well even if you have to include another 7805 IC in the circuit. It's going to work with far more accuracy and less problems if the entire power supply is at a common level.

    Perhaps something a bit higher would be in order such as a 7809 or 7810 but try to use the ACT parts, they can source over 2A if on a good heat sink. http://www.fairchildsemi.com/ds/LM/LM7805A.pdf
    Last edited: Jan 1, 2011
  16. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    So I was actually thinking correctly in running the circuit off the 5v regulated power supply? ...glad I got at least one thing right! :)

    The "other circuit" is nothing more than a battery operated motion sensing LED nightlight - with the voltage regulator put in place of the batteries to step the vehicle's power down from 12v to 5v. When I walk up to the bike at night, it senses the movement and turns on LEDs to illuminate the ignition and seat locks so I can see where to put the key in - it's pretty cool and works well. (This is a custom motorcycle build)

    Whatever regulator I'm using for the motion circuit was good up to a couple amps (I don't have my notes in front of me to see what IC I'm using) and that motion sensor circuit was only pulling about 38mA, so there's plenty of overhead, even with the thermistor in there I think (haven't done the math yet).
  17. KMoffett

    KMoffett Senior Member

    Joined:
    Dec 19, 2007
    Messages:
    2,334
    Location:
    Minneapolis MN USA
    Look at an LM311 comparator. Specs have the operational voltage down to 5V.

    Ken
  18. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    Thanks - that's the one I happened to be looking at.

    I think I'm getting this together. I flipped the logic over so that the comparator is triggered once the voltage goes high. This *should* mean that when the circuit is powered on (the cap will be discharged) and with both thermistors cooled by fuel, the voltage will be low and the cap will remain discharged as long as the sensing thermistor is cool.

    I'll post a new schematic once I get a few other things figured out.

    Insofar as the dual-thermistor idea - I like the idea of it being self-compensating, but I'm thinking that it's really not necessary, and it occurs to me that if it runs completely out of fuel, the reference thermistor will also be uncovered and would begin to self-heat, putting the voltage back in balance and the light would actually turn back off.

    The temperature difference at hand here in the thermistor is much larger than would be affected by the fuel temp. When the thermistor self-heats, It's gotta be upwards of 65ºc or higher, hotter than the fuel would be under any circumstance. (I've been burned when touching these things and I've seen them sizzle when put back into fuel - they got HOT!)

    In a worst-case scenario - an extremely blazing hot day in the desert - the fuel would only get up to 50ºc maximum. If I'm riding in higher ambient temp than that, the bike's gonna be overheating, and the fuel evaporating! I would think under most circumstances, even on a hot day, the fuel temp would remain below 32ºc, plenty of a temperature difference to measure with one thermistor and a second resistor to limit current flow and create a reference voltage.

    I appreciate everyone's patience - I only dabble in electronics once in awhile, when I've got a hair to build something that I can't source elsewhere. Point being that I have just enough knowledge to know what I'm looking for and to figure out the basics of what kind of circuits I need to put together (voltage divider, comparator, latching circuit, etc). Where I fall down usually is in knowing what specific components to use and calculating the individual values to make those components work - I simply don't know how to do that math, but I can usually figure it out with enough prodding in the right direction. I do understand ohm's law... :)

    Anyway, this is turning into a fun project, and I'm eager to begin plugging things into the breadboard.
  19. KMoffett

    KMoffett Senior Member

    Joined:
    Dec 19, 2007
    Messages:
    2,334
    Location:
    Minneapolis MN USA
    If the low fuel light has been ON, and finally goes OFF, that tells you that you waited tooooooo long. The fuel-fairy didn't magically refill your tank. ;)

    With a dual-thermistor setup they don't need to be that hot. That's one of the beauties of the the design. Since both thermistors change resistance simultanionsly in the fuel, they form a constant divide-by-2 voltage divider over a very wide fuel temp range. The comparator is just looking for a small change from 2.5V when one (or both :( ) goes above the fuel surface.

    Best way to learn is with a project that you really can use.

    Ken
    Last edited: Jan 2, 2011
  20. iwasnevy

    iwasnevy Thread Starter New Member

    Joined:
    Dec 30, 2010
    Messages:
    19
    You bring up a very good point, and something I've been mulling over - I really do like the idea - it's very elegant - and I'm remiss in dismissing it before I understand how it would work.

    What I'm failing to understand is how the current is limited? I was (erroneously) thinking that this would have to be achieved external to the thermistors somehow, but this is accomplished with the thermistors themselves I suppose. (duh, they're resistors!) What kind of resistance rating am i looking at for dual thermistors? (for each). I see thermistors up to 10k, more than enough to limit current - but It has to be low enough to self-heat, but not so low as to burn them out or create a short or pull too much current from the power supply...

    BTW, the 5v power supply uses an LM317, because it's super simple and it's rated for 1.5A, (the motion sensor draws 38.5mA) but that can change if anyone has a better suggestion (I could really use suggestions!) as I'll be putting both circuits together on one board.

    I'm looking at the datasheet right now for a range of thermistors, but I'm not sure how to use what I'm reading to figure out which one to use - maximum dissipation, dissipation constant, thermal time constant - I might as well be building a rocket!

    I notice some of them say they'll take 2 minutes to heat - if that were the case, I wouldn't need to worry about charging a capacitor to achieve a buffer effect. I suppose that has as much to do with how much current is going through them as what they're rated for.

    Ain't that the truth! Thanks for your help.
Similar Threads
Forum Title Date
General Electronics Chat Hydrogen Fuel Cell Mar 2, 2014
General Electronics Chat OMRON Twin Timer Relay - Battery Driven Fuel Pump Oct 25, 2012
General Electronics Chat How diesel is used as fuel in generator. Oct 17, 2012
General Electronics Chat boat electric fuel pump circuit at hot idle fluctuates on and off Sep 21, 2012
General Electronics Chat Fuel gauges Apr 6, 2011

Share This Page