Electronic – arduino – Understanding a circuit for reading current passing through human bodies

analogarduinoswitchesvoltage-reference

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).

Touch circuit schematic

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() {
  int r = analogRead(A0);
  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.

Best Answer

The basic principle is this:

Here, from an engineering perspective, is a human -

enter image description here

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 -

schematic

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.