Arduino capacitance meter
A 470 uF will be likely an electrolytic type and this will have a leakage current in the order of 1 to 10 uA per microfarad, Assuming 1 uA is the figure then the total leakage will be 470 uA and this will cause a volt drop (irrespective of capacitance value) across the 10 kohm resistor of 4.7 volts and your algorithm will probably never really perform properly.