Hi, I am designing a capacitive sensor using cap sense csd,used to detect a piece of metal in front(about mm gap) of sensing element.i am using generic cap sense widget to get raw data to my program. I am planning to put a threshold value in between the variation of output when metal is present and metal is not present. The entire case which hold PCB and sensor is grounded/earthed. Due to this the variation when metal not present to metal present value is very low(about 10 or 20), Which is fluctuating too.hence i cant put a proper threshold. Please help me with this issue as soon as possible. Also please tell me what happen is i increase or decrease the CMOD capacitor.