periodic spikes in analog sensor
After some research on the forum and doing some tests myself i realized that it was my laptop which was the source if noise. Thanks to this answer.

I put everything on battery and put the values on LCD display and everything was smooth. So it was my laptop which was the source of noise.

Thanks for all the comments and help.