# Why are the values I'm getting through a capacitive sensor decreasing as the resistance gets lower?

I'm currently messing around with "capacitive sensors" by trying to light an LED using an Arduino. My capacitive sensor that I am using is just made up of an Arduino, three wires and a resistor. My setup is simply two wires hooked to an Arduino and both ends of a resistor, with the third wire connected to the resistor on one side, and nothing on the other.

When I am using a 1 megohm resistor, I am getting values in the range of 2700 ~ 2800 when I grasp the exposed end of the wire with my fingers. However, when I try switching the resistor to one with lower resistance (10,000 ohm), I am only getting values of 60 when I grasp the exposed wire, and I get values of 0 when I use a 220 ohm wire.

An illustrative example:

.............
|           |--------- <-- wire
| ARDUINO   |        |
|           |      Resistor
|           |        |
|           |--------- +++++++++++ <---- Exposed wire which I grab
.............

Should I not be getting a greater value by using a resistor with less resistance as that would allow more current to flow through? Yet, the inverse is happening where the values outputted from my Arduino decrease as I lower the resistance and increase as I increase the resistance.

Why is this so?

Capacitive sensing works by using the RC network created by the resistor (R) and the human body (C) as a timing circuit and measuring how long it takes the analog signal to reach a digital threshold ($\tau = {k RC}$) when the capacitance is charged or discharged. When the resistance decreases the timing speeds up, and lower values are measured.

• Thanks for taking the time to answer. To re-iterate, am i right in saying that the arduino produces an electrical charge that is stored by me(acting as a capacitor) when i touch the wire. When my body stores up a pre-specified amount of charge, the sensor will then output a value(the time taken to reach the specified threshold)? Also, what does the analog and digital threshold refer to? Also i'm guessing that t=time in your equation, but what is kRC? – Kenneth .J May 26 '14 at 15:41
• Voltage, not charge. electronics.stackexchange.com/q/97222 . R is the resistance. C is the capacitance. k is a factor that is based on the digital threshold (ohms * farads = seconds) – Ignacio Vazquez-Abrams May 26 '14 at 16:09

Are you using the Arduino's CapSense library? If so, it works by charging the "capacitor" with one pin of the Arduino, and the second pin measures the time it takes for the capacitor to charge to whatever the threshold voltage of the digital pin is.

A higher resistance reduces the current and thus increases the charge time. Your body doesn't really store any charge. Your body interacts with the electric field of the capacitive sensor in a way which repels the electrons that are trying to charge the capacitive sensor thus making it harder to charge and charging takes longer. The sensor should work without you actually touching it.

• Yes,i'm indeed using the arduino's capsense library =) If i'm holding onto a piece of wire, causing a LED to light up, wouldn't my body serve as a capacitor? If not, what would the capacitor be? Also is there anywhere i can read up on my body interacting with the electric field of the cap sensor? – Kenneth .J May 27 '14 at 17:22
• A capacitor is essentially made of two plates separated by a distance. In this case the capacitance is seen from the wire to ground, so the wire is one plate, and all the surroundings acts as another (this is my understanding anyways, there might be better informed people on here). This video kind of explains it youtube.com/watch?v=QItuf6lNvmI. Cheers – THEMuffinMan7 May 28 '14 at 2:42