SlideShare a Scribd company logo
Senior Design Project
Jared Johnson, Alex Maciej, John Fox
May 13, 2015
AutoTun(a)
Department of Electrical Engineering
University of Minnesota Duluth
Duluth, MN 55812
Approved: _____________________________ Date: ________________
Advisor’s Signature
An automatic tuning mechanism built directly into the body of a guitar that uses infrared light to
determine frequency and motor control to tighten/relax the strings to put the instrument in tune.
2
Table of Contents
Introduction…………………………………………………………………………..…. 3
Current Market Products
Design Differences
Full Circuit & Optical Pickup Design………………………………………………..… 4
Optical Pickup & Components
Controllers
Other Electrical Components
Machining & Hardware Design………………………………………………………...6
Physical Layout
Material Removal of the Body
3D Printing & Component Design
Custom Front Plate
Original Electronics Modifications
Additional Modifications & Purposes
Reading Frequency & Slave Code…………………………………………………….8
Reading Signal Output
Initial Setup & Determining Midpoint
Frequency Calculation
Sending via I2
C
Master Tuning Subroutine Code……………………………………………………….9
Initial Setup
Receiving I2
C Values
Using Current Read Frequency
Motor Control Subroutine
Flow Chart
Display Code & Design………………………………………………………………..11
Start-up Screen
Initial Screen
Tuning Screen
Professional Component……………………………………………………………...12
Economic Concerns
Environmental & Sustainability Concerns
Manufacturability Concerns
Ethical Concerns
Health & Safety Concerns
Social & Political Concerns
Improvements…………………………………………………………………………..14
Conclusion……………………………………………………………………………...15
Resources............................................................................................................16
3
Introduction
Musicians typically spend a great deal of time tuning their instruments before every
performance. Currently musicians tune their guitars using conventional tuners, by ear, or a
phone application. They pluck each string individually and check to see if the string is sharp, flat,
or in tune. Based on this given feedback, the string’s tension is then adjusted by the musician in
order to increase or decrease the frequency. This process is repeated until each string is tuned
to its correct frequency depending on which tuning pattern the musician is trying to achieve.
Current Products
There are a couple of automatic tuners already on the market for guitars today. One of the
products currently available is called the TronicalTune[1]
. It mounts to the headstock and
replaces the tuning pegs with its own set. The tuning time for the original TronicalTune system
takes 5-8 seconds. Their new system, TronicalTune PLUS, estimates 2-4 seconds of tuning
time. Gibson released a guitar that implemented TronicalTune’s technology into the guitar, and
named it Gibson Robot Guitar[2]
. This guitar has the tuner built right into the body in order to tune
the strings at the headstock of the guitar. Both of these products use the same approach to read
the frequency from the string, they include a built in microphone in order to pick up the audio
coming directly from the string.
AxCent Tuning Systems[3]
(previously Transperformance) creates products most similar to our
current design. Their design has the motors built right into the body (of a premade guitar,
modified), along with an LCD into the side and a 2x6 pushbutton keypad on the face.
Design Difference
The AutoTun(a) design is different than any of the automatic tuners commercially available for
several reasons. The user will begin tuning by pressing “Start Tuning” on the touch screen, and
the tuning process will begin. First, in order to read in the frequency from the string, this design
uses infrared LEDs and phototransistors. We will refer to this combination as the optical pickup.
A signal will be created by the string’s shadow crossing over the phototransistor. The Trinket
Pros (a microcontroller) will sample that signal to determine the frequency the strings are tuned
to. Each string has an independent Trinket Pro to read frequency. The frequency is then passed
to the Arduino Uno from the Trinket Pros, and the motors tighten or loosen the string based on
the difference between the pre-defined frequencies of the tuning pattern and the actual
frequencies.
Figure 1: The basic system diagram for the AutoTun(a) tuning system.
4
Full Circuit & Optical Pickup Design
Optical Pickup
The optical pickup is the portion of our circuit that captures the string
movement. In order to do this, infrared LEDs were implemented below the
string and phototransistors above (see figure 1). When both are powered
initially (and guitar string not moving), the IR LED will cast a shadow onto
the phototransistor and do nothing. However, when the strings are
strummed, the movement of the string will allow the infrared light to be cast
onto the phototransistor.
When the phototransistor sees the light, it will allow a current to flow
through it, across a resistor, then to ground. The change in current through
the resistor then creates a change in voltage across it, equally representing
the movement of the string. Figure 2 shows the waveform capture of this;
equal to what the guitar string was tuned to.
Microcontrollers
It was decided to have dedicated microcontrollers for each string to
determine frequency of the output given by the phototransistors. This
will give the maximum possible speed to sample our signal from the
phototransistors. Adafruit’s Trinket Pro was chosen to be the
microcontroller for this purpose. The greatest benefit of these is the
small size of the device optimal for having six of them. It is also great
that they are fully compatible with the Arduino libraries and use the
same ATmega328 chip found on the Arduino Uno, which made programming them very simple.
The Arduino Uno is the main micro controller due to the enormous amounts of resources for it.
The decision was made even easier since a display and motor shields were sourced that were
designed to work with it.
Other Electrical Components
Motor Shields: In order to control the motors, it was decided to use (2) Adafruit Motor shields
for Arduino. The motor shields control up to 4 motors each, with built-in H-bridges in order to
spin the motor both ways. The included library and online resources also made the control easy
to implement.
Display: The display sourced is called the Gameduino 2[4]
. This is a 4.3” (480x272 pixel)
touchscreen display that has the shield attached to it, making it fully compatible with the Arduino
Uno. The shield has 26 pins and was designed to attach directly onto the Uno, luckily only 14
are needed to use it fully, and so only those were used to save on wiring space.
Batteries: In order for Arduino Uno's 5V output to work reliably, more than 5V must be given for
power to it. This was achieved with (5) AA disposable batteries in series (1.5V each) giving a
total of 7.5V—plenty to run power to the whole system and have the Arduino output 5V reliably.
The 2750mAh storage of the batteries would be sufficient for the whole system to run for
minimum 1½ hours in full tuning mode.
Figure 2: Basic diagram of
our optical pickups.
Figure 3: Output of phototransistor
produces a fairly sinusoidal signal,
and is at the same frequency the
string is tuned to.
5
Figure 4: Full circuit diagram of the AutoTun(a) system. The motors are connected to their own + and – portions of the motor
shield to allow bidirectional movement. The display (not shown) also shares 13 wires that connect directly to the Arduino.
6
Machining and Hardware Design
Physical Layout
The layout of the guitar accommodates room for all the components to rest inside the body (with
the exception of the phototransistor mount). It was designed this way to make it look and feel as
close to an ordinary electric guitar as possible.
Material removal of the body
In order to make room for all of the components being added to the standard electric guitar,
material removal of the guitar body itself was required. After measuring all the components’
dimensions, a material removal sketch was drawn on each side of the guitar body using a white
marker. To ensure clean edges, the boundaries were first cut using a portable circular saw set
to the desired depth of removal. A hand router fit with a circular cutting tool was used to remove
all material inside the boundaries.
3D printing & Component Design
Many constituents of the design needed to be 3-D printed due to their complex geometry. The
motor mount, motor spools, and the phototransistor-LED mount assembly were modeled in
SolidWorks and 3-D printed. The motor mount was designed to snuggly fit the Spark Motors
from FingerTech with the tension of the string being the primary source of holding them securely
in place. The motor spools have holes in the side to form the origin of the guitar strings. The
strings can then wrap over themselves during winding on the spool to reduce slippage. The
assembly of the phototransistor-LED mount allows for the direct alignment of the infrared LED,
guitar string, and phototransistor for optimal readings. It also contains a channel to
accommodate the wiring of the phototransistors to pass through the front plate to the Adafruit
Trinkets.
Figure 5: The SolidWorks models of the motor mount (left) and the LED-Phototransistor mount assembly (right).
7
Custom Front Plate
Lexan was the material chosen for the custom back and front plate of the guitar. This material
was used so that it could closely resemble the originals and provide a durable product. Both
plates were manufactured using a band saw and drill press. The reason for creating a custom
front plate was to allow room for the phototransistor-LED assembly and still accommodate the
three pickups originally on the guitar. Also, this permitted some modifications to eliminate the
tone knobs, which is discussed in more detail later in the report.
Additional Modifications & Purposes
A few modifications were made to accommodate the different routing of the strings. Since the
strings do not originate directly on the backside of the bridge, a large piece of the bridge was
removed. The remaining portion of the bridge contained holes that needed to be elongated to
allow for the passage of the strings. Also, a guide was made out of scrap steel to allow for the
string to be directed from the spools through the bridge. The guide was made from steel to
prevent wear and to reduce friction between the string and the surface it rides on. This allows for
longevity of the product and reduces torque required from the motors while tuning.
Original Electronics Modification
Some modifications were made to the original electronics on the guitar to allow for more room
within the body cavity. The two tone knobs that were on the guitar were removed, as well as the
sliding selector for the pickups. To still produce the desired sound, the wires from the pickup
were sent directly to the volume knob and then to the ¼ inch output jack. This allowed the
bypass of the previous knobs while still being able to have a useable volume knob.
Figure 6: The solid model of the motor spools (left) and the final printed parts off the 3-D printer
(right).
8
Reading Frequency & Slave Code
Reading Signal Output
Because the phototransistors of the optical pickup will create a change in voltage across the
respective resistor, the signal is sampled using the Trinket Pros (using port A0). Figure 2 shows
what an example of this signal looks like. The Trinket Pro will sample the signal and use the
algorithm to determine frequency (described below).
Initial Setup & Determining Midpoint
The wire library is included to enable I2C communication and the FastRunningMedian[5]
library
to help calculate a median value. Then globally declared are variables for FastRunningMedian,
time start, and time end, along with a global structure of a single float variable. This will make it
easier to transfer the data over I2C. In the Setup subroutine, the address is declared to join I2C.
Then the I2C event is registered and the Setup subroutine ends.
The main loop begins by declaring local variables to be used. The first while loop the subroutine
enters samples the signal for 50 milliseconds to determine the lowest point (the highest is
always set to 1023). Once the time goes past 50 milliseconds, it exits the while loop and
calculates the midpoint value.
Frequency Calculation
Following the midpoint calculation, the subroutine enters an endless loop to determine
frequency. The diagram in figure 3 demonstrates what is being looked at on the physical signal.
The process begins by waiting for the signal to fall below midpoint (1 on the diagram, do nothing
while greater than midpoint), waits again for it to cross back above (2 on the diagram, do
nothing when less than or equal to midpoint), then captures the start time. It then samples the
signal until it crosses below the midpoint (3 on the diagram, do nothing while greater than
midpoint), then waits for it to cross above again (4 on the diagram, do nothing while less than or
equal to midpoint) before capturing end time. The period of the signal is then calculated by
subtracting start time from end time. The inverse of the period produces the frequency value.
To avoid any outliers or misreads from our
calculations, the latest frequency value is added
to our FastRunningMedian variable. This is just
an array of ten numbers (the ten latest
frequencies), and the FastRunningMedian library
will automatically replace oldest values with
newer ones and gives the latest median value
when getMedian is called. The structure value is
set equal to the latest median calculation.
Sending via I2
C
When the main controller (Arduino Uno) requests for data, it will trigger the requestEvent
subroutine. Before sending any data, it will check if there were errors reading frequency. If time
of 50 milliseconds (or more) has past between readings (meaning a value less than 20Hz), it will
save an error value of 999.99 to our structure value. After checking this, it will begin
transmission of data. The easiest way to do this is by passing what is in our structure (the latest
frequency) and then telling how many bytes of the structure to pass (all that make it up).
Figure 7: Diagram for frequency calculation.
9
Master Tuning Subroutine Code
Initial Setup
The tuning algorithm subroutine is triggered once the user presses “Start Tuning” from the initial
display screen. The subroutine starts by declaring needed variables including a byte array,
counting variables, and a union. The display is updated and the tuning loop is entered.
Receiving I2
C Values
The while loop entered will continue to loop until all strings are in tune or the user presses “Stop
Tuning” on the touch screen. Because the array variables for all string information, the arrays
can be rotated through in this while loop. The first if statement will check if the string rotator
value goes past 6, and if so, the StringStatus array variable is reset to 1. This value keeps track
of the current string being looked at. The next if statement will check if the current string is in
tune, and prevents extra computation for strings already in tune.
Once the main algorithm loop is entered, data (current frequency) is requested from the current
string’s corresponding Trinket Pro. The bytes sent are read and are saved into our union’s byte
array, which will form the union’s float variable. The float array that holds the strings’ frequency
values then is updated with this number.
Using Current Read Frequency
The first if/else statement will check if the frequency was misread (denoted with a frequency of
999.99 by the Trinket Pros). Because there is no situation where the string will have to play
above 455Hz, it checks if it is higher than that. If it is, then the StringStatus array is set to 2
(meaning error). Otherwise the StringStatus array is set to 0 (meaning out of tune). The display
is then updated.
The next if statement will enter the Simplified PID subroutine if the string is out of tune (string
status of 0) and the frequency read was outside of the ±2% tolerance. If the frequency read was
inside our tolerance, then the string status is set to 1 (meaning in tune). Before looping all of this
for the next string, it checks if the user had pressed “Stop Tuning” (if so exiting subroutine) and
increment the current string rotator value.
Motor Control Subroutine
The motor control algorithm is based on one main principle: The farther out of tune the guitar
string is, the larger the adjustment it will make. The algorithm uses a tuned constant for each
individual string times the percent error between the actual frequency read by the optical
pickups and the actual desired frequency. The algorithm determines which way the motor needs
to spin and how long the motor will be turned on.
Flow Chart
The flow chart shown (next page) depicts the main sections that the Arduino Uno (left side)
takes and how the Uno’s actions work with the Trinket Pros’ actions (depicted right, gray box).
10
Figure 8: Block diagram of the steps of the tuning system during tuning mode.
11
Display Code & Design
Splash Screen
The start up screen displays our logo, name of project, and who made it (our names). This
serves no other real purpose other that to show the system is just being powered on, and only
lasts for a couple of seconds.
Initial Screen
Prompts user to start the tuning upon touch. It
also informs the user that it will be tuning the
guitar to standard tuning. The blue rectangles
corresponding to each string will also show
what notes the system will tune each string to.
When the user presses “Start Tuning”, it begins
the master tuning subroutine.
Tuning Screen
Informs the user that tuning is in progress. The
green "Start Tuning" button you saw in the initial
screen is now a red "Stop Tuning" button.
Pressing this will stop the tuning. It also shows
the status of each string, which corresponds to
each rectangle shown. If the rectangle is red,
that means that string is out of tune. If the
rectangle is gold, then there was an error
reading that strings' frequency, and normally
means that the user must re-strum. If the
rectangle is green, that means that string is in
tune.
On top of the rectangles will show the strings
current note. This is an estimate based off of
the read frequency values. This is determined
by the Note subroutine, which simply will output
the string of current note when passed a
frequency.
Figure 9: (Top to bottom) Start-up screen, initial screen, and
tuning screen.
12
Professional Component
Economic Concerns
With this design for an automatic guitar tuner that comes built into the body of a guitar, there are
several economic concerns that would have to be taken care in the case that this tuner would go
into mass production. The electronic components such as the Arduino and trinket
microcontrollers are commercially available; therefore in order using them in this product would
not be a viable option. The microcontrollers would have to be designed and built on custom
PCBs using the AtMega328 chips. The controller chips themselves would be cheaper than
buying assembled Arduino boards in bulk because costs would be cheaper for the chips
themselves. The raw materials to manufacture printed circuit boards might be expensive to
acquire but there would be ways to cut costs in other areas during the design process. Once
research of raw materials is complete, the budget would have to be restructured to incorporate
the amount of custom built parts during the manufacturing process. Depending on the ability to
produce the components in large scale would determine the affordability.
Environmental & Sustainability Concerns
AA batteries in this initial prototype power the Arduino, motor shields, and trinkets. In the case of
this guitar being commercially available to the public, the battery choice would be switched to a
rechargeable type battery. This would reduce battery waste and allow for users to reuse the
batteries rather than disposing non-rechargeable batteries. Another option for a battery would
be to incorporate the use of a battery pack in place of disposable or rechargeable AA batteries.
Manufacturability Concerns
First, the electronic components such as the Arduino and trinket microcontrollers are
commercially available; therefore in order using them in this product would not be a viable
option. The microcontrollers would have to be designed and built on custom PCBs using the
AtMega328 chips. Doing this would be easier to manufacture because the body of the guitar
could be designed around the custom built electronics rather than the electronics designed and
built to fit inside of the body of an already existing guitar. The motors would also have to be
designed and custom built to meet the specs needed to meet the torque requirements. The
prototype of this guitar tuner could be considered to be a one-of-a-kind device because
elements of its design have not been commonly used in commercially available tuners.
Ethical Concerns
The Arduino board, trinket microcontrollers and pieces of the code used for the motor shields
are all considered to be open source. The custom boards would require code built from scratch.
Special permission from manufacturers such as Fender and Gibson would be needed in order to
use their guitar body designs, otherwise designs would be created for an entirely new body
style. Once the design process is finished, measures would be taken in order to protect
intellectual property involved in this project as well as making sure that the owners of intellectual
property of components used in the initial prototype are given proper credit. Since parts of the
prototype were considered to be open source, such as parts of the code associated with the
motor shields and the I2C sections that allow the master-slave communication between the
Arduino and trinket pros.
13
Health & Safety Concerns
The design created for the consumer version of the guitar would include all the necessary
components and accessories for the end user to successfully operate the tuner
To prevent injury while restringing, safety instructions could be made to insure a user does it
correctly. Safety measures could also be included in the programming of the motors in order to
prevent the motors from over tightening and ultimately breaking the strings. It would be made
sure that the final design meets any necessary standards set by IEEE and ANSI.
Social & Political Concerns
An automatic tuning guitar that has the components built into the body would allow for amateur
and professional guitar musicians alike to be more efficient when it comes to keeping their
instruments consistently tuned and sounding the way they are intended to sound. The only
known licensing requirements would come straight from either Fender, Gibson or any other
manufacturer of well known guitars, in order to use their designs for the body and neck of the
guitar.
14
Improvements
One of the potential future features could be multiple tuning settings, such as drop D & 1/2 step
down. The screen would show the note changes for the strings as well.
The construction and physical size of our circuit could also be drastically reduced. By including
everything that isn’t the optical pickup on a single PCB (dedicated frequency & main processors,
resistors, MOSFETs, etc.), the design could probably be as small as the Arduino Uno. This
would make the practicality much more reasonable and implementation of design a lot easier.
There may be other possible ways to mount the pickup electronics keep the optical pickup
sleeker. If ways were explored to accurately bounce the light up at an angle and reflect it back
down, the space taken up by the optical pickup could
significantly reduce. This would also be much more
visually pleasing and keep the strings open. The way
depicted would create a signal inverse to our current
design, unless the resistor off of the emitter is moved
before the collector. Either way, it should not affect
how the frequency is read. One of the many
challenges this design possesses though is the use of
wrapped strings, which make reflection almost
impossible. However different string types may prove
differently (such as nylon potentially).
By implementing a quick-pull connector for the top
phototransistor portion of the optical pickup, the guitar
would have a much more natural feel while playing. The portion could detach and reattach only
for tuning, and the LED portion remaining while the top is detached would barely look different
from the standard pickups on the guitar.
Rather than using 3D printed spools on the shafts, if the shafts themselves were 2-3 times the
diameter, a hole could be drilled right into them to secure the string. This would lower the
amount of torque required by the motors slightly. More importantly it would make string
replacement much simpler and faster.
Currently, only have the individual strings’ microcontrollers read frequency. A future design
could have them not only do that, but instantly adjust the motor themselves following. They then
would report to the main microcontroller whether it is in tune or not.
Instead of modifying an existing body, a body could be formed to work fully with the system from
the ground up. This would make assembly of the product easier, along with much better
aesthetics. It would almost be required if this went into production.
While not in tuning mode, additional functionality could also be applied to the system. One of the
features that could be added is applying audio effects to the output signal. The idea behind this
is you would then essentially have a multi-effects pedal built into your guitar. With the
touchscreen system this would make it easy for users to apply & save settings. This would also
be one less item your guitar would plug into before any amps.
Figure 10: Representation of an alternate optical pickup
design. This design shines IR light (red) at an angle, and
is reflected back to the phototransistor.
15
Conclusion
While there are many possible improvements that can be had upon our design, our initial
prototype is a great proof of concept. The initial goal of automatically tuning a guitar without
using sound and at a much faster pace (than individual string plucking) was met. This way, use
of the AutoTun(a) guitar in real life would not be effected by other band instruments’ sound, and
also would deliver a quick change in tune for a next song.
The total cost of the project was roughly on par with the TronicalTune PLUS
($400). The purchased parts of the project that went directly into the final design
cost $365, and with an estimated $35 in other material
purchased by the school, brings an estimated total to $400.
This total could be reduced if we implement what was
discussed in the economic concerns of the
professional portion and a few of our improvements.
If this were to be a business endeavor, the markup
would have to be factored into a selling price.
Figure 11: Final appearance of the AutoTun(a) guitar.
16
Resources
[1] "Tronical." TronicalTune. Tronical, n.d. Web. 19 Apr. 2015.
[2] "Gibson Robot Guitar." Wikipedia. Wikimedia Foundation, n.d. Web. 19 Apr. 2015.
[3] "Self Tuning, Alternate Tuning, Automatic Tuning System." AXCENT TUNING SYSTEMS.
N.p., n.d. Web. 19 Apr. 2015.
[4] "Gameduino 2: This Time It’s Personal." Excamera. N.p., n.d. Web. 19 Apr. 2015.
[5] "RunningMedian Class on Playground." Arduino Forum. Arduino, n.d. Web. 19 Apr. 2015.

