# Electronic – arduino – Touching Person-to-Person

arduinocapsensesensor

Is there any way to detect skin touching or no-touching between two people? Maybe using capacitive sensing or any other methods? It doesn't need recognizing gesture, only yes-or-no-touching.

The constraints are:

• Two people in the classroom. (Each person may bring the sensor. If it only need one person, it's better).
• Their gesture is in free way. (both standing, both sitting, one-standing one-sitting, or any gesture).
• The size of sensor must not bigger than lunchbox.
• The total price of the sensor components must below \$100.
• The sensor must be powered with battery.
• The sensor output may only LED light. The light is on if touching detected.

I've read Touche for Arduino: Advanced touch sensing. Can this method be customized to detect person-to-person?

In case anyone comes looking, I've built something recently that did exactly this.

I built three versions, all of which work, but have different constraints in terms of what you're connecting to people.

1)Passive version One person has a wire attached to them. This is attached directly to the analog pin of the arduino.

If you repeatedly read from the analog pin of the arduino, you will get a pretty random value (basically the person is being a big antenna). However, the amount this value varies is pretty constant. So, I do analogRead 20 times, calculate the variance (you know, the obvious way, using your school maths). This stays constant while someone is not touching anyone else.

The moment they touch someone else, the antenna is one heck of a lot bigger, and the variance increases drastically.

2)Semi-active version

Both people have wires attached to them, person 1 is from analog pin of arduino, person 2 from ground of the arduino. The variance of an analogRead is repeatedly sampled. If the people aren't touching, the value shifts around, as before, and a high variance is shown. When people do touch, the circuit is grounded, and the value goes down to 0.

3)Active version

Both people have wires attached to them, person 1 from analog pin of arduino, person 2 from digital output pin. On the digital output pin, I output a square wave, in sync with my measurements of the analog pin. This way, when people touch, the variance is really high (as it is recording 0...1024...0...1024.) I use the pullup resistor to output the square wave, to limit current, don't know if it really changes much, but I felt more comfortable putting it through the person's body with it.

Because of the active signal being used, the top and bottom values of variance are pretty constant, so this version is I think most accurate.

The measurement loop looks roughly like this:

``````for(int n=0;n<20;n+=2)
{
pinMode(outpin,INPUT);
digitalWrite(outpin,HIGH); // square wave HIGH (through pull up resistor)
delay(2); // let things settle + don't run analogReads too close together