Fuel gauge recalibrator project

BCX

Administrator
Moderator
Location
SA
First Name
Bill
Drive
2000 Galant Type-V
1997 MK Triton GLS [6G74 conversion]
2019 i30 N-Line
Correct, ATmega also has the same protection, but I've killed an input so put additional protection infront and provide local capacitance for the 5v rail too.

The diodes internally will dump excess votlage/current internally to vcc within the chip. Let it be a last resort.

As Tony said, a resistor in series to current limit. cos the ADC is such high impedence, it shouldnt have much of a voltage drop across it.
 

Kaldek

2 AYC Bars
Premium Member
Location
Melbourne
First Name
Ed
Drive
2000 Legnum VR4 Manual, Ford Territory family runabout, BMW K1300R.
Correct, ATmega also has the same protection, but I've killed an input so put additional protection infront and provide local capacitance for the 5v rail too.

The diodes internally will dump excess votlage/current internally to vcc within the chip. Let it be a last resort.

As Tony said, a resistor in series to current limit. cos the ADC is such high impedence, it shouldnt have much of a voltage drop across it.
My question was more whether the creator of the UTCOMP had left out the protection you recommend or if it looks like he has it.
 

Tony_T

Leaving Skid Marks
Location
Hamilton New Zealand
First Name
Tony
Drive
Legnum VR-4 1997
My last post crossed with two posts that I hadn't seen #154 and #155. That power protection circuit in #154 loks good but I don't really see the function of C03 and R02 and I'd have been inclined to have C02 in parallel with C04 on the output side of the ferrite bead choke. That's obviously a typo on the fuse as no-one can make a fuse of such precise rating, it would just be 1 amp. For some applications the ferrite bead would be better replaced by an inductor with a bit more inductance, and C04 with a more substantial capacitance to remove some low frequency noise but this would depend on how susceptible to low frequency noise the actual circuit to be powered is.

The input from the fuel sender and any other analogue inputs should certainly have protection diode(s) and capacitance / resistance filtering as there will be induced noise / spikes from proximity to other wiring and also it would be possible accidentally to short those inputs to the 12 volt supply or something connected to the supply which has a low resistance. A zener may be preferable to the two diode setup as a short to 12 volt would flow via any series resistance, through the top diode to the 3.3 or 5 v supply rail, which ever it is. If the resistance was high enough no damage will occur but if a low value of resistor is used it may allow the IC's to see more voltage than they can handle on their supply pins and do damage. In any automotive electronic situation you need to protect against worst possible cases unfortunately.
What is under that UTCOMP board? Which of the terminals on the left are the analogue inputs? I see three pins with 1k resistors in your picture, are they the analogues? If so are there any diodes and / or capacitors on the under side connected to them? There's a 10k on pin 12 input to the quad op-amp and another track to a via which may go to protection components below but I don't see where the other three input pins 3, 5, and 10 go, they'll be on another layer. I'm sure there will be something protecting them or there would have been failures by now which there clearly have not been.

Wow, am I being helpful or just a nuisance?
 

BCX

Administrator
Moderator
Location
SA
First Name
Bill
Drive
2000 Galant Type-V
1997 MK Triton GLS [6G74 conversion]
2019 i30 N-Line
Looks like the inverting input is tied to the opamp output. This is a negative feedback configuration, so its acting as a voltage follower.
 

Tony_T

Leaving Skid Marks
Location
Hamilton New Zealand
First Name
Tony
Drive
Legnum VR-4 1997
That's just to get a defined input resistance to the ADC independent of the actual source resistance. Obviously takes any chance of damage away from the ADC also and op-amps are usually a bit more hardy than ADC's.
 

kc427

Leaving Skid Marks
Lifetime Member
Location
HK
First Name
KC
Drive
VR4
@BCX I took some closer shots of the UTCOMP board. These are definitely inputs at the bottom of the board from the earlier image, however these are all digital inputs that are either ON/OFF or pulsing.


I need to keep searching for how they have protected the analogue sensors.
For those curious, the reason I am looking at how the UTCOMP board interfaces with the car circuitry is because the UTCOMP is extremely reliable, and we should follow (but no further) how the UTCOMP does it.

Just guessing, the rpm input signal in red, it looks like some transistor/mosfet switching. Assume it is a NPN transistor, it may be like the simulation circuit, 0v to switch ON, and 5v to switch OFF. The resistor and capacitor, ie, RC, may act as a low pass filter? Just guessing, I am not too sure about that. The diode, I am not sure it's just protecting from wrong polarity or may have other function.. If so, seems it's just filtering and polarity protection. Note, the capacitor maybe 0.1uF or 0.01uf.

UTCOMP_Input.jpg
UTCOMP_Input_0v.jpg
UTCOMP_Input_5v.jpg
 
Last edited:

kc427

