Jump to content
I2Cdevlib Forums

MPU6050 - Motion Interrupt and FIFO

Recommended Posts

Hi all,

I'm trying to use the mpu6050 as a shock sensor (ie if a shock is > 2g's log the force and timestamp it). Here's the twist,

I managed to get the MOT_INT working, but I eventhough i see changes in force required ro triggger an interrupt ( setting MOT_THR byte) I can't map it reliably to an actual G value.

Each accelerometer output is on 16bits (signed)  but the threshold is set on 8bits (signed) (which means you can only set the interrupt as 1/128th of the actual resolution ?).

Also, once the interrupt is triggered, how am I supposed to find the "triggering value" in the fifo stack ?

If you have any idea, please share :)

Link to comment
Share on other sites

  • 3 weeks later...

initialize() sets the accelerometer range to +-2g
In that case, you're looking at +-16384 for 2g.
You might need to use setFullScaleAccelRange to raise the sensitivity to +-4g

I'm not aware of any force-sensitive interrupt, are you?  There's a few things that can trigger an interrupt, FIFO overflow, i2c interrupt, data ready.

That said, you might just want to analyze values over time.  The DMP outputs at 100hz if enabled.  Otherwise the device is adjustible via a divider setting and lowpass filter setting.  The DMP is kind of nice.  You'll get 10ms between samples.  So if you find one sample has a high g force, and the LSB difference between that and the next is >=2g, that's a shock, I think.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...