Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Electrical Engineering (https://www.askmehelpdesk.com/forumdisplay.php?f=497)
-   -   Arduino and home built capacitor sensors (https://www.askmehelpdesk.com/showthread.php?t=826633)

  • Jul 30, 2016, 10:21 AM
    eranzenbach
    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.
  • Aug 1, 2016, 08:46 AM
    ebaines
    Your theory seems sound,so I have to wonder if perhaps the variability is due to inconsistencies in how the capacitor is charged and the accuracy of timing the discharge. For example, prior to each run do you short the plates of the capacitor so that you always start with zero charge? Do the plates always charge to the same starting voltage? And how do you measure discharge time - is there a particular voltage value that you measure the time for? How accurate is the timing device?
  • Aug 2, 2016, 06:22 PM
    eranzenbach
    The charging and measuring is being done via an Arduino controller. The software package I use is a standard Arduino library. I simply specify what pins on the controller are to be charged and read and the call to capacitiveSensorRaw does the rests. I would assume that they ground the plates before each read. According to the library description, the plates are charged, then discharged and an internal counter is returned that gives the relative time of discharge. I have collected the one of the plates to a 1 megaohm resistor. I have just purchased a small commercial capacitor which I'll substitute for my "sensors" and am about to begin using that to see if the Arduino gives me readings within the tolerances of the capacitor. I appreciate the answer and I'll let you know what I discover.

  • All times are GMT -7. The time now is 01:11 AM.