PDA

View Full Version : General New Fuel Gauge Circuit



Bitsyncmaster
10-13-2018, 04:58 PM
After prodding from a few owners, I decided to start a fuel gauge circuit design. I’ve come to accept that car fuel gauges are inaccurate in that when you fill up, the gauge shows above the full mark and most stay at that point for many miles of driving. I then tend to full up the car when the gauge reads at the ¼ full mark or a little below. I have the TankZilla which has not caused me much problem other than a bad connection one time.

Note the fuel gauge and most other car gauge circuits use a two coil design to prevent car voltage variations from affecting the gauge reading. One coil is always powered and the other coil counteracts the first coil as it conducts current via the fuel gauge sender varying the current with its resistance. This does work very well to prevent car voltage variations changing the reading but really uses a lot of power at 333 ma. At 14.5 volts.

So I started designing a driver for the gauge by just driving a transistor to provide an analog current sink. This method turned out to be very problematic in that it provided very unstable gauge readings. The cars voltage would change the gauge reading over 1/8 when going from 12.5 volts to 14.5 volts. Also as the transistor heated the reading would change. Then it hit me to try driving a MOSFET with a pulse width signal to change the duty cycle rather than using analog. This turns out to be the way to drive the gauge since it keeps the driver “transistor” cool and also returns the stability of the duel coil gauge and voltage changes have no effect.

I have not decided how to make the unit adjustable for different sensors yet. I leaning to using different software and maybe a few component values to change the unit to use any sensor resistance.

Delorean Industries
10-13-2018, 05:34 PM
I have a lot of thoughts on this. Email me when you have a chance.

Bitsyncmaster
10-18-2018, 07:33 PM
I ordered a few prototype circuit boards for my design. What I have come up with are adjustments (trim pots) to calibrate the gauge and tank sender. Things may change after testing and software development. I have two spare fuel gauges for bench testing and of course the one in my car. I however have the Zilla sender in my car.

I'm planning on one adjustment to set the full scale of the gauge. This calibrates the gauge tolerance it self. A second adjustment calibrates the gauge empty reading. A third adjustment calibrates the sensor full value. A fourth adjustment calibrates the sensor empty adjustment. I added another adjustment which is not assigned yet for it's use. My plan is to have the FUEL light turn on at 1/8 tank level. Not sure if I should have that low fuel light flash or just stay on.

Of course the software will "filter" the gauge reading to prevent fuel slosh from moving the reading.

I have not even started the software yet but will have to get that going so when my boards come in I can start testing.

Riley88
10-19-2018, 01:06 AM
When this project is done I will be awaiting to purchase for sure. The fuel gauge accuracy has always been...annoying

Bitsyncmaster
10-19-2018, 04:28 AM
It would be nice to get resistance readings of senders that are installed. The full reading is normally what the manufacture states since the float is maxed out (unless the float arm is bent). The low (empty) reading is also subject to a bent arm if it does not hit the sender stop range. I need these readings to make sure my adjustment has enough range to compensate for correction.

dmcnc
10-19-2018, 07:51 AM
Thanks to our odd shaped tanks, I've noticed the full reading varies on integrated senders depending on the position or angle of install. I've seen the DMCH GM Style sender read about 10 Ohms below full extension while hitting the tank ceiling. On tube style senders you could get similar variance as the float will rarely make it all the way up (even to 83ohms) on a full tank.

What are you thinking for slosh reduction? My tank slosh usually acts up when less then a 1/4 tank.


It would be nice to get resistance readings of senders that are installed. The full reading is normally what the manufacture states since the float is maxed out (unless the float arm is bent). The low (empty) reading is also subject to a bent arm if it does not hit the sender stop range. I need these readings to make sure my adjustment has enough range to compensate for correction.

Bitsyncmaster
10-19-2018, 09:52 AM
What are you thinking for slosh reduction? My tank slosh usually acts up when less then a 1/4 tank.


I will put a long software timing to average the sensor readings. I may think of some ways to average that work better. When you first turn the car on it will quickly show what the sensor reads and then start averaging. So if your car is parked flat you should get an accurate reading right away. Maybe I can adjust the averaging since if the car is not shut off the reading should not increase (unless you fill the tank with engine running).

