# Detecting human hand between two pins

**URL:** <https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450>\
**Category:** General Guidance\
**Created:** [March 13, 2017, 8:11pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450 "2017-03-13T20:11:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 13, 2017, 8:11pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/1 "2017-03-13T20:11:21Z")

</div>

Hi all,  
I'm using a 5V arduino and trying to detect when a hand connects two terminals in my project. I initially tried a standard pullup input, with my hand connecting ground to the input pin. I believe the ~2Mohm resistance between my thumb and finger is preventing this from working though.

Does anyone have ideas for how to make that work? My current thought is something involving a transistor but I'm not sure of the right values to choose or if it's even feasible. Perhaps an analog input could do the trick? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [March 13, 2017, 8:18pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/2 "2017-03-13T20:18:16Z")

</div>

Detect "a human hand" as opposed to what?

Human skin resistance values vary from a few thousand Ohms if wet or sweaty, to millions of Ohms if clean and dry.

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 13, 2017, 8:28pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/3 "2017-03-13T20:28:52Z")

</div>

As opposed to a low resistance connection. I'm aware a hand has a higher and variable resistance. Any ideas how to implement it though?

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [March 13, 2017, 8:31pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/4 "2017-03-13T20:31:12Z")

</div>

Define "low resistance" connection.

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 13, 2017, 8:33pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/5 "2017-03-13T20:33:53Z")

</div>

Short to ground, like a typical button when pressed

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 13, 2017, 8:41pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/6 "2017-03-13T20:41:10Z")

</div>

To clarify, I imagine the terminals will be unconnected, and the action will be triggered when they are connected by a hand. Typically I'd do this with a button, shorting the ground and input pins when pressed. But I'm not sure how to implement something similar with a hand instead of the short.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [March 13, 2017, 9:06pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/7 "2017-03-13T21:06:33Z")

</div>

In the real world, such things can be remarkably difficult.

You have to experiment to find some approach that works satisfactorily, and that may require changing your expectations.

It will never work perfectly (neither does button push detection).

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 13, 2017, 9:29pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/8 "2017-03-13T21:29:56Z")

</div>

Thanks, I'm having a little luck now using an analog input attached to a 1 or 10 Mohm resistor to ground. Using my hand to connect the pin to a 5V supply. I'll still have to see if the latency and repeatability are good enough for double clicks and whatnot.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [March 13, 2017, 10:18pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/9 "2017-03-13T22:18:25Z")

</div>

> Beuller:  
> As opposed to a low resistance connection. I'm aware a hand has a higher and variable resistance. Any ideas how to implement it though?

You can skip resistance and go straight to capacitance. Then you can detect a hand or finger near one or between two contacts without touching either. Or with a big surface, someone at the door or in the hall. Touch gets a plus that's detectable from close, from none.

Here's the Arduino Playground page that covers these uses perhaps best.  
[http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense](http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense)

---

<div class="post-metadata">

**Author:** ![saximus](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@saximus](https://forum.arduino.cc/u/saximus)\
**Post date:** [March 13, 2017, 10:21pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/10 "2017-03-13T22:21:45Z")

</div>

This possibly sounds like an XY problem. There are a bunch of different ways to detect a touch that will be much more accurate and repeatable e.g. capacitive/resistive sensors, micro-switches, or even proximity sensors if the physical contact isn't completely necessary.

Maybe if you gave some more detail about what you're trying to achieve, you will get more helpful answers.

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 13, 2017, 10:50pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/11 "2017-03-13T22:50:57Z")

</div>

Sure thing, here's my project: I've built a 5' staff with ~300 LEDs in it. It needs 3 buttons for controlling modes and colors and such. I'd prefer to avoid drilling any holes in the polycarbonate staff as that will weaken it and possibly protrude a little bit. Space is very tight and mechanical strength is important.

So my plan is to draw with conductive ink on an acrylic ball at the top of the staff. The ball is held in place with an aluminum cradle that I plan to attach to either ground or 5V. The cradle will also conceal where wires attach arduino pins to the conductive ink. I'd like to detect when I'm holding the aluminum cradle and pressing different designs drawns on the acrylic ball with the ink. The goal being a seemingly "magic" button on the acrylic ball with no wires attached.

What seems to be working is setting the aluminum cradle to 5V and running the ink to wires to analog inputs, with a 10Mohm pull-down resistor. I'm triggering the input commands when the analog pin reads \>400mV. So far so good but the new problem is the ink scratching off :(.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [March 14, 2017, 12:08am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/12 "2017-03-14T00:08:00Z")

</div>

The same ink can be used as cap sensors with a non-conductive coating over it. You could do things like detect hand waving over the ball. Throw an accelerometer in and you could tie effects to staff movements.

