WHC 9: 6DOF

posted Apr 19th 2007, 00:36 under gesture, processing, WHC

After playing a bit with the 3-axis accelerometer (WHC 1 and 3), it's now time to get serious with IMUs (Inertial Measurement Units). I am now using the 6DOF v.3 unit from Sparkfun (link). It offers 3 axis-accelerometers (X, Y, Z), 3 gyros (roll, yaw, pitch) and compass headings (X, Y), all packaged with a Bluetooth link. Quite a beast! Check this wikipedia entry to know more about IMUs and how they work.

The goal of this week is to implement some sort of menu navigation (moving along one axis) using small gestures/movements. The tilt-slide interface has already been developed and published before. I am going more for quick hand movement that would allow you to move up (or down) 1 unit, 3 units or go all the way up. This calls for some filtering and peak detection algorithms.

My code in Processing is far from perfect but it fulfills my needs for now. Remember, the goal is not to come up with a production class software. It is more a hardware sketch to be able to test some ideas quickly.

The base is there and hopefully the application and algorithms will be refined to be more precise and recognize more gestures in the coming days and weeks.

6DOF unit

The marvelous 6DOF unit from Sparkfun.

Side view of the unit

Side view of the unit, with 4 AAs battery pack

Close-up

Close-up on the top board, see the X, Y, Z, Pitch, Roll and Yaw axis. I will be using the pitch axis first.

Graphing the values

Graphing the values, and trying to recognize the right gesture

Refining the peak detection code

More action shots! Refining the peak detection code.

First working version.

Improved version where I can dynamically adjust the threshold, lock delay and noise values