Design Presentation

BassBot
Design Team 03
Louis Begue-­‐Archivist, EE Greg Haren-­‐So8ware, EE Joshua Kuzman-­‐Hardware, EE Michael Prechel-­‐Team Lead, EE Dr. CarleFa Dr. Lee 12/2/2011 Need
•  RoboGames music robot challenge is a
competition where robots are designed and built
to play a musical instrument autonomously.
•  Scored based on the creativity, quality of the
sound, and diversity of sound.
•  Three judges score the competition by giving a
ranking of 1 through 10.
•  The robot must be unique in design and
functionality compared to known projects.
2 Goal
•  To design and build a robot that autonomously
plays a bass guitar through user interface and
pre-song programming.
•  BassBot will allow the user to download songs to
play autonomously or in real time through the
use of an iPad application
3 Design Requirements
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
The robot will play autonomously
The robot will ideally change positions on the same string in
0.125s/fret
The robot will be programmed using C language
MIDI Protocol
Cost should not exceed $1000
Play single notes on multiple strings
Custom tempo can be set
Robot will be capable of being loaded with a pre-sampled song
Force sufficient to push string down or strike the string
The robot will use an iPad application to play BassBot in real
time
4 Accepted Technical Design
• 
• 
• 
Mechanical
–  Structural Considerations
–  System Dynamics
–  Hardware Diagrams
Electrical
–  Schematics
Software
–  Computing
–  Communications
–  iPad
–  MIDI
5 Mechanical
Structural Considerations
• The robot will play autonomously
• Play single notes on multiple strings
• Cost should not exceed $1000.00
• The robot will ideally change positions on the same string in 0.125s/fret
• Force sufficient to push string down or strike the string
6 -The robot will play autonomously
-Play single notes on multiple strings
-Cost should not exceed $1000
7 .
System Dynamics
-The robot will ideally change positions on the same string in
0.125s/fret
•  To fulfill the design requirement of moving two inches
(one fret) in an eighth of a second, the speed needed to
meet this requirement is
•  The time it will take to cover the required distance is
•  This is the time it takes to make one revolution with the
stepper motor. Revolutions per minute will be
•  At this rpm, the chosen stepper motor will produce 45
mNm of torque, well above the required 32.32 mNm.
8 -Force sufficient to push string down or strike
the string
The max string force ~ 12 Newton’s or 2.7 lbs
(Quality Sound)
9 Cross SecSon of Guitar and Bar Slider Bar Xa X Xb String Fret
Guitar Neck Fret
not to scale Force to overcome (compress) spring (Xa)
Force to move distance (Xb)
Total Force to press string = 3.39lb
10 Hardware Block Diagrams
11 Solenoid Driver Analysis
• Solenoid (inductor) at DC is short
• Solenoid Resistance = 3.8 Ohms
• Turn ON and OFF with microcontroller I/O
12 Stepper Motor Driver
• Driven by PWM signal from microcontroller
• Current per phase found with
Example:
Risense = 0.25 Ohm
VREFx = 2.5 V
The full-scale (100%) chopping
current will be
2.5 V / (5 x 0.25 Ω) = 2 A.
13 Optional I/O Expander
• For optional senor feedback
• I2C Communication
14 Software Block Diagram
iPad/iOS
Play Live
Main
Main
Menu
Menu
Tech
Specs
PC/C
MIDI Data
Watch Me
Settings
Redpark Serial Cable
Microcontroller
RS-232
Primary
Microcontroller
I2C
Secondary
Microcontroller
Stepper
Motor,
Solenoid, and
Servo Motor
Data
Sensor
Data
Secondary
Microcontroller
Stepper
Motor,
Solenoid, and
Servo Motor
Data
Sensor
Data
Secondary
Microcontroller
Stepper
Motor,
Solenoid, and
Servo Motor
Data
Sensor
Data
Secondary
Microcontroller
Stepper
Motor,
Solenoid, and
Servo Motor
Data
Sensor
Data
15 iPad Flow Chart
iPad
Open iPad App
Load view
mainMenuView
Wait for User
Interaction
Remove
mainMenuView,
Insert settingsView
Yes
Pop-Up prompting
user to “Connect”
Microcontroller
Send iPad
Identifier
Wait for Response
Settings Button
Chosen?
Wait for User
Interaction
Remove Pop-Up
Get Status
No
No
Send New Baud
Rate
Change Baud?
Tech Specs
Chosen?
PC?
Yes
Yes
Remove
mainMenuView,
Insert
techSpecsView
Remove
mainMenuView,
Insert watchView
Remove Pop-Up
Receive Type A
Midi Data
Interpret Type A
Midi Data
No
Back Button
Chosen
Set New Baud
Rate
Play Live Chosen
Remove
settingsView,
Insert
mainMenuView
Wait for User
Interaction
Remove
mainMenuView,
Insert
playSongView
Slider Moved?
Yes
Update Labels
When Back Selected:
Remove
techSpecsView,
Insert mainMenuView
Wait for “Go”
Command
Send String
Number and
Position Value to
Primary
Microcontroller
Display Note on
Screen
Yes
No
No
Pluck Button
Selected?
Go or Done
Command?
Yes
Update Labels
Send Pluck
Command and
String Number to
Primary
Microcontroller
Remove
watchView,
Insert
playSongView
Display Options:
“Play Again”
“New Song”
“Play on iPad”
Update Labels
Send String
Number and
Position Value to
Primary
Microcontroller
Send iPad Control
Command to
Primary
Microprocessor
Play Again
Chosen?
Restart Sequence
No
Remove
playSongView,
Insert
mainMenuView
Custom Value
Set?
Yes
No
Back Button
Selected
No
Disconnect
Selected?
Yes
Send Play Again
Command to
Primary
Microcontroller
No
Yes
Send Abort
Command
Remove
playSongView,
Insert
mainMenuView
Play Song on iPad
Chosen
No
New Song
Chosen?
Remove
watchView,
Insert
mainMenuView
Yes
Send New Song
Command to
Primary
Microcontroller
Prompt User to
Disconnect iPad
and Connect PC
16 Sample iPad Application
17 -MIDI File
-Custom Tempo
18 MIDI Flow Chart
MIDI File
(.mid)
Remove One note
and try again
Does this
instant exist?
Find Header
Chunk
Error: Cannot
Play
Determine
#Tracks, Timing
info, and MIDI
format
YES
At instant n,
#notes>#strings?
YES
NO
Error:
Reached
Beginning of
file and cannot
play time
instant
Remove One note
and try the newest
instant again
Go to previous
time instant
NO
YES
Error: Do not
play this track
NO
Can Available Strings Play
These notes with enough time
to move?
Find Track. Is
instrument a Bass
Guitar?
YES
YES
NO
Have all note
arrangements
been
attempted?
Reassign notes to
NO different strings at
this instant
Can Available
Strings Play
These notes
with enough
time to move?
NO
YES
Write Track Data
(Delta Time and
Notes) to
MIDI Array
YES
Assign Notes to
Strings
Go to next time
instant
Are there more
tracks in the file?
NO
NO
Analyze MIDI
Array by looking at
each Delta Time
Instant
Is this the end
of the file?
YES
DONE!
19 Primary Microcontroller Flow Chart
Wait for Device
Data
Display
“Connected to
iPad” on LCD
Send Status to
Secondary
Microcontrollers
Confirm iPad
Receive
Command Data
Set Baud Rate
Send String 1 Data
to Microprocessor
4
Get New Baud
Rate
Send Data to
Microcontroller 4
Baud
Command
?
Yes
iPad
PC
Or
iPad
Send String 1 Data
to Microprocessor
3
PC
Confirm PC
Send Status to
Secondary
Microcontrollers
Display
“Connected to PC”
on LCD
Send String 1 Data
to Microprocessor
2
Send String 1 Data
to Microprocessor
1
Interpret Midi Type
A Data
Wait for Ready
Response from All
Secondary
Microprocessors
All Ready?
No
Yes
Receive Midi Type
A Data
Display on LCD
“Disconnect PC,
Connect iPad”
No
No
Abort
Command
?
No
Receive Song
Data
String 3 Data?
Yes
Send Data to
Microcontroller 3
Display
“Connected to
iPad” on LCD
Yes
Yes
Connected?
Check Connection
No
No
Send Abort
Command to
Secondary
Microprocessors
String 1 Data?
No
String 2 Data?
Yes
Send Data to
Microcontroller 2
Send Midi Type A
Data to iPad
Set Proper Go Pin
Yes
No
Send Data to
Microcontroller 1
Send Go
Command to iPad
Wait for Ready
Response from All
Secondary
Microprocessors
Send “Play Again”
Command to
Secondary
Microprocessors
Done?
Yes
Yes
Play Again?
Send “Done”
Command to iPad
Send “New Song”
Command to PC
Get Command
Response From
iPad User Input
Display
“Connected to PC”
on LCD
Display “Connect
to PC” on LCD
Confirm
Connection to PC
No
Use iPad for
Playing Live
No
New Song?
Yes
20 Secondary Microcontroller Flow Chart
Wait for Status
No
No
Correct
Address?
Wait for Command
iPad
iPad or PC
PC
Correct
Address?
Wait for Command
Yes
Yes
Move Left
appropriate
amount
Receive
Command
Move Right
appropriate
amount
Move to Position
Get and Store
Position And
Timing Data
Compare Desired
Position to Actual
Position
Correct
Position?
Yes
Yes
Abort
Command
Received?
No
Left of
Desired?
No
Yes
Lower Rail with Lift
Solenoids
No
No
Position
Command
Received?
Compare Desired
Position to Actual
Position
Yes
No
Pluck Solenoid
Command
Yes
Move Left
appropriate
amount
Correct
Position?
No
Yes
Left of
Desired?
Wait for Go Pin to
go High
Yes
Pluck
Command
Received?
Move Right
appropriate
amount
Pluck
No
Reset Command
Received
Compare Home
Position to Actual
Position
Reset Solenoid
Position
Lift Rail with Lift
Solenoids
Wait Length of
Note
Lower Servo
No
Move Left
appropriate
amount
No
Left of
Desired?
Yes
Move Right
appropriate
amount
No
Correct
Position?
Raise Servo
Done?
Yes
Wait for Next
Command
Yes
iPad Control
No
New Song?
Yes
No
Play Again?
Yes
Restart Song
21 Questions?
22