Jump to content

Smoothing fuel sender output via mathblock


DerekAE86

Recommended Posts

I've wired in a fuel sender via a 100ohm pull up to 5v.
I didn't put any capacitor in the circuit because I was planning on smoothing it via a mathblock.

I used av(a,200) so it averages the value over a decently long time.

However I noticed that when the car is first started the GP Output starts at 0 before jumping up to the actual value (assume theres a brief period before the 5v kicks in?)

This means the fuel level starts at 0 and slowly ramps to the actual level. Is there a way to put a delay in the initial check so the value starts at what the actual level is?

Link to comment
Share on other sites

Better if you use a resistor/capacitor to smoothen the reading. Depending on the resistance and capacitance, this however has a longer time before settling to the actual level. Well try combinations, but it would be a compromise between having the correct reading immediately vs level fluctuations on fuel sloshing.

 

Link to comment
Share on other sites

The average function previous values always start as all 0s so it will take 200s to reach the current actual value if it steady and not changing.

you could probably use a timer to show the current value until 200s has passed and then show the average value

Something like this:

Capture.PNG.28c2df6963690a8020340a2beec0cdca.PNG

Link to comment
Share on other sites

  • 3 weeks later...
On 11/6/2023 at 3:56 PM, DerekAE86 said:

Thanks Vaughan, that's exactly what I was after.

Hey Derek! Sorry complete noob here just starting in the Link ecu world and I was thinking about doing the same kind of setup as you (wiring without a capacitor on the ground side)  in my car for the fuel sender. 

Witch signal input did you use on the ecu for the smoothing of the values? Does it matter witch one i use? "digital/analog/temp ect" ?

 

Link to comment
Share on other sites

2 minutes ago, koracing said:

Fuel level will be an analog signal so analog input with your own external pullup resistor to 5v (value of the pullup resistor will depend on the ohm range of the sender between empty and full).

Awesome! Thank for the answer! 

I would have to physically confirm this with a tester but from what I found on the internet my resistance from the sender would be :

E : 105-110 ohms

1/2 : 25.5 - 39.5 ohms

F : 2-5 ohms

What size resistor should I use or how can I calculate that on my own?

Link to comment
Share on other sites

  • 2 weeks later...
On 11/29/2023 at 12:11 AM, thpcars said:

Witch signal input did you use on the ecu for the smoothing of the values? Does it matter witch one i use? "digital/analog/temp ect" ?

Like Kris has said use a analog input. With your pullup resistor going to the ECU's sensor 5v reference.

This method worked pretty well. However just be aware that the first 200 seconds of the "unfilered" result is _very_ sensitive.
Just sitting in the car, or wiggling around adjusting your position makes the fuel level jump around significantly.
Even filling up with fuel the sloshing in the tank takes ages to settle down.

Felt a bit self concious sitting at the petrol station putting 5l in at a time to build a good calibration curve and having to wait a min or so each time for it to stablize hahaha.

Link to comment
Share on other sites

31 minutes ago, DerekAE86 said:

Like Kris has said use a analog input. With your pullup resistor going to the ECU's sensor 5v reference.

This method worked pretty well. However just be aware that the first 200 seconds of the "unfilered" result is _very_ sensitive.
Just sitting in the car, or wiggling around adjusting your position makes the fuel level jump around significantly.
Even filling up with fuel the sloshing in the tank takes ages to settle down.

Felt a bit self concious sitting at the petrol station putting 5l in at a time to build a good calibration curve and having to wait a min or so each time for it to stablize hahaha.

Hahah alright man! I will keep that in mind! Thank for the answer :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...