Translate

Monday, 20 January 2025

Linearising a classic Mini Fuel Gauge when fitting an ETB gauge.

 Julian rang....

"Can you tell me whether this fuel gauge I've got will work in my Mini"

I thought to myself "This is going to be horrible" ... it was.

Connecting the gauge to the tank sender, a 12V supply and hooking the tank float about with a bit of wire gave empty and full, and garbage in between.

I took some measurements of the resistance of the tank sender at Empty, 25%,50% and 100% full

TankR sender
1007.5
7530
5065
25125
0200

R sender is in ohms...

Having got home with the gauge, I wired it up to a pot and took the same values

I lots these when I did this, but it was quite clear that bodging this up with some analogue electronics wasn't going to be easy.

What about a microcontroller? Hmmmm.

I tried connecting the tank connection of the gauge to a 2N7000 fet, via a 4.7 ohm resistor to round, and PWMing it.... yep, that works. I took note of the PWM values vs indications on the gauge.

TankPWM %
100244
75222
50174
25144
0123

Now to mash the two together.....

Get an arduino nano to measure the voltage developed across the sender in series with a 200 ohm resistor. Calculate the resistance of the sender, calculate the required PWM.

Except for neither graph was a straight line ...

A bit of messing about inn google sheets later had two equations I could implement in my code to flatten it all out a bit. https://docs.google.com/spreadsheets/d/1W5jGL7obq-l499up6gbHa-PL1yinc2bq0epixeFbGJ8/edit?usp=sharing

A circuit was quickly conjured up...


... and built up on a piece of perfboard.

To make it a bit smaller I chose a Pro-mini clone, and changed the 7805 for a Traco TSR-1-2405 switching regulator, to keep the heat down.





Next up was to make a case in tinkercad, and get it printed.













... and once that was done ...












It's put in it's box, sealed with a little RTV, and connected up for test.







All works great! 

No comments:

Post a Comment