I'm a big fan of robots, so what a better way to celebrate Halloween than making a robot pumpkin or "The Pumpkin-Bot". It is an opportunity to integrate LEDs, an Arduino, duct tape, foam and have lots of fun making something that will make you smile (or scare you).
I tried to keep the cost as cheap as possible, to be able to compete in that category. If you like electronics, robots and read Instructables you probably have many of the materials to make this.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials & Tools
Most of the materials in this list I had laying around from previous projects. But here is a list with prices for those interested. To follow this tutorial you'll need the following materials:
- 1 Floating noodle $1.00 Dollar Tree
- 1 Roll of silver duct tape $3.00 Walmart
- 1 Squared Foam sheet black $0.40 Walmart
- 1 Plastic Pumpkin $6.00 Target
- 1 Box (size anything you like) $1.50 Staples
- 1 Colored translucent weekly pills container $1.00 Dollar Tree
- 2 rgb leds (50 pieces x $2.00) Ali Express
- 1 blue,1 green, 1 red, 1 yellow led (50 pieces x $0.98) Ali Express
- 10 270 ohms resistors (100 x $0.66) Ali Express
- assorted jumper wires (40 x $1.00) Ali Express
- wire for leds (2 strands)
- wire for rgb leds (4 strands) ($1.40 / meter) Ali Express
- 1 Arduino Uno or compatible ($3.35) Ali Express
- 1 mini breadboard ($0.58) Ali Express
- USB cable Ali Express
- E6000 glue
- Strong knife to cut plastic pumpkin
- Bread knife to cut foam noodle
- Exacto knife (optional) to cut body circles
- Soldering tool (cheap one is fine)
Step 2: Pumpkin-Bot Head
To make the Pumpkin-Bot head I covered the plastic pumpkin with the silver duck tape. Try to cut the duck tape in chunks instead of long pieces to make it easier to apply uniformly and keep the shinny silver metallic look. Don't go to short either because it won't look even. Around the eyes, mouth and nose I applied pieces of tape that won't cover the holes, then trim the excess tape with the scissors. I like the orange edge against the silver surface look, but be creative with yours :-)
After covering the pumpkin with silver duck tape, we proceed to cut an opening in the back of the head to have easy access to place the RGB LEDs that will be the Pumpkin-Bot eyes. This hole can be as big as you want to easily work inside the cavity, later you will use more duck tape to seal the hole back in place after completing the eyes setup. Estimate the distance from the head to the inside of your torso box, add 0.5 more to that measure and you have how long the 4-strands RGB wire need to be for each eye. Peel the ends and tin the wires using your soldering tool. You could solder the resistors for the RGB LEDs to the cable, but since we'll use a mini breadboard this will allow us to minimize the amount of soldering needed by placing the resistors in the breadboard (see Step 5).
Using the black Foamie sheet cut a shape that will be place behind the eyes cavities, to focus the light of the LED out and not light up the inside of the Pumpkin-Bot head. Since my plastic pumpkin has triangle shaped eyes, I cut a shape that creates a space approximately 1/2 inch deep for each eye. Make a little hole with a pen, then pushed the RGB LED through the Foamie. After the RGB LED is in place, proceed to tape the Foamie to the Pumpkin-Bot head (see the picture of the head interior). After taping both eyes to the head use the left over Foamie to cover the back of the mouth hole. Bend the Foamie making a U shape and place it creating a depth effect in the mouth of the Pumpkin-Bot.
Make a small hole on the bottom of the plastic pumpkin to pass the wires from the head to the torso.
Step 3: Arms, Legs and Torso
To create the arms, hands, legs and feet we use the 'Swimming Noodle'. One noodle was enough to make the Pumpkin-Bot. Carefully look at the pictures before you start cutting the foam. First, plan your cuts by drawing them on paper, this will give you a better idea of how it will workout.
Cut two equal length pieces of foam for the arms including the hand. Each one of this pieces will be enough foam for one arm, see "Arm cuts" picture and follow the diagram. The shoulder joint needs one cut, after cutting just rotate the shoulder part on the shoulder joint to make it fit against the torso's vertical surface. Use a small piece of tape to hold the shoulder and upper arm. The joint between upper and lower arm needs 2 cuts, one vertical cut and one cut at 25 angle. Set aside the small chunk and attach the lower arm at the elbow joint of the upper arm. Finally the hand requires 2 cuts parallel to the foam cylinder length. See diagram and pictures. Now cover the arm with silver duck tape following the same advise from the head and using small pieces of tape.
To make the legs cut to equal length parts for each leg. For the feet cut one piece with length at least twice the diameter of the foam cylinder, this will help the Pumpkin-Bot to stand and not fall back or forward. Cut this piece in half along the cylinder length, now you have the 2 robot feet. A rectangle shape must be carved on each of this 'feet' for the leg part to rest flush against the foot surface. The small part that you removed from each hand will be used as the front of each foot. Now cover the legs with silver duck tape following the same advise from the head and using small pieces of tape. Try to keep the bottom of the feet surface flat to help the Pumpkin-Bot stand.
Carefully choose the side of the box that will face back and front since some boxes have glued joints that are harder to cut.
Next proceed to cover the box that will serve as the torso with silver duck tape. Make a small hole on the top of the box for the eyes wires. Carefully make a bigger hole on the back of the torso to place the Arduino and other parts inside the torso. Make the hole big enough for your hands but not close to the edges of the box since this would affect the rigidity of the cardboard. Make the holes for the lights in the front of the torso, an Exacto tool will make this task easier. Don't make the holes bigger than the pill containers. Push the pill containers in place.
After the pill containers had been place in the torso, cut a small piece of aluminum foil big enough to cover the interior opening of the pill containers. Solder a resistor to each one of the four LEDs that we'll use on the torso. Wire the 4 colored LEDs with the resistor, cover any expose wire with electrical tape. Use enough wire to easily connect the LEDs to the breadboard or Arduino while both of this are still outside of the robot torso. Carefully punch a small hole through the aluminum foil and push each LED matching the color of the pill container. Using duck tape attach the aluminum foil with the LED to the back of the pill container. Try to completely cover the back of the pill container and keep the LED in place to avoid any 'light leak'.
Step 4: LEDs and Arduino Software
Follow the diagram to connect the wires of the LEDs to the Arduino. Remember to insulate the LED wires to avoid any short circuit, it will be hard to find later after you put all the components inside the Pumpkin-Bot.
The source code for the Arduino sketch is attached.
A quick explanation of the code: The loop will call the lights pattern functions passing the duration value. We call the functions with different values to make the lights move faster or slower. There are 4 functions that make the lights move in clockwise, counterclockwise, all-blink, 2On2Off patterns.
This is a very simple sketch and can be improve, maybe next year I'll post about the Pumpkin-Bot 2 :-D
Step 5: Placing Electronics Inside Robot Body
After you have all the wires connected and tested that everything is working as you want it, proceed to place the Arduino and breadboard inside the torso of the Pumpkin-Bot. The wires of the head eyes should already be passed inside the torso cavity if you are following this Instructable, otherwise pass the wires through the hole on the bottom of the pumpkin into the torso cavity. Connect the power cable to the Arduino and test one more time before closing the back of the head and torso. A small slot on the bottom of the torso door allows the door to open and close without getting stuck on the power cable.
Step 6: Attaching Arms and Legs
IMPORTANT: When your electronics are working correctly, not before, proceed to attach the arms and legs to the Pumpkin-Bot. You should not attach the arms and legs before because the placement of the balance of the robot and it's ability to stand and not fall will depend on the placement of the legs (and the placement of the legs will depend on the distribution of weight in the head and torso).
I used E6000 glue to attach the head, arms and legs to the torso. The arms are approximately in the middle between the front and back of the torso sides and very close to the top. You can change this but this are human proportions. Wait until the arms are completely dry before proceeding to attach the legs.
To place the legs, first test the balance of the Pumpkin-Bot torso with head and arms on top of the legs. If it doesn't fall forward or backwards, then that is where you should attach the legs. This maybe the hardest step of this tutorial ;-) You can always rest the Pumpkin-Bot against a wall and avoid it falling.
Step 7: Conclusion
Hope you enjoy this tutorial and your comments are greatly appreciated since this is my first tutorial. If you decide to make your own Pumpkin-Bot please share your creation with me, as I said I love robots and is always exciting to know about them!