Leaving Skid Marks
Lifetime Member
Location
HK
First Name
KC
Drive
VR4
@BCX , @Tony_T when you talking about protecting the input pin by adding diode, resistor and capacitor, is this drawing enough for the protection? Just a gentle reminder that the fuel sender is just a rheostat with low resistance, around 4-107 ohm only, which is connected to the GND as in the drawing, and simply using the Arduino to read small resistance.

input_pin_protection.jpg
 

Tony_T

Leaving Skid Marks
Location
Hamilton New Zealand
First Name
Tony
Drive
Legnum VR-4 1997
That protection looks fine @kc427 although the left-hand 5v1 zener (with the green line) is redundant as a zener is a normal diode in the forward conduction direction so will clamp to approx -0.6 volts and +5.1 volts, the only consideration for me is that a short to 12 volts by accident on the sender line will instantly destroy the zener and if that fails to an open circuit the LM317 will follow along with anything else on the 5 volt line. A low current fuse could be added in the input, but that would still be something that would have to be repaired if such an external fault happened. At present I can't think of any way of making that input fully protected so you may choose to assume that the situation won't ever arise. Maybe just make the zener to ground a stout 1 watt type and use a (say) 500mA SMD fuse which could easily be replaced.
Looking at the input circuit you traced out, you have that totally correct, the circuit next to it is identical. The diode is just reverse protection and is almost redundant as the 300k series resistor will prevent any damage even from even several hundred volts of reverse voltage. The capacitor is RF and noise rejection, probably won't be as high as 1µF as that would slow the input response considerably although that may be what the designer aimed for since none of the functions look to need any speed, and the other 300k to ground is to make sure the base of the transistor has a definite 0 volts when no input is applied and that no input below about 1.2 volts plus 0.6 for the diode will be treated as a valid input.
 

Baba Galant

1 AYC Bar
Lifetime Member
Location
Melbourne
First Name
John
Drive
Galant VR4 twin turbo 1997
I appreciate that you guys are working towards a calibrated unit to accurately tell our fuel gauge exactly what's in the tank.
Have you put any thought into perhaps modifying the rheostat or wiper section?
I've never been able to fill up with more than 40 odd litres, even the orange warning light comes up yet I still have almost 20 litres in the tank.
I'm ok with not having the needle fly past the full mark if it means adjusting the wiper contact or even bending the float arm up. I'm sure it's more complicated than this but it may be worth a shot?
 

Kaldek

