Cap sensor

Hi guys, I'm currently making a capacitance sensing device that displays the result on an lcd screen.
The circuit uses a MOSFET which is controlled by the Arduino when the Arduino output 1 is set to high the MOSFET is closed a 0V.
When the Arduino output 1 is set to low it starts timing and 5v is applied to the MOSFET opening it, allowing the unknown cap to begin to charge.
When the voltage across the capacitance reaches the voltage dividers Reference point (2.5v) the output of the comparator goes high.
Arduino detects the high output from the comparator on Output 2 and using the hardware interrupt command and stops the timer.
Using the timer taken the unknown capacitance can be found.

My question is will this circuit work? I'm not too sure about the MOSFET I've used.

It will probably work, but you have to remember a cap does not charge linearly unless fed by a constant (fixed) current.

Hmm what could i do about that?
also do u know which MOSFET i should be using? i don't really know much about them.

Mosfet seems ok.
The comparator has an open collector output.
Add a pull up resistor to the output of the opamp, or use the internal pull up of the Arduino.

Detection level and linearity is irrelevant. It can all be dealt with in code.

thank you for the info should help a lot, ill make it up on a breadboard and see if i can get the Arduino codes to work.