More Related Content

What's hot

ROBOCON 2015 Documentation
ROBOCON 2015 DocumentationROBOCON 2015 Documentation
ROBOCON 2015 DocumentationVamsi Krishna
 
Project Report Distance measurement system
Project Report Distance measurement systemProject Report Distance measurement system
Project Report Distance measurement system
kurkute1994
 
Magicus clock
Magicus clockMagicus clock
Magicus clock
eSAT Publishing House
 
Brain controlled wheel chair
Brain controlled wheel chairBrain controlled wheel chair
Brain controlled wheel chair
Odai Abu-Zaid
 
Design and Development of Secure Navigation System for Visually Impaired People
Design and Development of Secure Navigation System for Visually Impaired PeopleDesign and Development of Secure Navigation System for Visually Impaired People
Design and Development of Secure Navigation System for Visually Impaired People
ijcsit
 
IRJET- Arduino based Four-Wheeler Accident Detection and Prevention System
IRJET- Arduino based Four-Wheeler Accident Detection and Prevention SystemIRJET- Arduino based Four-Wheeler Accident Detection and Prevention System
IRJET- Arduino based Four-Wheeler Accident Detection and Prevention System
IRJET Journal
 
Zxsdr bs8900 a product description 20101026
Zxsdr bs8900 a product description 20101026Zxsdr bs8900 a product description 20101026
Zxsdr bs8900 a product description 20101026
Adeep Asaad
 
