I made a ddr pad using capacitive sensors. It's kind of like this http://www.artemlive.com/photos/908.jpg, but with steel plates covered with fabric instead of aluminum foil, and only 4 instead of 6. They are connected to a single Arduino Leonardo, using the capsense library at Arduino Playground - CapacitiveSensor, using a 1-megohm resistor for each sensor. The Arduino sends current through the resistor to measure the capacitance.
My goal is so that each sensor will accurately and immediately detect when I step on it. Most of the time, it works. The sensor will report a reading of about 0-30 at rest and 130-250 when I step on it, and I set the threshold at 100 so that works fine. But sometimes a sensor will jump to 60-100 at rest, and will sometimes go over 100 when I hover my foot over it or simply at random, resulting in false positives. Also, the readings tend to slowly increase the longer the Arduino is plugged in. I'm not sure why this happens, and I need some way to make this more reliable.
I tried making a 'ground plane' of aluminum foil that goes under all four sensors and has a wire to both a metal pipe and the Arduino ground. This helped alot, but the problem still remains.
I read in several places that connecting capacitive sensors to ground via a small capacitor can stabilize the readings. So I connected each sensor to a pin which I set to LOW using 220pf capacitors. This made things much worse; readings take 4 times as long, and now what happens is the reading will be 0-5, then I step on it and it jumps to 400 or so, but then I take my foot off and it goes to 200 before resetting to 0. Basically I don't have a stable range of pressed/not pressed values.
Any ideas?