# Understanding a circuit for reading current passing through human bodies

I found on Instructables this circuit that is used to detect when two conductive pads are touched at the same time by a person (or, in that particular example, a chain of people).

Used in conjunction with this Arduino sketch it works perfectly, producing a stable value when the two pads are not being touched and different values proportional to the amount of contact when being touched:

void setup() {
Serial.begin(9600);
}

void loop() {
Serial.println(r);
delay(200);
}


It works perfectly for me but I don't understand what is the principle behind it and the article doesn't explain it.

Normally I would expect to have a voltage source present on one pad, and pull down resistor on the other pad, and the person completing the circuit. However in this case there's no voltage source and one of the pads is connected to the analog reference pin instead.

-

The basic principle is this:

Here, from an engineering perspective, is a human -

The value of a human is much easier to measure or estimate for this model. Hopes and dreams do not enter the equation, instead it's just the sweatiness of their skin. The value of a human can range from 1kΩ to 100kΩ.

We have a sweaty human, they are 5kΩ.

When we add a human to the circuit you provided -

simulate this circuit – Schematic created using CircuitLab

Our human creates a voltage divider with R1. The circuit designer modeled their average human resistor as 39kΩ. We can infer this because the maximum change in a voltage divider is when the resistors are equal. Thus, to maximize the change in the signal being measured they set R1 to 39kΩ.

With no human the voltage on $A0$ will simply be equal to AREF and the capacitor will be charged to the same. When the human is added and the circuit is complete, the voltage is now:

$$A0 = AREF * \frac{(Human + 1kΩ)\;\|\;1kΩ}{39kΩ + ((Human + 1kΩ)\;\|\;1kΩ)}$$

The capacitor is there too, but if we consider it to have infinite DC resistance then it won't enter the equation. It's there to smooth out the change in voltage.

You may have not immediately recognized this as a voltage divider because of the series 1kΩ resistors. Those are there to provide isolation to the human and, along with the capacitor, as a debounce circuit. Additionally the AREF for the 'supply' voltage. We're making an analog measurement so the analog reference (AREF) voltage is a good choice. Very little current is required to charge the capacitor in sufficient time.

-
This makes sense, especially since 39kΩ is way too low to model the resistance of the human body. I usually measure it above 1MΩ down to 200kΩ with wet hands. Which makes sense as replacing R1 with a bigger value gives me more sensitive output. The thing that actually confused me here is that instead of using the 5V V+ pin on the Arduino they are using the AREF (analog reference) pin. Is there a specific reason, or would this work the same even with the 5V V+ pin ? –  Ugo Riboni Jun 8 '14 at 16:41
The AREF is used because it's the reference voltage for the ADC. This means it's a copy of what the ADC is using for a reference, that way any noise on it will be what's called 'common mode', which ADCs usually ignore quite well. –  Samuel Jun 8 '14 at 16:54

It relies on the conductivity of the human body allowing a small current to pass via R1, thru the body then thru R3 to ground. This creates a change in voltage on the input to the ADC. This, presumably is measured by the MCU and some form of visual or audible feedback is given to you, the operator of the MCU.

-
Your answer would make sense for a different circuit where current flows from one pin through the body and then is read by the ADC. But this circuit seems to work in a different way as it involves the analog reference of the microcontroller. I updated my question to match this. –  Ugo Riboni Jun 8 '14 at 15:57
+1 This answer is completely correct. It just didn't address the OP's misconception about AREF vs VCC. –  Samuel Jun 8 '14 at 16:56
@Samuel - the question has changed out of all proportion - there was no mention of Vref in the OP's question when he posted it, just a circuit diagram. And, for the downvoter (not you Samuel) please take note of this - how can I be expected to check every 5 minutes for the OP to come back and change his or her question. –  Andy aka Jun 8 '14 at 17:38

Samuel is correct, but there are two things I believe are wrong with his answer.

First, assuming the ADC input draws negligible current, the output voltage is really:

$$A0 = AREF * \frac{(Human + 1kΩ)\;}{39kΩ + (Human + 1kΩ)}$$

This matches simulation.

Second, the voltage divider isn't exhibiting "maximum change" when the human $= 39kΩ$. It actually changes the most at low resistor values, as can be seen from this graph of the voltage divider equation.

The real reason to set R1 to the expected value of "human" (plus 1kΩ) is so that the expected human resistance is in the middle of the voltage range, since then :

$$A0 = AREF * \frac{39kΩ\;}{39kΩ + 39kΩ}=\frac{1}{2}AREF$$