We talk a lot on this blog about integrating robotics into academic curriculum. And for good reason – the Finch Robot and the Hummingbird Kit are amazing tools for inspiring deep and joyful learning across grades and content areas! But sometimes, the mood strikes to put creativity first and let the standards follow suit. With creative robotics, you don’t have to sacrifice learning to give your students a fun, interactive experience. As students build and create, they are building and strengthening valuable skills – from engineering and programming to math and collaboration, and everything in between. Hilarious pranks, and serious learning. What could be better?
We could never pick favorites when it comes to robotic projects – but if we could, this one might be it. Here’s a tutorial for a silly, wholesome, and sure-to-please creation: a personalized Jack-in-the-Box!
Jack-in-the-Box Project for the Hummingbird Kit
Materials will vary based on design. But for this project, we used:
– 6×6 cardboard box
– Hummingbird Robotics Kit (Hummingbird Bit, micro:bit, position servo, servo horn, and sensor of your choice)
– Programming device
– Wooden craft sticks
– Wooden skewer
– 1 candy stick
– 1 pipe cleaner
– Duct tape
– Hot Glue
– Hummingbird Robotics Kit
– Misc. cardboard pieces
Plan your mechanisms
This Jack in the Box prototype contains two mechanisms: one that holds the lid shut until we are ready for it to open, and another that acts as the machine’s crank. Let’s take a look at both:
Lid mechanism – This mechanism assumes that the lid of the box will pop up when it is not being held down by an external force. For the lid mechanism, we used a position servo with a piece of cardboard attached securely to the servo horn. When the servo is in position 1, the lid is held down. When it moves to position 2, the lid is no longer held down. (You may need to experiment with your box in order to make the lid pop open when not held down. All part of the fun!)
Crank mechanism – We created a crank from a popsicle stick, and used a candy stick covered with a pipe cleaner to make the handle. This crank is attached to a skewer which travels through the center of the box, and turns the mechanism on the other side. The mechanism on the other side is a cardboard circle with a small wedge cut out, like PacMan. Read on to learn how this works.
Plan your program
How will your box know when to pop open? For our prototype, we used a light sensor. The light sensor is embedded in the side of the box, facing out. The sensor is covered by the PacMan cardboard circle we cut. For the majority of the circle’s rotation, the light sensor is blocked. For one small portion, it receives light. Each time the light sensor receives light and goes back to dark, it counts as one crank rotation. Sample code:
With a build plan and a program plan in hand, you’re ready to start building. Test everything out with each step – a lot of moving pieces are coming together!
Secure the lid
If you haven’t yet, add your position servo to the box to hold the lid down. Add this servo to your program. Consider – what will trigger the servo to turn? We used a variable called “crank rotation” to count as a rotation, and then programmed our servo to change positions and open the box on a randomized number. This isn’t necessary, but having it random sure is fun!
Create the “Jack”
Once your mechanism is in place, start working on the “Jack” in your box (or in our case, the Tom!). Draw or print out your picture and put it aside for when you need it. You can also experiment with a 3D object popping out of the box!
Add a False bottom
Create a false bottom to cover your mechanism and act as a base for your spring. We found it helpful to add a little pull tab but easier removal and replacement.
Create the spring that will push your box lid open and pop your Jack out of the box. Experiment with different materials, folding techniques, etc. For our 2D printed picture, two pieces of light cardboard folded accordion-style had enough force to create the effect we were looking for.
Experiment with different locations inside of the box. Where will the springs need to be attached in order to clear the lid? How far down should the false bottom be placed? When you’re ready, attach the Jack to the springs, and the springs to the false bottom.
Iterate, iterate, iterate!
Your build and code will evolve as you test. Your finished product may end up looking very different than your original plan. It’s all part of the magic!
Use whatever materials you’d like to decorate your box. Be sure to test your mechanisms and program after decoration – changes in weight and materials can impact the way it works! We used duct tape to cover the box.
Delight your audience with your customized Jack-in-the-Box. Who will you surprise with this feat of robotic genius?