DIY Interactive Animated Pumpkins - 3D Printed | Raspberry Pi
by DIY Machines in Circuits > Raspberry Pi
20432 Views, 143 Favorites, 0 Comments
DIY Interactive Animated Pumpkins - 3D Printed | Raspberry Pi
In this project I’m going to explain (and show) you how to 3D print and build this trio of performing pumpkins. 🎃
Though the pumpkins are outside themselves , these three singing squashes are brought alive by a single low-cost projector from the inside of your home. This means you do not need to worry about mains electricity outside, or any trickers - treating themselves to your projector.
The performance is controlled by your visitors using this set of mini-arcade buttons in the 3D printable control housing. They can choose between a Song, scare or haunting tale. The speaker for the audio is built into this control panel so that your guests can hear the pumpkins clearly from where they are stood without waking your neighbours from their crypts.
I have prepared a project video which shows the pumpkins in action at the beginning if you wanted to see the effect. The video us embedded just above.
You Will Need...
To build your own set of animated pumpkins you’re going to need a few things, I have included links and a list of everything. You’ll need:
- RaspberryPi: https://geni.us/RaspberryPiV4
- 3.5mm jacks (x2): https://geni.us/3-5mmJacks
- Suction Cups (x6): https://geni.us/SuctionCups
- Illuminated Momentary Buttons (x3): https://geni.us/IllumMomentButtons
- Wire: https://geni.us/22AWGWire
- Resistors (220 Ohms) (x3) : https://geni.us/Ufa2s
- Budget Projector: https://geni.us/BudgetProjector
- Sony Budget friendly Waterproof Speaker (optional x1): https://geni.us/Sony-SRS-XB01
- PLA Filament: https://geni.us/PLAFilament
- M3 nuts and bolts: https://geni.us/NutsAndBolts
-
10 core wire (length depends on your use): https://geni.us/10CoreWire
Wago Connectors (optional, two-way x6 and four-way x1): https://geni.us/WagoConnectors
(Both the portable speaker and projector can continue to be used after Halloween. We won’t be damaging them in anyway for this project. So you could use a projector you already own or use this as an excuse to buy one!) :)
Printing the Pumpkins
All the files for the 3D printed components can be found on my Thingiverse page: https://www.thingiverse.com/thing:4628211
You can off course make the pumpkins and control panel from any other suitable materials if you don’t have a 3D printer. Just ensure that it you are going to rear project onto the pumpkins as show in this project that your material for the pumpkins is translucent enough.
We can start by 3D printing three sets of parts for the Pumpkins. Each of your three pumpkin sets requires a base, left hand and right hand side, and stem/top. I have chosen to print two colours of pumpkins, one cream colour and two orange ones - each with green stems.
The base is printed with supports - it is the only part which requires them. I used a speedy 0.3mm layer height for the pumpkins as they will be seen from afar and in low light conditions. Two of them were printed in PLA and one in PETG (just because that it what I had to hand). The PLA pumpkins came out better because they were less stringy.
Brims were used for the two main sides and the stem requires neither a brim or supports.
Please take a look at the images above for the print orientations I have the designed the parts to be printed at.
Assembling the Pumpkins
To assemble the pumpkins you will need some M3 nuts and bolts.
Take the stem and fix each of the two side parts using a pair of bolts each through its underside.
The base is then attached using two more M3 bolts (and nuts if you would like a tighter fit depending on your printing tolerances). This is done through the tab like holes on each of the side prints.
To hold together the front edges of the pumpkins panels we will use glue. I’m going to use hot melt glue as I can smooth it out with my finger whilst it is still warm and it’s fairly invisible to the projections. You could also consider using super glue or even a 3D printing handheld pen if you have one - just ensure that you don't increase the thickness of the shell too much or it will show as a darker patch when we apply our projections.
Printing the Control Panel
There are two different 3D printable design for the control panel which I have created for you to use. One includes a mounting for the low-cost battery speaker I used in my project and the other design does not include space for the speaker leaving you to decide how to handle the audio your own way.
I recommend printing this part on the print bed face down. It has been designed so that you can momentarily change the filament colour after a few layers to add the colour to the text on the front. Use a large brim to help with adhesion whilst this part prints and I did not require any supports.
Preparing the Buttons
For this step you will need:
- Momentary illuminated 30mm arcade buttons (x3)
- 10cm lengths of 'hook-up' wire (x9)
- 220 ohms resistors (x3)
Orientate the button so that we can see the legs on the underside and so that the pair of legs coming out through the grey plastic are towards the top (these are the legs for the button mechanism, the bottom pair are for the LED). We can then put a resistor between the top right and bottom left leg and a wire onto all of the legs accept the bottom left.
These can then all be soldered into position and any excess wire trimmed away.
Repeat this for all three buttons.
Fitting the Buttons Into the Control Panel
To add the buttons into the housing you will need to remove the plastic nut if it is still attached. Thread the button down through the front of the housing and then firmly tighten the nut from the inside of the housing.
Again, repeat for all three. :)
Adding the Audio Jacks to Our Cable
You will need both 3.5mm jack connections for this.
If you remove the plastic sleeve from the connector by unscrewing it you will find three legs. The leg highlighted in red in the image is for the right hand side audio and the green leg the left hand side audio. The leg highlighted in blue is a common ground.
You will need to expose about 10 cm's worth of internal wires from inside your long multi-core cable and then solder any three onto the three legs on the connector. Before you solder it though, make sure you slide the plastic sleeves over the three wires so that it is in place for screwing back together once the soldering is complete!
We can then repeat this at the other end of the multi-core cable but this time you will need to expose about 20 cm's worth of internal wiring and this time use the same three wire colours you used earlier in the same three positions.
You can check your work by using the cable between something such as your laptop/phone and the speaker.
Connecting Buttons to Our Main Cable
As this is a very seasonal project I will use plastic 'Wago' connectors to join my wire up in this step of the project. This will make it very easy for me to re-use the cables and buttons in another project in the future. You can use either a similar type of connector, or solder the wires together if you prefer.
The first bundle of wires we need to connect are the ground wires from the buttons (for me this is the purple wires I used) and a wire from the main cable length. I chose purple again to help follow things through.
To make it easier to follow I created a sheet (you'll find it above) which you can use to record which wire is connected to which in the main cable. You'll see a blank copy above for you to use (you can either screenshot/photograph it with your phone and fill it in on device or print it). There is also a copy I have filled in for my records to show you an example of what a completed sheet should look like.
So for my purple ground wires, I have recorded that I connected them to the purple wire in the main cable.
Work through the remaining wires, but this time just connecting one unique wire from the buttons to one wire from the main cable whilst keeping your records up to date.
Connecting Our Main Cable to the Raspberry Pi
Now that we have one end of our main cable connected we can connect the other end. This is the end which we exposed roughly 20cm's worth of internal wiring on earlier.
To connect them I'm going to add the wires into a simple and cheap Dupont style connector using some female crimps. This means it's very easy to connect and disconnect the cables from the Pi which is ideal for several reasons.
- It's much easier to transport things when you can break them down to smaller parts.
- It allows me to pass this end of my cable through the letter box / window when I set up the show.
- I don't need to make any semi-permanent solder connections to the Pi.
I have a made a separate video and guide on Instructables which will step you through how to crimp your wires ready for adding into the plastic housing of the Dupont connector. The video is above and the Instructable article is here: https://www.instructables.com/Crimping-Dupont-Connectors/
If you are going to solder your wires, don't worry! I've not abandoned you. If you look at the sheet you filled in earlier to record which wire is connected to which then you will see that I included the pin label it needs to be connected to on the Raspberry Pi in the bottom right of each box you completed. :)
If you're going to use a Dupont connector like I have then we need to add in the wires in a specific order to the 2x4 connector housing. You will want your completed wiring sheet in front of you again for this step. I have included mine above but don't forget that you may need to connect to different coloured wires - mine is an example.
Work your way through adding in each wire. The top right corner one is meant to be left blank.
To connect this to your Pi it is positioned offset from the left by three pins with the missing pin furthest away from the left on the outside edge of the Pi. Check the image above - it will make this much clearer. :)
Programming Your Pi and Adding Video Clips
There are several steps we need to work through for the software side of things - this includes:
- Installing and configuring Raspbian / Pi OS on to your SD card
- Installing Pi Presents and supporting software
- Copy across some pre-prepared profiles and sample video files
- Setting the show to start automatically at power on
- Adding your own video files
I have not covered these steps in the project video as they are easier for you to follow when you're able to copy and past commands. It's also rather boring to watch. :/
I have written out a guide on my site which you can follow here: https://www.diymachines.co.uk/interactive-perform...
This where you can also download the sample video clips for your project. I decided not to copy and paste the instructions into this article as it is easier for me to keep them up-to-date and correct if I only have to worry about one location.
Mounting the Pumpkins to Windows
To mount the pumpkins to the outside of your windows you need to print three of the aptly names 'Pumpkin Mounts'.
Each of these are then coupled with a pair of suction cups and secured to your window. The pumpkins shells you made earlier can then be simply hooked over the mounts. This makes it very easy to adjust or remove the pumpkins when required.
Labelling the Buttons
We can then print a label to attach to our control panel so that your visitors can tell which button will do what. I kept this as a separate part so that you could change the labels to suite your project if you wanted to.
I changed the filament colour part way through the print to get the two colour look. This can then be glued into position just below the buttons.
Installing Control Panel Speaker and Cover
To finish of the the control panel we need to install the speaker (if you chose to build the one with the same Sony speaker I'm using). To do this, plug the jack connection into the speaker, turn on its power and ensure that it is turned up.
Slide this into position and then check that any plastic wiring connectors are tidied up around the housing. The 3D printed rear cover can then be secured in place with some M3 bolts.
Securing Control Panel Outside
I have decided to mount my control panel on top of the 70mm x 70mm post at the end of my driveway. For this I printed a sleeve that is secured over the top of the post with some wood screws.
Our control panel is then slid into place thanks to it's wider foot shape. This can also then be kept secure from theft by adding a padlock though the loop at the rear. This will make it much more difficult for people to remove.
Show Time...
All that's left to do now is to:
- Connect you Pi to the projector with HDMI cable
- Connect the audio jack (I connected mine to the projector headphone port)
- Power on the projector
- Power on the Raspberry Pi
Your show should start itself automatically and the three arcade buttons will light up on the control panel waiting for someone to choose a performance. Take it for a spin - but I warn you, the tunes get stuck in your head and haunt you. :)
Should you want to support my projects, please consider subscribing to me on here and Youtube. I also have a Patreon page where some very kind people are helping me to cover the cost of designing, documenting and sharing these projects. Please consider joining them in any way if you can.
A vote in the Halloween competition would also be very much appreciated.
Until the next project, ciao for now. Lewis