I have 200 mSec timing available in my code. I need to take a voltage reading and display it on the LCD. I have read that it's a good practice to take multiple readings, average it and then display it. I have multiple options and I would like advice on which option should be used.
Take 20 readings every 200ms, average it (divide by 20) and display on lcd
Take 1 reading every 200ms for 1 sec(5 readings/sec), average it (divide by 5)and display on lcd
Take 20 readings in 200ms, average it. Do it 5 times. Add the readings, divide the total by 5 then display it every 1 second on lcd.
you can use leaky integration to average each 200 msec reading against the current average. there will be some delay when there are significant changes