Self-Opening Box
This project is a self-opening box that uses a servo and accelerometer to open a laser-cut box, inspired by an interaction from the video game The Legend of Zelda: Breath of the Wild. This is not only a love letter to one of my favorite games, but if designed to be more portable and contained, could be used as a fun chest to keep things in.
Supplies
Materials
1x Arduino Uno
1x Arduino Breadboard
1x Arduino Piezo 24v Electronic Buzzer
1x Micro Servo SG90 - 9g
1x MPU-6050 Accelerometer and Gyroscope 3-Axis Module 3.3V-5V
16x Jumper Wire
1x Laser Cut Box (https://community.glowforge.com/t/hinged-lid-box-svg-generator/121731)
1-3x Zipties
1x Popsicle Stick
Tools
1x Soldering Iron
1x Lead/Soldering Metal
Tape
Concept Description / Early Iteration
Early Iteration + Testing Concept
The very first iteration of my design used a photoresistor to trigger a piezo and 2 servos. The concept behind this was to cause the sound to begin when enough light entered the box, and then triggered the servos seperately with my accelerometer, though after some testing, I made some adjustments. Firstly, I realized I only needed one servo, since it happened to be strong enough to lift the box. This made the wiring a lot simpler, and the assembly less clunky. Secondly, I came to the conclusion that it was unecessarily complex to have the photoresistor trigger the noise, and that I could just couple it with the piece of code that triggers the servos.
Reflection
There were a lot of cool learning experiences during my time working on this project. I soldered with very little experience, worked with Arduino which I had never done before using a component did not come with the kit, and learned to design a circuit, all of which felt very rewarding to complete. There were many things I would change, however. Firstly, my soldering was sub-par, and I ended up resoldering a lot of my board near the end of my project on a new board, since it stopped functioning after soldering it the first time. I also had a large problem with cable management, and could have much more considerately desgined the box to allow for more room, shortened the wires, cut a hole near the back to allow the wires to come through, or use a battery. I could have also used a bigger box and made a fake wood bottom to conceal the circuitry. I also am not very satisfied with the quality of the box itself, I had to settle for one which was taped together.
Designing the Board
*Note - The 4-pin LED in the circuit above is supposed to represent the MPU6050 accelerometer, as the website I used to design the board did not come with an accelerometer component.
The Design
The design of this board is organized specifically with the arduino and breadboard being next to each other in mind. I used a box that would allow for both of them to fit next to each other, and ideally, this would have meant shorter wire distances - which was true for the pre-soldered version of my board, but not true for the new version I had to make after being unable to fix the first one.
Cutting the Box
https://3axis.co/laser-cut-hinged-box-3mm-dxf-file/eoxlze4o/
https://cuttle.xyz/@cuttle/Hinged-Lid-Box-rTDUUz652dVO
I used the link above to print a laser-cut box that would allow enough space for my circuits to fit inside. I considered using the latter, which would allow me more control over the dimensions, but the one linked worked just fine, and I found the customizable one too late. The second one is also given as an option for people who might want to recreate this project using a better box and remedy my own mistake.
Coding the Arduino
Adafruit Sensor Library: https://github.com/adafruit/Adafruit_Sensor
Adafruit MPU Library: https://github.com/adafruit/Adafruit_MPU6050
Soldering the Board
Soldering First Try
The board in the beginning was a replication of my functioning breadboard soldered close to the conclusion of my project. The images above are the first attempt - most of the circuit seemed to work, but there were a few issues that were likely caused by my lack of experience with soldering that made it nonfunctioning. I am, however, proud that I was able to cut, strip, and solder wires for different lengths, even if there was a small imperfection somewhere on the board that stopped it from working.
Putting Together Project
Assembly
The system itself is quite easy to assemble. As listed in the reflection, if I were to redo this project, I would likely design a more appropriate enclosure for the boards, but for now, I was able to just place the board and arduino next to each other inside the box. In the roof of the box, I placed the accelerometer, taping it down to avoid misfires. In order for the servo to open the box, I mounted a popsicle stick to the top of the motor with a ziptie and fastened it onto the side of the box, so that it would be long enough to lift the lid on its own.
Functioning
This video displays my project working fully, displaying both the components working properly, as well as the soldering and updated board.