Open a box with the flick of a switch!
Have you ever given something to someone and wished that the box you gave it in opened automatically? No? Well neither have I (well, maybe) :D. However if you have, this is the guide for you! With just a flick of a switch the box will open automatically!
Step 1: Tools & Materials
Step 2: The Circuit
The Circuit is fairly simple. Its a 3 switches connected to 3 digital pins with 10K resistors shorting to ground. There is also a servo motor that connects to 5v, ground, and a fourth digital pin. Connect however you like, just make sure you know which digital pin goes where. I would recommend breadboarding it out first and then doing it on perfboard. Thats what I always do. Now let’s program it!
Step 3: Program It!
I like to test the code first, before putting it in the case (the box). This way, you can perfect the code and get it right, and not destroy things later. To program it, It’s like any other arduino code. Just open up the arduino project, connect your arduino, and press upload! Once you do that, your continuous rotation servo should start to spin. It will spin until it finds a button to press and then stop. When you flip the power switch to the next state, it will spin in the other direction until it finds another button to press. Believe it or not this was actually pretty hard code to write. If your just starting with arduino, you might be able to learn something from it!
Step 4: Assembly – The Arm
Great! So now we have the circuit up and running and everything working. Now lets attach the coat hanger to the servo.
Take your metal coat hanger and cut off a 5″ piece. Then, straiten out the piece with some pliers. Then measure 1″ on the coat hanger segment. Bend at that point until you get a 90 degree angle. It should look like the picture below.
By the way, the main reason for choosing hot glue is because it comes off without damaging other parts. That being said, you can attach the parts any way you like. 3D printer is preferred. Once I finish my reprap, I’ll upload the new files. In the mean time, anyone is welcome to post the in the comments!
Ok, The next step it to attach the arm to the servo. You can do this with hot glue very easily. Once you do this, your servo-arm thing is done! Next we’ll attach the servo to the box.
Step 5: Assembly – The Servo
Now we’ll glue 2″ x 1″ piece of cardboard to the side of the box. Make sure it is as secure as possible.
Once this is done, hot glue the servo to the cardboard piece. Make sure it is strait.
For more detail: Open a box with the flick of a switch!