In Arduino R3 I am using a voltage sensor but the voltage is 5v and the voltage provided into the Arduino is without any noise and it's pure DC source too . While reading the voltage in serial plotter it is not stable if any know the problem plz let me know
And give the solve for it
Let's call the 5V "VCC".
The ADC gives a relative value to its reference. The reference is default VCC.
If analogRead() returns 100, then it is 100/1024 of VCC.
If analogRead() returns 700, then it is 700/1024 of VCC.
If your pure 5V is 5% accurate, then a few percentage is added by the resistors, the circuit and the ADC and the total accuracy could be 8%.
The Arduino Uno has a internal voltage reference. You have to measure it once and if you keep the Arduino Uno at room temperature, then it is accurate.
Tip 1: Using the average of a number of samples works very well to get rid of electronic noise.
Tip 2: Since the ADC advances to the next level when that voltage is reached, a half bit correction can be added when calculating the voltage: http://gammon.com.au/adc
If there are wires between the voltage sensor and the analog input, environmental electrical noise can be picked up by the wires (antenna). Filtering can mitigate that noise.