Introduction: Box Monster!
Hello there!
As I have worked on a bunch of projects over the years, I was surprised to learn that some of the projects that I enjoyed the most were simple projects. There's nothing fancy or terribly clever about them, just a box that opens and closes on its own. With a monster face on the cover.
Since I enjoyed this so much, I decided that I should share how I made it so that other people could make it too.
Step 1: What We'll Need
To build this box monster (or at least the way that I am building it), we'll need to have a few things first:
- A small box
- A servo motor and accessories, such as this one
- Some wire, such as brass wire
- Wire cutters
- Pliers
- Screw driver
- Hot glue
- A microcontroller, such as Digilent's chipKIT uC32
- zUNO clips
- jumper wires
- A source of power, such as 4 AA batteries and a battery case
Step 2: Getting the Box Ready
This is one of the easiest parts of getting the box monster up and ready to go is folding the box together. The box I am using is one of Digilent's small shipping boxes, a Uline S-159.
You can either follow the text below or simply click through the pictures at the top of the screen.
- Lay the box flat with the brown side up.
- Fold the tabs of the "front" and "top" of the box in.
- Fold the "front" of the box up (you may have to unfold the tabs to get it to stay upright)
- Get the tabs of the "front" and "top" of the box side by side
- Fold the side of the box over the two tabs.
- Fold the other side of the box as well.
- You'll notice that the lid of the box has mini tabs on the end of it that help hold the box closed...but we want the box lid (monster mouth) to open and close freely.
- So, we'll fold these two mini tabs inward. You can also cut them off completely.
- Now, our box will close, but still be easily opened by the servo motor later.
- We'll want to glue (or otherwise hold) the lid of the box in such a position so that when the "mouth" closes, the end of the lid will go inside of the box instead of hitting the front edge or going outside of the box.
Step 3: Getting the Servo Motor in Place Will Be Easy... Right?
Some of you may think that getting the servo motor in place so that it is able to appropriately open and close the mouth will be easy.
That's what I thought too.
However, if you are more mechanically inclined than I am (which means you know you are mechanically inclined instead of just thinking you are mechanically inclined) you can probably skip this part and go on ahead. If you are in my boat or just got frustrated with the motor (another boat that I am familiar with), feel free to follow along with what I personally deemed satisfactory (but not perfect).
Sadly, all of these values are only designed to work with the box and servo motor that I am using; if you are using different materials, then there'll be a bit of trial and error to go through to get the motor set up just right. But in all seriousness, that's part of the fun: customizing your own project.
Step 4: Getting the Servo Arm Ready - Part 1
Before getting the motor portion in the right spot, we'll prepare the servo "arm" first.
Out of the GWS servo kit, we'll need the long "two armed" piece, the long "four armed" piece, the "six armed" piece as well as four screws and four of those cylindrical cap things.
To start, we'll attach the long two armed piece to the long four armed piece. Line up an arm of each piece with each other with the four armed piece "on top". Cap one of the screws and screw the two pieces together through the 3rd hole out from the middle of the four armed piece and the 3rd hole out from the middle on the two armed piece. The cap is there to prevent the screw from going too far so that just the threaded portion of the screw is holding the pieces together.
I personally recommend that before screwing them together you start screwing into them individually; that way you'll have a threaded hole already started once you make through the first piece, making your life a bit easier.
Then, take another capped screw and screw those same two pieces together (from the other direction this time) through the 2nd hole out on the two armed piece and the 4th hole out on the four armed piece. This should get you something that looks similar to third picture, although you may have your screw directions reversed (it is not a problem if you do).
Step 5: Getting the Servo Arm Ready - Part 2
Now we'll attach the six armed piece to the "back" of the four armed piece. Positionally, these two arms are going to be directly opposite of the already attached four arm piece. Take two capped screws and screw one of them through the 3rd hole out from the center of the four armed piece and the 2nd hole out on the six armed piece. From the other direction, screw through the 4th hole of the four armed piece and the 1st hole out from the center of the six armed piece.
If any of the holes on the pieces became cracked, you can undo the screws on that piece and rotate to a un-cracked side. However, as long as you have at least one of the screws secure on each side, it should be secure as is.
Step 6: Getting the Servo Arm Ready - Part 3
Now, we're going to attach the wire that will connect between the servo arm and the box lid. Orient the servo arm such that when the two armed piece is attached to the servo motor, the six armed piece is parallel with the side where the servo motor wire comes out. The wire will be attached to the arm directly to the left of the arm with screws.
The wire itself (I used soft brass wire) will need to be about 12 cm long; this is enough for what we are doing with an additional two centimeters to spare/mess up on without an issue. Weave 3 centimeters through the farthest hole from the center of the arm in question. Then, two centimeters in the end, bend the wire in a "U" shape so that you can pull the wire back and have the end go through the second farthest hole. Use pliers, or some other appropriate tool, to get the wire pushed in as far as you can.
Once it is pushed in, wrap the end of the wire around the main piece of wire that is in the first hole. Continue to wrap the excess around the "arm" so that the wire does not wiggle very much on the arm itself.
Step 7: Getting the Servo Motor Ready
Now that our servo arm is finally ready, we can get the servo motor in place.
First, we'll make sure that the gear on the servo motor is rotated all the counter clockwise, with the servo lead wire facing up. You can check out the first picture to see which orientation I'm referring to if you're not sure. One of the easiest ways to do this is to attach the servo motor arm to the servo motor itself via the two armed piece onto the motor and rotate the arm by hand. Once the gear has been fully rotated, orient the servo arm so that it is oriented in the "upward" position.
Place the servo motor upright inside the box with the edge of the servo motor 3.5 cm from the back of the box. I recommend using duct tape to hold the servo motor in place until we confirm that this is the best location. We also need to place the "servo motor hook piece" on the lid of the box. The piece I designed is a 3D printed piece and is available for download from repables (well, available from repables if my files ever finish uploading. Otherwise, you can download the appropriate file for your printer at the bottom of this step).
For the vast majority of us who do not have access to a 3D printer, you can also use the small four armed piece as your hook. This piece is much more easily obtained (considering that it comes in the servo motor package), although it will not be quite as easy to secure to the lid since it does not have a base. For either hook style, the bottom of the piece that is touching the lid should be 6 cm above the crease that marks the beginning of the lid.
Once both pieces are secured, bend the wire coming off of the six armed piece a "U" shape so that the "U" portion of the wire goes through one of the holes on the servo hook piece when both the box lid and the servo motor arm are vertical. In theory, the length of wire before the bend occurs will be between 6 and 6.5 centimeters.
Step 8: Finding Our Range of Motion
Now that we've gotten our servo motor ready, we'll need to find what range of degrees that we will be allowed to tell of our servo motor to rotate to without damaging the arm, as well as to make sure that our motor is in a good physical location as is.
Presuming that the motor has been rotated fully counter clockwise with servo motor leads coming up, 180 degrees on the servo motor will correspond to a fully open box lid. With this in mind, we can use the code in the text file below this step to figure out what the lower degree bound our servo motor will have before the servo arm hits the bottom of the box. The code is designed for the chipKIT uC32 in the compiler MPIDE (available as a free download here) and simply opens and closes the box lid.
To connect the servo motor to the uC32, connect the red wire to the 5V power pin, the black wire to a ground pin, and the white wire to a pwm capable pin, such as pin 3. The lower degree angle that the servo motor rotates to (and thus how far the box lid closes) can be adjusted by changing the number in the line:
int lowerServoDegree (number to be changed)
Once you change the number, re-upload the code onto the uC32 and see if range of motion is where you want it to be. You can expand the range of motion by breaking off some of the arms on the 6 arm piece which hit the bottom of the box first.
Attachments
Step 9: Some Final Preparations
Once the appropriate range of motion has been determined, we can make the servo motor and the servo motor hook more secure by hot gluing them to their respective locations. I recommend not screwing the two armed piece onto the servo motor gear, purely for the reason that it will be far easier to take off and adjust if the need arises.
We can also place the microcontroller that we are using as well as a battery pack inside the box monster. Gluing the microcontroller board directly isn't necessarily the safest idea (although most glue should be pretty non-conductive), so you could instead attach the microcontroller to a zUNO clip and glue the clip down instead.
In terms of connecting and disconnecting power to the board, we will end up creating two holes in the back of the box monster; one to feed the cables from the battery pack through and the other hole to feed the cables attached to the Vin and ground on the microcontroller. This way we can easily connect and disconnect the battery pack from the board without having the box itself get in the way or the cables be visually obstructive.
And finally, we'll also want to put the Box Monster sticker on our box, which is arguably one of the most important parts of this project, otherwise, it's simply not a "Box Monster". I recommend lining up the bottom part of the sticker (the mouth portion) with the bottom part of the lid. With the Uline S-159 box I'm using, the sticker will nicely cover nearly the entire lid.
Step 10: Final Thoughts
You can check out the Box Monster in action in the embedded YouTube video on this step. The code that I used for this video with the chipKIT uC32 is available in a text file below this step.
Please feel free to ask any questions that you may have and I'll do my best to answer them.
If you would like to create a Box Monster of your own, give us a comment on the Digilent Blog to get the box and sticker!
Check out my Halloween themed Box Monster Instructable!
Here's a shout out to nodcah and w3schools for showing me how to get this picture in the step!