What could be the reason for these unstable analog readings, and how can I stabilise the output? Should I add a capacitor for smoothing, or modify the

First read this

and this

and show us your code - in code tags.