APPLIANCE CONTROL USING INTELLIGENT SWITCH
APPLIANCE CONTROL USING INTELLIGENT SWITCHAPPLIANCE CONTROL USING INTELLIGENT SWITCH
APPLIANCE CONTROL USING INTELLIGENT SWITCH
Amresh Nayak
 
A prosthetic limb managed by sensors-based electronic system: Experimental re...
A prosthetic limb managed by sensors-based electronic system: Experimental re...A prosthetic limb managed by sensors-based electronic system: Experimental re...
A prosthetic limb managed by sensors-based electronic system: Experimental re...
journalBEEI
 
Position Control of PP ball
Position Control of PP ballPosition Control of PP ball
Position Control of PP ballJames Goddings
 
Design and operation of synchronized robotic arm
Design and operation of synchronized robotic armDesign and operation of synchronized robotic arm
Design and operation of synchronized robotic arm
eSAT Publishing House
 
IRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud Computing
IRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud ComputingIRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud Computing
IRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud Computing
IRJET Journal
 
Design of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithmsDesign of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithms
eSAT Publishing House
 
Design of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithmsDesign of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithms
eSAT Journals
 

What's hot (14)

ROBOCON 2015 Documentation
ROBOCON 2015 DocumentationROBOCON 2015 Documentation
ROBOCON 2015 Documentation
 