Another thought is where to get 12 volt power for the unit. If you take power from the fuel pump the unit would only work with the engine running. If you mounted the unit under the dash you could get power easy, not sure if you mount it over the tank.

dmcnc
10-19-2018, 10:00 AM
Agree on the 12v power concern although I think Houston’s just runs off the pump wiring. I would think mounting the unit inside the car is a better option if the module isn’t water and heat resistant (albeit with longer wiring). An easy spot might be through the AC rubber gasket on the passenger footwell? On the other hand keeping it outside by the tank would reduce installation complexity.

MikeWard
10-23-2018, 07:50 AM
I’ve come to accept that car fuel gauges are inaccurate in that when you fill up, the gauge shows above the full mark and most stay at that point for many miles of driving. I then tend to full up the car when the gauge reads at the ¼ full mark or a little below. I have the TankZilla which has not caused me much problem other than a bad connection one time.

What are your thoughts on the accuracy of the TankZilla unit, Dave? I have one in my car but curious if there is any variance between different units. I've always found mine to be very accurate, it hands down beats any other aftermarket sender out there.

Bitsyncmaster
10-23-2018, 03:30 PM
What are your thoughts on the accuracy of the TankZilla unit, Dave? I have one in my car but curious if there is any variance between different units. I've always found mine to be very accurate, it hands down beats any other aftermarket sender out there.

I've not done any accuracy checking. It shows a full or above after a fill up and seems to move accurately as I drive it long distance. I've never let it get low enough to turn on the GAS light.

Bitsyncmaster
10-29-2018, 08:19 AM
I got my prototype circuit boards and have done a little testing. I have trim pots to calibrate the circuit (no software) to set the gauge needle on the full line with 0% duty cycle and the empty line with 100%. The gauge shows 1/4 full with 46.1% duty, 1/2 full with 25.4% and 3/4 full with 12.3%. I was hoping the half full would be 50% so the duty cycle would be a linear function.

Now I'm going to try my second fuel gauge and see if those values hold pretty close.

After I finish the gauge driver testing, I will start testing the sender tests. Then I have to start writing software to link the two (sender and driver). I will probably just have some tables for the link since I'm using a basic micro without complex math functions.

FYI: The gauge has a lot of filtering itself. It takes about 30 seconds to move the needle close to match the duty cycle. The readings near full seem to have more filtering (takes longer). It still will take software filtering to prevent "gas slosh" from moving the needle. It would take a longer filter to prevent a 5 or 10 minuet hill climb or hill drop moving the needle. Not sure how much filtering will be best for most users.