Does your TV have moving buttons or touch spots? There's a bit of foil for the touch spot and more around it that's grounded, on Youtube and web sites a lot of the whys and hows are shown to better that Playground tutorial.

Everybody has an electrical field. When that field joins with the electrical field of another conductor, the capacitance of the conductor (your ink) is shared by the capacitance of you. For a pin moded INPUT\_PULLUP after being OUTPUT LOW (to drain the sensing conductor) to raise from LOW to HIGH takes longer to much longer as your hand nears, all you have to know is when to quit counting microseconds and call it a touch.

Note that since the conductor can lie under a layer of clear plastic you never need touch the circuit.

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 14, 2017, 12:29am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/13 "2017-03-14T00:29:15Z")

</div>

Thanks goforsmoke! That would be awesome since a layer of insulation over the acrylic ball would be good for mechanical reasons as well (i.e. How much do I really trust the glue holding it in place). I do have an accelerometer already working too. That implementation sounds like something I'll try out for the next iteration, I'm desperately trying to wrap this up in time to show off this weekend 🙂

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [March 14, 2017, 1:30am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/14 "2017-03-14T01:30:23Z")

</div>

See if you can layer Future floor wax (clear liquid plastic that sets on floors) over the ball but you might want to etch into the designs to make a central spot and lead to the edge surrounded by grounded design. That will make the touch area more specific.

Does the ball light up? Of course, how else will it be obvious that you are touching designs? In that case ditch the conductive ink, use real thin wires the way that cap sense touch screens do to find touch (can pick up close) and make the designs in light. That way they can change. (evil grin)

You can use piezo disks to sense change in physical pressure (press/release) including vibrations. You can power a led flash with a good tap, run through a 4-diode full wave rectifier with a capacitor across the output and ground a led can run a couple seconds after a bunch of taps -- seen it on Youtube, got their schematic and adopted it to measure on Arduino.

---

<div class="post-metadata">

**Author:** ![billhowl](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/billhowl/32/213655_2.png) [@billhowl](https://forum.arduino.cc/u/billhowl)\
**Post date:** [March 14, 2017, 1:42am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/15 "2017-03-14T01:42:46Z")

</div>

You can use LED as light sensor to be function as button since you have many LEDs.

[http://playground.arduino.cc/Learning/LEDSensor](http://playground.arduino.cc/Learning/LEDSensor)

[http://www.thebox.myzen.co.uk/Workshop/LED\_Sensing.html](http://www.thebox.myzen.co.uk/Workshop/LED_Sensing.html)

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [March 14, 2017, 2:10am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/17 "2017-03-14T02:10:45Z")

</div>

> Beuller:  
> Thanks goforsmoke! That would be awesome since a layer of insulation over the acrylic ball would be good for mechanical reasons as well (i.e. How much do I really trust the glue holding it in place). I do have an accelerometer already working too. That implementation sounds like something I'll try out for the next iteration, I'm desperately trying to wrap this up in time to show off this weekend 🙂

You need to learn up on capacitive sensing and spend time trying different resistors on your designs whether you etch inside from outside or not. Sensing one design at a time with the others grounded may be enough, you can check many such more than 100x a second with a small fraction of the cpu cycles available.

An Uno cpu cycles 160000 times in 0.01 seconds. Simple code takes fewer cycles to complete, keep it simple where possible and avoid floating-point math and C++ Strings (or any C++ Container Class) on 8-bit Arduino even when you can get away with it, bad practice is worse than no practice at all.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [March 14, 2017, 2:19am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/18 "2017-03-14T02:19:54Z")

</div>

> BillHo:  
> You can use LED as light sensor to be function as button since you have many LEDs.
> 
> [Arduino Playground - HomePage](http://playground.arduino.cc/Learning/LEDSensor)

I've done this one and thing is that it doesn't know the difference between finger on top and room light out since the detecting is done while the led is emitting no light and neither is your finger.

---

<div class="post-metadata">

**Author:** ![Beuller](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Beuller](https://forum.arduino.cc/u/Beuller)\
**Post date:** [March 14, 2017, 3:31am UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/19 "2017-03-14T03:31:38Z")

</div>

Yeah the ball will light up to some extent (if I can get it all wired up in time), and it would be super cool to have each button light up different colors when pressed, since some of the actions (enable/disable timer-based mode switching) won't be obvious otherwise. I was half planning on aiming some RGB LEDs to sloppily achieve something like that. I've definitely got some research to do to understand these ideas but they sound awesome and robust which is really exciting. Also evil grins are my favorite so bonus points there!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 6:09pm UTC](https://forum.arduino.cc/t/detecting-human-hand-between-two-pins/444450/20 "2021-05-05T18:09:35Z")

</div>

Closed on May 5, 2021, 6:09pm UTC


