The development of intelligent devices for the general public has seen an explosive growth over the last two decades, continuously offering more to make everyday life more convenient to the everyday person. The advancement of consumer grade sensor solutions continue to offer more footing for these ideas to expand upon. One such idea chosen for this project is the realization of a digital pen - by tracking orientation and motion in space.
The aim of this project is to explore an integrated accelerometer and gyroscope IC solution for utilization with such usage. Two communication protocols are examined - I2C and SPI - used to communicate with the sensor device through two different microcontrollers - The Piccolo C2000 Launchpad and an Arduino UNO -, using different development environments - Simulink and Arduino IDE. Throughout, I aim to demonstrate how to translate the task from the level of register reading and writing to object-oriented programming, building supporting C-syntax libraries for modular communication with the sensor device, processing of motion and implementing the required mathematical solutions throughout.
The processing of sensory data to orientational information is accomplished by usage of filtering, quaternion algebra and transformation between the global and local reference frames. Fusion of the sensory data is done through a complementary filter, which can be further expanded upon by the inclusion of a magnetometer; both solutions will be reviewed.