Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Fuel gauge adapter

Status
Not open for further replies.
From the figures you give, for the gauge input shorted to ground, by my calculation the gauge has an internal resistance of 12/0.09 = ~130 Ohms connected between the input and 12V. That will certainly skew the expected output from the opamp and make it unusable as is.
So, for 'full' the gauge draws 90mA. For 'empty' it will draw (12-5.3)/130 = ~ 45mA.
What you need is a circuit which translates 0V to 45mA and 5V to 90mA. That could be simply a transistor and a few resistors. I'll have a think and come up with something!
 
Here's the something....
 

Attachments

  • GaugeAdapter.gif
    GaugeAdapter.gif
    23.5 KB · Views: 158
That looks great. I had initially hoped that it might be that simple, but I didn't know how to go about choosing an appropriate transistor, so when I discovered the aforementioned op-amp circuit on this site a few weeks ago I figured that was probably my best shot at getting something built in time to install over the Thanksgiving holiday. But now I have a couple questions regarding this new circuit…

I assume the easiest way to fine tune the 100% (“full”) reading on the gauge would be to use a potentiometer in position R4, but it’s not immediately apparent to me how best to provide a means of adjustment for the zero (“empty”) point. (Connecting the gauge directly to ground—the 90 mA condition—actually yields a reading that’s slightly off-scale high, and the zero-current condition yields a reading that’s slightly off-scale low.) As tempted as I am to do some algebra and model this circuit in an Excel spreadsheet, I suppose I should just ask on here since it appears you’ve already simulated it with purpose-built software. :)

And since I’m actually starting from scratch this time I’m curious if there’s any easy way to correct for the nonlinearity of the gauge, which I had previously intended to ignore for the sake of simplicity. While the 100% reading occurs at an input of 0.6 V and 0% at 5.3 V, the gauge reads 50% at 4.1 V, so it’s apparently much more sensitive over the bottom half of the scale. Since the curves already flatten out towards the end of the above plot, I’m guessing this may not be easy, but if there are any tweaks that would introduce a similar effect over the left half of the plot (i.e. a negative second derivative for the V_gaugein curve), that would be ideal.

Many thanks,
Joe Elliott
 
Rather than use a pot for R4 it would be better to use trimmers for R1, R2 and R3. I had to juggle their values to get the response shown. A slight variation of R1 or R2 will get rid of the tail at the right-hand side, at the expense of shifting the left-hand side up/down. I'll have another bash with the sim and see if we can get things to flatten off at the left.
 
it’s apparently much more sensitive over the bottom half of the scale
Thinking cap on. Isn't that what you need from a battery monitor? I would have thought 'nearly empty' was more critical than 'nearly full'.

It occurs to me the gauge scale is non-linear for one of two reasons:
1) The original Renault 5 sender is non-linear but the gauge mechanism is linear,
2) The original sender is linear but the mechanism is non-linear.

Do you know which?

Edit: You could check the gauge linearity by connecting 2 or 3 known value resistors in turn between the gauge input and ground and measuring the voltages at the gauge input, then applying Ohm's Law.

Still playing with the sim.
 
Last edited:
Is this the sort of linearising you're looking for? R1, R2 and R3 are still the trimmers to twiddle. I've included the LTSpice asc file in case anyone wants to play with this.
 

Attachments

  • NonlinearGaugeAdapter.gif
    NonlinearGaugeAdapter.gif
    22.2 KB · Views: 135
  • Adapter3.asc
    2.9 KB · Views: 103
Thinking cap on. Isn't that what you need from a battery monitor? I would have thought 'nearly empty' was more critical than 'nearly full'.

Yeah, there would be some value in leaving it that way, which is why I wasn't going to worry about it before. But the flip side is that when the gauge shows 50% you'll actually be closer to 25% full which could mislead you into misjudging the remaining range of the car.

It occurs to me the gauge scale is non-linear for one of two reasons:
1) The original Renault 5 sender is non-linear but the gauge mechanism is linear,
2) The original sender is linear but the mechanism is non-linear.

It's the gauge mechanism. I didn't mean to imply that the scale is graduated in a weird way; it's not. It's just that the gauge reads in the middle at 4.1 V. I assume that the original fuel level sender (and/or the shape of the fuel tank) was similarly nonlinear.

The revised circuit looks perfect. But it occurs to me that the gauge is also tied to ground within the instrument panel. So the current through the input probably doesn't represent 100% of the current through the gauge mechanism and if I'm going to use a transistor like you suggested, that additional path to ground will need to be taken into account.
 
Check the gauge linearity as I suggested in post #25 and let us know the figures you get. That should give a clue as to possible additional factors to be taken into account.
 
