This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

is it possible to detect a tap without using of DMP feature of MPU9250?

Hi, i am using nrf51822 interface with mpu9250 and i want to detect a tap without using of DMP feature of mpu motion sensor. my application requirement is low current consumption that's why i want to play with raw readings of mpu and want to detect a tap or double tap. how can i achieve this.does anybody has idea about this? immediate help nedded!! Regards, Ashish

  • Thanks sigurd,I have posted same question on( invensense)support centre as you have mentioned in your comment hope will get reply soon.I am measuring the tap on z axis so without tap I am getting X=32767,Y=32767,Z=48768 constant readings...When I tap the board on z axis I got this values 1Tap-X=13403,Y=39351,Z=65534,2Tap-X=-1,Y=30119,Z=65534,so I set threshold value for z axis only coz if I tap on Z axis then respective Z values changes as I mentioned above like Z=65534 .should I need to set threshold for other two axis also for accurate tap detection.i have made algorithm like this 1.I set threshold value for z axis only and that is 55000 . 2.I set a counter for the z axis values when I tap the board and my axis values crosses 55000 thresh more than 4 times then executes motion function(); 3.I have also set counter for this when my motionfunction():; get called two times then I am glowing a led for indicating that tap is detected and printing "tap detected" on screen. But my actual problem is when I place the board on horizontal table and I tap the board led glows.and when I take the board on my hand just move (shake) little but then also the led glows.how should I make difference between the tap and little shake?

  • Maybe look into what separates the tap and a little shake?

    With a tap, you are maybe above the threshold for a small amount of time, but with a little shake, you are above the threshold for a much longer time? So you could maybe use a timer to measure the time you are above the threshold, and if you are above the threshold for a certain amount of time, you know that this is a little shake and not a tap?

    Maybe InvenSense also have some ideas on this also.

  • Hey Ashish, any valuable info regarding double tap? I want a similar thing to integrate into my project. Please shed some light if you have found the way. Thanks in advance.

    Regards,

    Nikhilesh

Related