MMA8452Q - False Trigger Issue With Single/Double-Tap Detection

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

MMA8452Q - False Trigger Issue With Single/Double-Tap Detection

1,028 Views
josephip
Contributor I

Hello,

I am able to setup the chip for tap or tap-tap detection, but I found there was serious false trigger issue (simply by shaking the unit will cause the chip to generate tap or tap-tap event).

Here is the register configuration I am using:

  • ODR=200Hz (chip work in low power mode)
  • LNOISE=1 reduced noise mode enabled (0x2A)
  • PULSE_HPF_BYP=0; PULSE_LPF_EN=0 (0x0F)
  • HPF cutoff freq.=2Hz (0x0F)
  • DPA=1, ELE=1 & pulses detection for Z axis only (0x21)
  • PULSE_THSZ=1.5g (0X25)
  • PULSE_TMLT=25ms (0X26)
  • PULSE_LTCY=125ms (0X27)
  • PULSE WIND=150ms (0X28)

In addition, I observed that:

When LNOISE=1, it is very easy for the false trigger to happen even when PULSE_THSZ is set to 6.36g (the spec. mentioned the dynamic range will be reduced to 4g).

When LNOISE=0, it is very easy for the false trigger to happen even when PULSE_THSZ is set to 7.938g.

It seems to me that the PULSE_THSZ factor in the pulse detection algorithm is not working correctly.

I appreciate if someone could help to solve the problem or give any suggestion.

Thank You!

Joseph

Labels (1)
Tags (1)
0 Kudos
Reply
4 Replies

766 Views
Joshevelle
Senior Contributor I

Hello Joseph,

Thanks for using our community. The problem that I noticed is that you’re setting a very short time period between the pulses (125mS), also the PULSE_WIND is very short (150mS) and the threshold is very small, that’s why is very easy to trigger a double tap. What is your application? are those time required?

I would recommend you to try configuration 6.2, shown in page 15 of the following document:

http://cache.freescale.com/files/sensors/doc/app_note/AN4072.pdf

Once you have the Double Tap detection working you can customize it.

Hope it helps.

Josh

0 Kudos
Reply

766 Views
josephip
Contributor I

Hello Josh,

Thank you for your reply and sorry for the late respond.

I am now preparing the CES samples and will come back to evaluate your suggestion after that.

For your information, we want to add the tap/tap-tap sensing to a watch and this will act as a key input, so we just care about tap/tap-tap input from human.

There is an iOS apps which can log the acc data at 100Hz and this is used to capture the tap-tap pattern.

So I did the tap-tap simulation and I observed 3 things:

1) the duration of a single tap is <50ms

2) the separation between the 2 taps is ~180ms

3) the pulse that jump up at the moment of tapping is ~1.5g

These are the reasons those values are chosen.

Did you ever try yourself and see no matter what value (have to be under 8g) is set for PULSE_THS, it is very easy to get false trigger with single tap?



Thank you!

Joseph

0 Kudos
Reply

766 Views
seanwu
Contributor IV

Dear sir,

    I tried the configuration 6.3 to enable single and double tapping. When I double tap, it will detect single tap and then detect double tap(SRC_PULSE will be 1 twice).

How to avoid the single tap when I just want to detect double tap, and I also need the single tap feature.

Thanks.

BR,

Sean Wu

0 Kudos
Reply

766 Views
Joshevelle
Senior Contributor I

Hello Sean Wu,

You can momentary disable double tap detection by writing 1 into the DPA bit into the PULSE_CFG register (0x21) but, unfortunately, you cannot momentary disable single pulse detection.

You can either set xDPEFE (Double Pulse Event Flag Enable) to detect double pulses, _OR_ xSPEFE (Single Pulse Event Flag Enable) but not both. Setting both bits has the same effect as setting xSPEFE bit only. i.e. on a given axis, you must decide beforehand whether you are looking for a single pulse or a double pulse.

If you need both at the same time, you would need to read the status register to determine if the double pulse status register is set or not, otherwise there is no way to detect if the event was a single or double tap.

Hope it helps!

Josh

0 Kudos
Reply