 CapSensing questions

Hi All,

I have been trying to understand the CapSense library but still got a couple of questions. If anyone can generously explain to me, I appreciate it.

1. When I get readings from serial monitor, are these number time constant? I assume these number are the result of R*C with the unit of ms?

2. Is the capacitance of the R.C term the result of two capacitor connected in parallel? (one is the capacitor connected between the sensing pin and ground and the other one is the sensing capacitor?

3. For the programme, I cannot see the relationship between R and C. I assume the term "long total1 = cs_4_2.capacitiveSensor(30)" is the calculation of R*C? How does the program know the value of the resistor being used?

4. At the start of the programme, what value will be returned after "CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2)" is executed? Is this just a value of the resistor?

5. What is the maximum and minimum detectable capacitance of the circuit?

6. When I was using large reisitor (e.g. 30 MOhm), the output was floating quite lot and it was very unstable (I used a aluminium sheet with the dimension of 10cm by 10cm).

Sorry for endless questions but I really love to understand the principle.

Any explanations are welcomed. :) :)

Thank you,

Rock

Any ideas?  Rock

Hi, If you read carefully the playground page of the capSense library, you can read that

1) these reading you get are not supposed to be constant. They do represent the capacitance of the capacitors virtualy connected to ground (look at the picture on the library page: http://playground.arduino.cc//Main/CapacitiveSensor?from=Main.CapSense) But it does not have any unit.

To answer the other questions you need to understand how it measures the capacitance. What the library is actually returning if the time that the capacitor made by you and the aluminium foil takes to go to the same state (high or low) of the send pin, when it changes (ie. goes from low to high, or from high to low) This time is representative of the capacitance because the time required to load a capacitor depends on it's capacitance, but it is not a very accurate way of doing it. It might not be very clear(english is not my native language) but If you look at the playground page and at the code you will find answers to all your questions. Hope I helped...