MPR121 retriggering when holding on a pad / can't recover from "touched" state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPR121 retriggering when holding on a pad / can't recover from "touched" state

3,827 Views
zilaihong
Contributor I

My MPR121 would keep the "touched" and "released" states when a finger is holding on a pad. And one of the electrodes even can't recover from the "touched" state sometimes.

Btw, when I have 2 fingers holding 2 electrodes, the glitch won't happen.

I used all settting in the application note AN3944.

One thing I noticed that in application note AN3747, it recommended to use thin <0.2mm traces for electrodes connections. But on my PCB I used 0.8mm traces which seems too wide. And I used 100% ground plane around the traces and the electrodes, 0.4mm gap between the traces / electrodes and the ground plane. Will this be the main cause of the problem?

Btw, I have another question, does MPR121 reset all its internal settings when rebooted? In other words, even if I really messed up the settings on the registers, when I upload a new correct one and reboot, it would recover from a "clean" state and start up with the new setting?

Thanks!

Labels (1)
Tags (3)
0 Kudos
Reply
8 Replies

2,705 Views
bryce
NXP Employee
NXP Employee

If you are following the app note, it looks like you should have the right settings, though even when touched you can adjust the filter settings.  If you look into the filter settings in http://cache.freescale.com/files/sensors/doc/app_note/AN3891.pdf you may find this helpful.  This will explain some of the detail about how the filter can be expected to work.  Specifically take a look at the settings in registers 0x33-0x35 as you can have the filter active even when a touch is currently being detected.  If you set this up for a "slow" response, you should be able to get a touch, then have the system automatically filter it out after some time.  While this will also impact valid touches, it should allow you to eliminate the opportunity for the system to get stuck in the touched state.

The recommendation on traces is really for 2 reasons.  First, wide traces increase trace capacitance, more trace capacitance will result in lower sensitivity.  Second, if someone puts their finger over a trace it could potentially look like a touch if a trace is almost the size of your pads.  If you consider both of these issues and are not having those specific problems then you should be in the clear.

If you are using the soft reset register, then yes this should clear all of the settings in the device and get back to an init state.

0 Kudos
Reply

2,705 Views
zilaihong
Contributor I

Thank you for the reply Bryce.

I see that when power on reset (POR) the MPR121 would go back to the init state. Does that mean even if I messed up the settings, I upload a new setting to the arduino and re-power the whole thing, then the settings would be cleaned up and replaced by the new settings, is the right?

And I've produced another small testing batch of touch panel. Which obeys to the touch pads design rules in the application note. But the glitch / retriggering still happens even if I set up the in-touch filter setting to the max with the following code:

#defineNHD_T0x33 // in touch
#defineNCL_T0x34 // in touch
#defineFDL_T0x35 // in touch

  set_register(0x5A, NHD_T, 0x63);

  set_register(0x5A, NCL_T, 0x63);

  set_register(0x5A, FDL_T, 0xFF);

One thing to notice is that when the arduino is powered by my computer with USB, the glitch is almost gone, but when connected to an external 12v power supply, the glitch is very heavy. So I wonder there needs to be some kind of power filtering between the arduino and the MPR121, or on the MPR121 module. (right now the MPR121 is powered by 3.3v on arduino, and then regulated on the MPR121 module) What kind of power filtering do you suggest?

Thanks!

0 Kudos
Reply

2,705 Views
bryce
NXP Employee
NXP Employee

The device only has volatile memory, so if you loose power it will go back to default settings.  Typically I have found the sensitivity to be reduced when you are running off a battery.  But in any case, I have not needed additional power filtering on the part in cases I have implemented.  Take a look at this app note for more information on the filter settings:  http://cache.freescale.com/files/sensors/doc/app_note/AN3891.pdf

Do you have a stream of the output data coming from the device?  I find doing visual debug on the streaming data is often the most straightforward method.  If you connect your electrodes to our evaluation tool you can easily get the data by using the Sensor Toolbox.  Then you can find out if it is a layout issue, setup issue or something coming from the arduino board.  When looking at the stream I would expect to see a touch appear as a step function in the output data.  When you un-touch it should again appear as a step function and go back to the initial level.  It is possible that your signal is very small or the touch/release thresholds are set too low, but the best way to find out is look at the data and see what is happening.

Once nice thing to note.  Nothing is done in the background on this device.  You can record all the changes the device makes to the baseline and the output data, then compare the two by hand.

0 Kudos
Reply

2,705 Views
zilaihong
Contributor I

I don't know what you mean by direct monitoring, do I just read from its i2c output and get them displayed?

Btw, it worth noticing that if I connect it to a linear power supply, it works without flaws, but with a switching power supply, it does those retriggering and glitches...

Thanks!

0 Kudos
Reply

2,705 Views
bryce
NXP Employee
NXP Employee

I mean you can read the raw data over I2C.  The evaluation kit for the device displays the real time data to the screen so you can see if there are signal glitches, but in your own system you may just want to record the data from the I2C and see what thej glitches look like.

I would not expect to see any issue when using a switching power supply.  You could try to adjust the decoupling capacitor value being used to smooth out the power supply if it is causing a significant problem.

0 Kudos
Reply

2,705 Views
boristomas
Contributor I

i must confirm problems with change of power supply type.

when mpr121 is connected to arduino with usb power everything is ok.

then i used power supply unit and got random touch events ("glitchs").

then i tried another PSU and glitches were still there but little less.

Difference between first and second PSU is that second has ground (green/yellow) input and other one has only N and L.

If i connect PSU and usb then everything works perfectly.

really frustrating :smileysad:

0 Kudos
Reply

2,705 Views
bryce
NXP Employee
NXP Employee

As this is a single ended capacitance sensor (meaning that there is not defined return path), the capacitive coupling is back to the ground on the device.  Due to this is is possible to see improved sensitivity when a true ground is connected in the system.  While this will always be the case to some extent it can be improved by having electrodes with ground rings around them.  Thus, when your high dielectric finger is near the pad the ground ring can help to provide this reference back to the ground on the board instead of only relying on coupling to earth ground.

In regard to seeing glitches, it could be just that the touch thresholds are set very low.  I have not seen spikes (even in battery powered environments) over 4 counts, so setting the threshold over 8 counts may prevent the glitch issue and the ground ring may be able to improve your good signal/touch sensitivity.

Hope this helps.  Regarding pad layout, page 2 of this app note may help to demonstrate the ground ring (or even ground plane) methodology: http://cache.freescale.com/files/sensors/doc/app_note/AN3747.pdf

0 Kudos
Reply

2,705 Views
Zhimin
Contributor I

I am very happy you can answer for this question,thank! "These subroutines initialize some control bits within the sensor measurement interface, SMI, and then place the MCU into the Stop1 mode until the measurement is completed with an interrupt back to the MCU" from the MPXx85/86xxD datasheet . the MCU don't place into Stop1,How should I do?thank!

0 Kudos
Reply