Dear forum,
this is basically a question for Paul Badger or Paul Stoffregen, or both! But anyone knowing an answer will be welcome!
First, congratulations for the library, a lot of people have successfully used that!
I am testing a self-made moisture sensor for wood chips mounted on a bucket. I am doing that within the frame of a MSc thesis. This means that I want to establish statistical relationships between the values from CapacitiveSensor (corrected reading, absolute reading or even elapsed time) and the real values of moisture, in combination with the measured bulk density and temperature. So, since my work has to be more or less scientific, I would like to explain in my results, when I finally obtain something, from where are the arduino values coming.
So, my question is, how does this library produce the values capacitiveSensor() and capacitiveSensorRaw()? My ideal would be to reach a value of capacitance (farads), but if impossible, I should be able to explain which is the meaning of a reading of 7000 or 29000.
When I tried to obtain my own values of capacitance by measuring the elapsed time between the "HIGH" in the send pin and the 63% of 5V in the received pin, for using the 1 = R*C equation, I completely failed to obtain anything. Then, I decided to use CapacitiveSensor library, which has shown to be sensitive to the material I am using.
In the meanwhile, I have noticed the enormous differences when getting readings when arduino is connected to a Laptop or connected to a 9V battery. When reading with the Laptop, the wire going to the bucket (where the + (10 cm x 10 cm) foil is stuck at the bottom) is sensitive when I grab it. So I thought that the use of shielded wires would solve this issue (yes?). But when working with a 9V battery, my aim, the wire is by contrary almost insensitive, and in addition I have lost a lot of sensitivity also in the sensor, even with a large foil connected to ground (-) and fixed on a wall of the bucket. Touching the battery also affects the readings, but I can solve it by isolating it.
Completely understanding how CapacitiveSensor works would help to better design the final experiment (I will devote a lot of time to that).
Thank you in advance!
Ignacio