Physical Computing — Project 2 Improved (Final Project)

Making It!: “A Celebratory Graduation Cap”

Elizabeth Estefan
4 min readMay 9, 2022

Recap

Moving forward with my motorized celebratory graduation cap, I wanted to make some physical modifications to improve the functionality. The python code was working properly, controlling buttons A and B on the Adafruit Circuit Playground Express microcontroller which moves a 180-degree servo motor. A string attaches to the servo horn and a confetti-filled bucket moves up and down for the confetti to drop in front of one’s face. But I left off having physical issues, thus the project was just short of the goal.

The front-heavy cap caused a dip forward making it difficult to keep the cap steady on my head. And the very short servo horn caused a shortened range of motion for the confetti drop bucket resulting in the lack of a proper drop.

Images of the preliminary prototype.

Improvements in Round 2

For this iteration, I made several physical improvements.

A new laser-cut form for the main structure now extends the full length of the graduation cap to redistribute some of the weight to the back to help account for the extra weight in the front where the confetti bucket sits. This new frame provides better balance on my head. And I included screw holes for the bucket which I had not included the first time around.

Structure from the first prototype (natural wood) side-by-side with a new prototype form (painted black).

To address the limited range of motion for the confetti bucket movement, I extended the servo horn with an attachment. This allowed for the bucket to properly sit upright to contain the confetti and drop down far enough to release it when desired with the button presses. I also moved the servo to one side rather than in the center to allow space for the horn extension. I considered turning the servo sideways for the horn to move forward but some issues arose with that attempt due to the extended servo mounting tabs. I would need to go back to the drawing board for that one.

Servo horn extension allows a fuller range of motion for the bucket to move up and down.

And to allow for repeated fun without the mess, I replaced the use of confetti with fabric streamers which I affixed to the bucket interior. After the streamers drop, quickly tuck them back in and repeat. Another added convenience was the use of a battery holder with an on/off switch.

Prototype 2 and interior bucket view.

And last but not least, I added audio to the project. I tried adding a WAV file of Sir Edward Elgar’s “Pomp and Circumstance March №1,” the traditional commencement music, but the files even reduced to a few seconds were either too big to load or if loaded overwhelmed the microcontroller or code. So I opted for a clapping audio file which was something I considered during my preliminary ideation.

Below is the revised Python code. It is the same button press code I used in my first prototype but with the audio code added. When button A is pressed, the streamer bucket drops and the clapping audio clip plays. At first, I thought something was breaking in the code since pressing button B would not pull up the bucket as the clip played. But no errors were posted in the serial. I quickly discovered that the audio clip must finish playing before another action can begin. So once the audio file completed running, I was able to press button B to pull up the bucket. Phew.

View of the updated code in the Mu Editor. Addition of audio to the A button press.

Let There Be Streamers

Revised Prototype Video.

For More

To read the write-up on the ideation and making of the first prototype of the Celebratory Graduation Cap, visit Physical Computing — Project 2.

--

--