Piano Playing Robot

DOI : 10.17577/IJERTV3IS052150

Download Full-Text PDF Cite this Publication

Text Only Version

Piano Playing Robot

Abhishek Attal1 , Diptiman Purbey2 , Aman Khatri 3 , Kushang4 , Abhishek Kumar5

IIRobotics Club IIT Kanpur

Abstract–Piano is one of the most familiar musical instruments, which uses the basic principles of sound, string, damping and vibration to produce sounds. When a key of a piano is hit, series of mechanism converts mechanical energy to sound energy. The beauty of this instrument is that is produces a particular sound when a specific key is pressed for a specific amount of time. The aim of this project is to build a robot which can play piano. It uses a rack and pinion mechanism for linear traversing for accessing all the keys. Keys are pressed using four soft ended small double acting pneumatic piston mounted on each hand. Five port two way solenoid valves are used to actuate the pneumatic piston. The robot is controlled by a microcontroller which is the brain of the system, provides commands to different actuators to strike the key.

Keywords: Robot, Piano, Pneumatics, Rack and Pinion, Solenoid valve, Relay, Microcontroller, Pneumatic cylinder, Motor driver, linear bearings, roller bearings, etc.

  1. INTRODUCTION

    We have tried to mimic the piano playing ability of humans by constructing a mechanical structure having similar functionality as fingers. This robot requires a lot of perfection as slight wrong movement in hands can result in wrong key being struck by the soft ended pneumatic cylinders. Our aim is to develop a robot which will take a file as input inside computer, which will have information about the keys which are supposed to be pressed in a given order and time. This file is a custom build for each chord or melody or sound track after looking at its notes.

    The process of pressing a particular key can be divided into three major parts. First is identifying the position of the key that is to be pressed. Second is to optimize the distance of all the fingers from that key and then reaching to that key. Third is to press the key using pneumatic piston.

    The file which is given as an input to the computer has three things viz. a set of musical code for the position of the key, whether black or white key and the amount of time it is supposed to be pressed. This string of data is fed into the microcontroller which decides which hand and which of its finger is supposed to press the required key. Microcontroller then drives the encoder motor attached to a hand and then a solenoid valve to actuate the pneumatic cylinder.

    This paper is organized as follows:

    Section 2: Mechanical Design. Section 3:

    Electronics. Section 4:

    Programming. Section 5: Conclusion. Section 6: Acknowledgement.

    Section 7: Future Scope. Section 8: References.

    Figure 1: Piano Playing Robot Photograph

  2. MECHANICAL DESIGN

    As in any other robot, mechanical design of the piano playing robot was very important. Whenever we think of someone playing piano, we have the vision of two hands playing black and white keys smoothly. So our basic motto was to make the bot system just like human hands. There are some basic steps which everyone does while playing piano. Displacing the hand to the exact location and pressing the keys. The mechanical system of our bot also involves these two processes.

    • Linear motion of hands.

    • Pressing the keys with fingers.

    Even the slight error in the movement of hand will produce different sound. Robot basic structure is of cuboidal shape whose length is around 20cm greater than the length of the standard piano. Width of the robot is such that it does not topple with the weight of fingers hanging outside the base of the robot. Height is slightly greater than the height of piano so that it can keep its fingers on top of keys of piano. Simple rack and pinion mechanism with involute profile is used to move the hand.. DC motors with an encoder are used to move the pinions on the rack. Four small soft ended double acting pneumatic cylinders are mounted on each hand just like our fingers pointing downward on top of piano keys. Distance between the central planes of the two pneumatic cylinders is same as distance between the centers of two white piano keys.

    Before going to market and buying and fabricating all the required components, we made the design of the robot on Student version of Autodesk Inventor 2013 Software, which helped a lot in deciding the crucial design factors. We also did the static and dynamic simulation of whole design. All the essential parts were fabricated using Water Jet machine available to students at 4i Lab at IIT Kanpur.

      1. Linear Hand Motion

        One basic rack i.e. the profile of the conjugate gear of infinite pitch radius is laid on the base of the robot frame. Frame of the robot is made of L section of Aluminum. This rack is tightly fixed with the frame so that it cannot move by the forces generated by the movement of pinions. Two pinions are laid on top of it to mount both the hands using some roller bearings. In this system one hand can never cross the other hand since it is being restricted by two pinions. A flange coupling is mounted on both the pinions from both the sides so as to couple it with the shaft of the motor. Each pinion is rotated by using a DC motor with

        encoder to accurately measure the angle swept by the motor. Motor mount is mounted below the hand system. Since the pinion itself is rotating and rack is fixed, hence pinion will also traverse linearly on the rack. If motor is only allowed to move in the direction of rack while resisting it rotary motion, the motor will copy the motion of pinion. The system of hand carrying four fingers each is mounted on motor which in turn will try to rotate. So we have used two rigid linear guide rods which are fixed to the frame at a distance. We have used some linear bearings to mount on those two stainless steel guide rods which will restrict rotational motion of both the hands. This design of the robot helps the robot to use both the hands simultaneously on the same rack.

        Figure 2: Linear Hand Motion

      2. Finger Pneumatic Cylinder

        This is the second most important part of the robot. Four soft ended small double acting pneumatic cylinders were used on each hand which was representing four human fingers.

        Pneumatic cylinders are mechanical devices which use power of compressed gas to produce a force in reciprocating linear motion. Pneumatic cylinder usually has two open ends at the end of a cylinder which are sealed from both the ends. There is a piston, i.e. a disc or a cylinder inside the cylinder which transfers the force it develops to the object moved.

        When compressed air is send inside the cylinder through anyone of the end, it forces the piston to move towards the other end which in turn forces the gas in other compartment to leave the cylinder from other end. This way reciprocating motion can be achieved. This type of cylinder is called as Double acting pneumatic cylinders.

        The other kind of pneumatic cylinders are Single acting or spring return cylinders. These cylinders have spring inside the cylinder, towards one of the end. Motion from this side of the cylinder is carried by the stored potential energy which was stored while movement from other side caused by compressed gas. But this spring movement will be caused only when the gas from the other side is removed.We did not used this type of cylinder because to maintain a particular position in this cylinder we were required to constantly supply the power to solenoid, because once removed it will retract back because of spring. But n case of double acting cylinder we can remove the power after we have got our desired position, and this position will not be changed unless until second solenoid of solenoid valve is not triggered.

        Since the use of pneumatics involve rapid release of pressurized gases, which creates a lot of hissing sound. This sound can really disturb the sound coming out of piano. We used Pneumatic silencer at the end of all the exhaust points of solenoid valve, which significantly decrease the amount of disturbing sound.

        Figure 3: Basics of Pneumatic System

      3. Gas Tank

        The compressed gas that is used to create forces is stored in a gas tank. Working with high pressure pneumatics can be dangerous, so care must be taken in selecting the components of correct pressure rating. We used CO2 gas. The best thing with CO2 gas is that it liquefies at around 850 psi at normal temperatures, which allows it to take less space and a smaller storage cylinder. When we release some CO2 gas out of the tank, pressure inside the tank decreases

        and makes the tank cold. Since the pressure in the tank has decreased the liquid CO2 starts to boil off, which again increases the pressure. Liquid CO2 keeps on boiling until there is sufficient pressure developed, which will not allow more liquid to evaporate. So as long as there is a single drop of liquid CO2 inside the tank the pressure will be same. Use of pressure regulator helps in reducing the pressure coming out of the storage cylinder. We reduced the pressure of CO2 to around 110psi which was best for our solenoid valve and pneumatic cylinders.

  3. ELECTRONICS

    Electronic parts of this robot are microcontroller, motor driver, relay, solenoid valve, encoder installed on DC motor. Microcontroller is the brain of the robot. We have used Arduino Mega which is a microcontroller board based on the ATmega1280. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports). Microcontroller commands the motor driver based on the code present inside chip, which in turn helps to run encoder motor or relay.

    The motor drivers are connected to the pins of the microcontroller. We have used L298 motor driver which just acts as a switch who helps to pass high current to encoder motor. We have used High Torque encoder DC servo motor which has absolute position and speed control with high resolution optical encoder. It has a 0.2deg resolution optical encoder. This motor has six wires, two of which are power and ground terminals and rest are I2C clock, I2C data, RX, and TX.

        • Feedback from encoder (closed loop control).

        • Rx and Tx pin of the Arduino are connected to the Tx and Rx pin of the Encoder motor respectively.

    3.1 Solenoid Valve

    Solenoid valve is basically an electrically operated valve. The electric current triggers the solenoid which in turn attracts or repels the metal plunger which is kept inside solenoid valve. In two port valve, flow can only be switched on or off. Solenoids offer fast and safe switching of on and off. Solenoid valve which we used was 24V DC, 5 port 2 way solenoid valve. This solenoid valve was triggered with the help of a DPDT(Double pole double throw) relay which was in turn triggered by 12V power supply supplied by a L298 motor driver, which was finally being controlled by a microcontroller.

    Encoder Motor: 1

    Encoder Motor: 2

    Motion of both hands on Rack.

    Arduino

    Mega

    5V output

    Motor Driver

    Motor Driver

    298, 12 V output

    Motor Driver

    Motor

    Driver L

    Relay Relay Relay Relay Relay Relay Relay Relay

    24V output

    Solenoid Valve

    Solenoid Valve

    Solenoid Valve

    Solenoid Valve

    Solenoid Valve

    Solenoid Valve

    Solenoid Valve

    Solenoid Valve

    Gas output

    Pneumatic Cylinder

    Pneumatic Cylinder

    Pneumatic Cylinder

    Pneumatic Cylinder

    Pneumatic Cylinder

    Pneumatic Cylinder

    Pneumatic Cylinder

    Pneumatic Cylinder

    Force on piano key

    Right Hand Left Hand

    Figure5: Flowchart of working of piano playing Robot

  4. PROGRAMMING

    Programming is usually the final step in the process of building a robot, also without programming a robot is a very nice looking expensive paperweight. Programming includes programming the microcontroller to control the motor drivers, relays and motors sequentially.

      1. Arduino Programming

        Arduino is open source electronics prototyping platform based on flexible, easy to use hardware and software.

        Some of the important constraints which are taken care by the program are:

        • Collision of both the hands at any point of time while traversing on rack to play any sound.

        • Over-running of pinions overs the sides of rack.

        • Simultaneously hitting the two adjacent keys.

    The data obtained through the string file of a particular music is send to Arduino mega using serial communication between computer and Arduino Mega.

    Read the string file

    Decode key, color and time of key to be pressed

    Shortest distance of finger

    Move the hand Press the finger Go to Step 1

    Figure 4: Flowchart of basic algorithm

  5. CONCLUSION

    Developing systems with an understanding of music and other performing arts is becoming more important as humans and robots interact more frequently. Musical instruments are designed to be played by humans, and the process of developing humanoid performers offers the potential of revealing new insights into the control of instruments in a musical expressive manner.For this vision a piano playing bot was being developed by us.

    Here, in this paper we have discussed about a method to make a piano playing robot. We were successful in playing some of the famous chords and melodies i.e. Happy birthday to you, Papa kehte hen, badanaamkarega, etc.

  6. FUTURE SCOPE

    There are certainly many directions for the future of piano playing robot and similar kind of other musical robots. As the cost of the essential parts will decrease we can see them

    for the entertainment of public in theme parks. Some courses have already been introduced in some universities where students build musical robots to learn interdisciplinary art form.

  7. ACKNOWLEDGEMENT

    The satisfaction that accompanies the successful completion of this project would be put incomplete without the mention of the club and people who made it possible, whose constant guide and encouragement crown all the efforts with success.

    We would like to thanks our parents for providing us the valuable education and support.

    We avail this opportunity to express our deep sense of gratitude and heartiest thanks to Robotics Club, Science and Technology Council of IIT Kanpur, for providing relevant atmosphere and financial support.

    To complete this project we got valuable suggestions and guidance from Mr. Abhijit Verma, Mr. Ayush Varshney and Mr. Farid Ahsan, Coordinators of Robotics Club, during the entire project.

    Finally, we would like to thank staff members of 4i Laboratory of IIT Kanpur for providing us all the fabrication facility for our project.

  8. REFERENCES

  1. Team da Vinci

  2. Arduino

  3. Tutorials of Robotics Club

  4. Wikipedia

  5. Thomas E. Kissell Industrial Electronics, 2006

  6. A History of Robotic Musical Instruments

    Ajay Kapur; University of Victoria; Music Intelligence and Sound Technology; Interdisciplinary Centre (MISTIC)

  7. Development of Piano playing robot with motion sound mapping.

Leave a Reply