Xadow movement detection demonstration

Xadow Demo1 Acceleration detector
Xadow Demo1 Acceleration detector

This more complicated demonstration uses an accelerometer to detect movement, displays accelerometer values on the OLED display and vibrates to indicate movement detected!

The demo code works first time, although the wiki instructions do need a little update to help klutzes like me. I’ll have to get stuck into those updates next!

MMU 6050 6 axis / 6 DOF gyro and accelerometer interrupt & data summary

The most excellent Xincehjian maker Edward introduced me to the also excellent MMU 6050 that has a 3 axis gyro and a 3 axis accelerometer and in addition has a bucket load of on-board digital motion processing (DMP) to give a huge range of 6 axis (DOF) outputs as well as motion, free fall, tap and shake detection. Amazingly, in China, you can buy it on a break out board for about $4 and get it delivered for another $1, a day or so later.

A popular library for this chip, seems to be the I2cDev library from Jeff Rowberg which not only provides access to this chip, but a HOST of other sensors AND it also provides a generic I2C lib (hence the name I2Cdev) that can and has been ported to many different host processors!

But wait there’s more, the I2cDev library offers a choice of several underlying I2C libaries, and even when using the default Arduino Wire library to provide the I2C, the common blocking – hanging issues that seem to plague many people when using the Arduino Wire library for I2C, have been resolved! I can now run I2C code for many hours, even overnight, instead of previous seconds or rare minutes!

So, I am really stoked, because the MMU 6050 delivers a lot of features that I really want to use (see Assistive devices) and those Wire I2C issues have caused me a lot of grief over the last 2 years as I tried to use several different sensors and motor controllers and even recently when I tried several different libraries, that others have created to get past these issues!

click for the A3 page of information
Screenshot of MMU 6050 interrupts & data summary


But wait there’s still more, there is also the freeIMU library, which I have been using successfully. It sits on top of the I2cDev library and provides additional features.

The last “But wait there’s more” is that as part of trying to get my head around all, well so far some of the above (tap, shake and motion detection), I delved into the documentation and code and summarised my understanding of interrupt configuration, interrupt status, raw data access and access to the DMP data. The document is still a work in progress, so please add comments to this post or contact me with updates and corrections!