LEGO MindstormsProjects

LEGO Mindstorms Music Box

This is a fun project using a LEGO Mindstorms EV3 set along with a few household products: The LEGO Mindstorms Music Box.

(Updated 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).

Check out the video below to see how it works. Now that we have it up and running, every song in the world (that uses 8 notes or less) is within our reach.

Here’s our first test with the music box playing a simple scale.

For Test #2, we tried a simple melody. See if you can recognize it.

For the last test, we tried out a song that also used simple chords.

This was a fun project using a few things we had around the house. A large oatmeal container, push-pins, some metal s-hooks from the garage, and a kids xylophone. And of course our LEGO Mindstorms EV3 set.

Want to try this project? Now there are full build instructions available for download: LEGO Mindstorms Music Box Build Instructions Also, check out the video further down in the post to see how it’s all put together.

Build Instructions

The software for the LEGO Mindstorms Music Box is very simple. All the program needs to do is turn the 2 large motors at a slow speed once the button is pushed. In fact, most of the ‘programming’ for this robot will be placing the pushpins to program new songs.

LEGO Mindstorms Music Box Side View

LEGO Mindstorms Music Box Front View

The oatmeal container with the pushpins contains the song “program”. The pushpins are simply moved around to create different songs. The EV3 software mainly turns the 2 large motors at the set speed. We modified the speed of the motors for each song slightly.

We covered the oatmeal carton with graph paper to help place the pushpins accurately. I think this would have been very sloppy and difficult without the graph paper as a guide. For the xylophone, we took apart a toy xylophone and just used the top portion.  We place some of the large wheels from our Mindstorm set as a base for the xylophone to sit.

We used metal s-hooks I found in the garage on the hammers to get a little better sound as the hammers strike the xylophone. See below for photos showing a closer look or watch the video below to see how it is all put together.

Adding Alexa Voice Control

Once you have the robot built and working, 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

Alexa-Controlled Music Box

We hope you enjoyed this project. Also, please check out our other LEGO Mindstorms Creations – EV3 Dancing Robot, EV3 Basketball Robot, Rubik’s Cube Alarm Clock, Mindstorms Booby Trap.

EV3-Music-Box8 EV3-Music-Box7EV3-Music-Box6EV3-Music-Box5 EV3-Music-Box4 EV3-Music-Box3

LEGO Mindstorms EV3 Booby Trap

Booby Trap Building Instructions

LEGO Mindstorms EV3 Dancing Robot

Lego Mindstorms Dancing Robot

EV3 Basketball Robot

LEGO Mindstorms Basketball Robot

Rubik’s Cube Alarm Clock

SpeedCuber Alarm Clock

For more amazing videos visit and subscribe to our Youtube Channel.

And check out some of the great books below for great Mindstorms lessons and ideas.

 

Want to keep up with the latest projects and resources from Teach Kids Engineering? You can follow us on Facebook and Youtube
 

11 thoughts on “LEGO Mindstorms Music Box

  • Would it be possible to post a parts list?

    • Hi Jodi, Great timing! I was just working on the full build instructions and parts list this past weekend and I hope to post them either tonight or tomorrow. I’ll let you know when they are up.

    • Hi Jodi, I just now updated with the full build instructions. Let me know if you are able to download them.

  • HI
    I want to do this
    Would it be possible to post a source code?
    I want to build a music box

  • Hello!! Awesome project! and very easy to make 🙂
    Does anyone have any music song patterns? I found some on the internet but they are too long for the cylinder..

    • Hi Marilena, I hadn’t thought of making printable patterns, but that’s a great idea! I will see if I can post something, but it will be a while before I could get to it (we took apart the music box to create a new robot with our Mindstorms set). They key is to find a song using less than 8 notes – you can find songs online by searching for “kids xylophone music”. Then depending on the graph paper you are using, figure out how many grid-lines you want to use for a quarter note, double that for a half-note, etc. Change the motor speed to slow down or speed up the song. I hope that helps!

  • Hi,

    My district is in the process of approving me to the get the Robots for this project. They are asking if they can use the IPAD app for programming the robots to turn the gears as I do not have PCs in my room. Please let me know ASAP!

    Thank you!

    • I do not have an IPad so I haven’t been able to verify it myself, but the LEGO website indicates that it can be programmed using Ipads or Android devices using their app. It might be good to double-confirm with LEGO.

      I hope your class enjoys this project!
      Matt

  • Hello,

    What is the size of the S-Hooks? Thank you for this idea.

    • That’s a good question. I used S-Hooks because we were just looking for something metal that was relatively easy to attach. We had some of these in the garage and they worked pretty well. I’m pretty sure I bought them at Lowe’s originally https://www.lowes.com/pd/Hillman-S-Hook/3823307, but the web site doesn’t list the size unfortunately.
      Another thing we tried was attaching metal nuts with small rubber bands. Just having something metal attached helps increase the volume.

      I hope you enjoy the project! It would be great to see a video of it when it’s finished.

Comments are closed.