Project Report Distance measurement system
Project Report Distance measurement systemProject Report Distance measurement system
Project Report Distance measurement system
 
Magicus clock
Magicus clockMagicus clock
Magicus clock
 
Brain controlled wheel chair
Brain controlled wheel chairBrain controlled wheel chair
Brain controlled wheel chair
 
Design and Development of Secure Navigation System for Visually Impaired People
Design and Development of Secure Navigation System for Visually Impaired PeopleDesign and Development of Secure Navigation System for Visually Impaired People
Design and Development of Secure Navigation System for Visually Impaired People
 
IRJET- Arduino based Four-Wheeler Accident Detection and Prevention System
IRJET- Arduino based Four-Wheeler Accident Detection and Prevention SystemIRJET- Arduino based Four-Wheeler Accident Detection and Prevention System
IRJET- Arduino based Four-Wheeler Accident Detection and Prevention System
 
Zxsdr bs8900 a product description 20101026
Zxsdr bs8900 a product description 20101026Zxsdr bs8900 a product description 20101026
Zxsdr bs8900 a product description 20101026
 
APPLIANCE CONTROL USING INTELLIGENT SWITCH
APPLIANCE CONTROL USING INTELLIGENT SWITCHAPPLIANCE CONTROL USING INTELLIGENT SWITCH
APPLIANCE CONTROL USING INTELLIGENT SWITCH
 
A prosthetic limb managed by sensors-based electronic system: Experimental re...
A prosthetic limb managed by sensors-based electronic system: Experimental re...A prosthetic limb managed by sensors-based electronic system: Experimental re...
A prosthetic limb managed by sensors-based electronic system: Experimental re...
 
Position Control of PP ball
Position Control of PP ballPosition Control of PP ball
Position Control of PP ball
 
Design and operation of synchronized robotic arm
Design and operation of synchronized robotic armDesign and operation of synchronized robotic arm
Design and operation of synchronized robotic arm
 
IRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud Computing
IRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud ComputingIRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud Computing
IRJET - Real Time Muscle Fatigue Monitoring using IoT Cloud Computing
 
Design of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithmsDesign of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithms
 
Design of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithmsDesign of wheelchair using finger operation with image processing algorithms
Design of wheelchair using finger operation with image processing algorithms
 

Viewers also liked

TWB Article October 09
TWB Article October 09TWB Article October 09
TWB Article October 09firstflight
 
Ideas To Reduce Parcel Shipping Costs
Ideas To Reduce Parcel Shipping CostsIdeas To Reduce Parcel Shipping Costs
Ideas To Reduce Parcel Shipping Costs
Jerry Hempstead, B.A., M.A.,DLP
 
The Dublin Core Abstract Model – a packaging standard?
The Dublin Core Abstract Model – a packaging standard?The Dublin Core Abstract Model – a packaging standard?
The Dublin Core Abstract Model – a packaging standard?
Eduserv Foundation
 
Packaging Tips
Packaging TipsPackaging Tips
Packaging TipsHolly Li
 
Small Parcel Freight Auditing
Small Parcel Freight AuditingSmall Parcel Freight Auditing
Small Parcel Freight Auditingsmisovic
 
TechDataPackLaneProject
TechDataPackLaneProjectTechDataPackLaneProject
TechDataPackLaneProjectAlex Robinson
 
