Ping Sensor Musical Instrument
We first chose to do a ping sensor piano because both of us are really into music and it seemed like it would be a cool project that would be feasible since neither of us had experience with Arduino before. We also were interested in the idea of the ping sensor, and thought it would be cool to experiment with sound for our final project.
For our first deadline, we created a push button piano consisting of five push buttons, each corresponding to a different note with different frequencies. In order to advance the project further, we wanted to replace the push buttons with ping sensors such that each ping sensor would correspond to a different note. Throughout the process, we realized that we would not be able to use multiple ping sensors since ping sensors only read in depending on the hierarchy of the code. Instead, we chose to use only one ping sensor which would detect the presence of a barrier at different distances. The ping sensor detects the temporal delay in the output and input when an object disrupts the signal. We converted this measurement of time to distance in inches. In our code, we established five different intervals of distance from the sensor that each corresponded to a different frequency which would represent a different note. We also added in a push button, such the distance reading of the ping sensor would only be sent over bluetooth from “master” to “slave” while the button is pushed. The signal is sent over bluetooth from the master to the slave, and when the signal is received the sound frequency corresponding to the distance input was played. While we initially played sound through a buzzer, our final implementation incorporated speakers. However, we were ultimately unable to get the speakers to produce clean notes.
This project could potentially be turned into a real mini instrument and sold since it’s kind of a mix between an air harp, piano and trombone. If we could make any improvements of additional changes, the first thing we would really want to do is to connect our instrument to a better sound system because the sound that was playing out of the speaker was really unpleasant. Additionally, the ping sensor was pretty finicky and it was hard to detect the actual distance of the barrier (we had to use an iphone instead of our finger) so possibly with more MEAM experience, we would have loved to build a little box that went around the ping sensor that created discrete intervals so that the notes would play more smoothly. Additionally, we had some trouble debugging the button because our original vision was for the sound to start playing only when the button was pushed once, so that we would not have to constantly hold it down. Another improvement we would have loved to make is to have more notes and possibly figure out how to incorporate more ping sensors so we could do a whole range of frequencies.
Log in or sign up for Devpost to join the conversation.