Author Topic: LED Fuel Gauge  (Read 19269 times)

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
LED Fuel Gauge
« on: June 06, 2013, 09:00:46 pm »
To address the lack of a fuel gauge since I replace the factory fuel gauge with a modified tachometer in my non-tach 1976 dash cluster, I needed for the lower left idiot light location (the brake light position - see this thread for discussion on what I did with the break light when adding the tachometer http://forum.73-87chevytrucks.com/smforum/index.php/topic,25150.msg216849.html#msg216849).

I had several options to add a small fuel gauge, as there are several version of a 2” to 2 ¼” aftermarket fuel gauges available, which could be probably fitted to the opening where the brake light was located.  As the idiot light openings are about 2” with a viewing area of about 1 ¾”  I could attach one to the cluster carrier somehow and it should work.  I looked at several parts houses on the internet and the price ranged from $30 to $70 depending if I wanted the retro look or white faced or full sweep or LED back lighting or lighted pointers, etc.  I could also get the digital read-outs that would fit as well, but looked way to hi-tech for this truck. On e-bay I found some LED units for around $20 from China that were universal with an adjustable “pot” to dial in the fuel level.  However, these looked like they would be too bright for my bare bones dash and a bit too much like something off a Star Trek console.  I could put an OEM small gauge in the lower left location but that would require some type of clear lens fabrication to cover the needle.

All I wanted was a simple LED bar graph that showed the relative fuel level.  I did not have to be dead accurate as this is not a daily driver.  I only needed to know when it was time to fuel up.  Someone suggested I use single light bulb in the brake light location hooked to the fuel sender and as the fuel level went down the bulb would become brighter and brighter.  I guess the idea here was when the bulb became so bright it annoyed me I would fuel up and shut it off.  This sounded a little too simplistic for me as I may not always be the only driver and what is bright to me may not be bright to my wife and if she ran out of gas - I would never live it down.

I decided to do some research and experimentation on the fuel gauge.  From what I have read, GM used the same basic fuel gauge and sending units on all product lines from 1965 to 1990.  The gauge is two coil - moving meter design with one coil fixed biased to force the needle to read empty and the second coil variable depending on the current flowing from the sending unit forcing the needle toward full.  This needle between two forces provided some damping of the movement so as the sender bobs up and down with the fuel sloshing around in the tank the needle does not bounce between full and empty.

Refer to the meter drawing for a picture of how the meter works.

The guts of the meter are simple one coil connected to the battery shunted with a 42 ohm resister (this was the reading of my gauge and may not be the same for all – some sources said there appears to have been some variation in the size of the shunts to accommodate various fuel tanks and mounting methods on different vehicles) and a second coil connected to ground shunted with the sending unit’s 0 to 90 ohm variable resister.  Both coils are wired in series forming simple voltage divider circuit so as the fuel level changes the voltage in each coil changes causing the needle to move proportional to the fuel level in the tank.  When the tank is full the sending unit reads hi ohms causing more current to be in the variable biased coil overcoming the pull of the fixed biased coil and moving the needle toward full.  When the tank is empty the sending unit ready low ohms (almost ground or 0 volts) causing most of the current to be in the fixed biased coil pulling the needle toward empty.

Here is my plan, have an 8 LED stacked bar where each LED is tied to a different voltage reference from the fuel tank sending unit.  Based on the OEM design the variance from full to empty would be about 9.5 volts at full and 0 at empty.

As a side note - what amazed me is that at empty the gauge circuit pulls about 330ma or 1/3 Amp.  That’s around 4.5 watts at 13.8 volts.  At full it’s only about 100ma or 1.4 watts, still more than I expected for a fuel gauge.  With only a 40 amp alternator in this truck I hope GM was a little more efficient with the other options!

More details to come . . .
« Last Edit: June 08, 2013, 01:35:21 pm by sphinx »

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #1 on: June 08, 2013, 01:45:03 pm »
So, with the OEM fuel sender/wiring set-up, I need a way to light a series of LEDs one at a time from 0 to 9.5 volts.  With 8 LEDs that would give us about 1.2 volt per LED. 

Here are my design specifications to fit my truck:

Display must fit in the 1 ¾” opening where the brake light was located.

Circuitry must fit inside the space behind the old brake bezel - about 4 square inches.

Must use existing OEM fuel sender unit with range of 0 to 90 ohms.

Must work off 12 to 15 volts DC (vehicle power)

Should have 8 divisions approximating 1/8 tank fuel levels - not specific requirement but would be nice.

Should be able to read LEDs in direct sunlight and not be too bright at night - the night brightness would be the primary issue here as i'm not planning on adding any dimmer to the LEDs.

Here are the assumptions/limitations:

The fuel tank sending unit is a linear unit.  As the float raises 1/8 the distance in the tank, the resistance also changes 1/8 or about 11 ohms.  This is probably not the case as I doubt the old style sending units in our trucks are that consistent - the windings on the resister are not perfectly aligned, crud builds up on the windings, the wiper arms shift position, etc..  Nevertheless, they should be close enough for this to work.
The sending unit really does go to 0 ohms when the tank is empty (or when the fuel can no longer be picked up by the pump).  This most likely does not happen - the tank may become empty when the sender still reads 10 ohms.  Causes include the shape of the tank, mounting angle of the tank with respect to the frame, bent sender wiper arm or just an out of spec sending unit.  I can’t test this without the sender back in the tank, the tank mounted on the truck and fuel available.  I’ll need to build in an empty “fudge factor” so I get an empty state notice before the sender actually goes to 0 ohms.  This should not be a problem as this gauge does not have to be an exact indicator of remaining fuel for this application, just a good notice that it is time to get more fuel.

The sending unit will respond to sloshing of the fuel in the tank.  The LED meter circuit does not have any electronic or mechanical buffering, as the fuel sloshes around in the tank the voltage will vary from the sender and cause the LEDs to flicker.  I can live with this as long as the circuit is not so sensitive that the fuel gauge becomes a “sloshometer.”  This will not be daily driver so a little slosh flicker won’t hurt.

I have enough electronics knowledge to actually build a safely working unit.  I have not done this type of circuit before and I’m not educated in electronics beyond what I have picked-up over the years (my tinkering with electronics is the same vintage as my truck).  If you are reading this and saying “wow that was a stupid way of doing that” you very well may be correct.  If you are trying to replicate the same results as me, be warned, some of my experimental projects have been known to let the magic smoke out of circuits damaging other parts in the process.
 

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #2 on: June 08, 2013, 01:53:59 pm »
After scouring the internet for ideas on building LED meters, I decided to try the LM339 voltage compander IC chip  to compare the voltage from the sender to a reference voltage and illuminate a series of 8 green LEDs to indicate the fuel level.  In theory, when the voltage through the sender is higher than the reference voltage the LED will light-up.  So, at a full tank I should have 8 lit LEDs and when empty at empty all should be off.  Anywhere in between full and empty should light up a corresponding number of LEDs to the amount of fuel in the tank.  That way when I have no LEDs on I have no fuel in the tank.  When all the LEDs go out its too late, I’m empty – I had better change that – what if the last LED flashed on and off when it’s the only one left.  That would get my attention that I need to gas very soon.

Pic 1 is the rough drawing of what the front of the readout will look like.  The inner circle is 1.75” which will be the visible area in the gauge cut-out in the dash.  The upper seven 7 green LEDs are T-1 or 3mm (1/8”) and the lower red LED is a T-1 ¾ or 5mm (7/32”) flasher LED.


I used, for the first time, an circuit simulation program from Texas Instruments called TINA-TI (free software from TI’s product support website) to verify that my component value calculations were accurate and the circuit should yield the expected results.  The schematic was built with TINA.  I’ll explain the parts as we discuss the operation of the circuit.  See Pic 2 for the schematic.

Pics are in next post sorry
« Last Edit: June 08, 2013, 02:00:33 pm by sphinx »

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #3 on: June 08, 2013, 02:03:28 pm »
Here are the pics

Display drawing

Schematic of circuit

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #4 on: June 08, 2013, 03:19:02 pm »
Here is the circuit design.

Sending Unit Section

I wanted to change the voltage that the circuit is going to read from the sender to give a smother “bottom” end in case the sender goes zero before the fuel is gone.  I did this by adding a 10 ohm resister in series with the sender to make the sender read from 10 to 100 ohms instead of 0 to 90.

Also, I changed the OEM 42 ohm shunt resister to a 200 ohm series resister to make the total resistance 300 ohms.  This did two things.

First, it adds a ballast factor to the sender.  I have always wondered about sending voltage to a variable resister submerged in a flammable liquid.  I mean what if the resister windings received too much current and became a heating element?  I guess there is no danger as we have done it for decades.  But to be safe with my design I wanted a current limiting resister somewhere on the sender side of the circuit in case I screwed up the circuit.  200 ohms is not mush, but I don’t want a runaway current if the sender shorted to ground.  There is a fuse somewhere in the truck gauge wiring – right?

Second, it changed the sender voltage range from 0 to 9.5 volts to 0.6 to 4.6.  An average of ½ volt per 1/8 tank segment.
Display Driver Section

On left side of the schematic the OEM sending unit is at the lower left connected to ground in the fuel tank.  The other end of the sender unit is connected to the circuit by R1 the 10 ohm sender biasing resister.  R1 is connected to R2 the 200 ohm series resister which is feed battery voltage.   The connection of these resisters makes a voltage divider that changes relative to the level of fuel in the tank.  The “read” voltage from the sender is taken from the junction of the R1 and R2.  With these values (using Ohm’s law) the voltage should vary from 0.6 volts at empty to 4.6 volts at full.

In the center of the schematic are the LM339 chips.  Each LM339 has 4 companders, as I want 8 segments, it will take two LM339’s each segment is represented by ¼ of a LM339 and controls one LED.

Each ¼ LM339 has two inputs, one output and connection for battery and ground.  On the actual chip, all the battery and ground connections are wired together, but for the TINA circuit simulation they have to be shown separately.

The negative (-) input is the voltage to be read, the positive input (+) is the voltage the read voltage is to be compared to.  If the read voltage is greater than the reference voltage, the output is on.  When the read voltage is lower than the reference voltage, the output is off.

Resisters R3 through R10 are connected in series between ground and battery voltage.  This creates another voltage divider with the reference voltages taken from the junction of the resisters in the series and connected to the positive input of each of the first 7 LM339 segments.  Values of R3 through R10 shown on the schematic yield the following reference voltages:  4.13, 3.78, 3.44, 2.97, 2.5, 2.03, 1.56.

Note for the 8th segment the inputs are reversed, the sender voltage is connected to the positive voltage and the reference is connected to the negative.  This will “flip” the output to only be on when the sender voltage is lower than the reference and off when it is higher.  So, when the sender reads over 1.56 volts, segment 7 will be on and segment 8 will be off.  As soon as the sender voltage goes lower than 1.56 volts, segment 7 will turn off and segment 8 will turn on.

Note that segments 1 through 7 are set to be on when any of lower segments are on.  Segment 8 will only be on when none of the other segments are on.  Hopefully when the tank is about empty.

The remaining resisters, R11 through R18, are current limiters for the LEDs keeping the current under 20ma.  I may have to change the value of R18 when I build the circuit as LED8 is a special LED with an on-board flasher, it may need a different current setting.  LED1 through LED7 are standard green T-1 LEDs.

This is the design.  Time to order the parts and build it.  I’ll post the results.

Offline solve4x

  • Newbie
  • Posts: 42
  • Thankful Every Day!
Re: LED Fuel Gauge
« Reply #5 on: August 13, 2013, 04:44:36 pm »
be warned, some of my experimental projects have been known to let the magic smoke out of circuits

It's always about keeping the magic smoke!
Cool project!...my son is working on an Arduino driven 20 light tachometer for his old truck.
We'd like to see your gauge when it's all done...good luck!
« Last Edit: August 13, 2013, 04:46:08 pm by solve4x »
Scott
1987 Chevy R-10 long bed, working man's truck.
Thankful every day!

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #6 on: August 14, 2013, 08:23:55 pm »
I thought about going the Arduino route, but also trying to keep complexity to something I can tinker with out having a laptop connected.  Thanks for reading, I still need to order the ICs, I just have too many projects in the lunch phase right now.  I'll post when I get back on this one.

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #7 on: May 08, 2014, 07:31:34 pm »
I know it has been a while since I worked on the LED fuel gauge project. It was raining this past weekend and I could not get out and work on other projects.  This LED gauge had been setting on my desk for a few weeks and was begging for some attention.

I purchased an Asian made LED fuel gauge off eBay for $14 shipped from Hong Kong.  It looked decent and was the standard 2 1/8”/52mm variety.  The description was rather rough English as the sender was referred to as “oil floater” with a resistance of 0 to 500 ohms - it stated standard GM type input.  So, I thought I would give it a shot.  I can’t buy the parts, let along put it in a standard gauge case, for $14.

With a 12volt power supply and a hand full of 10 to 100 ohm resisters to simulate a fuel sender I hooked it up to see what it does.  Wires?  Positive on the black wire and negative on the green?  Hum, sounds more like AC color coding than automotive DC, oh well.  Yellow for the sender, I used 100 ohm resister to ground.  Little tweak of the adjustable pot hanging on the outside of the gauge and a full tank reading!  8 blue LEDs, one Yellow and one Red.  Switched out the 100 ohm for a 10 ohm (expecting the reading to be significantly less), but it still showed full.  So I adjusted the pot till it just lit the yellow and red LEDs. That should be about right for 10 ohms, about an 1/8 of a tank.  Then I put a 68 ohm resister in expecting about ¾ tank or 5 blue, the yellow and the red.  But I still got only the yellow and red.  What is going on here?

Then I thought, maybe the gauge is set-up to use reverse ground, i.e., if the sender is grounded it thinks the tank is full and when the sender voltage is anything other than ground it some fraction of a tank full.

So, I shorted the sender to ground and adjusted the pot until all LEDs were on, then swapped out the 100 ohm resister, and guess what, only the last three were on (one blue, yellow and red).

This little gauge was designed to read zero ohms on the sender as a full tank and up to 500 ohms as an empty tank.  This will not work with the standard GM 0 to 90 ohm senders in our trucks.

I drug out my 1979 or so (the cover is long gone) copy of Engineer’s Notebook by Forrest Mims III from Radio Shack.  This has been my go to for simple yet effective circuits for making things work electronically for years.  Per Forrest, if I use an op amp in a voltage subtractor configuration I could feed one voltage (the GM 0-90 ohm signal from the sender) and subtract it from a second voltage ( a fixed reference voltage) and use the difference between the two to feed the LED fuel gauge.  Not exactly in those words, but the concept was there.

Here is an example.  A 0 to 90 ohm sender is hooked up to a +12v  battery and ground (we will assume the 63 ohm ballast resister from the factory fuel gauge has been replaced with 90 ohm resister for this example so the math will be simple) to make a voltage divider that will provide 0 to 6 volts depending on where the sender “float” is located.  We will say the tank is full, the sender is at 90 ohms and the voltage from the sender is +6v.  We will call the sender voltage “B.”   Second we have wired up two 90 ohm resisters in series between the +12v and ground with a tap at the junction of the resisters to give a reference voltage of +6v.  We will call this the reference voltage “A.”  Now the when we apply the A and B voltages to an op amp configured as a voltage subtractor, the output from the op amp is A – B.  In this example the output would be 0 volts (6 - 6).  Now let’s move the sender float to “empty.”  The resistance would fall to 0 ohms, the voltage divider formed by the junction of the sender and the ballast resister would give us 0 volts from the sender as the sender is now grounded, so B is zero.  The output of the op amp is still A – B and that now equals +6v (6 – 0).  We effectively “switched” the GM sender from sending 0 volts (0 ohms reading) at empty to 6 volts, and from sending 6 volts at full to sending 0 volts.

If we applied this op amp circuit between the tank sender and the LED fuel gauge input we should be able to use the LED gauge to reasonably display the fuel level.

In the example we were using perfect world parts with no impact of heat from the current being displaced by the ballast resisters.  My ballast resister from +12v to the sender needed to be around 200 ohms to keep from pulling too much current through the sender.  The factory used a 63 or so ohm resister on the back of the fuel gauges, this would allow about 220 ma through the sender or about 3 watts when the trucks electrical system was charging at 14.4 volts and the tank was about empty.  Almost a quarter of an amp through a coil of wire in a tank of hydrocarbon fuel!  Wow, I want to keep my circuit a bit cooler than that, so with a 200 ohm ballast resister the wattage drops to about 1 when the tank is empty.

Also, the op amps I had in my parts box were not high quality units and did not drive the output to ground (0 volts) when A – B should have been zero, so I had to fudge on the LED gauge’s lower end to get the display to read full by replacing one of the reference resisters on LED gauge.

I also tapped off the LED gauge’s voltage regulator to power the op amp so any noise in the truck’s electrical system should not cause variances in the op amps output.  I did use straight power to the sender and voltage reference diver resisters so as the charging system kicked in both the sender and reference voltages with changes by the same amount.

So what I have now is a LED bar graph fuel gauge in a 2 1/8” housing with the op amp circuit board hanging off the back with 3 leads, red for battery, black for ground, and orange for the fuel sender.

When I get around to reassembling the dash cluster I decide if I want to mount the gauge in the traditional fuel gauge position (lower left I think) and move the idiot light for the brake up to the tachometer (it has the position and bezel it’s just not hooked up) or modify the LED circuit board to fit in the bottom of the tachometer where the seatbelt/break bezel is located.

Problems I might have:

Slosh control.  I could not tell the if LED gauge has any “buffering” of the input signal to prevent fuel slosh from causing the LED’s from flashing erratically as I go down the road.

Brightness.  There is no control over the brightness of the LEDs.  I looked at them in the dark and they are pretty bright when they are all lit.

Fit.  This does not look like it belongs in a 70’s truck.  I remember LEDs in the 70’s they were mostly dim red or off-color orange, blues ones were not available until the 80’s.

Offline solve4x

  • Newbie
  • Posts: 42
  • Thankful Every Day!
Re: LED Fuel Gauge
« Reply #8 on: May 16, 2014, 05:40:34 pm »
Cool project.
My son made a smoked plastic cover for his LEDs at night....solved the glare problem.

That linear stack of lights looks 70's to me!
Scott
1987 Chevy R-10 long bed, working man's truck.
Thankful every day!

Offline sphinx

  • Registered Users
  • *
  • Posts: 124
Re: LED Fuel Gauge
« Reply #9 on: May 18, 2014, 12:24:25 pm »
I may have to try that.  I guess I could put some window tint film over the gauge plastic.  Thanks for the suggestion.