Lego Mindstorms Dancing Robot
(Update 3/15/2020: New video and instructions for adding Alexa voice control to the robot. This allows the robot to adjust speed to songs played on Alexa devices.)
This week our family project with the kids was to build and program a Lego Mindstorms Dancing Robot. I thought this would be a great exercise in computer programming for the kids because a computer program is just a sequence of instructions, and a dance routine is a series of movements. Programming a robot to make specific movements in a set order seemed like a great way for them to get an immediate visual reward for their efforts.
First, watch the video below to see the robot in action and then read beyond if you want to see more details on how it was all done.
Interested in seeing how this was all put together and trying this project at home? I’ll describe the different phases of the project in more detail below. For our other Lego Mindstorms EV3 projects, check out our LEGO Mindstorms Music Box, LEGO Mindstorms Booby Trap, LEGO Mindstorms Basketball Robot or our Speedcuber Alarm Clock.
The Robot Construction
Dancing Robot Build Instructions
The inspiration from the robot design came from one of our favorite EV3 robots on Youtube, Ice’s Giant. I wrote about this robot in an earlier post about our favorite Lego Mindstorms EV3 Robots. I like the basic concept for this robot – it uses the two large motors for the legs and the small motor to control the arms. The legs are very stable so that the robot walks well without falling over. The first challenge that prevented us from using this robot is that there are no good building instructions available.
There is a set of close up photos available that is somewhat helpful and there is an auto-generated instruction set from Lego Digital Designer, but these are not very useful. The second and bigger challenge is that Ice’s Giant was design using the Lego Mindstorm Ev3 Education Set. This uses many components that are not available in our LEGO Mindstorms EV3 Home Edition. (Update: Now the latest LEGO Robotics Robot Inventor set is the newest set available).
We needed to make many modifications to the robot design to build with the pieces available with our set. This was actually much more fun than blindly following the high quality building instructions provided by Lego. We built from the Ice’s Giant photos, modifying as needed. Stability was a big priority for this robot because we did not want the robot to fall over or for an arm or leg to detach while doing repetitive dance movements.
For the legs we followed the same construction as much as possible, while enlarging the feet to improve stability. For the upper body, we followed the same concept of using the small motor to move the arms with sensors for hands, but we really had to do a very different design because we had different pieces to work with.
Detailed Build Instructions are now available. Click the link below to download the build instructions.
Dancing Robot Build Instructions
Programming the Robot to Dance
The Lego Mindstorms EV3 software uses a block programming structure where blocks are dragged with the mouse and snap together. This is similar to the concept used in the popular Scratch programming platform (read more about Scratch here). Each block we used controls the movement of a motor (one of the legs or the arms), sets a wait time or simple loop, or controls one of the display options of the main brick (facial expression or light).
This was also a perfect project to teach the kids about sub-routines within a program because dance movements are very repetitious. We created two custom blocks – Shake_Those_Arms and Take_Steps. For the Take_Steps block, we were able to learn about passing variables into a sub-routine.
Click here to download the full Dancing Robot program.
Creating the Video
Once we had fine-tuned the program to move the robot to the song we selected, we were ready to capture it all on video. We chose to add the music afterwards in the video editor for two reasons – recording quality and the ability to accurately sync the music and the movements. The robot was already moving very accurately to the music, but it is difficult to start and stop the music at the exact desired time.
Adding Alexa Voice Control
Once you have the robot built and dancing, another fun project is to add Alexa voice control. In September 2019, hackster.io launched the LEGO Mindstorms Voice challenge with very helpful instructions on adding voice control commands to Mindstorms robots. The contest provided very helpful instructions to add voice control capability. This is a much more advanced project since it involves several technical steps, but it is a great challenge for those who are very comfortable with programming on different platforms. You can see our projects on Hackster.io at the links below.
Alexa-Controlled Dancing Robot
Please also check out our LEGO Mindstorms Basketball Robot with a fun video and building instructions. Our latest EV3 project is a Speedcuber Alarm Clock that requires a Rubik’s cube to be solved and scanned by the robot before the alarm will turn off. We’ve also more recently added a Mindstorms Music Box and a Mindstorms Booby trap based on the opening scene of Indiana Jones and the Raiders of the Lost Ark.
Subscribe to our Youtube Channel to keep up with our latest videos.
LEGO Mindstorms Booby Trap
LEGO Mindstorms Music Box
LEGO Mindstorms Basketball Robot
Rubik’s Cube Alarm Clock
Want to keep up with the latest projects and resources from Teach Kids Engineering? You can follow us on Facebook and Youtube
I love this! Wish I had your blog when I was homeschooling! (But I did manage to raise 2 engineers). This made me smile.
Good for you Kathleen! It sounds like you have already accomplished what we are setting out to do with our kids – teach them a love for engineering. What made your kids want to become engineers?
salve ,
vorrei altre foto di questo robot della costruzione per favore perché la parte di sopra di non si capisce bene come è fatta …
Grazie mille
Hi Mostafa,
The building instructions are available to download for free. The link to download the instructions is in the post just above the pictures.
Best regards,
Matt
Mostafa può trovare le istruzioni di costruzione nel post sopra le immagini.
We are trying to download the building directions to the dancing robot. We subscribed to the website and it still would not let me. Can you please send it to me through my email. I teach robotics at Newberry Christian Community School.
Hi Wendi, Sorry you had trouble with the download. I’m so glad you found our project – I sent you the instructions by email along with a couple of our other Mindstorms projects. I hope you find these helpful for your robotics class!
I keep hearing so much praise on the mindstroms, I think I will buy it this christmas. Id love to watch the dancing sequence you made with your kids but the video didnt work for me for some reason :/ I have found that there are multiple mindstroms kits. Which one would you recommend?
I’m sorry the video link isn’t working for you. You can see it directly on youtube here: https://www.youtube.com/watch?v=NPIq5qldbio
We currently use the Mindstorms EV3 home edition: http://buy.geni.us/Proxy.ashx?TSID=16523&GR_URL=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2FB00CWER3XY%2Fref%3Das_li_tl%3Fie%3DUTF8%26camp%3D1789%26creative%3D390957%26creativeASIN%3DB00CWER3XY%26linkCode%3Das2%26tag%3Dteachkidsengineering-20%26linkId%3DQ7CLXNBNJSPMNSPE
The Education set is very popular – it comes with more components, but it is a little more expensive: http://buy.geni.us/Proxy.ashx?TSID=16523&GR_URL=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2FB00DEA55Z8%2Fref%3Das_li_tl%3Fie%3DUTF8%26camp%3D1789%26creative%3D390957%26creativeASIN%3DB00DEA55Z8%26linkCode%3Das2%26tag%3Dteachkidsengineering-20%26linkId%3DNHWL7VFUHUSPM7IJ
awesome project for kids, what is the music called and can you send more robot instructions.
Hi John, The name of the song is “Beat Your Competition” Here is the link to it: https://www.youtube.com/watch?v=PVuvBkfPydQ
I hope to have a new project to share in a few weeks. Another robot using music.