DIY barrel piano powered by Arduino

Musicians, makers and Arduino enthusiasts may be interested in a new project created by Max Danilin, showing a DIY automatic barrel piano, powered by an Arduino micro-controller and capable of outputing MIDI signals. A sheet is pulled under an array of 40 optocouplers using a hand crank and converted to sound using a MKR Zero board.

“Old musical instruments use rather complex mechanisms with shafts projections and valves. I can use Arduino and electronic sensors to get the presence signals of a particular sound; for example, optocoupler sensors also called line sensors. Optocouplers are used in the Arduino world for line racing. These sensors allow you to determine the white or black color of the surface below it.

Here is the idea (pic. 1). Let the line sensor represent one piano key. Place several white and black areas on a sheet of paper. Then, move this sheet relative to the stationary line sensor. If there is a white area of the sheet below the sensor, then the key is released. If a sensor detects a black area, then the key is pressed. At the moment when the key goes from the released state to the pressed state, a note begins to sound.

With multiple optocouplers at the same time, you can create a kind of a piano keyboard where each optocoupler corresponds to its note. By positioning black and white areas on the sheet in a certain way and moving the sheet at the desired speed, you can get the note sequence of a musical piece.”

For more information on the project jump over to the Instructables project page by following the link below.

source: DIY barrel piano powered by Arduino


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top