guitar performance

Download Report

Transcript guitar performance

JAMDROID
Group Seven
Kacey Lorton, BSEE
Brian Parkhurst, BSEE
Anna Perdue, BSEE
What Is It?
• Electrically controlled electromechanical system that produces human-like
guitar performance.
• Uses internal memory or external converted music files to send coordinated
commands to motors and solenoids, which control string pressing and
picking.
Motivation
• Interest in integrating music with electrical engineering concepts
• Exploration of an uncommon project theme
• Desire to increase knowledge of an familiarity with electromechanical
devices
Goals and Objectives
• Create characteristic guitar sound through electromechanical, rather than
human, performance
• Achieve satisfactory timing and coordination of electromechanical devices
within a narrower-than-perceptible tolerance.
• Acquire and drive devices whose performance will allow for audio playback
through a range of common tempos.
• Achieve goals with a low-cost, low-power, wall powered solution
Specifications and Requirements
• Overall system requirements:
Parameter
Specification
Maximum Note Speed
10 Hz (600 notes per minute)
Pitch Range
Three octaves (37 discrete pitch levels)
Volume Range
8 discrete volume levels
Primary Electromechanical Devices
Device
Function
Solenoid
Depresses guitar string to change pitch
Stepper Motor
Rotates guitar pick to strike string
Servo Motor
Drives solenoid to select different string;
Controls volume of guitar picking
Mechanical Block Diagram
• Base Assembly
Guitar Body Assembly
• Rests flush with the top of
Guitar Body (shown in
magenta)
• Holds box-like framework that
travels orthogonally to the
surface of the guitar, to
provide dynamic control
(shown in Pink)
• Box-like framework suspends
6 servo motors, 3 on each
side and staggered (Shown in
Lime Green)
String Picking System
• Stepper motors each have one
pick attached to the shaft
• One stepper is responsible for
one string
• Worm gear system (Dynamic
Control), one in each corner,
which rotate to provide minor
vertical position adjustments of
the stepper frame (shown next)
Dynamic Control System
• The idea: Raise and lower the
picks to change how far down
past the string they go
• The deeper the pick goes, the
further the string will be
displaced when it is plucked by
the stepper/pick
• This will allow for different
levels of intensity in the
playback of a song
Guitar Neck Assembly
• Framework that will enclose the
•
•
•
•
guitar neck
Two main bulkheads through which
the neck would pass
Two parallel dowels, fixed on the
bulkheads
Floor plate to mount servo motors
Solenoid assemblies will be:
• Attached to the servos via belts (shown in
green)
• Horizontally free-moving (frictionless but
attached to belts)
• Suspended over strings uniformly by
grooved wedges, shown in pink
String Selection and Fret Pressing
• 12 solenoids (shown in teal, one for
•
•
•
•
each fret of the first 12 frets on the
guitar neck)
Size constraint of the upper frets limits
our design to the wider, lower frets
12 Servo Motors (one for each
solenoid, responsible for moving it
from side to side)
This design is in lieu of an array of
solenoids (12 frets * 6 strings = 72
solenoids = expensive)
Also, movable solenoid alleviates size
constraint of solenoids (string-to-string
distance of 7mm at nut, 10mm at
bridge of guitar)
Electrical Block Diagram
Work Status:
Microcontroller
Solenoid
Servo
Stepper
Driver Circuits
Power
Regulation
Power Supply
Guitar
Computer
Guitar Amplifier
Purchased
Sampling
Research
Sampling
Research
Research
Purchased
Pre-owned
Pre-owned
Pre-owned
Picking System – Stepper Motor
• We are using bipolar stepper motors to drive
the rotation of the guitar picks
• The desired motor behavior is to rotate between -30o and
30o from the string, traversing 60o to pick one note
• 3.9V, 2-phase bipolar (SY20STH30-0604A, Pololu)
Specification
Desired Value
Product Value
Minimum torque
102.3 g-cm
180 g-cm
Max length, width
22 mm
20.2 mm
Rotational speed
200 rpm
286.8 rpm
Example Motor Step Sequence
• Full step sequence
• Both coils are energized at all
times
• Pulses must occur in
sequence, rather than with
constant polarity
• For rotation in the opposite
direction, the sequence is
reversed
IA
IB
Step Sequence State Machine
• We wanted to use two control lines
Dir
A
B
Da
Db
A+
B+
0
0
0
1
0
1
0
0
0
1
0
0
0
0
0
1
0
1
1
1
1
0
1
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
0
from the microcontroller:
- Step
- Direction
• All transitions occur at the positive
edge of the step signal.
• The full implementation of the state
machine for one motor encompasses
two XOR gates and two D flip flops.
• The derived input
• Da = Dir xor B’
• Db = Dir xor A
Stepper Motor Driver Circuit
Circuit flow: MCU Control Lines -> Logic -> H Bridge -> Motor
String Depression System - Solenoid
• The desired solenoid behavior is to apply
enough force to depress the string when
activated
• 5V D-frame (ZHO-0420S-05A4.5, Sparkfun)
Specification
Desired Value
Product Value
Force
200 gf
140 gf
Max length, width
20 mm
12, 11 mm
Rotational speed
200 rpm
286.8 rpm
Current Draw
1A
0.4 – 1 A
Weight
50 g
13 g
Solenoid Driver Circuit
• Simple switching circuit
• Darlington Pair BJT can handle
up to 8 A of current (we need
about 1 A)
• Flyback diode protects circuit
from back EMF
Pulley System- Servo Control
• The twelve selected servos
• interfaced directly with the microcontroller chip’s
twelve dedicated individual PWM GPIO pins
• Microcontroller and servo motors share a common
ground.
• The Servos (MG90S, TowerPro) require a
pulse width modulation voltage of 5 volts.
• When the input of 3.3 volts coming from the
microcontroller goes to the tri-state buffer they
can output the required 5 volts to the servo.
• The MG90S will require a voltage step up on
the PWM input line.
• The 74VHC244FT buffers’ Vcc are tied to the 5
Volt line used by the Servo DC power node.
• The 74VHC244FT comes in a surface
mount packaging,
• Resistors can be tombstone surface mount
components, to conserve space.
Dynamic Control
• Two servo motors the HS311,
Hitec
• They can be tied to the same power,
same PWM input control line, and the
same ground.
• Need to be actuated at the same time
and travel the same distance.
• This circuit is easy to implement
• No separate driver circuit
• One PWM line from the microcontroller.
• This should not cause any issues
apart from the current drawn from the
microcontroller.
Brains - Central Microcontroller
• Tiva C Series TM4C123G
• Built in PWM channels
• 32-bit ARM Processor
• Familiar CCS software
MCU Program Structure
• Lowest level functions:
• Change solenoid state (simple on/off)
• Change Servo PWM value (encodes position)
• Activate hardcoded stepper motor pulse sequence (one stroke)
• Higher level functions:
• Note parameter -> device command converter
• Timing optimization
Software/ Firmware Block Diagram
What is MIDI?
• Musical Instrument Digital Interface, or MIDI, was developed in 1983 as a
means for instruments and computers to communicate and control one
another.
• Most of the data in a MIDI file is dedicated to the different instrument tracks
and their events
• Events include Note Off, Note On, Note Aftertouch, Program Change, and Pitch Bend
• Each event contains note pitch, velocity (volume), and start and stop time stamp values
• Events are encoded in chronological order, with a field indicating the time
delay from the previous event, with the lowest value being zero, meaning the
event should occur simultaneously with the previous event.
Software Summary
• The goal of the of the desktop
application (C++) is to parse a MIDI
file into its sequence components
• Our baseline system only needs pitch,
volume, and timing data – the rest of
the data can be thrown out
• Shown: Relevant information on a five
note sequence
• Once the MIDI information is
processed, the entire sequence packet
is sent to the MCU which will
determine device commands
Sequence Title, Beats Per Minute = 60, Time Signature = 4/4
Number of items in Sequence = 6
Measur Note (0-127) Intensity Duration
Aftertouch
e
0.00
60 (Middle-c) 100%
Quarter
No
0.25
62
100%
Quarter
No
0.50
64
100%
Quarter
No
0.75
65
100%
Quarter
No
1.00
67
100%
Whole
No
2.00
0%
Rest
No
Modulatio
n
No
No
No
No
No
No
Frequencies
• MIDI has 128 different notes
• Some of them line up with available notes
that can be played by our apparatus
• The lowest frequency available on the
guitar, assuming a standard tuning of E, A,
D, G, B, and E in that order
• MIDI Sequences begin at the Scientific
Notation pitch of C1, which is a frequency of
32.703 Hz. This is below the lowest
available frequency to be possibly played on
the guitar.
• The maximum note being one octave above
E4 (12 frets meaning 12 half steps meaning
one octave), E5 is our maximum frequency
to be played. This note is 659.26 Hz.
String
Frequency
1(E)
329.63 Hz
Scientific
Pitch
E4
2(B)
246.94 Hz
B3
3(G)
196.00 Hz
G3
4(D)
146.83 Hz
D3
5(A)
110.00 Hz
A2
6(E)
82.41 Hz
E2
Mapping Module Example
• MIDI Sequence Notes will be given
equivalent positions on the guitar
• If a note can be played on an open
and available string, it would be
convenient in all aspects to simply
pick that particular string.
• Also to be converted is the measure
value to a timestamp value, by taking
the beats per minute and measure
and combining them, taking into
account the time signature as well,
into a point in time for our
convenience, with the beginning of the
sequence being time t = 0.000.
Sequence Title, Beats Per Minute = 60, Time Signature = 4/4
Number of items in Sequence = 6
Measure Note (0- String Fret
Whole/Hal Duration
127)
f/Quarter/e
tc
Time t
End
Note
Time
0.00
0.25
0.50
0.75
1.00
2.00
0.000
0.250
0.500
0.750
1.000
2.00
0.250
0.500
0.750
1.000
2.000
Inf.
60
62
64
65
67
X
2(B)
2(B)
1(E)
1(E)
1(E)
X
1
3
0
1
3
X
Quarter
Quarter
Quarter
Quarter
Whole
Rest
0.250
0.250
0.250
0.250
0.250
Infinity
Converted Mapping Module
• Example sequence, shown with
conflicts
• Warning in red
• Fret Conflict; two notes on the same
•
•
•
•
fret at the same point in time
This simple G – Chord cannot be
implemented in our design
The Higher note, 1(E) on fret 3 can be
moved to string 2(B), on fret 8
In yellow is a note that is beyond the
range of the playable frets
This note can be taken down an
octave and played
Firmware Summary
• Once the MIDI-converted Note
Sequence Packet has been
sent to the MCU, It must be
turned into sequential and
simultaneous Driver commands
• The microcontroller will see a
list of tasks to perform in a
timeline
• For this to happen, we need to
have a few data classes
Devices in state/position Value
Component
• Servo motors will need 6 different
states, one per position above a
string on the guitar
Solenoids only have two states, on
or off
Stepper motors have many
possible states, 0 (no action) all the
way up to the maximum speed we
can achieve
Different mechanical actions take
different lengths of time to
complete
Reference
Designation
Servo Motor 1
SER1
Servo Motor 2
SER2
Servo Motor 3
SER3
Servo Motor 4
SER4
Servo Motor 5
SER5
Servo Motor 6
SER6
Servo Motor 7
SER7
Servo Motor 8
SER8
Servo Motor 9
SER9
Servo Motor 10
SER10
Servo Motor 11
SER11
Servo Motor 12
SER12
Solenoid 1
SOL1
Solenoid 2
SOL2
Solenoid 3
SOL3
Solenoid 4
SOL4
Solenoid 5
SOL5
Solenoid 6
SOL6
Solenoid 7
SOL7
Solenoid 8
SOL8
Solenoid 9
SOL9
Solenoid 10
SOL10
Solenoid 11
SOL11
Solenoid 12
SOL12
Dynamic
Control DYN
Servos
Stepper Motor 1
STEP1
Stepper Motor 2
STEP2
Stepper Motor 3
STEP3
Stepper Motor 4
STEP4
Stepper Motor 5
STEP5
Stepper Motor 6
STEP6
Possible Values
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Up, Down
Low, High
0
through
Speed
0
through
Speed
0
through
Speed
0
through
Speed
0
through
Speed
0
through
Speed
Max
Max
Max
Max
Max
Max
Time-base list
• A note is given a slot with all of the
necessary commands required to
implement that note
• Notes in the future have to be
considered before they need to be
played, as servos have a noticeable
time delay to change position
• The advantage of splitting is that
there is inherent delays in moving
objects over variable distances,
which would need to be calculated
based on previous positions
• An example of what that would look
like is…
Timestamp
• Each type of Mechanical
device would get its own list
with time-based events
• Timing could be more precise
where required
• One issue could be
debugging unsynchronized
events
Timestamp
+0.000
+0.250
+0.500
+0.750
+1.000
Stepper
STEP2
STEP2
STEP1
STEP1
STEP1
Action
Pick
Pick
Pick
Pick
Pick
Timestamp
-0.250
-0.250
+0.275
+0.525
Servo
SER1
SER3
SER1
SER3
Action
Move to 2
Move to 2
Move to 1
Move to 1
Timestamp
Solenoid
Action
-0.050
+0.240
+0.249
+0.510
+0.740
+0.990
+0.999
+1.999
SOL1
SOL3
SOL1
SOL3
SOL1
SOL3
SOL1
SOL3
ON
ON
OFF
OFF
ON
ON
OFF
OFF
PCB Design
• No real size constraint on our PCB
• We will enclose our PCB and power supply inside a Metal ‘Bud Box’
• Large wiring harness going from PCB to guitar apparatus
• Used CadSoft Eagle for PCB implementation
• 95% complete with schematic
• Starting Board Layout
PCB Schematic and Board Layout
Power Supply
• SE-350-24 TRX Electronics
Specificatins
Input Voltage
115/230 VAC
Output Voltage
24 V
Output Current 14.6 A
Max Power
350 W
• This product offers protection for short circuit, overload, over voltage, and
over temperature
Component
Manufacturer
Power
Supply
Stepper
Motor
Servo
Motor
(Pulley
System)
Servo
Motor
(Dynamic
Control)
Solenoid
TRC
Electronincs
Pololu
MCU
TIVA
Part Number
SE-350-24
Rated
Voltage
24 VDC
Rated Current
14.6 A
3.9 VDC 0.6 A
Tower Pro
SY20STH300604A
MG90S
4.8-6
VDC
7.4-7.7mA/idle
160-180 mA no
load operating
Hiltec
HS-311
4.8-6
VDC
7.4-7.7mA/idle
160-180 mA no
load operating
SparkFun
ROB-11015
5 VDC
0.5 A
ROHS
TM4C123GH6PZ 3.3 VDC 19.7 mA
Power Distribution
Power Regulation Schematic
• LM25117
• Synchronous buck controller
intended for step-down regulator
applications from a high voltage
• The operating frequency is
programmable from 50 kHz to 750
kHz. T
• Features
•
•
•
•
Thermal shutdown
Frequency synchronization
Hiccup mode current limit
Wide Operating Range from 4.5V to
42V
Power Regulation
• TPS62095RGT
• Step down Converter
Power Regulation
• LMR10515Y
• Step-Down voltage regulator
Finances
Parts
Vendor
Part Number
Price
QTY
Total
Solenoid
SparkFun
ROB-11015
$4.95
12
$59.40
Flyback diode
Digikey
641-1311-1-ND
$0.11
12
$1.32
NPN Darlington Pair
Digikey
TIP102TU-ND
$0.91
12
$10.92
BJT base resistor
Digikey
CF14JT2K00CT-N
$0.08
12
$0.96
Stepper Motors
Pololu
1204
$17.95
6
$53.85
H Bridge IC
Digikey
296-29434-2-ND
$2.73
6
$16.38
D Flip Flop IC
Digikey
296-8257-5-ND
$0.52
3
$1.56
XOR Gate IC
Digikey
296-8375-5-ND
$0.49
3
$1.47
Servo Motors (Pulley
system)
Tower Pro
MG90S
$8.23
12
Buffer Driver
Digikey
74VHC244FT(BE)
$0.49
2
Parts
Vendor
Part Number
Price
QTY
Total
Power Regulator
Texas Instrument
TPS54336
$2.26
1
$2.26
Power Regulator
Texas Instrument
TPS61725
$1.44
1
$1.44
Power Regulator
Texas Instrument
LM25117
$4.30
1
$4.30
Power Supply
TRC Electronics
SE-350-24
$55.05
1
$55.05
$98.76
Building Material
----------------
-----------------------
$50.00
------
$50.00
$0.98
PCB board
-----------------------
$50.00
1
$50.00
Trapezoidal Tooth
Urethane
1679K634
$1.39
12
$16.68
----------------
-----------------------
$20.00
1
$20.00
Servo Motors
(Dynamic Control)
Hiltec
HS-311
$10.02
2
$20.04
Driver Belt
Power Regulator
Texas Instrument
LM3150
$1.42
1
$1.42
Bud box
Milestones
AUGUST
1-8
9-15
16-22
23-31
SEPTEMBER
1-5
6-12
13-19
20-26
27-31
OCTOBER
1-9
10-16
17-23
24-28
November
1-9
10-16
17-23
24-31
December
1-5
6-13
Order Parts
Mechanical testing for string plucking sub-system, work on code
Mechanical testing for String Depression sub-system, work on code
Work on programming code, PCB Design
Continue program, and PCB Design
Code Testing; finalize schematics
Code Testing; finalize schematics
Debug; order PCB Board
Debug
Testing
Debug
Assembly of systems
Assembly of systems
Interface
Interface
Testing
Testing
Work on paper and presentation
Presentation
ANNA
Division of Labor
System
Anna
Brian
Dynamic Control
X
Electrical
Enclosure
X
PCB
X
Power
X
Pulley
X
Servo
X
Software
Solenoid
X
X
X
Stepper
Structural Frame
Kacey
X
X
X
X
ANNA
Progress Report
Series 1
Prototype
Testing
Series 1
Research
Design
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
Problems
Questions?