[{"jcr:title":"Mechatronic Engineering students create robot that plays the piano","cq:tags_0":"area-de-conhecimento:engenharia"},{"richText":"PianoBot, made up of software and a mechanical hand, is capable of reproducing everything from rock to classical music","authorDate":"25/01/2024 15h00","author":"Tiago Cordeiro","madeBy":"Por","tag":"area-de-conhecimento:engenharia","title":"Mechatronic Engineering students create robot that plays the piano","variant":"imagecolor"},{"jcr:title":"transparente - turquesa - vermelho"},{"themeName":"transparente - turquesa - vermelho"},{"containerType":"containerTwo"},{"jcr:title":"Grid Container Section","layout":"responsiveGrid"},{"text":"The user creates the music in a computer application using a virtual keyboard. The user defines the notes, scale and tempo of the song. This information is translated into a simple and easy protocol for the robot, which then moves the fingers and artificial arms according to the song defined by the user.   This is how the PianoBot works (watch the  [video](https://www.youtube.com/watch?v=AU6dKH4lxr4) ), a robot composed of software and a mechanical hand that plays the keyboard. The robot was developed by four students from the seventh semester of  [Mechatronic Engineering](https://www.insper.edu.br/graduacao/engenharia/engenharia-mecatronica/)  at Insper:  [Andressa Silva De Oliveira](https://www.linkedin.com/in/andressa-silva-oliveira) ,  [Gabriella Kowarick Zullo](https://www.linkedin.com/in/gabriella-zullo/) ,  [Guilherme Ricchetti Carvalho](https://www.linkedin.com/in/guilherme-ricchetti-carvalho-9b77781b5/)  and  [Lucas Gabriel Mocellin Teixeira](https://www.linkedin.com/in/lucas-mocellin-teixeira/) .   The project was created during Industrial Robotics classes, taught by professor  [Lie Pablo Grala Pinto](https://www.linkedin.com/in/liepgp/?locale=pt_BR) . “The course is divided between theoretical workload, which takes up two thirds of the time, and practical activities”, explains the teacher. “It is a course that meets the legal requirements of the Ministry of Education, but also has a completely open topic project.”   Students in the class are challenged to present a working prototype, usually industrial robots capable of assembling parts. But the four students took a different path.   Division of tasks   The four went on exchange programs in the first half of 2023 — Andressa was in Australia, Gabriella in Germany, Guilherme in France and Lucas in Italy. When they returned to classes, they decided to come together around a project inspired, in part, by Lucas’ fascination with music. It was on his keyboard, by the way, that the PianoBot was tested. He also suggested the song selection.   The team divided tasks. Guilherme and Lucas carried out the programming in Python, and Lucas also contributed to the beginning of the electronic part. The code, which involves programming the user interface and the microcontroller, reached more than 250 lines. The next step was to develop a user-friendly interface.   Andressa took care of the electronics development. The solution used were solenoids, formed by conductive wires distributed in the shape of cylinders and capable of creating a magnetic field. Another central component for the robot to function properly is Arduino, a platform that enables the development of electronic projects. Finally, the main function is to use an Arduino to control the flow of energy to the solenoids, which represent the “fingers” of the robot.   “Every Monday, we held a brainstorming meeting, where we assessed progress and discussed results. It was important that the mechanical part advanced ahead of the electronics”, says Andressa. The mechanical work was carried out by Gabriella.   “We started the project in advance, but we encountered several challenges throughout the development and finished close to the deadline”, recalls Gabriella. “I developed two versions of the claw, one simpler and another one more sophisticated. That’s what we ended up using. I printed and laser cut the pieces that make up the claw at Insper’s laboratories.  The assembly was smooth.”   A claw with 12 fingers   The result, in non-layman’s terms, is presented by Lucas as follows: the user creates the music using a virtual keyboard programmed in Python. Then, user’s inputs are converted into a simple and compact string, which will be processed and sent to an Arduino, which controls the actuation of the fingers, and a UR5, which controls the movement of the robotic arm.   The robotic hand has 12 fingers — seven to play the white keys, five for the black ones. At first, it was instructed to play only on one of the five scales on the keyboard. Then, he continued to cover the entire length of the instrument.   “They conducted the research alone, the merit is all theirs”, reports the professor. “The students were creative in choosing the topic and organized in the division of tasks. They needed to delve deeper into the theoretical part and solve technical challenges. The result was very satisfactory.”   Now, the robotic hand will be located in the industrial automation laboratory, nicknamed by the students as “pre-salt”, because it is located underground. “Our colleagues had fun watching us develop the project and lined up to play a song using PianoBot”, says Gabriella. “The project aroused curiosity. And it ended up being fun to develop”, concludes Andressa."}]