Floating Eye in a Jar With Motion Tracking

2018-06-11

Last edited: 2018-09-23

This is a floating eye in a jar controlled via magnets, servos, OpenCV, and a Raspberry Pi. I created it for an Arts seminar titled "Interaktive Exponate entwickeln mit dem Raspberry Pi" (translation: Development of interactive exhibitions with the RaspberryPi) which I attended for my General Studies, i.e. classes not organized by the faculty for Computer Science.

I embedded some neodymium magnets in a ping-pong ball that I'd cut open. The magnets and weights (2 times 20 Euro cents) are held in place by use of a custom 3D-printed mount. Everything is glued in with hot glue. I sealed the ping-pong ball with silicone sealant and painted it with acrylic paint. (Be careful to take the eyeball out of the jar during transport or the paint might come off! I learned this the hard way.)

Below the jar are the same number of magnets, which are rotated by a servo connected to a Raspberry Pi Zero W. I used two servos since my original plan was to also have the eye pitch up and down. That didn't really work out, unfortunately.

At first I tried to use face detection for finding a point of interest for the eye to look at, but the Pi Zero W turned out to not be fast enough for the task. Fortunately, motion detection appears to be sufficient for making the eye follow people around the room.

Links: Technologies used: