Help with low fuel level circuit

KMoffett

Joined Dec 19, 2007
2,918
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...
You will need a constant voltage sourse, so you will use the resistance of the thermistor to limit the current under the worst case scenario...lowest resistance of both thermistors in series.

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.
Switch to an LM7805 and save two resistors?

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.
Link to the datasheet?

Ken
 

Thread Starter

iwasnevy

Joined Dec 30, 2010
19
... the E10 ethanol stuff doesn't run as well nor is it very carb friendly on the 32 year old bike I have.
What kind of bike is it? 32 years old, sounds like fun...

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.
I agree - my car is a turbo, so requires high-octane. I've done the math, and it pays for itself over time in increased fuel mileage.

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.
Perhaps you could use the results of my little project for your bike. 5 thermistors like this would create a "full, 3/4, 1/2 1/4 and an "oh **** find a gas station" LED gauge. For mine, I'm modifying the petcock to get the thermistors up in there - no tank drilling.
 

KMoffett

Joined Dec 19, 2007
2,918
Just an estimate. I think you want the power dissipation to be near, but below the "maximum dissipation" when both thermistors are above the fuel and at "Rhot" resistance.
Power dissipated is (2.5V*2.5V)/Rhot for each thermistor.
6.25/59Ω=106mW....too high
6.25/130Ω=48mw....OK
The larger the range between Rbead and Rhot will cause the biggest voltage change between submerged and not.
But, the larger the range between Rbead and Rhot the more likely the non-uniformity of resistance between the two over a large fuel temp range.
I'd go for the 256-045 for starting to experiment.

Ken
 

Thread Starter

iwasnevy

Joined Dec 30, 2010
19
OK, tell me how this looks:



As temp increases, resistance of VR1 decreases, and begins charging the capacitor C1. Capacitor charge/discharge rate is determined by C1 and R1, ~ 2-4 minutes to charge. Once C1 is charged above 3.45V threshold set by R2 & R3, Vin at the comparator goes higher then Vref and Vout goes low, activiating the LED.

Not sure if 1k is the correct value to use to pull Vout up..

Haven't figured out the values of C1 and R1 yet. not sure how to do that.

Comments, suggestions, corrections?
 

Thread Starter

iwasnevy

Joined Dec 30, 2010
19
Hi all

Here's what I've come up with:



Quick question: I *think* I calculated C1 correctly at 50kµF to have a charge time of about 2 minutes through VR1 at 1k Ω (assuming that's it's resistance at the temp I'm looking for - a spec sheet or experimenting will determine that, but for now I'm just trying to figure out if I'm thinking about this properly)

...and I calculated the discharge time of C1 to be about one minute through R1 at 500 Ω.

If I understand this correctly, for the capacitor to charge through VR1, R1 needs to be a higher resistance than VR1 (when hot) otherwise it'll be always pulling the voltage down, correct? So this won't work...

Assuming VR1's resistance at my desired temp is 1k, then R1 needs to be greater than VR1?

I guess what I'm getting at is, can I expect to achieve a faster discharge rate than charge rate for C1, so that it takes 2 minutes to turn it on, but only 1 minute to turn it off? Or am I (again) over-thinking this and VR1 and R1 should just be the same resistance (with VR1 hot), giving an equal charge and discharge rate?

Thanks again
 

KMoffett

Joined Dec 19, 2007
2,918
50KuF is an unrealistic value, even if it calculated right. Also the 500Ω R1 will appear in parallel VR2, swamping out any value of it's presence. Divide C1 by 1000, and multiply R1 by 1000. 47uF and 470KΩ would be about the same time with standard component values. Otherwise it looks right. OK, maybe delete R2 and change R3 to a pot with the wiper connected to the (+) input of the 311. This allows you the adjust the trip point.

Ken
 
Last edited:

Thread Starter

iwasnevy

Joined Dec 30, 2010
19
50KuF is an unrealistic value, even if it calculated right. Also the 500Ω R1 will appear in parallel VR2, swamping out any value of it's presence. Divide C1 by 1000, and multiply R1 by 1000. 47uF and 470KΩ would be about the same time with standard component values. Otherwise it looks right. OK, maybe delete R2 and change R3 to a pot with the wiper connected to the (+) input of the 311. This allows you the adjust the trip point.

Ken
Thank you!!!!!
Now off to buy some components and begin experimenting!
 

Thread Starter

iwasnevy

Joined Dec 30, 2010
19
Good point. R4 = gone.

My local electronics store didn't have thermistors, so I picked up a couple pots to substitute. I'll be breadboarding tonight, we'll see if it all works.

Thanks all for the help. I'll post my results.
 

Thread Starter

iwasnevy

Joined Dec 30, 2010
19
OK, all works great! Woohoo! A big thank you to this forum!

Except for the capacitor "buffer". It was discharging as expected, over the course of a couple minutes, but charging instantly when VR1 changed. What I'm looking to accomplish is for it to take a couple minutes to both charge and discharge. So after thinking about it for awhile, here's what I ended up with to accomplish that:



I understand that putting a resistor in parallel to C1 controls it's discharge rate, but after thinking about it, I figured it would work just fine (and probably simpler) to just have it charge and discharge at the same rate.

Removing the diode allowed C1 to discharge back through the voltage divider. Increasing R3 lengthened the amount of time it took C1 to charge/discharge, with no discernible effect on the voltage seen at pin3 on the 311 once the voltage equalized.

After all, I'm measuring large values here, VR1 will change from 10k to somewhere around 150k - 200k, taking me from 2.5V to nearly 5V. My threshold voltage at the comparator is set to 3.5V, and could realistically go up to 4 or 4.5, and still achieve the same end result, so there's tons of margin for error here.

So I'm back to figuring out what the values for R3 and C1 should be.

I had about 50k in there for R3 and it was taking approx. 2-3 sec for the voltage at pin3 of the 311 to catch up to the voltage change from VR1. I'm pretty sure I need a larger capacitor, and probably a larger resistor for R3, but I'm really lost on how to calculate the necessary values with R3 and C1 in their current configuration.

Help?
 

KMoffett

Joined Dec 19, 2007
2,918
No time to think of details right now, but I would delete R1/C1 and add another stage after the comparator to deal with the on/off alarm-delay function.
Ken
 
Top