Part 1: Story Time
Every year, my daughter Natalia’s elementary school hosts a pumpkin painting contest. The rules are simple: decorate a pumpkin your kid can carry into school and, most importantly, have fun as a family. Pumpkins are brought in two days before Halloween, the kids vote on them the day before Halloween, and they stay on display at school until after the holiday. Voting is done with spare change, which is donated to a local family in need. At the end of the voting, a winner is selected.
As a family, we’ve participated in the contest for the past two years. Two years ago, Natalia and I worked on recreating the house from Up, complete with balloons. Last year, Natalia and my wife teamed up to make a mermaid pumpkin. Unfortunately, neither submission fared particularly well in the voting.
Looking back, the painting on the Up pumpkin wasn’t our best work, and while kids might not have noticed, all I could see in my wife’s mermaid pumpkin was E.T wearing a wig.
This past summer, I took Natalia and one of her friends to see Despicable Me 4 in theaters. Even though it was only July, halfway through the movie, I found myself thinking about how perfect a Minion pumpkin would be for this year’s contest—specifically one with an animated eye.
Of course, painting a Minion pumpkin has been done a million times over. But after a quick Google search, I realized no one had combined the classic Minion look with an animated eye. I was up for the challenge.
In the middle of summer, I started brainstorming. I’ve been tinkering with electronics and 3D printing for a few years now, so I figured this project would be the perfect way to combine those skills. The idea seemed doable, and I already had some components on hand. Over the next few months, I spent time tinkering with electronics, designing and 3D printing CAD models, and writing and testing code.
In the end, I used a Raspberry Pi Zero 2 W, a 2.8 inch round display I found on Amazon, animated GIFs of an eyeball I commissioned on Fiverr, code I wrote, and 3D prints Natalia and I designed to create exactly what I had envisioned over the summer.
The night before the submission deadline, Natalia and I painted the pumpkin to look like a Minion. Once the paint dried, we tested the electronics for the last time. Everything worked perfectly. On Tuesday, Natalia carried the finished pumpkin into school, and it was up to the students at her school to decide our fate.
On Halloween, Natalia was so excited as she stepped off the bus, proudly showing us the winning certificate. Sharing this project with her was so much fun. Natalia loves creating as much as I do, and involving her in the CAD, 3D printing, and electronics made the experience even more special.
Part 2: How To
Now let’s get into what exactly I used and how I connected it all together to create this award winning masterpiece. 😉
Parts List
Like many of my other projects, I already had most of these parts on hand.
- Raspberry Pi Zero 2 W - $15
- 2.8 inch Round LCD Display - $39.99
- 1 inch wide Gray Elastic Band - $8.19
- Mini HDMI Cable - $13.99
- 3D Printed Goggle - Free
- 3D Printed Elastic Clip - Free
If you’re looking to power the system on a battery bank I would suggest adding a relay so that the Pi can turn the screen on and off on a fixed schedule to save power. If not, you can skip the relay and battery bank all together.
- Gravity: Easy Relay Module - $7.90
- 5v Power Bank - $20-$80
3D Prints
I created the following models for this project. Both models are available for free on Printables.com in STL and Fusion360 formats.
Goggle Frame
The goggle frame was modeled to look like what the Minion’s wear. There is a recessed space on the underside to fit the 2.8 inch display linked above. The holes on each side are just wide enough to fit the 1 inch elastic strap through.
Elastic Strap Clip
This is used to tie together the two ends of the elastic strap. There is enough friction between the elastic and the print to keep the tension.
Code
The following code handles both the playing of the animated gifs and the scheduling for turning the screen on and off. If you don’t plan on using the scheduling you can simply set SCHEDULE
to False
on line 9. There are other variables available for customizing the schedule and the GPIO pin used for the controlling the relay.
We’ll use this code further down in the Raspberry Pi Setup section.
Eye Animated GIFs
I found someone on Fiverr to create these gifs for me. Feel free to download them and use them.
Connections
Connect the Raspberry Pi and the relay to the battery bank for power.
Connect the display to the relay for power.
Connect the display to the Pi via mini HDMI.
Connect the relay to the Raspberry Pi’s GPIO pins: 26, 3.3v, Ground. For a more detailed look at the GPIO pins, checkout pinout.xyz.
Raspberry Pi Setup
Update + Install Packages
- Connect to your Pi and update packages
- Install the necessary Python libraries
Setup Python Script
- In the root directory create a file named
eye.py
.
- Copy the code from the above Code section and paste it into
eye.py
.
Transfer GIFS
Use either a flash drive or scp
to transfer the three GIF files to the Raspberry Pi. The files should be named blink.gif
, look-left.gif
, and look-right.gif
.
Place the files next to eye.py
in the /home/pi/
directory.
Startup Script
If you’d like the animation to automatically play after the Pi boots then follow these instructions, otherwise skip to the next section.
- Navigate to the
/etc/systemd/system/
directory.
- Create a configuration file called
eye.service
and add the following.
- Make the
eye.py
file from earlier executable.
- Reload the
systemd
manager configuration and enable theeye.service
so it runs automatically after boot.
- Reboot the Pi
Paint Your Pumpkin
As I mentioned above, there are a ton of existing guides on how to paint a Minions pumpkin. A simple search for how to paint minion pumpkin
should yield a lot of great written and video tutorials.
Assembly
Loop the elastic through the printed goggle frame and then create a loop and use the printed elastic clip to keep things together.
Cut a large hole in the backside of the pumpkin and scrape out the seeds as you would a normal pumpkin carving.
Create a square 1in x 1in hole behind where the elastic strap is to route the display’s power and HDMI cables through to the inside of the pumpkin.
Make all connections and insert everything into the pumpkin.
Close up the hole in the back with the piece you cut out.
Comments