[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments
[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments
[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments
Chainalytics
 
Best Practice for Selling on Amazon
Best Practice for Selling on AmazonBest Practice for Selling on Amazon
Best Practice for Selling on Amazon
Daytodayebay
 
What is dimensional pricing? Will it mean the end of your business?
What is dimensional pricing?  Will it mean the end of your business?What is dimensional pricing?  Will it mean the end of your business?
What is dimensional pricing? Will it mean the end of your business?
Red Stag Fulfillment
 
Marketing - Packaging Project CBSE
Marketing - Packaging Project CBSEMarketing - Packaging Project CBSE
Marketing - Packaging Project CBSE
Saish Gaonkar
 
Packaging project
Packaging project Packaging project
Packaging project
Manasvi Wagh
 
Drop Shipping Made Easy
Drop Shipping Made EasyDrop Shipping Made Easy
Drop Shipping Made Easyaccellosinc
 
Packaging & labeling in food industries
Packaging & labeling in food industriesPackaging & labeling in food industries
Packaging & labeling in food industries
naveenaugust
 
Packaging ppt
Packaging pptPackaging ppt
Packaging ppt
Shraddha Kurdekar
 
30 60 90 Day Sales Plan
30 60 90 Day Sales Plan30 60 90 Day Sales Plan
30 60 90 Day Sales Plannatevans65
 

Viewers also liked (17)

TWB Article October 09
TWB Article October 09TWB Article October 09
TWB Article October 09
 
Ideas To Reduce Parcel Shipping Costs
Ideas To Reduce Parcel Shipping CostsIdeas To Reduce Parcel Shipping Costs
Ideas To Reduce Parcel Shipping Costs
 
The Dublin Core Abstract Model – a packaging standard?
The Dublin Core Abstract Model – a packaging standard?The Dublin Core Abstract Model – a packaging standard?
The Dublin Core Abstract Model – a packaging standard?
 
Packaging Tips
Packaging TipsPackaging Tips
Packaging Tips
 
Small Parcel Freight Auditing
Small Parcel Freight AuditingSmall Parcel Freight Auditing
Small Parcel Freight Auditing
 
how-to-pack
 how-to-pack how-to-pack
how-to-pack
 
Box packaging 1
Box packaging 1Box packaging 1
Box packaging 1
 
TechDataPackLaneProject
TechDataPackLaneProjectTechDataPackLaneProject
TechDataPackLaneProject
 
[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments
[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments
[Webinar] Shedding a Light on Dim Weight Pricing Changes for Parcel Shipments
 
Best Practice for Selling on Amazon
Best Practice for Selling on AmazonBest Practice for Selling on Amazon
Best Practice for Selling on Amazon
 
What is dimensional pricing? Will it mean the end of your business?
What is dimensional pricing?  Will it mean the end of your business?What is dimensional pricing?  Will it mean the end of your business?
What is dimensional pricing? Will it mean the end of your business?
 
Marketing - Packaging Project CBSE
Marketing - Packaging Project CBSEMarketing - Packaging Project CBSE
Marketing - Packaging Project CBSE
 
Packaging project
Packaging project Packaging project
Packaging project
 
Drop Shipping Made Easy
Drop Shipping Made EasyDrop Shipping Made Easy
Drop Shipping Made Easy
 
Packaging & labeling in food industries
Packaging & labeling in food industriesPackaging & labeling in food industries
Packaging & labeling in food industries
 
Packaging ppt
Packaging pptPackaging ppt
Packaging ppt
 
30 60 90 Day Sales Plan
30 60 90 Day Sales Plan30 60 90 Day Sales Plan
30 60 90 Day Sales Plan
 

Similar to Senior Design Final Report

Ball following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNOBall following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNO
IRJET Journal
 
Gigatron-manual.pdf
Gigatron-manual.pdfGigatron-manual.pdf
Gigatron-manual.pdf
Nemanja31
 
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET Journal
 
Arduino Based Project.pptx
Arduino Based Project.pptxArduino Based Project.pptx
Arduino Based Project.pptx
Abhishek Sharma
 
Unmanned Wireless Controlled Robotic Vehicle
Unmanned Wireless Controlled Robotic VehicleUnmanned Wireless Controlled Robotic Vehicle
Unmanned Wireless Controlled Robotic Vehicle
Swapnil Patel
 
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Tawsif Rahman Chowdhury
 
COMPUTER GRAPHICS AND ANIMATION UNIT 1.pptx
COMPUTER GRAPHICS AND ANIMATION UNIT 1.pptxCOMPUTER GRAPHICS AND ANIMATION UNIT 1.pptx
COMPUTER GRAPHICS AND ANIMATION UNIT 1.pptx
PabanYadav1
 
Mini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser EngraverMini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser Engraver
ijtsrd
 
IRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control System
IRJET Journal
 
Robotics Report final.compressed (1)
Robotics Report final.compressed (1)Robotics Report final.compressed (1)
Robotics Report final.compressed (1)Kael Kristjanson
 
Sonar Project Report
Sonar Project ReportSonar Project Report
Sonar Project Report
Sumit Sapra
 
IRJET- Design and Implementation of Driverless Car using Machine Learning
IRJET- Design and Implementation of Driverless Car using Machine LearningIRJET- Design and Implementation of Driverless Car using Machine Learning
IRJET- Design and Implementation of Driverless Car using Machine Learning
IRJET Journal
 
report on mini project Bicycle lock
 report on mini project Bicycle lock  report on mini project Bicycle lock
report on mini project Bicycle lock
Omkar Rane
 
Three-Axis Auto Stabilizing Video Camera Platform
Three-Axis Auto Stabilizing Video Camera PlatformThree-Axis Auto Stabilizing Video Camera Platform
Three-Axis Auto Stabilizing Video Camera Platform
Eklavya Sharma
 
Joystick Controlled Wheelchair
Joystick Controlled WheelchairJoystick Controlled Wheelchair
Joystick Controlled Wheelchair
IRJET Journal
 
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET Journal
 
Home Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via BluetoothHome Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via BluetoothMOKTARI MOSTOFA
 
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET-  	  Android based Home Automation System with Power Optimization ModesIRJET-  	  Android based Home Automation System with Power Optimization Modes
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET Journal
 
Controlling and optimization of 3d optical stage for precise movement
Controlling and optimization of 3d optical stage for precise movementControlling and optimization of 3d optical stage for precise movement
Controlling and optimization of 3d optical stage for precise movement
Avadhut Khade
 
Accelerometer and LED Sensor Array Based Remote Control Car
Accelerometer and LED Sensor Array Based Remote Control CarAccelerometer and LED Sensor Array Based Remote Control Car
Accelerometer and LED Sensor Array Based Remote Control CarAbhijeet kapse
 

Similar to Senior Design Final Report (20)

Ball following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNOBall following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNO
 
Gigatron-manual.pdf
Gigatron-manual.pdfGigatron-manual.pdf
Gigatron-manual.pdf
 
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
 
Arduino Based Project.pptx
Arduino Based Project.pptxArduino Based Project.pptx
Arduino Based Project.pptx
 
Unmanned Wireless Controlled Robotic Vehicle
Unmanned Wireless Controlled Robotic VehicleUnmanned Wireless Controlled Robotic Vehicle
Unmanned Wireless Controlled Robotic Vehicle
 
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
 
COMPUTER GRAPHICS AND ANIMATION UNIT 1.pptx
COMPUTER GRAPHICS AND ANIMATION UNIT 1.pptxCOMPUTER GRAPHICS AND ANIMATION UNIT 1.pptx
COMPUTER GRAPHICS AND ANIMATION UNIT 1.pptx
 
Mini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser EngraverMini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser Engraver
 
IRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control System
 
Robotics Report final.compressed (1)
Robotics Report final.compressed (1)Robotics Report final.compressed (1)
Robotics Report final.compressed (1)
 
Sonar Project Report
Sonar Project ReportSonar Project Report
Sonar Project Report
 
IRJET- Design and Implementation of Driverless Car using Machine Learning
IRJET- Design and Implementation of Driverless Car using Machine LearningIRJET- Design and Implementation of Driverless Car using Machine Learning
IRJET- Design and Implementation of Driverless Car using Machine Learning
 
report on mini project Bicycle lock
 report on mini project Bicycle lock  report on mini project Bicycle lock
report on mini project Bicycle lock
 
Three-Axis Auto Stabilizing Video Camera Platform
Three-Axis Auto Stabilizing Video Camera PlatformThree-Axis Auto Stabilizing Video Camera Platform
Three-Axis Auto Stabilizing Video Camera Platform
 
Joystick Controlled Wheelchair
Joystick Controlled WheelchairJoystick Controlled Wheelchair
Joystick Controlled Wheelchair
 
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
 
Home Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via BluetoothHome Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via Bluetooth
 
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET-  	  Android based Home Automation System with Power Optimization ModesIRJET-  	  Android based Home Automation System with Power Optimization Modes
IRJET- Android based Home Automation System with Power Optimization Modes
 
Controlling and optimization of 3d optical stage for precise movement
Controlling and optimization of 3d optical stage for precise movementControlling and optimization of 3d optical stage for precise movement
Controlling and optimization of 3d optical stage for precise movement
 
Accelerometer and LED Sensor Array Based Remote Control Car
Accelerometer and LED Sensor Array Based Remote Control CarAccelerometer and LED Sensor Array Based Remote Control Car
Accelerometer and LED Sensor Array Based Remote Control Car
 

Senior Design Final Report

  • 1. Senior Design Project Jared Johnson, Alex Maciej, John Fox May 13, 2015 AutoTun(a) Department of Electrical Engineering University of Minnesota Duluth Duluth, MN 55812 Approved: _____________________________ Date: ________________ Advisor’s Signature An automatic tuning mechanism built directly into the body of a guitar that uses infrared light to determine frequency and motor control to tighten/relax the strings to put the instrument in tune.
  • 2. 2 Table of Contents Introduction…………………………………………………………………………..…. 3 Current Market Products Design Differences Full Circuit & Optical Pickup Design………………………………………………..… 4 Optical Pickup & Components Controllers Other Electrical Components Machining & Hardware Design………………………………………………………...6 Physical Layout Material Removal of the Body 3D Printing & Component Design Custom Front Plate Original Electronics Modifications Additional Modifications & Purposes Reading Frequency & Slave Code…………………………………………………….8 Reading Signal Output Initial Setup & Determining Midpoint Frequency Calculation Sending via I2 C Master Tuning Subroutine Code……………………………………………………….9 Initial Setup Receiving I2 C Values Using Current Read Frequency Motor Control Subroutine Flow Chart Display Code & Design………………………………………………………………..11 Start-up Screen Initial Screen Tuning Screen Professional Component……………………………………………………………...12 Economic Concerns Environmental & Sustainability Concerns Manufacturability Concerns Ethical Concerns Health & Safety Concerns Social & Political Concerns Improvements…………………………………………………………………………..14 Conclusion……………………………………………………………………………...15 Resources............................................................................................................16
  • 3. 3 Introduction Musicians typically spend a great deal of time tuning their instruments before every performance. Currently musicians tune their guitars using conventional tuners, by ear, or a phone application. They pluck each string individually and check to see if the string is sharp, flat, or in tune. Based on this given feedback, the string’s tension is then adjusted by the musician in order to increase or decrease the frequency. This process is repeated until each string is tuned to its correct frequency depending on which tuning pattern the musician is trying to achieve. Current Products There are a couple of automatic tuners already on the market for guitars today. One of the products currently available is called the TronicalTune[1] . It mounts to the headstock and replaces the tuning pegs with its own set. The tuning time for the original TronicalTune system takes 5-8 seconds. Their new system, TronicalTune PLUS, estimates 2-4 seconds of tuning time. Gibson released a guitar that implemented TronicalTune’s technology into the guitar, and named it Gibson Robot Guitar[2] . This guitar has the tuner built right into the body in order to tune the strings at the headstock of the guitar. Both of these products use the same approach to read the frequency from the string, they include a built in microphone in order to pick up the audio coming directly from the string. AxCent Tuning Systems[3] (previously Transperformance) creates products most similar to our current design. Their design has the motors built right into the body (of a premade guitar, modified), along with an LCD into the side and a 2x6 pushbutton keypad on the face. Design Difference The AutoTun(a) design is different than any of the automatic tuners commercially available for several reasons. The user will begin tuning by pressing “Start Tuning” on the touch screen, and the tuning process will begin. First, in order to read in the frequency from the string, this design uses infrared LEDs and phototransistors. We will refer to this combination as the optical pickup. A signal will be created by the string’s shadow crossing over the phototransistor. The Trinket Pros (a microcontroller) will sample that signal to determine the frequency the strings are tuned to. Each string has an independent Trinket Pro to read frequency. The frequency is then passed to the Arduino Uno from the Trinket Pros, and the motors tighten or loosen the string based on the difference between the pre-defined frequencies of the tuning pattern and the actual frequencies. Figure 1: The basic system diagram for the AutoTun(a) tuning system.
  • 4. 4 Full Circuit & Optical Pickup Design Optical Pickup The optical pickup is the portion of our circuit that captures the string movement. In order to do this, infrared LEDs were implemented below the string and phototransistors above (see figure 1). When both are powered initially (and guitar string not moving), the IR LED will cast a shadow onto the phototransistor and do nothing. However, when the strings are strummed, the movement of the string will allow the infrared light to be cast onto the phototransistor. When the phototransistor sees the light, it will allow a current to flow through it, across a resistor, then to ground. The change in current through the resistor then creates a change in voltage across it, equally representing the movement of the string. Figure 2 shows the waveform capture of this; equal to what the guitar string was tuned to. Microcontrollers It was decided to have dedicated microcontrollers for each string to determine frequency of the output given by the phototransistors. This will give the maximum possible speed to sample our signal from the phototransistors. Adafruit’s Trinket Pro was chosen to be the microcontroller for this purpose. The greatest benefit of these is the small size of the device optimal for having six of them. It is also great that they are fully compatible with the Arduino libraries and use the same ATmega328 chip found on the Arduino Uno, which made programming them very simple. The Arduino Uno is the main micro controller due to the enormous amounts of resources for it. The decision was made even easier since a display and motor shields were sourced that were designed to work with it. Other Electrical Components Motor Shields: In order to control the motors, it was decided to use (2) Adafruit Motor shields for Arduino. The motor shields control up to 4 motors each, with built-in H-bridges in order to spin the motor both ways. The included library and online resources also made the control easy to implement. Display: The display sourced is called the Gameduino 2[4] . This is a 4.3” (480x272 pixel) touchscreen display that has the shield attached to it, making it fully compatible with the Arduino Uno. The shield has 26 pins and was designed to attach directly onto the Uno, luckily only 14 are needed to use it fully, and so only those were used to save on wiring space. Batteries: In order for Arduino Uno's 5V output to work reliably, more than 5V must be given for power to it. This was achieved with (5) AA disposable batteries in series (1.5V each) giving a total of 7.5V—plenty to run power to the whole system and have the Arduino output 5V reliably. The 2750mAh storage of the batteries would be sufficient for the whole system to run for minimum 1½ hours in full tuning mode. Figure 2: Basic diagram of our optical pickups. Figure 3: Output of phototransistor produces a fairly sinusoidal signal, and is at the same frequency the string is tuned to.
  • 5. 5 Figure 4: Full circuit diagram of the AutoTun(a) system. The motors are connected to their own + and – portions of the motor shield to allow bidirectional movement. The display (not shown) also shares 13 wires that connect directly to the Arduino.
  • 6. 6 Machining and Hardware Design Physical Layout The layout of the guitar accommodates room for all the components to rest inside the body (with the exception of the phototransistor mount). It was designed this way to make it look and feel as close to an ordinary electric guitar as possible. Material removal of the body In order to make room for all of the components being added to the standard electric guitar, material removal of the guitar body itself was required. After measuring all the components’ dimensions, a material removal sketch was drawn on each side of the guitar body using a white marker. To ensure clean edges, the boundaries were first cut using a portable circular saw set to the desired depth of removal. A hand router fit with a circular cutting tool was used to remove all material inside the boundaries. 3D printing & Component Design Many constituents of the design needed to be 3-D printed due to their complex geometry. The motor mount, motor spools, and the phototransistor-LED mount assembly were modeled in SolidWorks and 3-D printed. The motor mount was designed to snuggly fit the Spark Motors from FingerTech with the tension of the string being the primary source of holding them securely in place. The motor spools have holes in the side to form the origin of the guitar strings. The strings can then wrap over themselves during winding on the spool to reduce slippage. The assembly of the phototransistor-LED mount allows for the direct alignment of the infrared LED, guitar string, and phototransistor for optimal readings. It also contains a channel to accommodate the wiring of the phototransistors to pass through the front plate to the Adafruit Trinkets. Figure 5: The SolidWorks models of the motor mount (left) and the LED-Phototransistor mount assembly (right).
  • 7. 7 Custom Front Plate Lexan was the material chosen for the custom back and front plate of the guitar. This material was used so that it could closely resemble the originals and provide a durable product. Both plates were manufactured using a band saw and drill press. The reason for creating a custom front plate was to allow room for the phototransistor-LED assembly and still accommodate the three pickups originally on the guitar. Also, this permitted some modifications to eliminate the tone knobs, which is discussed in more detail later in the report. Additional Modifications & Purposes A few modifications were made to accommodate the different routing of the strings. Since the strings do not originate directly on the backside of the bridge, a large piece of the bridge was removed. The remaining portion of the bridge contained holes that needed to be elongated to allow for the passage of the strings. Also, a guide was made out of scrap steel to allow for the string to be directed from the spools through the bridge. The guide was made from steel to prevent wear and to reduce friction between the string and the surface it rides on. This allows for longevity of the product and reduces torque required from the motors while tuning. Original Electronics Modification Some modifications were made to the original electronics on the guitar to allow for more room within the body cavity. The two tone knobs that were on the guitar were removed, as well as the sliding selector for the pickups. To still produce the desired sound, the wires from the pickup were sent directly to the volume knob and then to the ¼ inch output jack. This allowed the bypass of the previous knobs while still being able to have a useable volume knob. Figure 6: The solid model of the motor spools (left) and the final printed parts off the 3-D printer (right).
  • 8. 8 Reading Frequency & Slave Code Reading Signal Output Because the phototransistors of the optical pickup will create a change in voltage across the respective resistor, the signal is sampled using the Trinket Pros (using port A0). Figure 2 shows what an example of this signal looks like. The Trinket Pro will sample the signal and use the algorithm to determine frequency (described below). Initial Setup & Determining Midpoint The wire library is included to enable I2C communication and the FastRunningMedian[5] library to help calculate a median value. Then globally declared are variables for FastRunningMedian, time start, and time end, along with a global structure of a single float variable. This will make it easier to transfer the data over I2C. In the Setup subroutine, the address is declared to join I2C. Then the I2C event is registered and the Setup subroutine ends. The main loop begins by declaring local variables to be used. The first while loop the subroutine enters samples the signal for 50 milliseconds to determine the lowest point (the highest is always set to 1023). Once the time goes past 50 milliseconds, it exits the while loop and calculates the midpoint value. Frequency Calculation Following the midpoint calculation, the subroutine enters an endless loop to determine frequency. The diagram in figure 3 demonstrates what is being looked at on the physical signal. The process begins by waiting for the signal to fall below midpoint (1 on the diagram, do nothing while greater than midpoint), waits again for it to cross back above (2 on the diagram, do nothing when less than or equal to midpoint), then captures the start time. It then samples the signal until it crosses below the midpoint (3 on the diagram, do nothing while greater than midpoint), then waits for it to cross above again (4 on the diagram, do nothing while less than or equal to midpoint) before capturing end time. The period of the signal is then calculated by subtracting start time from end time. The inverse of the period produces the frequency value. To avoid any outliers or misreads from our calculations, the latest frequency value is added to our FastRunningMedian variable. This is just an array of ten numbers (the ten latest frequencies), and the FastRunningMedian library will automatically replace oldest values with newer ones and gives the latest median value when getMedian is called. The structure value is set equal to the latest median calculation. Sending via I2 C When the main controller (Arduino Uno) requests for data, it will trigger the requestEvent subroutine. Before sending any data, it will check if there were errors reading frequency. If time of 50 milliseconds (or more) has past between readings (meaning a value less than 20Hz), it will save an error value of 999.99 to our structure value. After checking this, it will begin transmission of data. The easiest way to do this is by passing what is in our structure (the latest frequency) and then telling how many bytes of the structure to pass (all that make it up). Figure 7: Diagram for frequency calculation.
  • 9. 9 Master Tuning Subroutine Code Initial Setup The tuning algorithm subroutine is triggered once the user presses “Start Tuning” from the initial display screen. The subroutine starts by declaring needed variables including a byte array, counting variables, and a union. The display is updated and the tuning loop is entered. Receiving I2 C Values The while loop entered will continue to loop until all strings are in tune or the user presses “Stop Tuning” on the touch screen. Because the array variables for all string information, the arrays can be rotated through in this while loop. The first if statement will check if the string rotator value goes past 6, and if so, the StringStatus array variable is reset to 1. This value keeps track of the current string being looked at. The next if statement will check if the current string is in tune, and prevents extra computation for strings already in tune. Once the main algorithm loop is entered, data (current frequency) is requested from the current string’s corresponding Trinket Pro. The bytes sent are read and are saved into our union’s byte array, which will form the union’s float variable. The float array that holds the strings’ frequency values then is updated with this number. Using Current Read Frequency The first if/else statement will check if the frequency was misread (denoted with a frequency of 999.99 by the Trinket Pros). Because there is no situation where the string will have to play above 455Hz, it checks if it is higher than that. If it is, then the StringStatus array is set to 2 (meaning error). Otherwise the StringStatus array is set to 0 (meaning out of tune). The display is then updated. The next if statement will enter the Simplified PID subroutine if the string is out of tune (string status of 0) and the frequency read was outside of the ±2% tolerance. If the frequency read was inside our tolerance, then the string status is set to 1 (meaning in tune). Before looping all of this for the next string, it checks if the user had pressed “Stop Tuning” (if so exiting subroutine) and increment the current string rotator value. Motor Control Subroutine The motor control algorithm is based on one main principle: The farther out of tune the guitar string is, the larger the adjustment it will make. The algorithm uses a tuned constant for each individual string times the percent error between the actual frequency read by the optical pickups and the actual desired frequency. The algorithm determines which way the motor needs to spin and how long the motor will be turned on. Flow Chart The flow chart shown (next page) depicts the main sections that the Arduino Uno (left side) takes and how the Uno’s actions work with the Trinket Pros’ actions (depicted right, gray box).
  • 10. 10 Figure 8: Block diagram of the steps of the tuning system during tuning mode.
  • 11. 11 Display Code & Design Splash Screen The start up screen displays our logo, name of project, and who made it (our names). This serves no other real purpose other that to show the system is just being powered on, and only lasts for a couple of seconds. Initial Screen Prompts user to start the tuning upon touch. It also informs the user that it will be tuning the guitar to standard tuning. The blue rectangles corresponding to each string will also show what notes the system will tune each string to. When the user presses “Start Tuning”, it begins the master tuning subroutine. Tuning Screen Informs the user that tuning is in progress. The green "Start Tuning" button you saw in the initial screen is now a red "Stop Tuning" button. Pressing this will stop the tuning. It also shows the status of each string, which corresponds to each rectangle shown. If the rectangle is red, that means that string is out of tune. If the rectangle is gold, then there was an error reading that strings' frequency, and normally means that the user must re-strum. If the rectangle is green, that means that string is in tune. On top of the rectangles will show the strings current note. This is an estimate based off of the read frequency values. This is determined by the Note subroutine, which simply will output the string of current note when passed a frequency. Figure 9: (Top to bottom) Start-up screen, initial screen, and tuning screen.
  • 12. 12 Professional Component Economic Concerns With this design for an automatic guitar tuner that comes built into the body of a guitar, there are several economic concerns that would have to be taken care in the case that this tuner would go into mass production. The electronic components such as the Arduino and trinket microcontrollers are commercially available; therefore in order using them in this product would not be a viable option. The microcontrollers would have to be designed and built on custom PCBs using the AtMega328 chips. The controller chips themselves would be cheaper than buying assembled Arduino boards in bulk because costs would be cheaper for the chips themselves. The raw materials to manufacture printed circuit boards might be expensive to acquire but there would be ways to cut costs in other areas during the design process. Once research of raw materials is complete, the budget would have to be restructured to incorporate the amount of custom built parts during the manufacturing process. Depending on the ability to produce the components in large scale would determine the affordability. Environmental & Sustainability Concerns AA batteries in this initial prototype power the Arduino, motor shields, and trinkets. In the case of this guitar being commercially available to the public, the battery choice would be switched to a rechargeable type battery. This would reduce battery waste and allow for users to reuse the batteries rather than disposing non-rechargeable batteries. Another option for a battery would be to incorporate the use of a battery pack in place of disposable or rechargeable AA batteries. Manufacturability Concerns First, the electronic components such as the Arduino and trinket microcontrollers are commercially available; therefore in order using them in this product would not be a viable option. The microcontrollers would have to be designed and built on custom PCBs using the AtMega328 chips. Doing this would be easier to manufacture because the body of the guitar could be designed around the custom built electronics rather than the electronics designed and built to fit inside of the body of an already existing guitar. The motors would also have to be designed and custom built to meet the specs needed to meet the torque requirements. The prototype of this guitar tuner could be considered to be a one-of-a-kind device because elements of its design have not been commonly used in commercially available tuners. Ethical Concerns The Arduino board, trinket microcontrollers and pieces of the code used for the motor shields are all considered to be open source. The custom boards would require code built from scratch. Special permission from manufacturers such as Fender and Gibson would be needed in order to use their guitar body designs, otherwise designs would be created for an entirely new body style. Once the design process is finished, measures would be taken in order to protect intellectual property involved in this project as well as making sure that the owners of intellectual property of components used in the initial prototype are given proper credit. Since parts of the prototype were considered to be open source, such as parts of the code associated with the motor shields and the I2C sections that allow the master-slave communication between the Arduino and trinket pros.
  • 13. 13 Health & Safety Concerns The design created for the consumer version of the guitar would include all the necessary components and accessories for the end user to successfully operate the tuner To prevent injury while restringing, safety instructions could be made to insure a user does it correctly. Safety measures could also be included in the programming of the motors in order to prevent the motors from over tightening and ultimately breaking the strings. It would be made sure that the final design meets any necessary standards set by IEEE and ANSI. Social & Political Concerns An automatic tuning guitar that has the components built into the body would allow for amateur and professional guitar musicians alike to be more efficient when it comes to keeping their instruments consistently tuned and sounding the way they are intended to sound. The only known licensing requirements would come straight from either Fender, Gibson or any other manufacturer of well known guitars, in order to use their designs for the body and neck of the guitar.
  • 14. 14 Improvements One of the potential future features could be multiple tuning settings, such as drop D & 1/2 step down. The screen would show the note changes for the strings as well. The construction and physical size of our circuit could also be drastically reduced. By including everything that isn’t the optical pickup on a single PCB (dedicated frequency & main processors, resistors, MOSFETs, etc.), the design could probably be as small as the Arduino Uno. This would make the practicality much more reasonable and implementation of design a lot easier. There may be other possible ways to mount the pickup electronics keep the optical pickup sleeker. If ways were explored to accurately bounce the light up at an angle and reflect it back down, the space taken up by the optical pickup could significantly reduce. This would also be much more visually pleasing and keep the strings open. The way depicted would create a signal inverse to our current design, unless the resistor off of the emitter is moved before the collector. Either way, it should not affect how the frequency is read. One of the many challenges this design possesses though is the use of wrapped strings, which make reflection almost impossible. However different string types may prove differently (such as nylon potentially). By implementing a quick-pull connector for the top phototransistor portion of the optical pickup, the guitar would have a much more natural feel while playing. The portion could detach and reattach only for tuning, and the LED portion remaining while the top is detached would barely look different from the standard pickups on the guitar. Rather than using 3D printed spools on the shafts, if the shafts themselves were 2-3 times the diameter, a hole could be drilled right into them to secure the string. This would lower the amount of torque required by the motors slightly. More importantly it would make string replacement much simpler and faster. Currently, only have the individual strings’ microcontrollers read frequency. A future design could have them not only do that, but instantly adjust the motor themselves following. They then would report to the main microcontroller whether it is in tune or not. Instead of modifying an existing body, a body could be formed to work fully with the system from the ground up. This would make assembly of the product easier, along with much better aesthetics. It would almost be required if this went into production. While not in tuning mode, additional functionality could also be applied to the system. One of the features that could be added is applying audio effects to the output signal. The idea behind this is you would then essentially have a multi-effects pedal built into your guitar. With the touchscreen system this would make it easy for users to apply & save settings. This would also be one less item your guitar would plug into before any amps. Figure 10: Representation of an alternate optical pickup design. This design shines IR light (red) at an angle, and is reflected back to the phototransistor.
  • 15. 15 Conclusion While there are many possible improvements that can be had upon our design, our initial prototype is a great proof of concept. The initial goal of automatically tuning a guitar without using sound and at a much faster pace (than individual string plucking) was met. This way, use of the AutoTun(a) guitar in real life would not be effected by other band instruments’ sound, and also would deliver a quick change in tune for a next song. The total cost of the project was roughly on par with the TronicalTune PLUS ($400). The purchased parts of the project that went directly into the final design cost $365, and with an estimated $35 in other material purchased by the school, brings an estimated total to $400. This total could be reduced if we implement what was discussed in the economic concerns of the professional portion and a few of our improvements. If this were to be a business endeavor, the markup would have to be factored into a selling price. Figure 11: Final appearance of the AutoTun(a) guitar.
  • 16. 16 Resources [1] "Tronical." TronicalTune. Tronical, n.d. Web. 19 Apr. 2015. [2] "Gibson Robot Guitar." Wikipedia. Wikimedia Foundation, n.d. Web. 19 Apr. 2015. [3] "Self Tuning, Alternate Tuning, Automatic Tuning System." AXCENT TUNING SYSTEMS. N.p., n.d. Web. 19 Apr. 2015. [4] "Gameduino 2: This Time It’s Personal." Excamera. N.p., n.d. Web. 19 Apr. 2015. [5] "RunningMedian Class on Playground." Arduino Forum. Arduino, n.d. Web. 19 Apr. 2015.