CNC Garlic Press
A device to display your facial features on a wall with a laser beam - see Github Repo.
This was a project to dive deeper into electronics and software on Arduinos and Raspberry Pi's. The goal was to have someone stand in front of a camera hooked up to a Raspberry Pi and have their facial features projected onto a wall with a laser
The general architecture is:
- Raspberry Pi camera takes video frame and is sent to Python script running on Raspberry Pi
- Python script runs OpenCV with training data + algorithm taken from here, outputs several key points on detected face
- Key points are sent over serial to a Teensy 4.0
- Teensy converts those points to a route for the laser to take, sends commands over SPI to a DAC to control the voltage input to two galvonometers
- The two galvonometers rotate according to the voltage, turn mirrors, and project the route of the laser
- A face appears!
Future work includes making the facial detection much faster (potentially converting to C++?), fix a "streaking" effect when the trying to move the galvonometers too far, too fast, and making some kind of a game with it (maybe cookies can drop and you have to catch them in your mouth).
The final breadboards with Teensy, Op Amps, ADC, and voltage conveter
Diagram of circuit layout
A preliminary laser control test
OpenCV running on my face, outline in blue
A rough face (left) and a nearly complete face (right)