90 ohm fuel level reading

I have searched and not seem to find an answer that quiet matches my use case. I have a GM resistance based fuel level sensor (0 ohm empty and 90 ohm full) in a 1987 C10 that I would like use an Arduino to read the level and output to an LCD. I am no longer using the factory dash/gauge (this is where it differs from other peoples projects I have found) I do not have to worry about the Arduino and supporting components affecting the factory gauge or and computer input.

My issue is that the fuel level sensor is grounded to the fuel sending assembly which makes it grounded to the vehicles 12v chassis ground.

I need some assistance on the wiring and what components are needed. From what I gather I believe I need a voltage divider but unsure how the 5v Arduino, 12v chassis ground, and resistance (sensor) is going to work. I only understand a voltage divider based on dropping a voltage from say 12v to 5v with a particular load and cant seem to wrap my head around the sensor part.

Thank you in advance for your assistance.

Grounds are common, two resistors in series spec'd at a 12/5 ratio. The 12V enters at the top resistor, and the 5V at the junction of the two resistors.
What part of a voltage divider are you not understanding?
What might be best is for you to hand-draw the voltage divider and label the parts and connections, so that someone can say yes or change the following.

I am assuming you know that the 12VDC signal isn't a constant 12V, there is some sort of variable resistor in line with the 12VDC so that the signal is between 12V and 0V which causes the divider to be between 5V and 0V in proportion.

I guess my understanding of a voltage divider only goes as far as powering a device. "said electronic device" operates at 5v. with 12v use a 4.7k and 6.8k resistor in a divider and have an output of 5v.

But this variable resistance 2 wire "sensor" does not have a voltage input like a 3 wire sensor. One leg is permanently attached to 12v chassis ground and the other leg goes to a gauge. I guess I dont know how to implement the divider in this case. (Im not reducing a voltage per say buy reading a resistance).

I think the sensor is a lower shoulder of the divider, the upper is inside the gauge.

So the only we need to select the upper resistor so that with a sensor resistance of 90 Ohms there is 5 V at the middle point with 12v power:

90 Ohms * (( 12v/ 5v) - 1)  = 90 * 1.4 = 126 Ohms

Since the voltage in the car is often higher than 12V, in order to protect the Arduino you need to take a resistor with a higher rating - 180 or 200 ohms

Here is a fairly comprehensive treatment of the topic.
https://dronebotworkshop.com/dc-volt-current/

It is also significantly lower at times, in fact 12V is an almost dead battery.

The gauge is a variable resistor (rheostat) which is activated by the fuel tank float. At full the rheostat is at 0 ohms and at empty 90 ohms. Adding a voltage divider after the rheostat changes the 0 to 12 to 0 to 5.

It occurred to me that the sensor's resistance of 90 ohms seems too low. If 12V is used for measurement, the current through such a sensor would be in the order of tens of milliamps, which is quite high.
Most likely, the car has a high-resistance divider that reduces the voltage across the sensor many times over, and a microammeter is used as the measuring gauge.

Not if it is heating a bi-metal strip so it bends more with more current.

When using an Uno R3 or classic Nano...
Connect a 330 Ohm resistor between the 5volt pin and A0.
Connect A0 and Arduino ground to the sensor.
Now measure with 1.1volt Aref enabled in setup().
analogReference(INTERNAL);
See what range of values you get from an analogueRead.
Use map() to convert to 0-100% or whatever you like.
Other boards may need other solutions.
Leo..

Yes I am using a Uno R3 for testing incase I mess up and smoke it. But will be using a R4 Minima in the truck. The sensor ground is permanently connected to 12v chassis ground. How does that affect the Arduino ground pin since Arduino is 5V?

Ground is ground. Your Arduino ground can share the vehicle 12 volt ground just fine.

Next, what is your fuel sensor out max? Reason I ask id I replaced the fuel pump and level sensor on a 1999 Tahoe and the fuel level sensor excitation was only 5 volts. If your level sensor Vout exceeds your max Vin for your Arduino choice consider using a voltage divider (a few resistors) for a front end to your Arduino analog input.

Ron