2 AYC Bars
Premium Member
Location
Melbourne
First Name
Ed
Drive
2000 Legnum VR4 Manual, Ford Territory family runabout, BMW K1300R.
I appreciate that you guys are working towards a calibrated unit to accurately tell our fuel gauge exactly what's in the tank.
Have you put any thought into perhaps modifying the rheostat or wiper section?
I've never been able to fill up with more than 40 odd litres, even the orange warning light comes up yet I still have almost 20 litres in the tank.
I'm ok with not having the needle fly past the full mark if it means adjusting the wiper contact or even bending the float arm up. I'm sure it's more complicated than this but it may be worth a shot?
Your problem is indicative of something in your car being broken. I would suggest that there's a few things going on here:
- Your jet valve (the venturi that pulls fuel from the passenger side of the tank to the driver's side is not working
- Your passenger side Low Fuel switch is stuck in the "low fuel" position

I have some detail on the design of the setup in the new Wiki:

I honestly think something on the passenger side of your car is jammed up in the fuel tank. When the low fuel light comes on (and you still have 20 litres left), what is the needle showing on the gauge?
 

Baba Galant

1 AYC Bar
Lifetime Member
Location
Melbourne
First Name
John
Drive
Galant VR4 twin turbo 1997
The needle shows 1/4 or just less. This generally where I top up to full.
I don't think there is access to the passenger side unit as there is no plate to access the unit.
 

Kaldek

2 AYC Bars
Premium Member
Location
Melbourne
First Name
Ed
Drive
2000 Legnum VR4 Manual, Ford Territory family runabout, BMW K1300R.
The needle shows 1/4 or just less. This generally where I top up to full.
I don't think there is access to the passenger side unit as there is no plate to access the unit.
You're right, there is no in-car access to the passenger side. Given your needle is at 1/4 and the light is coming on, there is definitely something in your car that has failed and the only solution is to drop the tank. It may be as simple as removing the passenger side jet valve and Low Fuel switch assembly to see what has it all gummed up, followed by a clean.
But you won't know until you drop the tank.
 

Baba Galant

1 AYC Bar
Lifetime Member
Location
Melbourne
First Name
John
Drive
Galant VR4 twin turbo 1997
Mmm, I don't think I'll be doing that, I'll check the line between the two for blockage but not game to drop the tank.
 

Kaldek

2 AYC Bars
Premium Member
Location
Melbourne
First Name
Ed
Drive
2000 Legnum VR4 Manual, Ford Territory family runabout, BMW K1300R.
Mmm, I don't think I'll be doing that, I'll check the line between the two for blockage but not game to drop the tank.
Be brave! Rob Allen from Adelaide just dropped his not a couple weeks ago.
 

Baba Galant

1 AYC Bar
Lifetime Member
Location
Melbourne
First Name
John
Drive
Galant VR4 twin turbo 1997
But I don't wanna be brave! Nah I've managed to mess up my upper and lower back about 3 times in 3 weeks. Stupid 2 story house, stupid mattresses and had to grab someone that collapsed and was about to hit the deck.
Physio is sending me broke!

I look at it in about 2 weeks when the tank empties and hopefully the back will be right.
Many thanks!
 

Kaldek

2 AYC Bars
Premium Member
Location
Melbourne
First Name
Ed
Drive
2000 Legnum VR4 Manual, Ford Territory family runabout, BMW K1300R.
I look at it in about 2 weeks when the tank empties and hopefully the back will be right.
Many thanks!
I should be a bit pragmatic about this and say to start by tracing all the wires before dropping the tank. You will be able to validate if the Low Fuel switch is borked just by probing wires on the harness connector under the seat on the driver's side. You will just need to get your hands on connectors E-12 and E-20.
If there is continuity between E-12, Pin #5 and E-20, Pin #3 when the tank is full then the low fuel switch is definitely borked (or has been bypassed by a previous owner).
 

Kaldek

2 AYC Bars
Premium Member
Location
Melbourne
First Name
Ed
Drive
2000 Legnum VR4 Manual, Ford Territory family runabout, BMW K1300R.
Back on the project topic, by reviewing what others have said and looking at how the UTCOMP deals with this issue, I will add the following Op-Amp voltage follower (using an MCP6001) as a buffer to the ADC which is reading the fuel sender resistance.

Should there also be a 10k resistor leading in to VIn on the op-amp or would this affect the voltage divider circuit and stop it from functioning as desired?
1652674764848.png


I have not as yet specifically looked at the protection for the digital output pin which is driving the MOSFET. I will again happily take guidance here but would prefer that it's pragmatic rather than electrical engineering theory based. Give me part numbers, not an engineering degree.
 
Last edited:

Tony_T

Leaving Skid Marks
Location
Hamilton New Zealand
First Name
Tony
Drive
Legnum VR-4 1997
I don't see a need for an op-amp in that input, the input resistance of your ADC is already very high so just use the circiut in post #167 with the deletion of the redundant zener to the 5 volt rail and with the inclusion of a small SMD fuse between the sender input terminal and the zener. The UTCOMP is allowing for high resistance inputs, you don't have that here with just a few hundred ohms of sender resistance.
For the MOSFET and the pin driving it, the protection shown in post #142 is perfect, don't change it.

If you really do want to use the op-amp buffer (why?) then yes a 10k right at the op-amp input pin would be ideal provided it is not a bipolar transistor input which would draw significant current, your MCP6001 is CMOS so no problem there.

Off topic, just noticed I don't have a picture by my name, I looked and don't see an option to place one, does that come only with paid membership or am I missing where to upload it?
 
Last edited:

BCX

Administrator
Moderator
Location
SA
First Name
Bill
Drive
2000 Galant Type-V
1997 MK Triton GLS [6G74 conversion]
2019 i30 N-Line
@Tony_T could the zener go after the 1k ohm resistor?

so 1k resistor would limit current that the zener would sink if higher than 5.1v?
 

Tony_T

Leaving Skid Marks
Location
Hamilton New Zealand
First Name
Tony
Drive
Legnum VR-4 1997
No, because the LM317 constant current source would not be able to draw the needed current through it, or if the LM317 came before the resistor it wouldn't be protected. 1k ohm drops 1 volt for every milliamp and since the 317 is set to deliver 15.2mA you don't have that many volts available, also the current wouldn't be constant anymore as you'd be back to the resistor feed the earlier version had, but with a lot more resistance. Maybe stick with post 167 modded as I suggested, but another thing to be aware of is that the recommended minimum input-output voltage for the LM317 is 3 volts, at 15mA you'll have 1.6 volts approx across the sender if the figure of 107 ohms is correct so 5-1.6 is only 3.4 which is running close and if the sender is any more than that value with production spreads the LM317 may not be able to hold a constant current anyway. Datasheet:

(para 8.4.2)
Just thinking it would probably be better to use the original setup with the resistor, the ADC input could then be protected by a 0.5 watt 5v1 zener at its input pin and the 1k resistor in series from the junction of the sender and the 100 ohm resistor. The voltage/sender resistance plot would be a different shape due to the non-constant current but that's only a matter of going back to the tables you already have, no other regulation is needed as it is all fed from an already regulated 5 volt supply.
 
Top Bottom