Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Do I really need a FIR for this?

Status
Not open for further replies.

blapcb

Full Member level 3
Joined
Jan 7, 2007
Messages
188
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,296
Location
Planet earth (most of the time)
Activity points
2,766
I want to detect the level of fuel in a cars fuel tank, taken from the voltage of the fuel sender. Granted, it will fluctuate when the car is moving since the fuel sloshes in tank.

I thought, I could do the following:
- Read a sample from the ADC
- Discard outlaying values (to get rid say of voltage spikes)
- Collect and average N samples over T time to get the reading
(I thought I could find the samples and time required by practical trial and error on a PC first)

My question is, would this method work or do I need something like a FIR filter? If so, why?

Thanks
 

Your approach should work as well or better than the filter approach. Your method tries to take into account the variations which are likely to occur in what you're measuring.

Example, if the voltage spikes are all positive, your method will eliminate them. The filter method will yield a falsely elevated reading.

As for sloshing variations...

I forget when or in which cars I've noticed the fuel gauge show a sloshing type movement. What I notice more is how the fuel gauge rises and falls gradually due to driving up and down hills. It has no predictable pattern of course. It may or may not be filterable.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top