Motion Detection MMA8451

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

Motion Detection MMA8451

1,723 Views
luigi5hd
Contributor II

Goodmorning,

I've enabled the motion detection and now when my acceleration on the X-axis exceeds the threshold it works fine, but I want also that it continues to collect data while the device is moving at constant speed (acceleration = 0).

Does exist some embedded register to use the deceleration (breaking) as threshold for stop collecting data?

Thank you for you time.

Luigi

Labels (1)
0 Kudos
2 Replies

1,600 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Luigi,

The configurable threshold in the FF_MT_THS register is an absolute value and you can distinguish positive vs. negative using polarity flags (XHP, YHP and ZHP) in the FF_MT_SRC register.

pastedImage_2.png

pastedImage_3.png

I hope it helps.

Best regards,

Tomas

0 Kudos

1,600 Views
luigi5hd
Contributor II

Hi Tomas,

Oh sure, you're right, I'd forgotten these register's proprieties.

But I have a question, the acceleration's polarity meanings are, for instance for the X axe:

if XHE = 1 we have an  acceleration

if XHP = 1 we have a braking (deceleration)

And the polarity isn't correlated to the fact that I'm going forward or backward right?

Thank you in advance.

Luigi

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-876615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMotion%20Detection%20MMA8451%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGoodmorning%2C%3C%2FP%3E%3CP%3EI've%20enabled%20the%20motion%20detection%20and%20now%20when%20my%20acceleration%20on%20the%20X-axis%20exceeds%20the%20threshold%20it%20works%20fine%2C%20but%20I%20want%20also%20that%20it%20continues%20to%20collect%20data%20while%20the%20device%20is%20moving%20at%20constant%20speed%20(acceleration%20%3D%200).%3C%2FP%3E%3CP%3EDoes%20exist%20some%20embedded%20register%20to%20use%20the%20deceleration%20(breaking)%20as%20threshold%20for%20stop%20collecting%20data%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%20for%20you%20time.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ELuigi%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-876615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAccelerometers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876617%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Motion%20Detection%20MMA8451%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876617%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Tomas%2C%3C%2FP%3E%3CP%3EOh%20sure%2C%20you're%20right%2C%20I'd%20forgotten%20these%20register's%20proprieties.%3C%2FP%3E%3CP%3EBut%20I%20have%20a%20question%2C%20the%20acceleration's%20polarity%20meanings%20are%2C%20for%20instance%20for%20the%20X%20axe%3A%3C%2FP%3E%3CP%3Eif%20XHE%20%3D%201%20we%20have%20an%26nbsp%3B%20acceleration%3C%2FP%3E%3CP%3Eif%20XHP%20%3D%201%20we%20have%20a%20braking%20(deceleration)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAnd%20the%20polarity%20isn't%20correlated%20to%20the%20fact%20that%20I'm%20going%20forward%20or%20backward%20right%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%20in%20advance.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ELuigi%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Motion%20Detection%20MMA8451%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Luigi%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20configurable%20threshold%20in%20the%20FF_MT_THS%20register%20is%20an%20absolute%20value%20and%20you%20can%20distinguish%20positive%20vs.%20negative%20using%20polarity%20flags%20(XHP%2C%20YHP%20and%20ZHP)%20in%20the%20FF_MT_SRC%20register.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_2.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_2.png%22%20style%3D%22width%3A%20572px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F53712i5EEB65442D830F3D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_2.png%22%20alt%3D%22pastedImage_2.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%20style%3D%22width%3A%20648px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F51862iA17ACF34CCCA73A3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_3.png%22%20alt%3D%22pastedImage_3.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20hope%20it%20helps.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3ETomas%3C%2FP%3E%3C%2FLINGO-BODY%3E