Motion Interrupt: Threshold and Duration

By michael kaufman , 10 July 2012

I have a question regarding values inputted into the motion detection registers for threshold and duration on the MPU-6050. I've been able to set the appropriate registers and produce an interrupt spike. When I start playing with the variables Threshold and Duration, I don't understand the correlation of the values to the results I'm seeing. I have read the the product spec but my results don't seem to follow the figure in Section 8.2

For example, I set threshold and duration to 0x01. Every time I make the slightest movement, the interrupt triggers. I expect this. If I up the threshold to 0x20, I have to violently thrash before it executes an interrupt. It is worse with the duration. If I increase it, while maintaining threshold of 0x01, it is near impossible to get it to trigger.

The way I read that graph is the following situations:
A low threshold and a short duration: Registers every movement
A high threshold and a short duration: Registers short/sharp movement
A low threshold and a long duration: Registers continuous movement
A high threshold and a long duration: Requires continuous, violent movement

Are these scenarios correct?

Also, the documentation said the threshold is measured in mg and the duration is measured in ms. With both registers being 8-bits, does this mean that the threshold has a maximum of 255 mg and the duration 255 ms? Or, is it scaled according to the programmable, full scale range (2g, 4g, 8g, 16g)?

Thanks

phpbb Topic ID
14511