Check the gauge linearity as I suggested in post #25 and let us know the figures you get. That should give a clue as to possible additional factors to be taken into account.

I'm 150 miles away from the car right now, but when I was there for the Thanksgiving holiday I left my brother with a potentiometer in case such measurements became necessary. Here's what he got:
3 ohms = 100%
117 ohms = 50%
...and the potentiometer I gave him maxed out shortly thereafter, so we don't have a resistance measurement to correlate with the 5.3 V = 0% measurement that I made when I had the instrument panel out of the car.
 
It would be nice to have a bit more data to plot the gauge response. Can your brother get us resistance values which give 25%, 50% and 75% scale readings on the gauge?
 
It would be nice to have a bit more data to plot the gauge response. Can your brother get us resistance values which give 25%, 50% and 75% scale readings on the gauge?

In theory he could get 75% with the potentiometer that I gave him, but in practice it'd be entirely subjective since the gauge is so small and only has markings at 0%, 50%, and 100%. If I can build something that hits the endpoints and gets closer to the middle at 50% state of charge than a linear input would, I'll be happy.
 
If anyone is still paying attention to this thread... I built the circuit shown in Post #4 above by Ericgibbs, and it's not working.

For the benefit of others who may read this Thread, this circuit was originally designed for another OP using a specific sensor and input and did work as required.!

It is not working for this OP, because the sensor and input are totally different, the circuit as posted is unsuitable for his application.

E
 
For the avoidance of doubt
the circuit as posted
....means as posted in that other thread.
 
Last edited:
For the avoidance of doubt
....means as posted in that other thread.

As jelliot was referring to a circuit I posted, I fail to see the point of your last post.:confused:
[unless its a post count bump]

I am sure that others have no doubt as to its meaning.!
 
For the benefit of others who may read this Thread, this circuit was originally designed for another OP using a specific sensor and input and did work as required.!

It is not working for this OP, because the sensor and input are totally different, the circuit as posted is unsuitable for his application.

In any case, the circuit I found in Post #4 here does work as I intended on the bench with a battery monitor/sensor identical to that used in this application, as long as its output is connected to a voltmeter or similarly high-impedance instrument. Where I went wrong was assuming that would translate to driving the very low-impedance automotive fuel gauge in my brother's car (which began life as a Renault 5).
 
It would be nice to have a bit more data to plot the gauge response. Can your brother get us resistance values which give 25%, 50% and 75% scale readings on the gauge?

My brother said he'll have time sometime today to get a resistance value at 75%.

What I was able to get from him last night should be enough to resolve my concern about the gauge being tied to ground, however: with the gauge disconnected from any input, there's 7.3 V between the floating input wire and ground/earth. Between that and the previous measurement of 90 mA when that input is shorted to ground, it seems that the gauge consists of a 130 Ω resistance between +12 V and its input, and 200 Ω between its input and ground. Am I correct in thinking that the circuit shown in Post #26 above will need to be modified to account for this additional current path between the gauge mechanism and ground?
 
In any case, the circuit I found in Post #4 here does work as I intended on the bench with a battery monitor/sensor identical to that used in this application, as long as its output is connected to a voltmeter or similarly high-impedance instrument. Where I went wrong was assuming that would translate to driving the very low-impedance automotive fuel gauge in my brother's car (which began life as a Renault 5).

hi jelliot,
Thank you for making that clear.:D
I was helping you complete your project, but it causes confusion when others start posting alternatives when 90% of the work is already done.

I will follow your thread and hope you get a good result.
 
I was helping you complete your project, but it causes confusion when others start posting alternatives when 90% of the work is already done.

Well as much as I like the simplicity of Alec's transistor approach, I'm certainly open to any suggestions for adapting the op-amp solution to work in this application, as that would save me from trying to design and fabricate an all-new board before the Christmas holiday.

Thanks again!
 
In theory he could get 75% with the potentiometer that I gave him, but in practice it'd be entirely subjective since the gauge is so small and only has markings at 0%, 50%, and 100%. If I can build something that hits the endpoints and gets closer to the middle at 50% state of charge than a linear input would, I'll be happy.

Update: The gauge reads 75% when the potentiometer is set to 58 ohms.
 
Well shucks; it appears that everyone lost interest in this thread just as two potential (no pun intended) solutions were both roughly 95% complete...

Anyone still following? Anyone know what I need to do to either A) Adapt the op-amp concept to absorb currents up to 90 mA, or B) Modify the transistor concept to pull roughly 87 mA @ 5.0 V input, 52 mA at 3.75 V, 38 mA @ 2.5 V, 29 mA @ 1.25 V and 24 mA @ 0 V?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top