Download presentation
Presentation is loading. Please wait.
1
The Self Tuning Guitar Kit
Group 5 ECE 445: Senior Design Tom DaMario & KyungJin Lee December 4, 2008
2
Introduction Kit provides fast, easy way to tune almost any guitar automatically Combines TI DSP, a simple microcontroller, and a stepper motor Gives easy user interface to make anyone could tune the guitar
3
Features Universal Design 3 different tuning configurations
Standard, Drop-D, Open-G Simple operation Accurate to +/ Hz
4
Objectives Portability: 100% Battery Powered Device and should be able to fit in guitar case Universal: Device should fit on any guitar Functionality: Device should have multiple tuning modes
5
Tuning Configurations
String Number Standard Tuning Drop-D Tuning Open-G Tuning Note Frequency [Hz] 6 E 82.4 *D 73.4 5 A 110 *G 98 4 D 146.8 3 G 196 2 B 246.9 1 e 329.6 293.6 * Strings that change from standard tuning. Source:
6
Hardware Overview DSP: C6713 DSK PIC 16F877A
Takes analog signal from guitar and runs ADC Runs FFT on digital signal Takes difference between desired signal and received signal PIC 16F877A Takes string number from DSK and outputs to Hex display Receives two signals from DSK to turn motor Motor: Parallax # Turns guitar tuning peg until desired frequency is reached
7
Software Overview Code Composer Studio v3.3
Used to connect to DSK Program/Run DSK Flashburn PIC C compiler and MPLAB IDE Used to convert .c program to assembly to load program on PIC 16F877A
8
Project Flowchart
9
Output from Guitar Without Amplification: Noise Level:
Ave noise level = 22.8mVp-p Ave signal level = 150.3mVp-p Noise % = 1- { ( ) / } = 15.16% Noise Level: String 3 without Amplification:
10
Signal After Amplification
Amplifier Circuit: After Amplification:
11
Original plan: Use C5509A Has built-in A/D converter
Design to draw low power (Easy to make Portable) Problems: Emulator could not detect target DSP chip Back current between CVdd and DVdd
12
C6713 DSK Board
13
C6713 Board DIP switches for user input Built-in LED for tuning config
Analyze the audio input from guitar to find different frequency in real time Send the motor control output to PIC
14
Flowchart of DSP Software
Holding DIP Switch 3 Analyzes the Signal in Real Time To ignore any input when guitar is not plucked, we add this part in the code. Simplify the output to PIC to control the motor Only two bits of GPIO are required
15
Only Run FFT When String is Plucked
Without any audio input With guitar audio input String 6 Max ≈ 4 String 6 Max ≈ 90
16
Calculating the Frequency
Lowest sampling frequency of A/D converter is 8kHz # of sample = 2048 Step size in frequency = 8000/2048 ≈ 3.906Hz Frequency = (step)(3.906Hz) 1st Peak: 84 2nd Peak: 168 3rd peak: 252 Mean difference ≈ 84 Freq = (84)(3.906) = 328.1Hz Frequency difference = 1.496Hz
17
Testing the DSP To test the user input from DIP switch, use LED on the board and check desired frequency from the memory To test the FFT, compare graphs from CCS to make sure the peak frequency of FFT is same as the frequency of input signal
18
DSK Challenges Find the common ground – to solve this problem we use TP32 as common ground from DSP board Find I/O from DSP – Use HPI to output as GPIO Cannot find the way to send any input to DSP – Use DIP switch as the user input Get the right speed for motor to turn, and prevent any delay
19
Increasing the Accuracy
Increase the number of samples taken by the DSP Would make the running time longer Requires more memory space Formula that filters out unclear guitar inputs When the first peak of FFT is smaller than other peaks of FFT
20
Daughter Card
21
Wire Wrapping Technique
Disadvantages: Wires not soldered in place Time requirement Messy
22
Voltage Regulator for Battery Power
23
Motor Specifications Parallax Continuous Rotation Servo #900-00008
Stepper Motor Powered with 5VDC Torque = 3.40 kg-cm (47 oz-in) Need about 37 oz-in to turn peg
24
Motor Power Consumption
String Number Average Current [A] Max Current [A] Average Power [W] Max Power [W] Clockwise Counter Clockwise 6 0.35 0.17 0.45 0.18 1.75 0.85 2.25 0.9 5 0.33 0.36 1.65 1.8 4 0.31 0.19 0.34 0.2 1.55 0.95 1.7 1 3 2 0.29 1.45 0.3 1.5 Max Power Consumed: 2.25 Watts (String 6 Clockwise) Average Power Consumed: 1.25 Watts
25
Motor Resolution Find Hz/Degree for each peg using motorRes.c
while (input(PB1)==1) //Push Button 1 is pressed, rotate clockwise { delay_ms(500); //wait for button to be depressed so that exact //number of pulses measured for (k=0; k<85; k++) //send 85 pulses to motor output_high(motor); delay_ms(1); output_low(motor); delay_ms(20); } Adjust k until motor turns exactly 360⁰
26
Data Taken from Pic.c String Number Clockwise 360⁰ Turn [Steps]
Counter Clockwise 360⁰ Turn [Steps] Clockwise Resolution [⁰/Step] Counter Clockwise Resolution [⁰/Step] No Load 51 49 7.06 7.36 6 56 84 6.43 4.29 5 60 81 4.44 4 3 2 62 5.81 1 63 86 5.71 4.19
27
Motor Resolution (continued)
String Number Frequency at θ = 0⁰ [Hz] Frequency at θ = 360⁰ [Hz] Frequency at θ = 720⁰ [Hz] Frequency at θ = 1080⁰ [Hz] 6 52.63 82.65 105.26 125 5 108.7 129.87 142.86 4 119.05 144.93 166.67 181.82 3 156.25 196.08 223.21 263.16 2 211.86 250 280.9 333.33 1 297.62 362.32 384.62 Θ = Standard Tuning – Frequency of 360⁰ Peg Turn
28
Motor Resolution (continued)
String Number Equation 6 f = 0.067θ+79 5 f = 0.056θ+110 4 f = 0.058θ+140 3 f = 0.097θ+190 2 f = 0.110θ+250 1 f = 0.081θ+330 Observations: Strings 6-4 have different slopes than strings 3-1 due to manufacturing process
29
Motor Resolution Results
String Number Frequency/Rotation [Hz/⁰] Rotation/Step [⁰/Pulse] Resolution [Hz/Pulse] Clockwise Counter Clockwise 6 0.067 6.430 4.290 0.431 0.287 5 0.056 6.000 4.440 0.336 0.249 4 0.058 0.348 0.258 3 0.097 0.582 0.416 2 0.110 5.810 0.639 0.488 1 0.081 5.710 4.190 0.463 0.339 Average Clockwise Resolution = .467 Hz/Pulse Average Counter Clockwise Resolution = .340 Hz/Pulse
30
Motor Challenges Motor designed to run on up to 6VDC
Running on 5VDC reduced torque Running daughter card and motor on same power supply reduced current to motor Gave motor separate battery More power supplies tied to common ground Needed to slow motor & still provide adequate torque
31
Motor Bracket
32
Future Improvement Increase Frequency Accuracy Flashburn
Create PCB with DSP chip embedded No need to have unused board components Power consumption at a minimum Convert entire project to battery power Reduces size Increase Number of Tuning Configurations
33
Ethical Considerations
Complies with IEEE Code of Ethics Tried to make kit as universal as possible One guitar maker will not benefit over others
34
Capacitors/Resistors/Diodes
Cost Analysis Parts: Item Manufacturer Cost Per Item Quantity Total Cost C6713 DSK Board Spectrum Digital $415.00 1 PIC 16F877A Microchip $3.71 Voltage Regulator Estek $0.90 2 $1.80 Crystal Oscillator Fox $0.40 Capacitors/Resistors/Diodes N/A $0.10 15 $1.50 Hex Display HP $10.56 Battery 9V Duracell $4.00 $8.00 Protoboard Silicon Labs $15.00 DaughterCard $99.99 Code Composer Studio v3.3 Texas Instruments $995.05 Guitar Tuner TU-80 Boss $24.95 Audio Cable 20' Peavy $19.95 Stepper Motor # Parallax $12.99 Mounting Bracket Machine Shop $50.00 TOTAL $1,658.90 Labor: $40.00/Hr x 2.5 x 200Hr x 2 People = $40,000 Total = $40,000 + $1, = $41,658.90
35
Special Thanks Professor Gary Swenson Ben Graf
Texas Instruments University Division ECE Machine Shop ECE Parts Shop
36
Questions ???
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.