Arduino and home built capacitor sensors
I am attempting to measure fluid levels in a chamber. To do this I have constructed a water-tight cylindrical capacitor sensor. The electrodes are copper strips applied to the outside of the cylinder. I have then covered the outside of the cylinder in a water-proof coating. The fluid fills the cylinder sensor as the fluid level rises. The electrodes are being discharged through a 1 megaohm resistor and I am using an arduino controller to charge and measure the capacitance using a pre-supplied library call. The device seems to work. I have run tests repeatedly using the same temperature fluid. As the fluid level in the chamber rises, so does the capacitor readings. As the fluid level falls, the readings fall. The problem is that there is so much variance in the readings that I cannot accurately tell the fluid level. I typically strobe (i.e. call the routine that charges and measures the discharge rates) the capacitor 200 times. According to the software package, there is no signal averaging by doing this, it just returns a cumulative value of how long it takes to discharge for the given number of attempts (in my case, 200). I also thought averaging the readings might help, so I am calling the routine that provides the measurement for 200 strobes 100 times and averaging the 100 readings.
I need to determine the fluid levels within about 10 cm3. Is there something that I can do to the circuit electrically that will stabilize it more and provide more consistent readings? Thanks.