I am trying to create a capacitive sensor that detects one's foot on an electric bike for safety. It needs to be able to sense the foot up to 10cm away from the bike so I have used a large surface area of 40 x 70mm. I'm using the Arduino for this sensing but I'm having trouble with it. The values being returned are very noisy and it's very hard to obtain useful data from the sensor. Also the sensor will hang 'on' once the foot has left the sensor. I have created a plane behind the sensor using a dual layer board. I've used this plane as a ground plane however a large value is returned and doesn't change with the presence of the foot. I've also used it by attaching the driving signal to it however the value returned is then 0, permanently. I have tried using the auto calibration in the Arduino and just using the 'Raw' function which just returns the capacitance sensor without any filtering without getting any improvements. This is all with the Arduino attached to my laptop and thus grounded to earth. Once the Arduino is operating on batteries the sensor is completely useless. Is there anything I can do to optimise the sensor? Or are there any alternatives to capacitive sensing? IR was considered and tested however sunlight would saturate the sensor on making it useless once more.