Bitsyncmaster
10-29-2018, 06:14 PM
I ran my circuit on the other spare fuel gauge I have. This gauge does not quite hit empty with zero ohms on the sensor input. The other gauge did go a little below the empty line. There is nothing I can do about that gauge not hitting the empty mark (it's really close).

One other thing is the resistor on the back of the first gauge is Yellow and it's resistance is 88.45 ohms. The second gauge the resistor is Green and it's resistance is 90.84 ohms. The resistor goes from the +12 pin to the sensor pin. So as expected after I swapped the resistors all it changed the full scale position a little bit.

Anyway the second gauge read a little lower (about a needle width) then the first gauge at the 3/4, 1/2 and 1/4 marks driving the same duty cycle as the first gauge was tested.

So with test of two units so far it seems the sensor would just need an offset calibration to bring it reading the same as the first gauge.

Bitsyncmaster
11-03-2018, 09:55 AM
I bought a new toy for design of my fuel gauge. A power resistor decade box.

Testing my spare fuel gauges.

Gauge (green trim resistor)
E = 0 ohms....Just a hair above E
1/4 = 25 ohms
1/2 = 44 ohms
3/4 = 62 ohms
F = 84 ohms

Gauge (yellow trim resistor)
E = 5 ohms
1/4 = 28 ohms
1/2 = 45 ohms
3/4 = 63 ohms
F = 85 ohms

Bitsyncmaster
11-03-2018, 10:16 AM
Just for gins, I removed the yellow trim resistor on that gauge and retested. So it looks like the trim resistor affects the full scale the most.

E = 10 ohms
1/4 = 79 ohms
1/2 = 158 ohms
3/4 = 318 ohms
F = 988 ohms

Bitsyncmaster
11-16-2018, 08:57 PM
I had to delay work on this new project since this last month a flood of orders of my other products came in. I had to build up my depleting inventory.

Anyway I bought a new daily driver. A 2018 Toyota Camry. One thing I note on it's gas gauge is after I fill up the needle is maxed about two needle widths above the full line. Then it stays at that point until 105 miles average 35.8 MPG. So it looks like the fuel senders all max out at full way before the tank is topped off. I guess you would need a tank with an indent so the sender can just max out when the tank is really full.

dmcnc
11-16-2018, 10:33 PM
Maybe car companies did this to avoid customers from feeling like they have to absolutely top off the tank every time to get to the full line. I have an original sender in mine and it's VERY rare (or difficult) that I get it on the Full mark if I fill the thing up completely. I think the tube style sender usually has some air trapped above the float to where the float will sit just below full extension. I don't think this is an issue at all with modern swing arm floats their movement isn't physically damped by air anyways. It would be great if users could determine their full point based on their "full" tank sender position.


I had to delay work on this new project since this last month a flood of orders of my other products came in. I had to build up my depleting inventory.

Anyway I bought a new daily driver. A 2018 Toyota Camry. One thing I note on it's gas gauge is after I fill up the needle is maxed about two needle widths above the full line. Then it stays at that point until 105 miles average 35.8 MPG. So it looks like the fuel senders all max out at full way before the tank is topped off. I guess you would need a tank with an indent so the sender can just max out when the tank is really full.

Bitsyncmaster
12-21-2018, 06:58 PM
I have been able to get some time to do work on my circuit. I have production boards arriving next week and have the software finished to deliver one unit to my most critical customer. This customer is using a Bosch pump unit that has a 250 ohm full to 40 ohm empty sender. So this unit is designed for that unit only. I think other senders will be no problem to implement but I plan so far to only ship the units with one sender operational. The software and a few components will need to be changed to use some other senders.

I came up with a double type of filtering of the fuel gauge movement. First is I filter the sender readings by taking 256 readings spaced at a software timing interval. Then that summed result is divided by 256 to get the average. Then I only let the gauge move one step each time I get the sender average. The gauge has 256 steps from empty to full.

The low fuel light I have set to come on at 1/8 tank level.

I was looking at senders and it looks like the most common one is 33 ohms full and 240 ohms empty. That sender should only take a simple software change. I think the DMC pump combo uses that sender.

I have an extruded aluminum box the circuit board slides into. I think I will just have the 5 wires exit one end of that box so the user will have to splice some wires. Where the box gets mounted will be up to the user. I think if it's mounted near the tank you would need to use the pump voltage to power my box or run a new 12 volt power wire to that location. The problem with the pump power is it only has power when the engine is running (and has a lot of electrical noise). I like the idea of seeing the fuel level before starting the engine.

Bitsyncmaster
12-30-2018, 08:36 AM
Here is the first unit photos.

Bitsyncmaster
01-07-2019, 06:40 PM
I was wondering the way you install your pump (orientation), if that affects the fuel sender. I guess the bottom of our tank is level so it would only matter if the sender float was at the rear or front if your tank shows full going up a hill or down.

titofiedler
01-07-2019, 06:47 PM
I was wondering the way you install your pump (orientation), if that affects the fuel sender. I guess the bottom of our tank is level so it would only matter if the sender float was at the rear or front if your tank shows full going up a hill or down.

Im getting one of these when it is ready


Enviado do meu iPhone usando Tapatalk

dmcnc
01-07-2019, 07:36 PM
I was wondering the way you install your pump (orientation), if that affects the fuel sender. I guess the bottom of our tank is level so it would only matter if the sender float was at the rear or front if your tank shows full going up a hill or down.

I would say as long as the float arm faces the center of the tank and has free movement, it should be good. I've heard of people having issues with the DMCH pump module sender if the orientation is off (say the arm is stuck on the side of the tank). Probably not as big of a deal for tube-style senders though.

Bitsyncmaster
01-18-2019, 01:14 PM
My first customer is happy with my unit after running a complete tank of gas. He stated he did see a little needle movement one time around half tank but never saw that again.

Right now I'm setting the sender calibration from what was tested with his tank. He recorded the resistance at full, empty and his quarter marks (using gallons added). I have adjustment pots to set the sensor empty and full values but for a user to set those would require he have a full and empty tank. Of course setting full is no problem for most users but empty may be a problem.

Each user will calibrate the gauge. I have a test mode the user sets and he adjusts two pots to put the gauge on full and empty.

So I guess I can sell a few more units. The pump he used is a BOSCH 67317 which has a 250 ohm full and 40 ohm empty sender. I have bought the same pump and will install it in my car after I get my clutch slave replaced. So if you have another pump sender, I would need to know the full and empty resistance. It's best you measure the full resistance in case your float does not move to the full sender specification resistance.

One thing to note is my new pump, the sender did not work. I had to slightly bend the arm on the sender pot to get it working. I would have expected BOSCH had better quality control but this pump is made in China.

I attached the draft of the install document I sent with the first unit.

BABIS
01-22-2019, 04:59 AM
Hello Dave,
do you have the resistance values of the oem sender? I can check mine if it could be helpful. It would be good to have also the exact values of the reproduction sender https://store.delorean.com/p-6566-fuel-tank-sending-unit.aspx

Bitsyncmaster
01-22-2019, 05:24 AM
Hello Dave,
do you have the resistance values of the oem sender? I can check mine if it could be helpful. It would be good to have also the exact values of the reproduction sender https://store.delorean.com/p-6566-fuel-tank-sending-unit.aspx

I never had the OEM sender (my car has a tankzilla). I think the OEM sender was 90 ohms full and 0 ohms empty but I have never measured.

dmcnc
01-22-2019, 08:43 AM
I have an OE sender and it goes from 0 (empty) to 90 (Full) however the tank design doesn't quite let the sender float make it all the way to the ceiling when full - more like at the 83-84 ohms position. I believe the gauge is adjusted for this?

Bitsyncmaster
02-10-2019, 02:02 PM
I pulled my TankZilla and it is interesting to see the TankZilla unit did not wire a power wire. Now I know why he chose the reversed sender which has high resistance at empty. He must use power from both the gauge wire and the low fuel light wire. I wonder if it would have worked with some LEDs in the low fuel light wire.

Bitsyncmaster
02-16-2019, 05:20 PM
I started with an empty tank and put in two quarts of gas. I’m surprised when I ran the pump I got a little flow from the return line with just two quarts of gas in a clean tank.

Note: pump current at 12.6 volts

Empty 39.8 ohms
2 Qt 39.8 ohms 4.8 amps
4 Qt 39.8 ohms 4.6 amps
6 Qt 48.0 ohms 5.5 amps
8 Qt 55.9 ohms 5.5 amps
10 Qt 63.7 ohms 5.9 amps
12 Qt 71.3 ohms 6.1 amps
14 Qt 78.4 ohms ?
16 Qt 85.8 ohms 6.5 amps
18 Qt 93.4 ohms 6.6 amps
20 Qt 101.3 ohms 6.8 amps

I had filled an empty 5 gal jug with 5.0 gal at the gas station and I had ½ Qt. left (my error or pump error)

5 Gal 101.4 ohms

I ran a flow test. This is the amount from the return line with the pump running for 60 seconds. This was with 5 gal. in the tank. Flow was just a little less than 2 quarts for 60 seconds. So that is the flow at 75 PSI since my primary pressure regulator has been calibrated for 75 PSI.

dmcnc
02-16-2019, 05:46 PM
How low do you think the level would have to get before the pump can't produce enough fuel pressure to keep the PRV running?

Bitsyncmaster
02-16-2019, 06:00 PM
How low do you think the level would have to get before the pump can't produce enough fuel pressure to keep the PRV running?

It would idle with the two quarts I'm sure. The return flow was pretty low so probably not get max RPM. And of coarse if you tried going up hill it would die. Remember our pump is at the front of the tank so going up hill will move the gas to back of the tank.

Bitsyncmaster
02-17-2019, 07:29 AM
22 Qt 112.8 ohm 6.7 amp
24 Qt 112.7 ohm 6.8 amp
26 Qt 120.3 ohm 6.7 amp
28 Qt 127.8 ohm 6.8 amp
30 Qt 133.9 ohm
32 Qt 140.2 ohm
34 Qt 151.8 ohm
36 Qt 158.0 ohm
38 Qt 157.8 ohm
40 Qt 170.4 ohm

Had about 4 oz left from my 5.00 gal fill up can

10 gal 170.5 ohm

Interesting to see two "dead" spots on the fuel sender ohm readings. Also seems like the pump current has settled at 6.8 amps with 12.6 volts at the pump.

I hope to have the fill up done today. I have to take a break doing this in my closed garage the fumes are pretty strong.

Bitsyncmaster
02-17-2019, 11:10 AM
I put clear tubing on the pump return pipe so I could see when the tank overfilled.

42 Qt 176.7 ohms
44 Qt 182.4 ohms
46 Qt 188.3 ohms
48 Qt 200.5 ohms
50 Qt 206.7 ohms
52 Qt 218.2 ohms

53 Qt 218.3 ohms
54 Qt 223.9 ohms
55 Qt 229.0 ohms
56 Qt 234.3 ohms
57 Qt 234.3 ohms
58 Qt 243.6 ohms
59 Qt 243.8 ohms.........overflowed 6 inches above top of tank. My old sender showed leaking also. So I pumped out 1 gallon and called my test done.

So it looks my my tank fills to 14.5 gallons. Not that you could use all that fuel since you can't pump the tank dry.

Bitsyncmaster
02-17-2019, 12:39 PM
I like doing testing to learn about things.

I'm using the DMCH V-band clamp which seems to work fine with this pump. I would guess the DMCH pump is a little thicker at the top because it's plastic and their clamp may be even better with that pump. If you buy their clamp remember to get the OEM sender plug they sell. Wish I saw that when I bought mine. I will probably turn an aluminum plug when I get some free time.

I have the electrical connector and pins coming this week. When I verify it's the correct one I will post the part numbers. Right now I have an Ebay connector which fits but it has wires in the wrong pins (pump wires should be 14 AWG and sender wires smaller).

I never knew the pump would have little flow with a very low tank level. I would guess the OEM pump does the same.

I love the quick line connects. Would make on the road replacement very quick.

My pump is a very tight fit into the tank opening. Even after I shaved the flashing off the opening with an exacto knife it still is very tight. I put a little synthetic grease on the rubber ring an that seemed to help a little getting the pump seated.

The pump draws 6.8 amps at 12.6 volts but current drops when the tank level gets very low.

Looks like I have to cut my closing "plate" to clear the electrical connector on the pump.

Bitsyncmaster
02-18-2019, 07:39 AM
I've never had any luck with sealing my Zilla fuel sensor. Looking at the tank hole I see why it had problems. First there is a notch cut into the tank hole I guess was used with the OEM sensor. The Zilla sensor had an O-ring to seal it and that notch is cut deeper than what the O-ring could seal. Second is the metal plate on the Zilla sensor it very thin. It looks like the plate has to be greater than 1/8" thick (plate and gasket) to have the ring that screws onto the tank put any force sealing the sensor down.

So it looks like I need to make a flat gasket and a thick plate so the gasket will seal outside of that notch cut in the tank.

Chris 16409
02-18-2019, 01:19 PM
Dave I was able to add another layer of foam pad on the closing plate to raise it up. I had to re-drill a couple screw holes to line up properly. But I thought that was a better solution that cut into the plate itself. I didn't put all the screws back in either. I used two on the bottom and three along the top edge.

Bitsyncmaster
02-19-2019, 06:38 PM
Well I bought the connector, pins, seals (this is a waterproof connector) and it turns out I need a special crimper because the wire seals are also crimped with the pins.

But the connector I bought on Ebay I was able to move the wires. Two wires look like 14 AWG and two look like 18 AWG and with my pump the the 14 AWG wires are in the wrong place. Well I found out the gray plastic cover over the pins just lifts off and then you can pull the wires and pins just using a little screw driver.

So I would suggest anyone installing the same pump to buy an already wired connector on Ebay. Here is the one I bought.

https://www.ebay.com/itm/New-Airtex-WH3009-4-Way-Upgrade-Fuel-Pump-Wiring-Harness-Connector/380876496355?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Bitsyncmaster
02-24-2019, 03:15 PM
I finished my pump and installed my fuel gauge box. Only thing left to do is modify the cover so I can screw it down. What I'm thinking is some fuel tanks are installed higher than others which is why some owners have fit problems.