-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPR121 weak touch detection #39
Comments
hiya - are you using an adafruit breakout board? |
Yes, I am. I am using the black version which has the connectors on the sides. |
ok you can run the second half the test example code with cap.filteredData to see the raw data, and use larger cpacitive touch pads. if you need more help please post in the forums with photos :) |
Thank you for the response. I did a lot more testing and also tried using the raw touch data, unfortunately this also did not help. Even with the raw data I can barely see a touch detection with a 1mm piece of acrylic on top of the touch pad. I designed a custom PCB with touch pads as well as the MPR121 on it. The length from the touch pad to the MPR121 is max. 150mm, but even with the pads close to the MPR121 there is no difference. On the picture you can also see the various sizes of touch pads I tested. I even tried removing the silkscreen and adding extra solder on top of it. But still, the touch sensitivity is very weak and I can not reliably detect anything with more than 0.5mm distance to the pad. Is there any other way to increase the sensitivity? Changing a capacitor or resistor on the Adafruit MPR121 Board or something like this? |
not that we see, you can look for MPR121 app notes and datasheets for advice! |
Thanks, I will have another look on the datasheet. |
we havent tried it so we dont know for sure! we have always used bare metal pads |
@xbavnu : I've been playing with AFE & FCR Configuration Registers (see https://www.nxp.com/docs/en/application-note/AN3890.pdf) and can increase sensitivity to go through self-adhesive vinyl. Could not make it work with acrylic. Just be careful not to overstress the units with too much charge (see https://www.nxp.com/docs/en/application-note/AN3889.pdf). Both CONFIG parameters can be found in MPR121.cpp under the Adafruit_MPR121::begin definition. |
@tahunus Those app notes look useful. Thanks. The There are no dedicated methods for changing the AFE & FCR registers. AFE Configruation Register =
Filter Configuration Register =
However, the class's // replace x's with 1's and 0's as desired
cap.writeRegister(MPR121_CONFIG1, 0bxxxxxxxx); // AFE register (FFI and CDC)
cap.writeRegister(MPR121_CONFIG2, 0bxxxxxxxx); // FCR register (CDT, SFI, and ESI) That way the library code itself does need to be altered. The sketch code settings will override the hardwired values in @xbavnu Try using the information in the app notes along with the methods above for tuning the registers for your setup and see if that helps. If you're not familiar with setting registers, the byte literal syntax shown above may make is easiest to set each specific bit as desired. For example, to set the FFI bits to cap.writeRegister(MPR121_CONFIG1, 0b11000001); // AFE register (FFI and CDC) If having control of these two registers seems useful, we can look at adding some proper getter/setter methods and predefined enum settings to make it easier. |
@caternuson consider that setThreshholds (two h's) has been deprecated and setThresholds (one h) is the one active. Also: if you're looking at adding additional methods, may I suggest to consider the Autoconfig feature? Something as simple as an On-Off parameter in the cap.begin() method. Autoconfig does work quite nicely! I've been tinkering with it and just wrote a quick guide of my use case and mods that might be of assistance to others. |
Hello,
I am having problems with the touch sensitivity of the MPR121.
Even when I set the threshold value very low
cap.setThreshholds(2, 1);
the detection of the touch button is very weak.When I touch it directly on the PCB, it works okay, but as soon as I add anything on top of the PCB, the touch won't be recognized anymore. Even with a 1.5mm thick piece of acrylic it won't detect the touch anymore. With other touch sensors (like the TTP223) I can easily place a 6mm sheet of acrylic on top of the sensor and the touch will still be detected.
First I thought the touch area was too small, but I tested it with circular touch areas with various sizes (from 8mm all the way up to 25mm) and the touch detection is pretty much the same with all of them.
Is there a way to further increase the sensitivity? Or is it normal, that the MPR121 only works directly on the PCB? But in which usecase would you touch directly on the PCB instead of a surface above it?
The text was updated successfully, but these errors were encountered: