String instruments often go out of tune due to reasons such as temperature and humidity. Hence, musicians are burdened with the task of tuning them often. Guitars are tuned by rotating its pegs until the strings have the right tension. Our aim is to automate this process.
2. Motivation
● String instruments often go out of tune due to
reasons such as temperature and humidity.
● Hence, musicians are burdened with the task of
tuning them often.
● Guitars are tuned by rotating its pegs until the
strings have the right tension.
● Our aim is to automate this process.
3. Specific Use Cases
● New players: Tuning a guitar is usually
hard and frustrating for beginners, as
they have untrained ears.
● Stage performers: Guitars need to be
perfectly in tune throughout the whole
show, which often means tuning before
every song.
● Players with bad musical ear (more
common than it seems).
Image Source: http://www.qwoc.org/wp-content/uploads/2013/04/Instruments-on-Stage.jpg
4. Previous work
● Variety of tuning apps (Android & IOS) such as GuitarTuna [1] and gStrings [2].
○ How they work
■ Capture frequency + Indicate gap b/w actual & expected frequency
■ They require user to move pegs, involving many iterations
● Arduino-based personal projects
○ Some use a microphone module to capture the sound [3]
○ Others process the electric signal of an electric guitar directly[4]
● First project commercialized - Roadie Tuner [5]
○ Crowd funded in 2014
○ Raised $178,613 [6] => Immense interest for automatic tuning devices.
● Starting 2007, Gibson has created a series of autotuning guitars [7], they are:
○ High-class, exclusive guitars => Not affordable by large population
○ Technology cannot be transferred to other guitars
6. Approach
● Use an android cell phone’s microphone to record the sound that is played
when a string is plucked.
● The phone will process the signal from microphone to determine if the string is
in tune or if the pitch is too low/high.
● Phone will communicate to an Arduino board via bluetooth.
● Arduino will then control a servo module to rotate the guitar peg accordingly.
● The process is repeated until the correct pitch is achieved.
7. Scope
● Android
○ Microphone
○ Sound Processing
○ Bluetooth Interface
● Arduino
○ HC-05 Bluetooth Communication
○ Stepper Motor Control Board
● Stepper Module
○ Accurate rotation with given input
8. Device Hardware
● Arduino Uno R3 Board
● HC-05 Bluetooth Module
● Nema 17 Bipolar Stepper Motor
● EasyDriver Stepper Motor Driver
● Breadboard
● Flexible Coupler
● Drill Bit Peg Winder
● 2x 9V Battery / Power Supply
9. Bluetooth
● Method of communication
between Android & Arduino.
● HC-05 Bluetooth Module
connects directly to Arduino
● Baud Rate: 9600
Image Source: http://www.aeroboshop.com/product/bluetooth-hc-05/
10. Stepper Motor
● Online research - Motor w/ torque(45Ncm)
● Advantages
○ Moves in both direction
○ Accurate
○ Responsive & Quick Acceleration
○ Positioning Stability
● Disadvantage
○ Bulky
○ Need for Driver circuit board
○ External power (9-12 V)
● Circuit design of integration w/ Arduino
● Using AccelStepper[8] library - Control speed & rotation
Image Source: http://www.schmalzhaus.com/EasyDriver/Examples/Example1_bb.png
11. Stepper Motor Driver Board
● Allows external power for motor.
○ Arduino cannot drive motor itself.
● 2-pin interface for controlling motor
from Arduino
○ Step Input
○ Direction Input
● AccelStepper library for generating
signals for step & direction [8].
○ Acceleration and speed.
Image Source: http://www.schmalzhaus.com/EasyDriver/
12. Coupler & Drill Peg Winder
● Drill peg winder is used to hold guitar peg
for rotation.
● Coupler allows peg winder to be connector
to stepper motor shaft.
13. Android Application
Workflow:
● Select string
● Detect frequencies
○ Microphone operating throughout app run-time
● Controller decides action to do
● Transmits messages to the Arduino via
bluetooth
○ Based on the code from BluetoothChat [8]
14. Android: Sound analysis
● App uses standard tuning frequencies
● Leveraging Fast Fourier Transform
algorithm to transform sound signal to
frequency.
● Uses jtransforms FFT open source library
for FFT functions [10].
● FFT algorithm based on code from a
previously built sound analyzer app.
Guitar open string Note Frequency
6th (thickest) E2 82.4Hz
5th A2 110.0Hz
4th D3 146.8Hz
3rd G3 196.0Hz
2nd B3 246.9Hz
1st (thinnest) E4 329.6Hz
15. Android Bluetooth(BT)
● App requests to turn on BT.
● Scans for and connects to BT devices.
● Bluetooth allows for connectivity to
Arduino controller.
● Messages sent to Arduino via BT serve
as commands to manipulate the stepper
motor and adjust the guitar knob.
16. Android: Controller
● Algorithm in App decides how much we need to turn the peg.
○ Repeat this process until in tune:
○ Send +500 or -500 (about 45 degrees) depending on too high or too low.
○ Each time the side changes, half the amount being sent.
● Mimics how humans tune a guitar.
● The movement is smooth and not abrupt, which helps the string stay in tune
longer.
17. Challenges
● Even after dedicating time (in HW gathering
phase) to find motor with right amount of
torque, it fails to tense all the strings.
● We propose an alternative target tuning with
every string two tones lower.
● The sound relation between strings is the
same, but everything sounds more low-
pitched.
Guitar open string Note Frequency
6th (thickest) C2 65.4Hz
5th F2 87.3Hz
4th A#2 116.5Hz
3rd D#3 155.5Hz
2nd G3 196.0Hz
1st (thinnest) C4 261.6Hz
18. TradeOffs/Constraints
● Stepper Motor vs. Servo Motor
● Weight vs. Power
● Low Power Consumption
● Battery vs. Power Supply
● No. of iterations vs. One perfect
rotation
● Addition of more hardware vs.
leveraging existing setup
● Simple vs. Complex (Optimized)
19. Future Work
● Find stepper motor alternative that
provides more torque and less
energy consumption.
● Consider alternative algorithms and
benchmark their accuracy and speed.
● Reduce hardware costs.
● Research marketability of the project.
● Reduce weight of gadget