With a simple program I was able to make Groovin' Grover dance to a popular dance tune from the 1980's and one from 2005. As you can see in the videos below, Grover has been programmed to dance to the music and at times his moves seem uncanny.
The first video shows a close-up of Groovin' Grover dancing to "Safety Dance" by Men Without Hats. The second video shows Groovin' Grover, his stage, and the servos that control his movements. He's dancing to "Feels Good Inc." by Gorillaz. If you listen carefully, you can hear the servos and if look carefully, you can see the transparent nylon threads that connect the servos to his limbs.
This instructable has been entered in the 18+ category for the Robots contest.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts List
Grover's Brawns and Brains:
- Four small inexpensive hobby servos like the TS-53 from Tower Hobbies.
- One Pololu Micro Maestro 6-Channel USB Servo Controller available from Sparkfun and other internet sites.
- One 6" Futaba J Plug or equivalent available from Tower Hobbies.
- One 5 Volt Wall Wart (AC adapter). I had an extra one but you can find used ones at Thrift stores or new ones at electronics stores.
- One 3 to 6 foot USB cable with a male USB mini-B connector and a male type A connector.
- Two 1" pieces of Heat Shrink Tubing (alternatively, you can use electrical tape).
- One 5 - 6" Grover finger puppet.
- Four 1/4"-20 hex nuts (these will be used to add weight to Grover)
- One small (1") safety pin (this will be use to help hold the weights inside Grover.)
- Two 8" x 12" x 1/4" pieces of plastic, wood, Masonite, or other firm non-conducting material. I used yellow plastic I had purchased for another project I never got around to build.
- Four 12" 1/4"-20 threaded rods.
- Sixteen 1/4"-20 hex nuts.
- Four self adhesive rubber feet (medium size 1/4 to 1/2" in diameter, 1/2" tall).
- Two and a half feet of self adhesive Velcro strips.
- One 11 3/4" x 18 3/4" white cloth for the backdrop on the stage. I cut an old pillow case to make mine.
- Two small plastic wire clamps (see photo below).
- Two small machine screws and nuts for the wire clamps (see photo below).
- Clear Nylon Thread
- Sewing Needle
- Washer (1" outer diameter)
- Blue Painter's Tape.
- Four small paper clips.
- Pololu Maestro Servo Controller User's Guide: HTML version or PDF.version.
- Maestro software and drivers are available at File Downloads section of the Micro Maestro Resources web page.
- Soldering iron and solder
- Wire cutters / Wire Strippers
- Small wrench for use with the 1/4"-20 hex nuts
- Electric drill and 1/4" drill bit and drill bit to match machine screws for the wire clips
- Heat Gun for the heat shrink tubing
- PC for developing and downloading programs to the microcontroller. The Pololu software currently only supports Windows and Linux.
Step 2: Overview
Groovin' Grover is a microcontroller-based marionette. Each of Grover's limbs are controlled independently: he can be made to walk, wave, and of course, dance. Groovin' Grover is controlled by a Pololu Maestro 6-Channel Servo Controller. I chose this microcontroller because it is specially designed for controlling servos, is very easy to wire, has a simple programming language, has superb software for developing and debugging programs, and is inexpensive ~$20.
Mechanically, Grovin' Grover is based on a Grover finger puppet attached to four inexpensive hobby servos. The servos are attached to each of his limbs allowing for independent movement. I built a simple "stage" for holding Grover and the servos in place. I used Velcro to attach Grover and the servos to the stage so that the parts could be easily moved and adjusted for getting Grover into proper position. Painter's tape and paper clips are used to attach threads to the servo horns: the paper clips can be bent to get proper movement and the painter's tape is easily removed if threads ever need to be replaced.
The first figure below shows how Groovin' Grover is attached to the servos when he is in his initial position. Transparent nylon thread is used to attach his limbs to the servos. When rotated from the initial position, the servos pull up to raise his feet or hands and can be rotated back to the original position to lower his feet or hands. Programming is very simple: in the Maestro programming language the command "8000 1 servo" would cause servo 1 to rotate to the maximum position and raise his left hand. The command "4000 1 servo" would return servo 1 to the original position thus lowering his hand. If you put those commands in a loop with a small time delay after each servo command, Groovin' Grover would appear to be waving at you. The code that Groovin' Grover uses to dance to the videos on the first page of this instructables is explained on the last step. The Popolu documentation for the microcontroller is well written and explains how to use the software and in detail how to program the microcontroller.
The second diagram shows Groovin' Grover and his stage. His stage is made of two platforms supported by threaded rods and hex nuts. Grover is suspended 4" from the upper platform: a piece of transparent nylon thread is threaded through the top of his head and attached to a washer. The washer is held in place on the upper platform using Velcro. Rubber feet are affixed to the bottom of the stage to prevent the washers from scratching the surface of where the stage is placed and to ensure that the stage doesn't rock back and forth when the servos are moving. A piece of white cloth hangs from the back of the stage as a backdrop. The backdrop is affixed to the bottom of the upper platform by Velcro. The backdrop hides power and USB cables and allows the transparent nylon thread to blend in with the background allowing Groovin' Grover to appear to float.
The third diagram shows the top of the upper platform where Groovin' Grover's electronics and servos are located. The PC-based program development and debugging software communicates with the microcontroller via the USB cable. Microcontroller power is supplied by the USB cable. The servos are powered by a 5 volt wall wart. The USB and power cables are held in place using plastic wire clamps: the wire clamps prevent the microcontroller from being accidentally pulled off the top of the platform. The microcontroller is affixed to the platform with a small piece of Velcro.
Each servo is attached to the microcontroller using standard connectors that come with the servos. Servo 0 controls the left foot; servo 1 controls the left hand; servo 2 controls the right hand; servo 3 controls the right foot. The servos need to be connected to the microcontroller exactly as shown in the diagram for Groovin' Grover to move properly. More information about the various connectors on the microcontroller can be found in the Pololu Maestro Servo Controller User's Guide.
Note: Throughout this instructable when Grover's limbs are described as left or right that is his left or right as he faces you.
The process for programming Groovin' Grover is simple. You launch the Maestro control center software and type your program into the "Script" window. You click "Apply Settings" to download the code to the microcontroller and then "Run Script". The control center includes features for debugging and manually moving servos as well as alternate way to develop scripts without using the programming language. I found the software to be very easy to use and the documentation to be well written.
Step 3: Construct Servo Power Supply
- Cut off the tip at the end of the wall wart's power cable as shown in the second photo. This tip will not be used and can be discarded or saved for a future instructable.
- Pull the wires apart and strip off an 1/8" of insulation off the ends of the wires as shown in the third photo.
- Making sure the stripped wires are not touching, plug in the wall wart and use a volt meter to test the polarity of the wires as shown in the fourth photo. If you are using an analog voltmeter, the needle on the meter should move to 5 volts as shown in the fifth photo or if you are using a digital voltmeter, the display should read +5 volts. If they don't reverse the test leads and try again. Make note of which wire is positive and which is negative.
- Add two pieces of heat shrink tubing to the wires as shown in the sixth photo. The purpose of the heat shrink tubing will be to insulate the wires. If you don't have heat shrink tubing, you can wrap electrical tape around the connections after you finish the soldering step below.
- Cut the Futaba J plug cable as shown in the seventh photo. Keep the end with the connector shown in this photo. Strip the red and black wires as shown.
- Line up and solder the wires as shown in the eighth and ninth photos. Make sure to connect the red wire to the positive wire from the wall wart and the black wire to the negative wire from the wall wart. The white wire will be left unconnected.
- Make sure the exposed connections are not touching, plug the wall wart in and using your voltmeter, verify that the red wire is positive and the black is negative. See tenth photo. Don't skip this step, if you have the polarity wrong you will likely damage the microcontroller and the servos.
- Move the heat shrink tubing over the exposed connections as shown in the eleventh photo. Apply heat with a heat gun or soldering iron. The resulting shrunk tubing should look like the twelfth photo. If you are not using heat shrink tubing, you should wrap each of the exposed wires with electrical tape.
- Cut the extra off the white wire, as shown in the last photo, and the servo power supply is now complete.
Step 4: Prepare the Stage Platforms
- Mark the holes for the support shafts. The placement of the holes are not critical but I recommend making the holes 1/2" in the from the corners as marked in the second photo.
- Drill the four holes using a 1/4" drill bit. I suggest clamping the two boards together and drilling them together to ensure the pieces fit well when assembled. The finished pieces are shown in the third photo.
- Pick one of the platforms to be the upper platform and drill holes for the plastic wire clamps. These clamps will be used to hold the USB and power cables and prevent them from pulling the microcontroller off the platform. The holes should match the machine screws you selected to mount the holders. The holes should be drilled about 4" in the edges as depicted in the fourth photo.
- Cut a 9 3/4" strip of Velcro and adhere it the front of the upper platform as shown in the fifth photo. This Velcro will be used to mount the servos. I used Velcro because it allows for the servos to be easily moved and adjusted after everything is assembled.
- Flip over the upper platform and affix a 12" piece of Velcro along the backside as shown in the sixth photo. This strip of Velcro will be used to hold the cloth backdrop in place.
- Take the lower platform and adhere the four rubber feet to the bottom as shown in the last photo.
Step 5: Assemble the Stage
- Thread one hex nut onto the ends of each threaded rod as shown in the second, third, and fourth photos. The hex nuts should leave 1/2" of the rod exposed.
- Insert each of the threaded rods into the lower platform and secure with hex nuts as shown in the fifth photo. Make sure that the hex nuts do not extend past the bottom of the the rubber feet. The rubber feet should be the only thing touching the surface where the stage is placed.
- Place the upper platform onto the threaded rods as shown in the sixth photo.
- Use four hex nuts to secure the upper platform as shown in the seventh photo.
- The assembled stage is shown in the eighth photo.
Step 6: Mount the Microcontroller
- Attach a small piece of Velcro to the center of the top of the upper platform as shown in the first photo.
- Attach the corresponding piece of Velcro to bottom of the microcontroller as shown in the second photo.
- Affix the microcontroller to the upper platform using the Velcro as shown in the third photo.
- Small plastic wire clamps and machine screws with nuts will be used the secure the USB and power cables to the upper platform - see the fourth photo.
- Identify the mini-B connector on the USB connect as shown in the fifth photo: this connector will attach the to microcontroller.
- Plug the USB cable into the microcontroller as shown in the sixth photo. Attach the servo power cable to the servo power pins on the microcontroller. Note the orientation of the white, red, and black wires. The white wire is unconnected. More details on the power connection on the microcontroller can be found at this link.
- Place a plastic wire clamp over each of the USB and the power cables and secure to the upper platform using the machine screws and nuts as depicted in the last photo.
Step 7: Mount the Servos
- Cut four pieces of Velcro the same width as the servos (approximately 1 1/2") as shown in the first photo. The orientation of the servos is important - note the positions of the servo horns in that photo.
- Attach the Velcro to the servos as shown in the second photo. Use the corresponding piece of Velcro to what you put on the upper platform in step 4 "Prepare the Stage Platforms."
- Mount the servos on the upper platform using the Velcro as depicted in the third and fourth diagrams and fifth and sixth photos. Note the position of the servo horns in the diagrams and photos. Proper placement is important to making Grover move correctly.
- Connect the control wires from servo 0 as shown in seventh photo. Servo 0 is the leftmost servo as you face the stage. Note the orientation of white, red, and black wires.
- Connect the control wires from servo 1 as shown in eighth photo. Servo 1 is the second from the left servo as you face the stage. Note the orientation of white, red, and black wires.
- Connect the control wires from servo 2 as shown in ninth photo. Servo 2 is the second from the right servo as you face the stage. Note the orientation of white, red, and black wires.
- Connect the control wires from servo 3 as shown in tenth photo. Servo 3 is the rightmost servo as you face the stage. Note the orientation of white, red, and black wires.
- The eleventh photo shows the power cable and all four servo control wires attached.
- If you have not yet installed the Maestro software for developing and downloading programs to the microcontroller, follow the instructions in the Maestro documentation to do so.
- At this point you should connect the USB cable to the PC where you have the Maestro software installed and plug in the power supply for the servo. Launch the Maestro software. Go to the "Script" tab and enter the short program (the four servo commands) shown in the twelfth image below. Click "Apply Setting", then "Run Script". This will put the servos into proper position for attaching the the threads that connect Groovin' Grover's limbs to the servos.
- Bend four small (1") paper clips as shown in the thirteenth photo. The threads controlling Groovin' Grover's limbs will be attached to these paperclips.
- Attach the paper clips to the servo horns as shown in the last image below. The paper clips extend the range of motion provided by the servos. There are photos in step 9 "Hang Grover" that also show how the paper clips attach to the servo horns.
Step 8: Prepare Grover
- Cut approximately 6" of transparent nylon thread and using a needle (photo two), insert the thread through the top of Grover's head as shown in the third and fourth photos. Set Grover aside for the moment.
- Cut a small piece of Velcro (set aside the matching piece of Velcro for use in a step below) to the size of the 1" outer diameter washer as shown the fifth photo.
- Tie the end of the thread from Grover's head to the washer. There should be about 4" to 5" of thread between his head and the washer. See the sixth photo.
- Take the Velcro and stick it to the washer as shown in the seventh and eighth photos.
- Take the matching half of Velcro and attach it to the front upper platform as shown in the ninth and tenth photos.
- Using the Velcro'd washer, hang Grover as shown in the eleventh photo.
- The Grover finger puppet does not weigh enough for the limbs to move properly when pulled by the servos, so we need to add some weight to him. Stuff four 1/4"-20 hex nuts into the opening on Grover's bottom and use a safety pin to hold them in place. The process is shown in the last two photos. If you don't use a finger puppet, then you will need to cut the puppet open, insert the weights, and sew the puppet closed.
Step 9: Hang Grover
- Starting with Grover's left leg, cut about 12" of the nylon thread. Lasso and tie one end of the thread around Grover's left ankle. Make sure the thread securely holds his angle and is not loose. Thread the other end to a needle and push it through the bottom of his foot and up through the top of foot. The second, third, and fourth images show the process.
- Take the end of the thread, wrap it around of the end of paper clip attached to servo 0 and use a small piece of blue painter's tape to hold it in place as shown in the fifth photo. The best way to do this is to take the tape and fold it in half over the thread and paperclip. The thread should not have any slack in it and should be tight. Cut off the excess thread when you are satisfied with the placement. The leg, thread and servo should look like the sixth photo.
- Repeat the process for the right leg as shown in the seventh through tenth photos. This thread should be attached to servo 3.
- Now lasso and tie a thread around Grover's left wrist as shown in the eleventh photo. Using a needle, push the thread through the back of his thumb and out the front as shown in the twelfth and thirteenth photo.
- Attach the end of the thread to servo 1 as shown in the fourteenth photo.
- Repeat the process for attaching the thread to his right hand and to servo 2 as depicted in the fifteenth through seventh photos.
- You are now done hanging Grover. He should look exactly like the last two photos - if not make the appropriate adjustments.
Step 10: Construct and Attach Backdrop
- Cut a 11 3/4" x 18 3/4" piece of white cloth. I used an old pillow case.
- Attach the matching piece of 12" Velcro that you attached to bottom the upper level of the stage in step 4 to the top of the cloth as shown in the first photo. Cut off any excess Velcro.
- Using the Velcro, attach the backdrop to the bottom of the upper level of the stage as shown in the second photo and third photos.
Step 11: Making Groovin' Grover Dance!
Here's how the program works: the first 4 servo commands start the servos moving to put his hands and feet into their initial position. The first parameter of the servo command tells the servo what position to move to and the second parameter tells the microcontroller which servo should perform the action. The "moving_wait" subroutine is then called to wait until all the servos have reached their final position. Next, the "speed" command is used to set the servo to move slowly on the way up and a "servo" command is used to start the raising of the hand. "moving_wait" is called again to delay going to the next command until the hand is fully raised. The speed is set to be faster, the hand is lowered, and the program waits until the hand has finished moving. When "repeat" is reached, the program goes back to the command after "begin" and the hand is waved again and again.
The first segment of this video shows this program in action. I then changed the servo numbers in the program in order to make his other hand and the rest of the feet move as you'll see in the rest of the video.
The next five slides show the program I used to make Grover dance as shown in the videos on the "intro" step of this instructable. In the first slide "Prepare for dancing," the speed command is used to set the speed at which the servos will rotate. Subroutines are called to move all of his limbs into the down position. "moving_wait" is called to pause until all the servos have stopped moving. The "delay" command causes a 1000 millisecond or 1 second delay for the dance routine starts.
The next slide "Main loop that makes him dance" shows the code that moves different limbs up and down with various delays in order to get a rhythm and motion that matches the music. It took some experimentation to get this right for the two songs in the video but that's what makes programming Grover fun!
The last slide "Subroutines for controlling the limbs" shows the how each of the limbs are controlled. I like using these subroutines because it makes writing and reading the program easier. All of this code can be found in the "Dance Grover Dance Program.rtf" file attached below. You can copy and paste this into the Maestro control center as described earlier to run this program.
There are interesting possibilities for extending this project. The microcontroller has additional capabilities for reading inputs from switches and can be used to turn other circuits on and off. One example would be to add a new capability to turn on music when Grover starts dancing and turn it off when he finishes.
Finalist in the
Third Prize in the
National Robotics Week Robot Contest
Participated in the
Halloween Decorations Challenge
Participated in the
3rd Epilog Challenge