I.C.U.
When I chose to take a class on Microcontroller System Design on a whim, I did not expect it to become my favorite class of my undergraduate education (so far).
First, Professor Branden Ghena is an amazing lecturer. He speaks with such joie de vivre and his passion for embedded systems rubs off on you. It turns out you can do surprisingly many things with a tiny amount of compute.
Second, microcontrollers are interesting to me because you need to be resourceful. You have a limited amount of memory and therefore cannot be gluttonous about hardware resources. These optimization challenges are interesting and allow me to imagine what coding would be like at the beginning of the computing revolution. It is also low level programming, which I already enjoy immensely.
As a requirement of the class, I was required to build a final project. Alongside Du Chen, we decided to create I.C.U. (Intrusive Camera Unit), a pair of 3D printed eyeballs that move around to always stare at your face.
We 3D printed the eyes using a CAD template we found online. To move the eyes, we used 6 servos: 2 to control the horizontal and vertical motion, 4 to control each eyelid. The servos are controlled by a Nordic nRF52 microcontroller using PWM signals.
I wrote the code that controls the eyes in C. Even without a camera telling the 3D printed eyes where the face is, it can already play sick animations.
Du wrote the Python code to use OpenCV to detect the coordinates of the face, which was then sent over USB serial to the microcontroller. What results is a pair of eyes that can track your face.
It is amazing to me how little code is needed to bring this project to life. If I were to rank projects based on the dopamine to lines of code ratio, this project would rank pretty high.
Thank you to Professor Branden Ghena for an amazing class and Du Chen for being a great project partner.