Sharing Surprise Box Project

Below is a video and a few pictures of a project I just completed. This is a wedding gift for a friend (and yes it is a year late). The idea is this box is meant to promote and make giving small gifts to each other more fun and regular.

The idea is that a partner can place a gift inside (a favourite beer, candy, a love note,…) and place the magnetic sparkle by the receivers name. The receiver then pushes the button on top and the doors open revealing the gift. The doors open for 15 seconds and then automatically close again.

More of the technical details are below for those who are interested in how I made this.

Video




Mechanical Design:
I designed this to use a single servo. It actually would have been easier to use two servos but I found that it was hard to keep servos completely in sync. By designing these 3D printed gears and arms operating off a single servo.

Electrical Components:

  • Aliexpress Li-On power converter and charger. Steps up to 5V and has a charging circuit integrated.
  • ESP32 with 4MB integrated flash (the mp3 is stored directly on the flash)
  • MAX98375A I2S for mp3 playback
  • Mini Pushbutton Power Switch LV by Polou
  • hobby servo
  • speaker found at the hackspace
  • various connectors and silicon wire

Everything was programmed using the Arduino IDE. I put the mp3 play back on the second core so it wouldn’t interfere with other functions. For core 0 I had to program everything without using delay. The lights were programmed using this tutorial as a base: https://learn.adafruit.com/multi-tasking-the-arduino-part-1/ditch-the-delay?view=all

I had to adapt all the servo functions to follow similar functionality without using delay. I’m a self taught hobby programer so I feel good about making this happen.

Overall this was a fun project but also took way longer than expected. Happy to answer any questions in the thread below.

14 Likes

Very cool project Brian.