I am working on Fuel Level Sensor module. We have a Fuel Level Sensor which is dipped into the fuel tank. The sensor sends the update in each 10 seconds. The volt varies from 0 to 5, wherein 0 means 'Fuel tank is Empty' and 5 means 'Fuel tank is Full'.
Currently I am working on to stabilize the voltage that I am receiving from the sensor. Since there is a lot of fluctuation happening while the vehicle is moving, I am not able to stabilize the graph.
Currently I am getting the graph in the following manner:
But I want the graph something like this:
I want to remove the fluctuation happening in the 1st graph.
Below is the data that I am receiving. Please download and open it in MS Excel 2007.(Trust me it is not a virus.)
Download Excel File
Looking ahead for a helpful logic.
Thanks in Advance.
Edited 4-Feb-13 20:32pm
Use a moving average: it sums the last "N" points and gives the average of those, rather than using the datapoints directly. You will still get some fluctuation, but it should be minimised, and you will probably need to play with the sample size to get the right "damping" factor.
BTW: If you want to show people "before" and "after" pictures, try to make sure that you use the same dataset, or at least similar - your two examples don't even use the same timescale!
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)