the GM pre 1999 fuel level sensors are not (0-5v) voltage based they are resistance based (GM typically 0-90ohm).

The 330 Ohm resistor powers the sensor with 5volt (15mA).
Noting else should be connected to the sensor.

It is safe to connect Arduino ground to car ground.
It is not safe to power an Uno R3 or Nano from a 12V car supply directly, because car voltages can spike well above 15volt. You can power a Nano/ Uno R3 safer through a cigarette lighter USB converter.

The R4 Minima has a buck converter supply with a higher input voltage range, which might be safer on a dirty car supply (no experience).
A Minima has a different Aref. You can switch to that with this line.
analogReference(AR_INTERNAL_1_5V);
With a Minima you should lower the 330 Ohm resistor to 220 Ohm.
Leo..

The sensor I replaced in my 99 Tahoe was 5.0 volt excitation from the PCM:

Understanding the 1999 Tahoe's Fuel Level Circuit

  • Sending Unit:

    The fuel level sensor is part of the fuel pump assembly in the tank. A float moves across a variable resistor, which changes the resistance in the circuit.

  • Wiring:

    The PCM receives a signal from the sending unit through a dedicated wire (typically purple on a 1999 Tahoe). The circuit also includes the sensor ground (orange and black wires).

  • PCM:

    The PCM supplies a 5-volt reference to the sending unit and monitors the changing resistance to determine the fuel level.

The resistance range is about 40 Ohms to 250 Ohms and I still have the removed unit.

Ron

I guess you need a % readout, ar a bar graph.

All you need is a single-core wire between the sender and A0.
It will get it's ground through the power supply ground.
Leo..

yes i will just do a % on a 4 line lcd I have for now.

I will power the Uno R3 with a cigarette lighter USB adapter for testing.

ok, single wire from A0 and non grounded side of sensor. Still use the 330ohm resistor between 5v ref and A0 correct?

Is there any concern for when the sensor is at 0 ohms? I saw on one post/project that someone suggested adding a resistor so when empty (0 ohms) it didnt present a dead short to the arduino.

yes you are correct the 98 and later sensors are 40-250ohms resistance based and with pcm ref voltage and 0-5v back to the PCM (this was where i was thinking 0-5v out)

Mine is a 87 only went straight to the dash and used 12v to excite in the cluster.

Normally you would have a resistor in series with the sensor. You also want a stable excitation. Just for example your typical automotive voltage is 12.6 volts up to as much as 15 volts or more and it varies. You want a stable excitation voltage. Normally the stable voltage comes from the ECM or whatever we call it. :slight_smile:

So if I directly apply 5.0 volts to the sensor I get 5 volts / 90 Ohms = 55 mA but as the 90 Ohms decreases the current increases. Starting to see a problem? What happens when you get down to maybe 1 or 2 Ohms? Smoke and you burned up your sensor. :frowning:

This is why we add a series resistance to limit the max current. Normally this resistance is in the ECM or similar.

Ron

The choice is made to use a value that does not require much current, but also not a big voltage. The coil driving the needle will have an internal resistance as well.
Now that is missing.

Ideally you should just supply Regulated 5v through a fair size top resistor like 220R. it is fine using just a small part of the 10-bit ADC, How accurate do you want it to be ? Providing a regulated 5v will have the added advantage that the voltage change as a result of low revs or the engine not running at all, will be negated.

I do recommend that you add an inline 10K resistor to branch of the input pin to protect it from inverted voltages and a 100uF Capacitor between the input pin and GND to stabilize the voltage level so you don't get strange readings.

With Regulated 5v this may not be such an issue, though there will still be inverted voltage spikes.

I just did a neopixel fuel gauge for the LPG tank, and i just tapped into the existing system and didn't want to fiddle with it. But that one is 12v+ based, and i was getting a lot of positive spikes on the line. With the movement of the car i ended up doing a 2 level average reading system. First 20 measurements over a period of a second and average that, then take 20 averages of that and constrain values around the previous value. A fuel gauge is supposed to move slow, and a 4 or 5 bit resolution is already quite a lot.

I went for 20 pixels and added 2 precision trim-pots to set minimum and maximum level compared to the input.

The sketch fit on an Attiny13a