Arduino Kids Piano Toy

by Miregac in Circuits > Arduino

1902 Views, 17 Favorites, 0 Comments

Arduino Kids Piano Toy

Captura de pantalla 2021-12-02 a las 20.47.33.png

Arduino Kids piano toy is an interactive game for children that simulates a piano. It is build up by eight keys, each one corresponding to a musical note. When the keys are pressed manually, the note corresponding with the key plays, and different color LEDS turn on. The piano also has a screen in which the name of the note in text appears when it is being played. This kids piano has been designed and created as part of UATEA final project.

In the following instructable you will find the materials needed, the code necessary for the operation of the Arduino and the steps to follow for the construction of the piano from scratch with a brief explanation. This piano is build up by eight buttons, eight LEDS with their respective resistors, a LCD screen and a speaker.

The objective of this project is to apply our Arduino knowledge acquired along the course to a functional product. The product we've chosen is a piano for kids to learn about music and the different musical notes. Each key corresponds t a LED color so that kids can relate the note to the color, and be easier for them to read the musical sheet and remember the notes.

Connect LEDs

MicrosoftTeams-image copia.png

The first step for the assembly of the circuit is to connect the LEDs.

  1. Connect the longer end of the LED to the ground and the shorter to the resistor.
  2. Connect all LEDS to the same number pin. (13 in this case)

Connect Buttons

MicrosoftTeams-image.png

The second step for the assembly of the circuit is to connect the buttons.

  1. Connect one end of the button to the ground. Connect wire on the same line to have only one wire connected to the ground.
  2. Connect the other end of the button to a number pin.

In this case, each button will have a different pin for its correct operation.

Connect Speaker

MicrosoftTeams-image copia 2.png

For the connection of the speaker:

  1. Connect one end (red wire) to 5V pin.
  2. Connect other end (black wire) to pin 11.

Connect LCD Screen

a69891cb-e047-4d73-bffa-048a5185d52c.jpg

The final step of the electronic components is to connect the LCD Screen.

  1. Connect one end wire to the ground and the other end to the board.
  2. Four wires are connected to the pins two to five. Other two wires are connected to the pins 11 and 12.
  3. The blue wire is attached to the potentiometer, witch is connected to the ground and the pin 5V.
  4. Three of the black wires are connected to ground and one of the red wires is connected to pin 5V.
  5. A short red wire is connected to a resistor which is attached to the 5V pin.

Arduino Wiring Diagram

a5658240-6576-45f5-94f7-175bd717cc29.jpg

Here is a diagram of how should the circuit look like once all the parts are assembled together.

Arduino Code

Captura de pantalla 2021-12-02 a las 20.50.22.png
Captura de pantalla 2021-12-02 a las 20.50.51.png

Flow Diagram

4e349dbd-8648-4946-91e2-1bfe70cc74d0.jpg

The flow diagram shows in a graphic way how our Arduino code works. The Arduino reads the button state, is this one is not pressed it goes back to the "Read State button", if it's pressed all LEDs turn on and the note corresponding to the button sound from the speaker. At the same time, the LCD reads the button and the name of the corresponding note appears in text on the screen. After 200ms the Arduino stops and goes back to the state "read button".

Laser Cut Piano Parts

Drawing1-Model_page-0001.jpg
hb_page-0001.jpg

The first step for the construction of the piano is tu cut the different part with the help of a laser cut machine. You can obtain the AutoCAD for the piano parts below.

Weld Electronic Components

Captura de pantalla 2021-12-02 a las 20.33.01.png
Captura de pantalla 2021-12-02 a las 20.33.23.png
Captura de pantalla 2021-12-02 a las 20.32.49.png

Before assembling the piano is important to weld all the electronic components together. Be careful when welding, as if something is wrongly welded, it can cause problems with the operation between components later on. The tool used for welding is an electronic welder with tin wire.

  1. Weld LEDs ground to a mounting plate so that there is only one wire going to the ground pin.
  2. Weld buttons ground to a mounting plate so that there is only one wire going to the ground pin.
  3. Weld LCD screen to ground with a mounting plate.

Paint Piano

Captura de pantalla 2021-12-02 a las 20.21.32.png

Paint the piano parts with the color you wish. Paint the pingpong balls (previously cut in half), each one in a different color.

Assemble Piano

Captura de pantalla 2021-12-02 a las 20.40.11.png
Captura de pantalla 2021-12-02 a las 20.26.26.png
Captura de pantalla 2021-12-02 a las 20.41.44.png
Captura de pantalla 2021-12-02 a las 20.44.26.png
Captura de pantalla 2021-12-02 a las 20.46.48.png

To assemble the parts:

  1. Glue together with a silicone gun, the walls of the piano with the base.
  2. Glue the pingpong balls to the upper part (keys)
  3. Insert the electronic components assemble inside the piano and place LEDs with cello tape behind.
  4. Place buttons in the square holes, drawn with the laser cut, in the second cover part located behind the piano keys.
  5. Place speaker behind it round circle with small holes.
  6. Place LCD screen in its corresponding hole.
  7. Stick supports to keys cover so that the keys can be removed easily in the case that comething from the circuit has to be modified.

Connect Arduino to Battery or Computer

The final step is to upload to code to the Arduino and connect the Arduino to a power source (9V battery or computer). To connect it to the computer you will need a USB cable compatible with Arduino. To connect it to a battery you will need a DC Cable PPBAT Battery Clip and a 9V battery.

Your Piano Is Ready to Be Played!

Captura de pantalla 2021-12-02 a las 20.47.33.png
Captura de pantalla 2021-12-02 a las 20.48.20.png
Captura de pantalla 2021-12-02 a las 20.27.01.png
Captura de pantalla 2021-12-02 a las 21.04.47.png

You can now enjoy your Kids piano toy! For it's use we recommend to use musical sheets with colored notes so it's easier for kids to learn to read musical sheets and relate the colors to the notes. With this project we've been able to put into practice the learning acquired along the course, both in classes, and from the feedback obtained from the first project. We've done this by designing an interactive learning game for kids in which we've applied the knowledge learned from class, but we've also applied some electronic components that were new for us. This has helped us to learn to investigate and think of ways in which we can make a component work and what code we will need for it to function in the right way. We've been able to carry out this project successfully by combining our Arduino skills, our imagination and creativity, and the theory and practice acquired during the course. These skills that we've acquired will be of great use for upcoming projects, Arduino is easy to use and useful for advanced projects, it is also a great way to start programming. Although this project reflects a big amount of theory and practice acquired, there is also a lot of room for improvement and eagerness to learn new things and learn about more electrical parts and how to use them. For this project we had to weld all the components and it made it harder to make things work, as they get easily mixed up. Also, we wanted to integrate an Mp3 player to obtain a more quality sound, but we encountered some problems with the ones we bought, but we look forward to learning on how to use it for an upcoming project. This project has been a great way to get to know how to apply Arduino into products, which will be of great use for us as industrial design engineers.