MPR121 Touch Sensor communication problems

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Lucas79
 
Posts: 3
Joined: Mon May 03, 2021 8:46 am

MPR121 Touch Sensor communication problems

Post by Lucas79 »

Hi!

A while ago I've posted something about the MPR121 board. After founding some interesting things here, I've bought 2 of them. I was able to configure them inside the code of the firmware that allows to communicate with the hub, hence everything works. But, sometimes I get a really weird behaviour, and after I've to reset the MCU (an Arduino Nano IoT).

What happens, more in detail, is this:
- the communication works for a while without problems
- after an undefined amount of time it starts to "slow" down a bit (touching one or more buttons generates no events)
- after some seconds the board responds with a touch event on all the buttons (even the ones that aren't connected with a sensor)
- after this the board is totally unresponsive

The active buttons, just 7, are connected to a large touching surface (around 6cm x 6cm). In this way, with the configuration that I've found on this post, I can sense a touch through a wide surface (around 2,5cm). The firmware the runs Arduino, apart the one to communicate with the MPR121, is instead here.

Has anyone a suggestion about a possible cause of this behaviour? How can I slow down the communication with the MPR121?

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

Re: MPR121 Touch Sensor communication problems

Post by mikeysklar »

@BANNED,

You can slow down the i2c connection on Arduino code using the WireSetClock() function.

I would start with setting the i2c speed at 100kHz which is "standard" mode. You can go even lower if necessary.

https://www.arduino.cc/en/Reference/WireSetClock

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

Return to “Other Products from Adafruit”