Wireless 3D Sensor


Cort's Corner -> Wireless 3D Sensor


This project was done for MP2079 Engineering Innovation and Design module at NTU, and won first prize in the Health,Lifestyle and Assistive Technologies category. It consist of a sensor which detects it's orientation and transmit them to a PC via bluetooth, and a set of software that uses the 3D data to control a game. The purpose of this project is to guide and motivate stroke patients in carrying out exercises.

The module lasted 5 weeks, but with the first week used up in deciding on the project topic, and classes on the second and third week, the entire project was carried out in quite a rush. As the module's documentation requirements focuses on the business plan of the project, the technical documentation were all sacrificed in the interest of expedience. What you see on this page is probably all the documentation there is, and they are all written from memory nearly 4 months after the project ended.

1st Prize!

3D Sensor

The 3D sensor is capable of sensing its own orientation in 3D using a combination of accelerometer and magneto-inductive sensor. It also comes with an optional attachment for detection of grip strength. The sensor can be strapped on the user's arm or leg, and can detect all 3 degrees of rotation, and also limited sensing of translational movement. It consist of X main components, which are all mounted on a stripboard (except the bluetooth module which is more dangling off the stripboard than mounted on it).

Schematics

It'll be nice if we have some schematics of the sensor huh... Too bad we didn't keep proper documentation and I don't remember it well enough to redraw it here. On the bright side, it's not all that hard to figure out.

Software

The software were all written in Python. The choice of language was a simple one; I'm rather language agnostic, while the rest of the team were relatively unskilled in any programming language. Python is a modern, easy to use language, and it saves the inexperienced programmers in the team from the hells of buffer overrun, stale pointers, and type conversion. Pygame is also used to simplify many of the programing task and allow platform independence (all of my software development was done on Linux while the rest of the team uses windows).

The software comprises of 5 games, "Cupcake Muncher", "Photo Window", "Egg Catcher", "Catch the Fish", and "Breakout" (this last one was written by me as a sample game for the benefit of the less experienced programmers), but I consider only the first two to be sufficiently polished to be usable. I also wrote an interface library to communicate with the 3D sensor and translate its reading into an onscreen coordinate, as well as a number of utility libraries to simplify the programming task for the other programmers in the team.