Welcome back to element14 presents! In this exciting episode, Lorraine takes on the challenge of making the Eye of Sauron move using LEGO, Raspberry Pi, and machine learning. If you're a fan of intricate builds and innovative tech projects, this is one episode you won't want to miss.
The Inspiration Behind the Project
Lorraine has been away for a while, focusing on completing her PhD thesis. To celebrate her achievement, her supervisors, colleagues, friends, and husband gifted her a massive LEGO kit with 10,000 pieces. Over the Christmas holidays, Lorraine built the Eye of Sauron, a project that combines her love for LEGO and her passion for technology.
Congratulations to Dr. Lorraine Underwood from our team and the whole community.
The Plan: Making the Eye Move
The Eye of Sauron is known for its fiery appearance in the movies, and Lorraine's LEGO version includes a red light block to give it a glowing effect.
But Lorraine wanted to take it a step further by making the eye move. The goal is to add more LEGO bricks to enable the eye to tilt left and right, and up and down, creating the illusion that it's following people across the room.
Adding Machine Learning to the Mix
To achieve this, Lorraine plans to integrate a camera into the structure that can detect faces using machine learning. The camera will lock onto a face and move the eye to follow that person around the room. This adds a layer of interactivity and realism to the project, making it even more impressive.
Challenges and Solutions
One of the challenges Lorraine faces is hiding the camera within the LEGO structure without drilling or gluing the pieces, which are considered sins in the LEGO community. She explores different options for mounting the servos and ensuring the eye can move freely without hitting any obstacles.
Building the Structure
Lorraine starts by soldering the servo board and configuring the Raspberry Pi to control the servos. She tests different libraries for pose detection and object detection to find the best one for her project. After some trial and error, she settles on a solution that works well for detecting body coordinates.
Integrating the Camera and Servos
With the top of the tower modified to allow better movement, Lorraine carefully feeds the camera through the structure, ensuring it remains hidden. She uses double-sided tape and a custom 3D-printed holder to secure the servos and Raspberry Pi in place. The servos are programmed to move the eye based on the coordinates detected by the camera.
Final Adjustments and Testing
Lorraine makes final adjustments to the structure, ensuring everything is securely in place. She calibrates the servos through code, setting the default positions and testing the movement in different directions. The eye successfully follows a person around the room, creating a subtle yet impressive effect.
This project showcases Lorraine's skills in 3D printing, Python programming, and camera integration, all while maintaining the integrity of the LEGO build. The Eye of Sauron now not only glows but also follows people around the room, thanks to the clever use of machine learning and servos.
Supporting Files and Links
Join the Conversation
What do you think of this project? How would you have approached it differently?
Bill of Materials
Part | Manufacturer | Quantity | Buy KitBuy Kit |
---|---|---|---|
MULTICOMP PRO Raspberry Pi 5 Starter Kit, 8GB, micro SD 16GB, Case with Fan, HDMI Cable, PSU 5.1V/5.0A UK Plug |
Multicomp Pro | 1 | Buy Now |
DFROBOT Servo Motor, Micro, 6 V, 0.17 N-m |
DFROBOT | 2 | Buy Now |
RASPBERRY-PI Raspberry Pi AI Camera, 12MP, IMX500 Intelligent Vision Sensor, Raspberry Pi Neural Network Model | RASPBERRY-PI | 1 | Buy Now |
ADAFRUIT Raspberry Pi PWM Servo Hat Development Board | ADAFRUIT | 1 | Buy Now |
Additional Parts:
Product Name | Quantity |
---|---|
LEGO Barad Dur |
1 |
Paper clips |
1 |