For my Sensors for Interactive Environments Course, I designed a phone case that rights itself when falling so that the phone doesn’t fall on its glass face. This is achieved by attaching a miniature motor with enough inertia on its shaft to influence the orientation of the device as it rotates the mass (reaction wheel). I used a Pololu Micro Metal Gear with a built-in gearbox to achieve the required RPM to properly reorient the device in the short time it’s in free fall. I only needed one motor since the goal was to avoid having the phone land on its face instead of stabilizing it completely. Now, I know, the design isn’t 100% practical and I can’t think of a reason anyone would actually want this case but I did have fun making it, even if I kept getting hurt by the rotating mass.
For the sensors, I used an IMU paired with a Teensy 3.2. The motor only activate if the device is in free fall and if a person is not holding it. The former is known by sensing the loss of the gravity vector in the acceleration measurements. In order to know a person is not holding the device, I fashioned two copper plates on the back of the case to where a person would short the plates together with regular use. Once the gravity vector is not sensed, the Teensy outputs a pulse in one electrode and then measures the voltage in the other. If nothing is sensed, the motors turn on and the device attempts to correct itself. To read further about it, my presentation is linked below.