July 9, 2015

Preparations for the fuel gauge

I want to be able to display the charge level on the Audi A2 fuel gauge. In order to do that I have to be able mimic the tank level sensor. The sensor is a variable resistor with a resistance of 300 ohms when empty and about 75 ohms when full. I will have to mimic that variable resistance according to the charge level of the battery. I have not yet figured out how to do that but yesterday I made preparations for this by installing a wire from the tank level sensor contact (which goes to the fuel gauge) to the EVCU. I also soldered a 100 ohm resistor on the end of the wire to make the fuel gauge go "almost full" and not signal empty tank with an annoying beep.
Measuring the tank level sensor resistance

Soldering a wire in place of the old tank level sensor contact

5 comments:

  1. The onboard electronic either measures the voltage over the tank level sensor, or the (mili-)amps that run through it. You could:
    1. Measure the volts and amps for two resistance levels (min and max).
    2. Then using a amp-meter and bench power supply slowly turn up the voltage, taking care to never exceed the amps you measured before. Then you know what the onboard electronic measures.

    Alternatively you could use a "Digital Potentiometer".
    e.g.
    https://www.sparkfun.com/products/10613

    You might need to look a bit around until you find one that meets your ohm/volt/amp requirements

    ReplyDelete
    Replies
    1. Thanks Tony,

      Since the fuel gauge is an analog instrument my guess is that it is based on the current that runs through it. Less resistance means higher current means higher indication on the gauge.
      I haven't measured the voltage yet, but if it is 12 V (another guess) that means the current varies between 40 mA for empty and 160 mA for full. I haven't found a digital potentiometer yet that can handle that kind of current and voltage.

      If the gauge is an analog instrument that measures current, then one of the wires from the resistor should go to the gauge and the other to either +12V or ground.
      I interpret your idea as applying a voltage on the wire that goes to the gauge so that the internal resistance of the gauge creates the correct current?
      I guess that would work if the gauge is connected directly to ground then applying a positive voltage on the other wire would create a current. If the gauge is connected directly to +12V it will be more difficult.
      But, hey, I'll just have to find out!
      :)

      Delete
    2. Maybe also connect a resistor in series with the gauge so the current is determined by the internal resistance of the gauge plus the series resistor.

      Delete
    3. The Arduino has a current limit of 20 mA on each of the pins. This solution would require a way of producing more current. Even if the gauge voltage is 5V then the max current would be 67 mA which is too much for one pin of the Arduino,

      Delete
    4. I doubt a little bit that the onboard electronics runs such a high current through it. I would agree that yes, it is connected to 12V, but as you suspect I guess that the onboard electronics has a resistor in series to limit the current.

      Take an ampmeter and an voltmeter and measure, then you know more.

      Delete