hi there,
i am having problems with hooking up a simple 10k potentiometer to the arduino. if i touch the potentiometer i get very stable values but as soon as i take my hand of it it starts to become unstable. i am suspecting this is due to improper grounding. would this effect stop if i would screw the potentiometer into a metal box? (and if i would use proper connectors and wires to the arudino)?
I'm not sure why you're reading the input multiple times then "averaging" the values (not sure why you're averaging the four measurements, then taking 1/8 of that measurement, either) - unless you were trying to combat what you are seeing.
It may be that you need better grounding (or shielding, actually) - but I really suspect that it may be those funky paperclips inducing/picking up noise, adding parasitic capacitance, extra resistance, who knows what...
I would first try removing those from the leads, stripping and re-tinning the ends of the leads well to be able to insert them directly into the headers (or solder on short lengths of solid -copper- wire for the ends).
I worked on a project some years ago which was using potentiometers to give a position feedback for a robotic leg. I had lots of problems with noise from the potentiometers which threw off the balance of the leg periodically. It turned out to be a mixture of unshielded connectors and cheap potentiometers.
I would start by shielding the connections and then look at the quality of your components.