Musical Table using Arduino

  The Musical Table is a toy table that allows kids to play musical phrases by moving toys around the surface. Each of seven switches can play different musical phrases in four bases, making 27 different musical phrases in total.  Some of the phrases are musically related and some of them are not. This toy table can help kids to develop musicality by playing phrases in logical order. The table also allows you to play two phrases at the same time. Depending on which phrases are played together, the sounds can be melodic or chaotic.

Step 1: Product Details


– Aluminum foil tape

– Solid hookup wire

– Ribbon wire

– 2 Arduinos

-12 10 K resistors

– 2 speakers

– 4 sheets of foam board (20 “x 30”)

– 7 toy robots (or any other your favorite toy figure)

– 2  8-ohms speakers

– screws/ nuts (to secure the table on a stand. But optional.)




– Wire stripper

– Utility knife

– Soldering iron/solder

– Solderless breadboard

– Ruler

Arduino Musical Table

Step 2: Wiring the Table

Make four sets of three 1k pull down resistors that connects Arduino pins (pin 2 – pin 13) to ground. Use different colors of wires for each set to distinguish the groups easily.

  1. Base1connection:  Connects to digital pin 13, 12, and 11 to a breadboard. Add another wire next to pin 13 on the breadboard, and connect it to the power.
  2. Add pull down resistor (a resistor that connects to ground) between each pin and ground.
  3. Base2 connection: Leave some space on the board and connect digital pin 10, 9, and 8 to the circuit board and power in the same way as step 1 and step 2.
  4. Base3 connection: Take the second Arduino board and connect digital pin 7, 6, and 5 to the same breadboard.
  5. Add pull down resistor between  pins (digital pin 7, 6, and 5) and ground.
  6. Add another wire next to pin 7 that connects to power.
  7. Base 4 connection: Leave some space below base 3 connection on the board and connect digital pin 4, 3, and 2 to the circuit board and power in the same way as step 4, 5 and 6, except this time the power is connected to a wire next to pin 4.

Step 3: Creating a melody (Arduino)

Arduino Musical Table circuit

An Arduino board makes only one tone at a time (I’m sure there’s away you can get around that, leave a comment if you know how). To have more than one notes played simultaneously, I am using two Arduino boards.
Making a melody entails three variables: pitch, duration, and number of notes. The code is based on Arduino/Tutorial/Melody created by Tom Igoe. You can find the code here. A melody is called when if statement condition is met. The if statement searches for the combinations of three digital pins.


In pseudo code

If (Pin 13 == HIGH && PIN 12==LOW && Pin 11== HIGH) {playtone 3; }

In order to make 14 arrays of notes and durations, I created a class of combinations of notes and duration arrays.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]

– Aluminum foil tape

– Solid hookup wire

– Ribbon wire

– 2 Arduinos

-12 10 K resistors

– 2 speakers[/box]


For more detail: Musical Table using Arduino

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
Scroll to Top