project14 design review1
TRANSCRIPT
-
8/8/2019 Project14 Design Review1
1/20
Automatic Guitar Tuner
ECE 445Fall 2007
Group #14
Date: September 21, 2007
Ryan FreebergTiffany KasettratutDarren Pocci
TA: Tony Mangognia
1
-
8/8/2019 Project14 Design Review1
2/20
Automatic Guitar TunerThis project was chosen due to its signal processing capability and control aspect. All
group members are interested and ambitious in these fields, thus this project will provide achallenging, fun, and learning experience.
Objectives
To build a device that will automatically tune a guitar. It will take the signal from theelectrical output of an electric or acoustic/electric guitar and depending on the frequency it willcontrol motors that will then turn the tuning pegs to get the guitar in tune. Our project will be amodification of a standard guitar stand where the musician can put their guitar, attach tuningmotors, input desired tuning configuration on the user interface, and then the machine wouldtune all strings on the guitar. The tuner will be able to quickly and precisely tune a guitar to afew common tuning configurations (e.g., standard, open, and Drop-D) with little humanintervention.
Benefits: Quick and precise tuning of instrument
No modifications to the guitar are necessary
Prevents users involvement of tuning process
Prevent human error in the tuning process
Features:
Several different tuning configurations to choose from
Auto-plucking component so the user doesnt have to pluck
Works with multiple different makes and models of guitars
Block Diagram
2
-
8/8/2019 Project14 Design Review1
3/20
Schematic Diagrams & Software/Code Flowcharts
User Interface Schematic
User InterfaceAuto-Plucker
Signal Processor
Guitar
Motor
3
-
8/8/2019 Project14 Design Review1
4/20
PIC16F877ARA0/AN0 (19)
RA1/AN1 (20)RA2/AN2/Vref-/Cvref (21)
RA3\AN3\Vref+ (22)(7) Vdd(28) Vdd
(18) MCLR/VppRB0/INT (8)
RB1 (9)
RB2 (10)RB3/PGM (11)
RB4 (14)RB5 (15)
RB6/PGC (16)OSC2/CLKO (31)
(30) OSC1/CLKI
RC0/T1OSO/T1CKI (32)
RC1/T1OSI/CCP2 (35)RC2/CCP1 (36)
RC3/SCK/SCL (37)
(6) Vss(29) Vss
LCD: Hitachi HD4478U
(37) DB0
(38) DB1
(39) DB2(40) DB3
(34) RS(35) R/W
(36) E(22) OSC1
Signal Processor
Standard Tuning Selected
Drop-D Tuning SelectedOpen Tuning Selected
Tuning Done
Standard
Tuning
Drop-D
Tuning
Open
Tuning
5K
+5
10 MHz
Enter
User Interface Flowchart
4
-
8/8/2019 Project14 Design Review1
5/20
Signal Processor Schematic
StartStandard
Tuning modeDrop-D Tuning
modeOpen Tuning
mode
Drop-DTuningbutton
OpenTuningbutton
Standard
Tuningbutton
LCD:Select TuningStandard
LCD:Select TuningDrop-D
LCD:
Select Tuning...Open
EnterButton
pressed
EnterButton
pressed
EnterButton
pressed
LCD:StandardTuning
LCD:Drop-DTuning
LCD:OpenTuning
[Inputs tuning style]
Signal Processor
[Outputs signal when done]
LCD:StandardDone
LCD:Drop-DDone
LCD:OpenDone
Enter
Buttonpressed
Restart
5
-
8/8/2019 Project14 Design Review1
6/20
(52) DIOB3
(51) DIOB2
(17) DIOB1
(16) DIOB0
(15) DIOA7
(48) DIOA6
(47) DIOA5
(13) DIOA4
(12) DIOA3
(45 )DIOA2
(44) DIOA1
(10) DIOA0
(11) GND
(1) +5 V
NI 653x I/O Connector
Frequency too high output to motor control
Frequency too low output to motor control
Frequency just right
Select bit 2 for motor MUX
Select bit 1 for motor MUX
Select bit 1 for motor MUX
Done to user interface
Open Tuning from user interface
Drop-D tuning from user interface
Standard Tuning from user interface
Pluck to Auto-plucker
Next str ing to Auto-plucker
6
-
8/8/2019 Project14 Design Review1
7/20
OpenTuningChosen
?
Drop-D
TuningChosen?
At leastone tune
signalhigh
Load OpenNote
Frequencies
Load Drop-D
NoteFrequencies
Load StandardNote
Frequencies
Pluck
Frequencywithin
frequencyrange?
Amplitude OK?
FrequencyGreater
thanRange?
Send loosenstring signal
Send tightenstring signal
FinishedLast
String?
Move to NextString
END
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
SignalProc
essorFlowc
hart
-
8/8/2019 Project14 Design Review1
8/20
Motor Schematic
1
2
3
4
5
6
7
8
9
10
11
12
24
23
22
21
20
19
18
17
16
15
14
13
+5V
Black
White
Red
Parallax Continuous Rotation
Servo Motor
Model #900-0008
BasicX-24
Output Signalsfrom DSP
Frequency Too High
Frequency Too Low
Frequency Just Right
Output
Input
Input
Input
Gnd
I/O
Gnd
Vcc
I/O
I/O
I/O
S2
S1
S0
1
0
2
3
4
5
6
7
1st String Motor
6th String Motor5th String Motor4th String Motor3rd String Motor
2nd String Motor
Current String
Bits from DSP
7
9
10
11
12
13
14
15
3
2
1
G1
G2AG2B
4
5
6
LS138
6
-
8/8/2019 Project14 Design Review1
9/20
Motor Flowchart
FrequencyJust RightSignal ON
Stop TurningMotors
FrequencyToo HighSignal ON
FrequencyToo LowSignal ON
Loosen Pegs (Turn MotorCounter-Clockwise)
Tighten Pegs (TurnMotor Clockwise)
Yes
Yes
Yes
No
No
No
7
-
8/8/2019 Project14 Design Review1
10/20
Auto-Plucker Schematic
1
2
3
4
5
6
7
8
9
10
11
12
24
23
22
21
20
19
18
17
16
15
14
13
+5V
Black
White
Red
Parallax Continuous Rotation
Servo Motor
Model #900-0008
BasicX-24
Output Signalsfrom DSP
Pluck String
Move to Next String
Output
Input
Input
Gnd
I/O
Gnd
Vcc
I/O
I/O
I/O
Auto-Plucker Flowchart
MoveString?
PluckString?
Signal to Motors tomove string Signal to Motors
to pluck string
Yes
Yes
No
No
8
-
8/8/2019 Project14 Design Review1
11/20
Schematic Descriptions
User Interface
This will be the part where the user will be able to select what type of tuning they wantbased three buttons corresponding to the different tuning styles offered (Standard, Drop-
D, and Open) and enter the style with an enter button to start the tuning. Buttons
o The four buttons will be inputted into the PIC which will then output signals to
the LCD and the Signal Processor
PICo Three more outputs from the PIC are sent to the Signal Processor corresponding
to the tuning style chosen. After tuning has completed the Signal Processor willthen send a signal to the PIC which will then send the corresponding addressregister to the LCD to display that the tuner has finished. The PIC will handle thesoftware necessary to send out the right signals to both the Signal Processor andLCD. Pressing the buttons is the only thing the user has to do (aside from placing
the guitar in the stand and attaching the motors and strummer) to get the guitar intune.
LCDo The LCD will have eight inputs from the PIC. Four of them will correspond to
the register selection address that will tell the user what tuning style they areselecting and the status of the tuner. The four other inputs are for Enable,Register Select, Read/Not Write, and the Clock.
Component Leader: Tiffany Kasettratut
Signal Processor
The signal processor will take the input from the guitar and extract the frequency
component of the signal. It will compare this to what the user selected, represented bythe three tuning set inputs: standard, drop-f, open, and depending upon if the frequency istoo high, too low, or acceptable, tell the motor which direction to turn. These arerepresented in the three output signals: frequency too high, frequency too low, andfrequency just right. The signal processor will send a pluck output to the auto-plucker tobegin operation. In addition, the signal processor will also keep track what string thetuner is on and output that value to the motor represented by the three select bit outputs. Itwill also output a move string signal to the auto-plucker when a string is tuned. Thisprocedure will be done in LabVIEW. With LabVIEW, the guitar can be plugged into themicrophone jack on the computer and easily read. The frequency can be directlyextracted from this signal. The signal processor will make use of the Data Acquisition
Board in the lab to communicate with the other parts of the project. Lastly, the signalprocessor will send a done output signal to the user interface to notify the user of tuningcompletion.
Component Leader: Ryan Freeberg
9
-
8/8/2019 Project14 Design Review1
12/20
Motor
The motors control the tension of the strings, which controls the emitting frequency.
BasicX-24 Controller
o The controller will take inputs from the signal processor: frequency too high,frequency too low, and frequency just right and output a pulse that controls theturning direction and turning magnitude of the motors. Frequency too high willsend out a pulse to loosen the string tension. Frequency too low will send out apulse to tighten the string tension. Frequency just right will tell the motors to stop
3-to-8 Decodero The decoder will receive input from the signal processor to indicate which string
to tune and, thus, which motor to turn. These signals are the three select bits. Inaddition, the decoder will also receive input from the controller, which is a pulsethat determines the turning direction and turning magnitude of the motors.
Motor
o Only viable input is the white wire, which is the pulse that determines the turningdirection and turning magnitude of the motors.
Component Leader: Darren Pocci
Auto-Plucker
This block will be the mechanical device that will automatically pluck the strings of theguitar or move to the next string.
Motoro This will be able to pluck multiple times if the amplitude of the signal in the
Signal Processor degrades to a point where it is unusable. This will also be ableto move to the next string on the guitar once the prior string has been tuned. The
motor has one input pin from the controller that determines the turning directionand turning magnitude.
Controllero This will tell the auto-plucker motors to pluck when the user has initiated tuning.
Also, this block will determine if the string needs to be plucked again or if thecurrent string is in tune and needs to move to the next string based on the signalsfrom the signal processor. The controller has two inputs from the signalprocessor that will tell the Auto-Plucker whether it needs to pluck the string ormove it to the next string and one output to the motor.
Component Leader: Ryan Freeberg
Guitar
Creates the audio output for determining frequency components after the Auto-Pluckerplucks a string. The Tuning Motors will change the frequency depending on thedirection that it turns.
Component Leader: Tiffany Kasettratut
10
-
8/8/2019 Project14 Design Review1
13/20
Performance Requirement
The requirements for our tuner are obviously to get the guitar in tune. We will do this bymaking sure the frequency of the guitar signal is within 2 Hz of the actual frequency of the note.
This is because the smallest difference a musically trained ear can detect is about 2 Hz[1]
. It willalso be able to attach to a wide variety of electric guitar models. Feedback of control system willguarantee no broken strings. Our device must completely tune a guitar within 2 minutes ofinitiation.
Tolerance Analysis
Since our device measures the frequency of a signal generated by the guitar, the signalprocessor is essential to extract the frequency components to get the emitting signal from theguitar in tune. When the string is plucked and the frequency detected by the signal processor iswithin 2 Hz of the actual note, the tuning motor must stop in time without changing the outputfrequency more than 0.5 Hz. In other words, the tuning motors must have a fast enough response
time to not de-tune the guitar string by overturning the tuning peg. In addition, this means thatthe motors will also have to be able to change the frequency by less than 0.5 Hz. Also, the signalprocessor will have to be able to detect the frequency with and accuracy of +/- 2Hz.
Testing
Signal Processor
The signal processor will first be verified by hooking it up to a function generator andmaking sure that it extracts the frequency correctly. We will plot the actual frequency of thefunction generator vs. the results obtained from the signal processor and calculate the percenterror. Then, we will input signals from the guitar to the signal processor. We will compare whatfrequency we find with what frequency a commercial guitar tuner finds and calculate the percenterror. We will then test to make sure the logic works correctly. This will be done by attachingthe inputs to function generators and using indicators in the LabVIEW program to make sure thatcorrect logic values are present at different points in the program.
User Interface
The User Interface can be broken down into three parts (buttons, LCD, and PIC). To testthe buttons, we will connect them to an oscilloscope and make sure that when the buttons arepressed the input voltage will drop from high to low due to the connection to ground.
The LCD will be tested by inputting different register addresses corresponding to eachtuning style during selection, tuning, and finishing that will call upon different sayings on theLCD screen. We will also test the home function of the LCD by inputting the correct inputs totest the reset after a tuning has been completed.
The PIC will be tested by selecting different inputs corresponding to the different tuningbutton selections and the done signal from the Signal Processor. An oscilloscope will be hookedup to all the outputs to make sure the right values are read to the LCD and the Signal Processor.
We will test the User Interface as a whole connecting all the components and selectingdifferent inputs and verifying that the correct information appears on the LCD and that the
11
-
8/8/2019 Project14 Design Review1
14/20
correct signals are outputted from the PIC. This will be compared to a table we have that showswhat the correct outputs should be.
state initialization selection enter selection tuning done reset
inputs
enter RA0 1 1 1 1 0 0 0 x 1 1 1 0
standard RA1 1 0 1 1 x x x x x x x x
drop-d RA2 1 1 0 1 x x x x x x x x
open RA3 1 1 1 0 x x x x x x x x
done RC3 x x x x x x x 0 1 1 1 x
tuning standard standard drop-d open standard drop-d open previous standard drop-d open standard
outputs
db0 RB0 0 0 1 0 1 0 1 x 0 1 0 0
db1 RB1 0 0 0 1 1 0 0 x 1 1 0 0
db2 RB2 0 0 0 0 0 1 1 x 1 1 0 0
db3 RB3 0 0 0 0 0 0 0 x 0 0 1 0
RS RB4 1 1 1 1 1 1 1 x 1 1 1 1
R/W RB5 1 1 1 1 1 1 1 x 1 1 1 1
E RB6 1 1 1 1 1 1 1 0 1 1 1 1
standard RC0 0 0 0 0 1 0 0 previous 0 0 0 0
drop-d RC1 0 0 0 0 0 1 0 previous 0 0 0 0
open RC2 0 0 0 0 0 0 1 previous 0 0 0 0
LCD "standard" "standard" "drop-d" "open""Standardtuning"
"Drop-dtuning"
"Opentuning" previous
"standarddone"
"drop-ddone"
"opendone" "standard"
Motor
The motor control will be verified by using a function generator to simulate differentinputs and then, given these inputs, output the correct turning direction of the motors. Also, whena correct frequency is simulated we will make sure the control unit outputs a signal to stopturning the motors.
The motors will be verified by inputting a signal to the motors to simulate the input fromthe controller and making sure they turn in the correct direction or stop. We will measure tomake sure that the motor will not turn more than 3 degrees.
Auto-Plucker
The auto-plucker control will be tested by simulating the start of the tuning process witha function generator and making sure it outputs a pluck signal to the Auto-Plucker. Also, it will
be tested by inputting a signal that simulates the completion of tuning of one string (determinedby the signal processor) and seeing if the Auto-Plucker moves to the next string. Lastly, we willmake sure the auto-plucker moves the pick a full strings width distance when told to move.
12
-
8/8/2019 Project14 Design Review1
15/20
Cost Analysis
User Interface
Part Quantity Price Total Order StatusLCD Hitachi HD4478U 1 $13.95 $13.95 WFA
Button Omron B3F Switches 4 $0.35 $1.40 WFA
PIC Microchip PIC16F877A 1 $3.71 $3.71 IL
Resistor 5k 4 $0.25 $1.00 WFA
TOTAL $20.06
Signal processor
Part Quantity Price Total Order Status
DAQ NI PCI-32HS 1 $1,199.00 $1,199.00 ILCable SH68-68-DI 1 $129.00 $129.00 IL
TBX-68 Block 1 $159.00 $159.00 IL
LabView 1 $1199.00 $1199.00 IL
1/4 male to 1/8 femaleadapter
1 $9.00 $9.00 Have
TOTAL $2,695.00
Motor
Part Quantity Price Total Order Status
BasicX-24 Microcontroller 1 $49.95 $49.95 ILSN74LS138 Decoder 1 $0.40 $0.40 WFA
Parallax Servo Motor #900-0008 6 $12.95 $77.70 WFA
6 $1.45 $8.70 Have
TOTAL $136.75
Auto-Plucker
Part Quantity Price Total Order Status
BasicX-24 Microcontroller 1 $49.95 $49.95 IL
Machine Shop 4 $35/hr $140 N/A
TOTAL $189.95
Guitar
- User Supplied
13
-
8/8/2019 Project14 Design Review1
16/20
Overall Total: $3041.76
Key
WFA Waiting For ApprovalIL In LabN/A Not Applicable
Addendum
Although we have an idea for the auto-plucker component, we may have been slightlyover-ambitious in the proposal. As a result, we will strive to finish this component but we willwork on it last, as indicated in the schedule.
Rough Mechanical Projections
Auto-Plucker
14
-
8/8/2019 Project14 Design Review1
17/20
Projected Torque Calculations
With no response from the physics lab department, we have included a torque calculationthat will tell us the needed torque to turn the tuning pegs. Note: this example is not our own and
is taken from [2] referenced at the end of this paper.
Simulations: See Appendix 2.
Schedule
WEEK Ryan Tiffany Darren
Sep 10 - Obtain Guitar outputsignals
X - Begin to order parts 0 - Obtain stepper motors 0
Sep 17 - Finish schematicdiagrams for signalprocessor and auto-plucker- Complete softwareflowchart for signal
processor and auto-plucker
X
- Finish schematic diagramfor user interface- Update testing procedureand tolerance analysis
X
- Finish schematic diagramfor motors- Update cost analysis andschedule
X
Sep 24 - Create signal processor inLabView- Test signal processor withsimulated sinusoidal inputscreated in LabView
- Program PIC to takeinputs from buttons andoutput correct signal minusLCD outputs- Test correct PIC bypushing all different buttoncombinations and observing
- Program BasicX-24 tooutput pulses that will rotateservo CW, CCW, and stop- Test all three functions indifferent permutations
15
-
8/8/2019 Project14 Design Review1
18/20
output
Oct 1 - Program LabView toacquire signal from dataacquisition board- Test signal acquisition
with function generator,then guitar
- Program PIC to makeproper display on the LCDwith corresponding tune setchoices
- Test LCD with differentpermutations
- Program BasicX-24 tooutput pulses that will rotateservo CW, CCW or stopbased on input from SP
- Test by simulatingdifferent input combinations
Oct 8 - Program SP to countnumber of tuned strings- Test outputs of SP basedon different emitting tonesfrom guitars and ability tocount # of tuned strings
- Connect buttons, PIC, andLCD to each other- Test correct output anddisplay based on differentinput sequences
- Connect MUX to motorunit to provide six stringfunctionality- Test proper rotation tocorrect motor based onnumber of strings tuned
Oct 15 - Construct bridge thatservo motor moves upon
- Calibrate motor movementto linear movement
- Program BasicX-24 tooutput pulses that moveplucker one string length
back and forthOct 22 - Connect Signal Processor
to User Interface- Test functionality of twomodule unit
- Connect Signal Processorto User Interface- Connect Signal Processorto Auto-Plucker- Test functionality of bothtwo module units
- Connect Signal Processorto Motor unit- Test functionality of twomodule unit
Oct 29 - Debug Signal Processorand Auto-Plucker
- Debug User Interface - Debug Tuning motors- Ensure connection ofmodules for mock-up demo
Nov 5 - Test stringency of signal
processor by calculatingdelay of stop signal aftercorrect frequency attained
- Test durability of auto-
plucker by determining howmany cycles before movedistance is inproper
- Test stringency of motors
by calculating delay of stopafter signal turned off
Nov 12 - Improve robustness ofAGT by improving delayof modular components
- Improve robustness ofAGT by improving delay ofmodular components
- Start final paper
Nov 19 Thanksgiving Break Thanksgiving Break Thanksgiving Break
Nov 26 - Present and Demo AGT- Start final paper
- Present and Demo AGT- Start final paper
- Present and Demo AGT- Start final paper
Dec 3 - Turn in final paper - Turn in final paper - Turn in final paper
16
-
8/8/2019 Project14 Design Review1
19/20
17
-
8/8/2019 Project14 Design Review1
20/20
References
[1] Henderson, Tom. Lesson 5: Musical Instruments. 10 Sep 2007.
[2] House, et al. A Self-Tuning Acoustic Guitar. Ohio: Ohio Northern University, 2006.
18