Skip to content

WoodCharp/ArduinoADCFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino ADC Filter

Method to smooth ADC readings.

How it works ?

This filter has running averaging for raw values from ADC and exponential smoothing to averaged sum of raw values.

Visualized values from filter

Few images to see how filter performs.

I have linear hall-effect A1324 with 4.7uF decoupling capacitor and arduino nano board for this test. New value is printed every 10ms (115200 baud rate). Blue line is highest value and red is lowest value got from arduino.

Remember, your results may vary.

Raw

Here filter is not being used. Value fluctuates around range of 2.

Raw

Exponential smoothing alpha = 0.9

Value fluctuates around range of ~1 - 0.7.

FILTERED_0_9

Exponential smoothing aplha = 0.1

Value fluctuates around range of ~0.6 - 0.45.

FILTERED_0_1

How to use

See the example file at ADCFilter\examples\FilterExample\FilterExample.ino

About

Method to smooth ADC readings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages