Quantitative Capacitive Touch in Same Circuit

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jd1
 
Posts: 16
Joined: Thu Sep 10, 2015 11:27 pm

Quantitative Capacitive Touch in Same Circuit

Post by jd1 »

I'm installing LEDs on a staircase that has a conductive metal handrail. The goal is to have the LED strips turn on sequentially based on the direction the stairs are used. I want to ditch the usual motion sensors and use the railing as a capacitive input.

Are there any sensors in the world when, if connected to the top and bottom of the railing, would be able to detect relative differences between the two sensors in the electrical properties of the handrail? On one hand, the railing is one solid piece of conducting metal. On the other, I expect some kind of sensor at the top would see a relative difference in something relative to the one at the bottom that has to go through more distance to "feel" the same input. Thoughts? Possible in some way?

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Quantitative Capacitive Touch in Same Circuit

Post by mikeysklar »

I think I remember discussing the LED part of this project with you before.

I like the metal hand rail directional concept. It should be really easy to detect which direction. If you use an ADC pin on your controller and connect one side of the railing to the ADC input and the other to GND you should be able to tell based on the ADC value (really high or really low) which direction someone has touch the railing on.

I'm saying you do not need an additional sensor. The metal railing will be doing that for you when you connect it to an analog pin.

User avatar
jd1
 
Posts: 16
Joined: Thu Sep 10, 2015 11:27 pm

Re: Quantitative Capacitive Touch in Same Circuit

Post by jd1 »

Wasn't me. I just got the railing! But, please forgive me, as I'm a total newbie and need to read a ton to learn how to do this right, now that I have a point in the right direction, but here's my follow up: if I have an input at the top and ground at the bottom, that suggests there's a live voltage running through the railing, right? Any risk to that? Again, apologies for the newbish question.

User avatar
jd1
 
Posts: 16
Joined: Thu Sep 10, 2015 11:27 pm

Re: Quantitative Capacitive Touch in Same Circuit

Post by jd1 »

Sorry one additional question. I need three states for this setup: one for each end and a third when no one is touching the railing at all. When looking at ADC pins, it looks like they always output either a high or low. How do I achieve the third state?

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Quantitative Capacitive Touch in Same Circuit

Post by mikeysklar »

@jd1,

This page shows how to wire up and code analog inputs. It is about 4 lines of code to get going with CircuitPython.

https://learn.adafruit.com/circuitpytho ... ter-inputs

The voltage and current will be very low so not risk to touch (3.3v and maybe a few mA of current).

The different states will need to be determined through some trial and error. Readings with nobody touching, when someone is at the top versus at the bottom. You have to wire it up which will determine which direction will be high vs low.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”