Samgeek
Posts: 4
Joined: Sat Oct 01, 2016 1:02 pm

Why do I need touch sensor?

Tue Apr 04, 2017 10:27 pm

Hello,

I'm quite interested in capacitive/resistive sensor to make my plants talk but I don't get why people are talking online about capacitive touch sensor like MPR121.
I mean I managed to make a capacitive sensor on my Arduino with a library (http://playground.arduino.cc/Main/Capac ... n.CapSense) and it worked pretty well. Why should I buy a sensor if I can just use a resistor between 2 pins? Same technique should work with my rpi right?

And if I do need capacitive sensor how to chose between different models like a simple "Adafruit 12-Key Capacitive Touch Sensor Breakout - MPR121" and "Adafruit Capacitive Touch HAT for Raspberry Pi - Mini Kit - MPR121"?

I look forward to your reply,

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Why do I need touch sensor?

Wed Apr 05, 2017 8:02 am

Hi,
arduino's have built in analogue input's, but the Pi doesn't. You'll need a ADC chip or HAT type board added to the pi in order to read analogue voltages.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Samgeek
Posts: 4
Joined: Sat Oct 01, 2016 1:02 pm

Re: Why do I need touch sensor?

Wed Apr 05, 2017 9:14 am

Hi Texy,

Sorry but I don't fully understand your response because in the example I gave Arduino is connected to 2 digital pins ?!

YCN-
Posts: 246
Joined: Fri Jun 10, 2016 3:18 pm

Re: Why do I need touch sensor?

Wed Apr 05, 2017 2:15 pm

Hi there,

It's a wonderfull technic I've never heard of it !
I do think it should work also on the Raspberry pi. But if you intend to do anything else than getting the touch, it won't be an efficiant way. Doing so will use a lot of CPU power, since you're counting onto an (almost) empty while. This is not accurate in a system that is not dedicated to be a touch sensor.
I had to do this kind of stuff and I used an MPC3008 (8 channel ADC) and some force resistive resistor : https://www.sparkfun.com/products/9375

YCN-

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Why do I need touch sensor?

Wed Apr 05, 2017 4:03 pm

There've been a few posts about measuring resistances using the charge/discharge times of a known capacitor. This is just the same, but measuring a capacitance with a known resistor. So it should work.

The MPR121 is an altogether more sophisticated device, capable of reading multiple points. If that's what you want, use it.
But if all you want is presence / absence of a human or plant, this should work with a Pi just as well as with an Arduino.

The only question I have is regarding your plants.
Mine don't move, and have never wanted to talk to me. Am I a bad gardener?

Samgeek
Posts: 4
Joined: Sat Oct 01, 2016 1:02 pm

Re: Why do I need touch sensor?

Wed Apr 05, 2017 8:22 pm

Alright so it looks quite interesting to go on with this solution.

Burngate I do feel your pain and I think you need to work on this lack of communication. Try Google translate!

Return to “Beginners”