Hi
I am trying to get a MPR121 to read touches through 3-5mm of plastic. How can I increase the sensitivity? The guide says to use this line of code but I am not sure of the kinds of values I should put here:
setThreshholds(uint8_t touch, uint8_t release)
I also tried the 5 pin breakout board and it worked great through thick acrylic. I thought this other 12 pin board would have similar capabilities to read through plastic.
Does anyone know how to increase the sensitivity on theres 12 pin boards?
Thanks
12-channel touch sensor board MPR121 - thresholds
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 12-channel touch sensor board MPR121 - thresholds
SetThresholds takes values between 0 and 255. The default is 12 for touch and 6 for release. Lower numbers will increase sensitivity.
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
Thanks.
Do you have any idea If I need to change that code in my Arduino script? If so where would I add it? In the setup section? Or do I need to edit it in the library .h file?
Do you have any idea If I need to change that code in my Arduino script? If so where would I add it? In the setup section? Or do I need to edit it in the library .h file?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 12-channel touch sensor board MPR121 - thresholds
You can just add the call in your setup().
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
Thanks but I tried that and I just get errors. In the example file I tried both:
Serial.println("MPR121 found!");
setThreshholds(uint8_t 12, uint8_t 6);
And
Serial.println("MPR121 found!");
setThreshholds(12, 6);
Any clues would be greatly appreciated. Thanks.
Serial.println("MPR121 found!");
setThreshholds(uint8_t 12, uint8_t 6);
And
Serial.println("MPR121 found!");
setThreshholds(12, 6);
Any clues would be greatly appreciated. Thanks.
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
I guess my question is no longer important. So far as soon as I try to extend a touch pad a few feet from the board it just endlessly blinks making it useless. I guess the entire wire is acting like a sensor or something. Total bummer. If there are any touch products that allow the conductive touch pad to be up to 5 feet away from the Arduino please let me know. I am in a bind.
Thanks
Thanks
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
I think I got it now. I can order a bunch of these momentary breakouts: https://www.adafruit.com/products/1374
If i install them close to the touch point I can connect them to the base Arduino with long wires that are not connected directly to the sensor. I hope it works.
If i install them close to the touch point I can connect them to the base Arduino with long wires that are not connected directly to the sensor. I hope it works.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 12-channel touch sensor board MPR121 - thresholds
Yes. The whole wire is sensitive. If you need the pads to be far from the board, the standalone momentary breakouts are probably your best bet.
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
Thanks for your help. Live and learn. Ordering now. If these work, and save my bacon, I am naming my next pet adafruit :)
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 12-channel touch sensor board MPR121 - thresholds
If you are looking for a pet... http://www.adafruit.com/blog/2014/08/26 ... ng-system/
;)
;)
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
I must have one! It seems so loyal.
- freddyk
- Posts: 26
- Joined: Thu Jun 02, 2011 9:15 pm
Re: 12-channel touch sensor board MPR121 - thresholds
Victory! OMG touch sensors are so cool. And they saved my life or at least helped me keep my biggest client. I built the electronics and programmed the quizhttp://www.fredknack.com/jumpwall/) were just to hard to press. And it was live in a major Portland Oregon Mall!
Adafruit's momentary capacitive touch sensors saved the day and they work great! Thank you, Thank you! This has been so stressful but now it works better than ever. Capacitive touch is going to change the way I do everything from this point on. I recommend that every hacker out there give these things a try.
Adafruit rocks!
for this interactive kiosk for Kaiser Permanente. It is a combination of a touch screen quiz and then if the user gets a quiz question wrong they have to take a 'physical challenge' that consists of LED rings that light up indicating a button that needs to be pressed. If the user hits the buttons as they light up fast enough they can move on to the next question. My problem was that the buttons I fabricated (Adafruit's momentary capacitive touch sensors saved the day and they work great! Thank you, Thank you! This has been so stressful but now it works better than ever. Capacitive touch is going to change the way I do everything from this point on. I recommend that every hacker out there give these things a try.
Adafruit rocks!
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 12-channel touch sensor board MPR121 - thresholds
Looks great! Glad they worked out for you.
- ja450n
- Posts: 21
- Joined: Mon Jun 17, 2013 6:13 pm
Re: 12-channel touch sensor board MPR121 - thresholds
i'm working on tweaking the sensitivity and found this thread, it doesn't look like the question was ever answers, so here's the answer:
so you'd reference the setThreshholds function like so:
The problem is scope, you need to tell the program where to find the function 'setThreshholds', in the MPR121test sketch you declare an instance of the class Adafruit_MPR121 as 'cap'Thanks but I tried that and I just get errors. In the example file I tried both:
Serial.println("MPR121 found!");
setThreshholds(uint8_t 12, uint8_t 6);
And
Serial.println("MPR121 found!");
setThreshholds(12, 6);
Any clues would be greatly appreciated. Thanks.
Code: Select all
Adafruit_MPR121 cap = Adafruit_MPR121();
Code: Select all
cap.setThreshholds(6, 2);
- Micheldum
- Posts: 3
- Joined: Wed Mar 18, 2015 1:19 pm
Re: 12-channel touch sensor board MPR121 - thresholds
Hello there, I am new to linux but found those MPR121 touch sensor boards and can't find any detailed instruction on how to adjust sensitivity when hooked up to a Raspberry pi. I had no issues running the test program and inputs are well read when directly touching the leads to the input pins. I want to use a thin sheet of glass above copper foil in a kiosk panel but cannot find precise instructions on how to adjust the sensitivity.
Where do you find the line "setThreshholds(12, 6)" I understand that I need to lower the touch value until I get detection but where exactly (which directory and filename) is that instruction located in a Raspberry pi installation ?
I basically would like to be walked through the process. I looked at the Adafruit pdf manual but found it not detailed enough for my knowledge level...
Also how to I update new thresholds settings and run a new test?
Thanks loads.
Where do you find the line "setThreshholds(12, 6)" I understand that I need to lower the touch value until I get detection but where exactly (which directory and filename) is that instruction located in a Raspberry pi installation ?
I basically would like to be walked through the process. I looked at the Adafruit pdf manual but found it not detailed enough for my knowledge level...
Also how to I update new thresholds settings and run a new test?
Thanks loads.
Please be positive and constructive with your questions and comments.