In ADC conversion randomly varying output

when i am reading sensor output using analogread()...It is not giving a stable digital value eventhough grounding is perfect. Although in the absence of input(wire is disconnected from arduino board), it is showing highly varying digital output. Some one help me out of this!

Phanibabu: when i am reading sensor output using analogread()...It is not giving a stable digital value eventhough grounding is perfect.

A common approach is to average say 10 readings. But how do you know the sensor isn't giving funny readings in the first place?

Although in the absence of input(wire is disconnected from arduino board), it is showing highly varying digital output.

With nothing connected it will pick up random signals from the environment. That's sometimes used as a seed for generating random numbers, in fact.

Treasure the random, some people would pay good money for that!


You could have spam eggs spam and spam, that's not got much spam in it!

What are you trying to measure? How much noise (and with what spectrum) are you expecting?