We are guitar players and we both know that while tuning does not require a great amount of time or skill, it would be more advantageous to have a machine tune it perfectly in half the time. We decided hackBCA III was the perfect place to do this, as we estimated that this project would take approximately 18 hours to make, and it was a hardware hack with integrated software.
What it does
A sound sensor positioned just under the guitar strings captures the frequency at which the guitar is being played at and sends it to an Arduino. The Arduino takes that value and compares it to the frequency of the string at perfect tuning, which is already programmed into it. It then turns a stepper motor attached to the tuning pegs either clockwise or counterclockwise depending on whether the frequency is lower or higher than the actual one. It immediately stops as soon as it hits the right frequency, which it will know because the guitar player will keep playing that string until the stepper motor stops turning.
How we built it
Robert was the head of the engineering efforts, and I headed the programming. He made very precise measurements of the guitar tuning peg with a micrometer and made models of them on Autodesk Inventor. He then used the 3D printers to print them out. I obtained an Arduino Uno, a stepper motor, and a sound sensor, and connected them all together and also to code on my Macbook. We then ran tests on the guitar to check if it was working correctly.
Challenges we ran into
We ran into a major problem too late into the hackathon to change it: the sound sensor. We had obtained a Grove Sound Sensor that was rated highly on its ability to capture sound at different volumes. However, this ability clearly did not extend to hearing frequencies, as it would wildly fluctuate from 0 Hz to 19000 Hz on the same string being plucked at the same rate. Because of this, the stepper motors, although they worked perfectly, could not properly tune the guitar. Another problem we ran into were failed prints and incorrect tolerances on the 3D printer, which cost us a lot of time.
Accomplishments that we're proud of
We definitely did not expect to finish this project by the end of the hacking today, and yet here we are with a completely finished working product. The only thing we could improve now is the sound sensor, to a sensor specifically built for frequencies. Also, we are proud of learning how to use the FFT process for our Arduino code, because we had never worked with anything so complex before.
What we learned
We learned that we should not rely too much on supplies given to us from the hackathon, because although they were sent out and certainly received with good intent, they are built for the general audience and not for our specific needs. Thus, we should bring all our major equipment with us next time, and leave only the small assignments, like breadboarding and soldering, to the hardware hacking materials.
What's next for HandyTune
We definitely want to replace the sound sensor with a frequency sensor. We also want to find a better way to secure the sound sensor to the guitar, because the tape might interfere with packaging and the sound output.