Shop OBEX P1 Docs P2 Docs Learn Events
fuel gage correction application — Parallax Forums

fuel gage correction application

yarisboyyarisboy Posts: 245
edited 2012-09-17 20:50 in General Discussion
I have an after market fuel gauge in my dash that requires 90 ohms/full and 0 ohms/empty. I have a sender in my tank that is 30 ohms/full and 0 ohms/empty. As a consequence when my tank is full I get a reading of 1/3rd tank. Can I use one of my props to "read" the sender, process the result, and generate a 3x resistance on an output? I haven't done a Prop application for over a year. My fogged up memory suggests that I go into the books reading about the sigma-delta circuits and applications to get a reading on the sender for an input, then use PWM sinking on an output to get a pseudo 3x resistance the Auto Meter 2316 gauge would be happy with.
In stage one I just want to get the gauge working on my '64 Chevy pickup. I suspect that the same setup could be used (with a look-up table) to linearize the gauge on my 2008 Toyoto Yaris (unless it's can-buss). We hate that the Toyota(s) look full like, forever, then sink like a rock below half full. I suspect I can use one of the running average routines from the OBEX to smooth out transient readings caused by braking and cornering.

Comments

  • ercoerco Posts: 20,259
    edited 2012-09-17 11:02
    Another solution (as long your're in a hacking state of mind) would be to make your own fuel gauge just using a servo to move the needle. You could use a Prop (or even a BS1!) to read your fuel tank sender and generate the right servo pulses. I used three BS1s in this project, which used a servo to move the RPM gauge: http://www.youtube.com/watch?v=hj_Dvyw4vA0
  • idbruceidbruce Posts: 6,197
    edited 2012-09-17 11:34
    yarisboy

    I am no electrical genius, so my advice might be worthless. However, if it was me attempting this project, here is what I would attempt to do.
    1. Fill up the gas tank
    2. Siphon out one gallon at a time until the tank is empty, meanwhile measuring the voltage from the sender with an ADC0831.
    3. Refill the tank with the siphoned gas.
    4. Hook up a digital pot between the propeller and the fuel guage and send it some test resistances. I would find a number of resistance values that would equal the number of gallons in the gas tank and make sure that various resistance values properly record tank levels.
    5. While using gas with the engine running, take samples from the ADC0831, and send corresponding gas tank levels to the digital pot to accurately reflect gas tank levels.
    Bruce

    EDIT: However, if the guage expects a nominal 12V or the sender outputs a nominal 12V, I am sure it would get more complicated than I made it sound.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-17 11:52
    I think what you need is a "fuel gauge shunt" resistor that allows some of the sender current to bypass the gauge.

    -Phil
  • kwinnkwinn Posts: 8,697
    edited 2012-09-17 13:42
    It sounds like this gauge feeds a constant current to the resistor and measures the resulting voltage. If that is the case you might be able to increase the current with an external constant current circuit. I would advise that you test this externally with a 12V supply and a 50 ohm pot or 5 10 ohm resistors in series. I can provide a diagram if you need one.
  • yarisboyyarisboy Posts: 245
    edited 2012-09-17 15:45
    kwinn wrote: »
    It sounds like this gauge feeds a constant current to the resistor and measures the resulting voltage. If that is the case you might be able to increase the current with an external constant current circuit. I would advise that you test this externally with a 12V supply and a 50 ohm pot or 5 10 ohm resistors in series. I can provide a diagram if you need one.
    That would be great. I'll most likely breadboard a number of test circuits before settling on the easiest, cheapest way. I know one can read resistance with the prop, I've just never done it. I've also never played with a digitally controlled resistor so it sound like fun both ways. I have used OBEX moving average routines for data smoothing on my tachometers with mixed results.
    Thanks,
    Stan
  • kwinnkwinn Posts: 8,697
    edited 2012-09-17 17:21
    Here is the diagram. I am guessing that your gauge has 3 or 4 connections as shown. Two for power and ground, and either one or two for the resistor in the gas tank. There might only be one if they share a common ground.

    Testing is easier with resistors than with a pot since we need to measure the total resistance and the voltage across the resistors. With a pot you must remove one of the wires from the gauge to measure the resistance. With the resistors you simply short out one or more and subtract sum of their resistance from the total.

    What you need to do is measure the voltage across the resistors for at least 3 resistances. I would suggest 0 ohms, 50 % of total resistance, and total resistance.

    BTW the resistors do not have to be the same values as long as they do not add up to more than 90 ohms when in series.
  • yarisboyyarisboy Posts: 245
    edited 2012-09-17 19:00
    I think what you need is a "fuel gauge shunt" resistor that allows some of the sender current to bypass the gauge.

    -Phil
    The so-called sender is a variable resistor with a single (wiper) wire going to the gauge. As such, the gauge must have a constant current source. The meter is most probably just a simple voltmeter.
  • yarisboyyarisboy Posts: 245
    edited 2012-09-17 19:04
    It looks like Andy Lindsay's Test Resistance Meter.spin will process the input with the simple addition of one capacitor and one resistor. Ref: RC Resistance.spin. Object RC time and Object Floatmath.

    For the prop signal output can I put a 90 ohm resister between the gauge input and ground, then tie my prop output from the gauge input to ground? Then a duty cycle of 0 on the pin would read full and a duty cycle of 100 % (ground shunt) would read empty. If the current is too high for a single pin I should be able to use multiple output pins. Prop manual says 40 ma max per pin so I should limit the load per pin to 20 ma max. Phoenix conditions.

    Can it really be that simple? Time to do more digging. I have a nagging feeling I'll need diodes between the gauge and the prop output pins so that a 3 volt high won't affect the reading but a duty cycle shunt low will have the desired effect. Am I thinking correctly? Would the .7 volt forward bias threshold of the diodes need to be offset in the software?
    1024 x 768 - 45K
  • kwinnkwinn Posts: 8,697
    edited 2012-09-17 20:50
    As much as I like the prop this sounds like a bit of overkill when a small 3 terminal regulator and a resistor or two would make the gauge read correctly. The only other thing you need to do is to figure out how much more current is needed by measuring the voltage with a known value resistor (90 ohms) in place of the sender.
Sign In or Register to comment.