Design Document

BassBot
Final Design Report
Design Team 03
Lou Begue
Gregory Haren
Joshua Kuzman
Michael Prechel
Dr. Carletta
Dr. Lee
November 30th, 2011
Table of Contents Abstract ...................................................................................................................................... 6 Problem Statement ........................................................................................................................... 6 Need .................................................................................................................................... 6 Objective ................................................................................................................................ 6 Background ............................................................................................................................ 6 Objective Tree .................................................................................................................................. 8 Design Requirement Specifications: ................................................................................................ 9 Accepted Technical Design ........................................................................................................... 10 Mechanical ................................................................................................................................ 10 Structural Considerations .................................................................................................. 10 System Dynamics ............................................................................................................. 11 Electrical ....................................................................................................................................... 16 Electrical Hardware .................................................................................................................. 16 Level 0 Hardware Block Diagram and Functional Requirement Tables ................... 16 Level 1 Hardware Block Diagram and Functional Requirement Tables .............................. 18 Level 2 Hardware Block Diagrams and Functional Requirement Tables: ............................ 21 Electrical Considerations ...................................................................................................... 24 Control System ..................................................................................................................... 24 Power (Voltage and Current) ................................................................................................ 24 Radiation ............................................................................................................................... 25 Thermal ................................................................................................................................. 25 Software .............................................................................................................................. 26 Communication ................................................................................................................. 26 Computing ...................................................................................................................... 27 Level 0 Software Block Diagram and Functional Requirement Tables ............................ 27 Level 1 Software Block Diagram and Functional Requirement Tables
........................... 29 iPad App Description and Functionality ............................................................................... 33 PC App Description and Functionality ................................................................................. 39 Level 2 Microcontroller Software Flow Charts .................................................................... 41 Level 3 Microcontroller Flow Charts ................................................................................... 42 i Mechanical .......................................................................................................................... 47 Mechanical Hardware ........................................................................................................... 47 Main Frame ...................................................................................................................... 47 Vertical Strut ..................................................................................................................... 48 Flat Steel .......................................................................................................................... 48 Stepper Motor and Idler Wheel ......................................................................................... 48 Cart .................................................................................................................................. 48 Plucking Solenoids ........................................................................................................... 48 Damping Servos ................................................................................................................ 48 Electrical Schematics ............................................................................................................ 49 Parts Lists ....................................................................................................................................... 53 Part Budget..................................................................................................................................... 55 Project Schedules ........................................................................................................................... 57 Final Gantt Chart ...................................................................................................................... 57 Proposed Implementation Gantt Chart ...................................................................................... 57 Design Team Information .............................................................................................................. 59 Conclusions and Recommendations .............................................................................................. 59 References ...................................................................................................................................... 60 Works Cited ................................................................................................................................... 60 Appendices ..................................................................................................................................... 61 ii List of Figures
Figure 1: LEMUR Robotic Guitar .................................................................................................. 7 Figure 2: Crazy-J Guitar Robot ...................................................................................................... 7 Figure 3: Objective Tree ................................................................................................................. 8 Figure 4: BassBot 3D Model - Angular View .............................................................................. 10 Figure 5: BassBot 3D Model – Side View .................................................................................... 11 Figure 6: Guitar Cross Section ...................................................................................................... 12 Figure 7: String Force Measurements ........................................................................................... 13 Figure 8: Solenoid Force Measurement ........................................................................................ 14 Figure 9: Pulling Force Measurements ......................................................................................... 14 Figure 10: Level 0 Hardware Block Diagram ............................................................................... 16 Figure 11: Level 1 Hardware Block Diagram ............................................................................... 18 Figure 12: Level 2 Hardware Block Diagram ............................................................................... 21 Figure 13: Level 0 Software Block Diagram ................................................................................ 28 Figure 14: Level 1 Software Block Diagram ................................................................................ 29 Figure 15: iPad Software Flow Chart ........................................................................................... 33 Figure 16: iPad Main Menu .......................................................................................................... 35 Figure 17: iPad Play Live ............................................................................................................. 36 Figure 18: Tech Specs .................................................................................................................. 37 Figure 19: iPad Settings ................................................................................................................ 38 Figure 20: MIDI Flow Chart ......................................................................................................... 40 Figure 21: Primary Microcontroller Flow Chart ........................................................................... 41 Figure 22: Secondary Microcontroller Flow Chart ....................................................................... 42 Figure 23: Primary Microcontroller Flow Chart ........................................................................... 43 Figure 24: Secondary Microcontroller Flow Chart ....................................................................... 45 Figure 25: Mechanical Structure ................................................................................................... 47 Figure 26: RS-232 Input ............................................................................................................... 49 Figure 27: Stepper Driver ............................................................................................................. 50 Figure 28: Solenoid Driver ........................................................................................................... 51 Figure 29: Status LEDs ................................................................................................................. 51 Figure 30: Momentary Switches ................................................................................................... 51 Figure 31: I/O Expander with DB-25 Connection ........................................................................ 52 Figure 32: Gantt Chart - Final ....................................................................................................... 57 Figure 33: Implementation Gantt Chart ........................................................................................ 58 iii List of Tables
Table 1: Requirement Specifications for BassBot ...................................................................... 9 Table 2: Weight Measurements .................................................................................................... 12 Table 3: Level 0 HW FR Table - PC ............................................................................................ 16 Table 4: Level 0 HW FR Table - iPad .......................................................................................... 16 Table 5: Level 0 HW FR Table - Bass Playing Robot .................................................................. 17 Table 6: Level 0 HW FR Table - Bass Guitar ............................................................................... 17 Table 7: Level 1 HW FR Table - iPad ......................................................................................... 18 Table 8: Level 1 HW FR Table - External Data Storage Source .................................................. 19 Table 9: Level 1 HW FR Table - Primary Microchip ................................................................... 19 Table 10: Level 1 HW FR Table - Secondary Microchips and Stepper Drivers ........................... 19 Table 11: Level 1 Stepper Motor HW FR Table .......................................................................... 19 Table 12: Level 1 HW FR Table - Plucking Solenoids ................................................................ 20 Table 13: Level 1 HW FR Table - Fret Board Solenoids ............................................................. 20 Table 14: Level 1 HW FR Table - Power .................................................................................... 20 Table 15: Level 1 HW FR Table - Bass Guitar ............................................................................ 20 Table 16: Level 2 HW FR Table - iPad ........................................................................................ 21 Table 17: Level 2 HW FR Table - External Data Storage Source ................................................ 21 Table 18: Level 2 HW FR Table - Primary Microchip ................................................................. 22 Table 19: Level 2 HW FR Table - Secondary Microchips ........................................................... 22 Table 20: Level 2 HW FR Table - Stepper Drivers ...................................................................... 22 Table 21: Level 2 HW FR Table - Stepper Motors ....................................................................... 22 Table 22: Level 2 HW FR Table - Plucking Solenoids ................................................................ 23 Table 23: Level 2 HW FR Table - Fret Board Solenoids ............................................................. 23 Table 24: Level 2 HW FR Table - Power ..................................................................................... 23 Table 25: Level 2 HW FR Table - Bass Guitar ............................................................................. 23 Table 26: Current Requirements .................................................................................................. 25 Table 27: Level 0 SW FR Table – iPad 2 .................................................................................... 28 Table 28: Level 0 SW FR Table - PC ........................................................................................... 28 Table 29: Level 0 SW FR Table - Microcontroller ....................................................................... 28 Table 30: Level 1 SW FR Table - iPad/OS ................................................................................... 29 Table 31: Level 1 SW FR Table – Main Menu ............................................................................. 30 Table 32: Level 1 SW FR Table - Play Live ................................................................................. 30 Table 33: Level 1 SW FR Table - Main Menu Settings ............................................................... 30 Table 34: Level 1 SW FR Table - Tech Specs .............................................................................. 30 Table 35: Level 1 SW FR Table - Microprocessors ..................................................................... 31 Table 36: Level 1 SW FR Table - Primary Microcontroller ......................................................... 31 Table 37: Level 1 SW FR Table - Secondary Microcontroller ..................................................... 31 Table 38: Level 1 SW FR Table - External Data Storage Source ................................................. 32 Table 39: Parts List ....................................................................................................................... 53 Table 40: Parts Budget 1 ............................................................................................................... 55 iv Table 41: Parts Budget 2 ............................................................................................................... 56 v Abstract
(LB)
The BassBot is an electromechanical robot that plays an electric bass guitar through user
interface and pre-song programming. This unit will allow the user to download songs to play
autonomously through MIDI files or play in real time through the use of an iPad application.
Problem Statement
Need
(MP)
RoboGames music robot challenge is a competition where robots are designed and built to play a
musical instrument autonomously. The competition is scored based on the creativity that the
instrument is played, 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.
Objective
(GH)
The objective of this project is to design a system that will play a bass guitar autonomously. This
robot will be programmed to autonomously play the musical notes given to it by a controller.
The robot will be able to keep tempo and play a wide range of notes and chords. Music notes will
either be written through an iPad app or downloaded from a PC. The robot will then play the
given notes/chords at the specified tempo.
Background
(JK)
Guitar playing robots have been designed and built in multiple ways. League of Electronic Urban
Robots (LEMUR) created a guitar robot, shown in Figure 1. This robot is more of a robotic
guitar than a robot that plays a guitar. Figure 2 shows a robot that has been built to play an actual
guitar. The Crazy-J was designed and built by Georgia Tech graduates as part of a Mechatronics
class. This robot is composed of three main sections. The “fingering section” use solenoids
acting as fingers to press down on different strings and different frets. The “plucking section”
picks the individual strings. The system control is located in the base of the guitar stand and
synchronizes the plucking with the fingering. More can be found on the Crazy-J website
(GeorgiaTech).
The design by Georgia Tech is the closest to our Bassbot. Bassbot will be simpler in the fact that
it will be playing a bass guitar with four strings instead of a regular guitar that has six.
6 Figure 1: LEMUR Robotic Guitar
Figure 2: Crazy-J Guitar Robot
7 The marketing requirements are shown in Table 1: Requirement Specifications for BassBot.
Additionally, Figure 3: Objective Tree shows the desired outcomes from this design. For the
competition, sound, diversity, quality and creativity are the goals. The Objective Tree shows
additions to the scope of the design beyond the competition. Consumer friendly and ease of use
are added to sound quality for a more marketable product beyond the competition.
Objective Tree
BassBot
Sound Quality
Ease of Use
Consumer Friendly
Tempo
Programmable via iPad
Load Song via iPad
Dynamic Range
Watch Notes in Real Time
Load Song via PC
Pitch
Custom Tempo
Tone
Figure 3: Objective Tree
8 Design Requirement Specifications:
Table 1: Requirement Specifications for BassBot
Marketing
Requirements
2,4,8,10
2,3,10
8,10
5,8,9,10
11
1,2,3,4,9
2,4,10
(LB)
Engineering Requirements
Justification
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.00.
Play single notes on multiple
strings.
Custom tempo can be set.
This is part of the competition, but is also a
requirement for marketing.
Must play a 4/4 time at 120BPM.
6,8,
Familiar to designers
Established format, files readily available
Affordability and marketability.
Diversity of sound. Simultaneous bass
patterns in a song.
To play songs of different tempos.
Robot will be capable of being
For demonstration purposes or
loaded with a pre-sampled song. preprogrammed songs.
1,3
Force sufficient to push string
Quality of sound.
down or strike the string.
1,3,4,5,6,7,9
The robot will use an iPad
Direct user interface to play custom songs.
application to play BassBot in
real time.
Marketing Requirements:
1. BassBot has to play a musical instrument.
2. BassBot has to be autonomous.
3. BassBot has to have quality and diversity of sound.
4. BassBot has to keep on time with internal metronome.
5. Sync up with the iPad.
6. BassBot has to be able to sync and read the given notes.
7. The iPad App should be plug & play.
8. Song should be able to be loaded manually onto the BassBot.
9. iPad shows the note being played in real time.
10. Set custom tempo.
11. BassBot should be affordable (excluding iPad and guitar).
9 Accepted Technical Design
Mechanical
(MP/GH/JK)
The mechanical design of the BassBot is critical. If the construction of the robot itself were to
fall behind schedule, it would jeopardize the entire project. Also, should the design not be up to
the standards expected by the team, it will cause late changes to be made to the electrical
components to compensate for a flawed hardware design. Therefore, structural considerations
and system dynamics were taken into account to avoid these issues.
Structural Considerations
(GH)
The structural design of the BassBot was kept as simple as possible for two reasons, cost and
ease of construction. While there are pre-manufactured rails that can be used, the price for one
of these pre-manufactured rails would exceed the entire budget of the project. The system can
best be described as four thin rails, approximately measuring 4 feet long by 2 inches tall by 1/8th
of an inch thick. Each of these rails will be situated above a corresponding string. Then, each
rail will be actuated on both ends by a solenoid to lift or lower it so a cart moving along its
length can place pressure on the string, when desired. The cart will slide up and down the
appropriate length of the guitar so it has access to every fret. A small wheel at the tip of the
bottom of the cart will be used to press down on the string. This wheel will allow for a sliding
motion, which previous designs, using only arrays of solenoids, would not allow. The cart will
be pulled back and forth by a belt which is attached to a stepper motor. Vertically oriented rails
are used to ensure the horizontal rails with carts do not wobble side to side.
Figure 4: BassBot 3D Model - Angular View and 5 show simple three dimensional models of the
BassBot’s mechanical design. Note that the actuators used to pick the strings of the guitar are
not shown in either figure. These solenoids are still in the conceptual design phase and will be
added in the final report.
Figure 4: BassBot 3D Model - Angular View
10 Figure 5: BassBot 3D Model – Side View
An additional, albeit mainly cosmetic, consideration is the placement of the iPad. The Redpark
serial cable that will be used to send data between the iPad and the microprocessors is only one
meter long. Therefore, the placement of the main microprocessor shall be considered when final
design details are being laid out.
System Dynamics
(MP/JK)
The mechanical design is based around the speed at which each arm needs to move during
operation. To determine this, a baseline tempo had to be selected. A common tempo used in
rock music is 120 beats per minute. This corresponds to half a second for each quarter note. The
design baseline for the movement of the arms is the ability to play eighth notes uninterrupted
between two adjacent frets. However, this movement will be designed towards accomplishing
this with sixteenth notes, or one eighth of a second for this movement. Using the equation of
motion,
1
! = !! + !! ! + !! ! 2
where x is the distance traveled, xo is the initial position, vo is the initial velocity, a is the
acceleration, our desired value, and t is time. Using the t is equal to one sixteenth of a second, x
is 34.952 mm, and if all initial values are zero, a is found to be 17.8954 meters per second.
However, while knowing the necessary acceleration is important, it is simply a step in
determining the force needed. As Newton famously stated,
F=m•a,
where F is force, m is mass, and a is acceleration. However, the force that is needed for each
cart is a combination of forces, the force to move the cart itself plus the force of friction, which is
!! = !!! ,
Where µ is the coefficient of friction, and Fn is the normal force. The coefficient of friction for
steel on polyethylene is .2 (Toolbox). The most likely building material for the carts is acrylic,
which should have a similar coefficient of friction on steel as the polyethylene. The normal force
can be determined once the carts are actually built.
11 The operation that will raise and lower the mechanical arms and cart will be performed by
solenoids on either side. When energized, the solenoids will pull the shaft inwards, pressing the
given string. Once de-energized, a coiled spring around the shaft of the solenoid will force it
back into the resting position. Each individual rail has dimensions of 1.25”x2”x6’, which gives a
volume of 18!"! . These values give the weight of bar to be 5.094lbs. The weight of the other
objects has also been found to acquire the total weight
Table 2: Weight Measurements
Item
Weight (lb)
Bar
5.094
Stepper Motor
0.561
Pulley+Acrylic+Belt
0.125
The combined weight of all the components equals 5.78lbs. Since there are two solenoids per
bar, each solenoid will take half the total weight, which is 2.89lbs.
With 0.18 inches between the guitar neck and the string, the ample amount of spacing for the
slider was found to be 0.17 inches. This makes the total displacement of the solenoids 0.35
inches.
Figure 6: Guitar Cross Section
!"
A spring was chosen with the rate of 3 !" and a maximum displacement of 1.47 inches. When the
weight of the load on one solenoid is divided by the spring rate, the offset distance is
12 2.89 !"
= 0.963!"
3 !" !"
At this compression, the spring will still be able to compress another half an inch. This half inch
will allow the solenoids enough room to press the strings down with enough force.
So, to compress the spring to the string (Xa in Figure 6) the force required is
!"
3 !" ×0.17!" = 0.51!".
The force graph shown in Figure 7 shows the force needed to press down the string starting at the
fret furthest away from the body and moving to the closest fret (run 2 on Figure 7). The closest
fret was measured a second time (run 3 on Figure 7) to receive a more accurate measure of the
force needed to provide a clear sound, i.e. no buzzing or ringing of the string.
Figure 7: String Force Measurements
The max force of the string was found to be approximately 12 Newton’s or 2.7 pounds.
So, the force to compress the spring, so that the slider pushes the string to the guitar neck and
creates a quality sound, was found to be
!"
2.7!" + 3 !" ×0.18!" = 3.24!!.
The chosen solenoid will be able to overcome this force with a shaft length of a quarter inch or
less (as seen from figure 6).
13 Pull vs. Sha0 Length Pull (in pounds) 5 0.125, 4.0625 4 3 0.25, 2.5 2 0.5, 1.4375 1 0.75, 1.125 Sha> Length 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Sha0 Length Figure 8: Solenoid Force Measurement
The stepper motor, which will move the slider up and down the length of the guitar, must be able
to overcome the friction of the slider moving along the bar. Force measurements were taken and
graphed on Figure 8. The average force needed was approximately 2.5 N. So, with a pulley of
radius 12.928 mm and a force of 2.5 N, the torque required by the stepper motor is
! = 2.5!×12.928!! = 32.32 !"!.
Figure 9: Pulling Force Measurements
14 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
!.!"!#!
!.!"# !"#
!
= 0.4064 !"#.
The time it will take to cover the required distance is
!×.!"#$$!
!.!"#!
!
!"#
= 0.2!"#.
This is the time it takes to make one revolution with the stepper motor. Revolutions per minute
will be
!"#
!"#
!"#
5 !"# ×60 !"# = 300 !"#.
At this rpm, the chosen stepper motor will produce 45 mNm of torque, well above the required
32.32 mNm.
15 Electrical
Electrical Hardware
Level 0 Hardware Block Diagram and Functional Requirement Tables
(JK/LB)
Figure 10: Level 0 Hardware Block Diagram shows a high level view of the hardware design.
The hardware inputs and outputs, as well as functionality, are shown in Tables 1-4. Table 1
shows the block diagram of the PC with the user using the keyboard as the input, and music data
as the output. Similarly, Table 2 shows touch screen of the iPad 2 as the user input and music
data as the output. Table 3 is shows music data from the iPad 2 or the keyboard, power and
sensor feedback as inputs and the solenoids being actuated as the output after interpretation of
the data. Table 4 shows the actual bass guitar from where the actuating solenoids will hold and
strike the strings. The output of the bass will go to an amplifier to amplify the bass guitar signal.
Interface format will be RS-232 between the PIC and the iPad.
POWER
TOUCH
KEYBOARD
iPad 2
PC
SENSOR
FEEDBACK
MUSIC DATA
Type A MIDI
Data
Bass Playing
Robot
MECHANICAL
ACTUATION
Bass Guitar
Figure 10: Level 0 Hardware Block Diagram
Table 3: Level 0 HW FR Table - PC
Modules
Inputs
Outputs
Functionality
PC
JK
- Keyboard
- Music Data
Create and send the data to the robot. MIDI format will be the data
structure.
Table 4: Level 0 HW FR Table - iPad
Modules
Inputs
Outputs
Functionality
iPad 2
JK
- Touch
- Music Data
Create and send the data to the robot. This will be the main piece of
hardware a user would interface with. After the musical piece is
created, a data stream will be sent to the robot to be interpreted and
played.
16 SOUND
Table 5: Level 0 HW FR Table - Bass Playing Robot
Modules
Inputs
Outputs
Functionality
Bass Playing Robot
JK
- PC Data
- iPad 2 Data
- Power
- Sensor Feedback
- Mechanical Movement
Interprets the data sent by the PC or iPad 2 and turns it into mechanical
movement. This mechanical movement will play the bass guitar. The
robot should be capable of playing various genres of music as well as
self correcting, so precise music can be played.
Table 6: Level 0 HW FR Table - Bass Guitar
Modules
Inputs
Outputs
Functionality
Guitar
JK
- Mechanical actuation
- Sweet Music
The bass guitar will behave as a stock electric bass guitar is designed.
The mechanical actuation of the strings will be turned into sound,
which will be played through a speaker.
17 Level 1 Hardware Block Diagram and Functional Requirement Tables
The following shows a more in-depth look at our mechanical and electrical design. The tables
that follow offer explanations of each block in the Level 1 Hardware Block Diagram.
External Data
Storage Source
iPad
Bass Robot
(JK) Vdd
Secondary
Microcontroller/
Stepper Drivers
Primary
Microcontroller
Power
(Vdd)
Vdd
Fret Board
Solenoids
Vdd
Plucking
Solenoids
Stepper
Motors
Bass Guitar
Figure 11: Level 1 Hardware Block Diagram
Table 7: Level 1 HW FR Table - iPad
Modules
Inputs
Outputs
Functionality
iPad
JK
- Touch
- Sensor Information
- iPad Control Data
Play the guitar using a GUI on the “Play Live” page. View technical
information pertaining to the BassBot project on the “Tech Specs”
page. View and change settings on the “Settings ” page. Data is sent
over the Redpark Serial Cable. Data is received over the same cable.
18 Table 8: Level 1 HW FR Table - External Data Storage Source
Modules
Inputs
Outputs
Functionality
PC
-Key Strokes
- MIDI File
Load process songs that are MIDI format directly to the control
JK
Table 9: Level 1 HW FR Table - Primary Microchip
Modules
Inputs
Outputs
Functionality
Primary Microchip
JK
- RS-232 (Data Source)
- I2C (Communication with Secondary Microcontrollers)
- MIDI Files
- I^2C to the Secondary Pics
Processes the data from the iPad or the PC. It processes and distributes
the song data to the proper microcontroller. It will send this data in the
timing accurate for the song.
Table 10: Level 1 HW FR Table - Secondary Microchips and Stepper Drivers
Modules
Inputs
Outputs
Functionality
Secondary Microchips and Stepper Drivers
JK
-I^2C from Primary Microchip
-Bit stream
Will receive data from the Primary Microchip on how many steps and
what direction the stepper motor will operate. The driver then uses this
information to energize the correct phases of the stepper motor. Pulse
will also be given to determine when the solenoid should be activated.
Table 11: Level 1 Stepper Motor HW FR Table
Modules
Inputs
Stepper Motors
-Digital Logic from Stepper Driver
Outputs
Functionality
- Rotational Force
Will move the sliders along the steel beam to the desired fret position.
19 JK
Table 12: Level 1 HW FR Table - Plucking Solenoids
Modules
Inputs
Outputs
Functionality
Plucking Solenoids
JK
- Limited Current
- Linear Force
Will be energized when pulled to ground by an N and P FET circuit
connected to Secondary Microcontroller. Once energized, these
solenoids will play the strings of the guitar.
Table 13: Level 1 HW FR Table - Fret Board Solenoids
Modules
Inputs
Outputs
Functionality
Fret Board Solenoids
JK
- Limited Current
- Linear
Will be energized when pulled to ground by an N and P FET circuit
connected to Secondary Microcontroller. Once energized, two
solenoids wills simultaneously pull the bar and slider to the string. It
will wait for the plucking solenoid to strum the string and release.
Table 14: Level 1 HW FR Table - Power
Modules
Inputs
Outputs
Functionality
Power
JK
- 120 VAC
- 12~24V max
Supplies power to the microcontrollers, drivers, solenoids, and stepper
motors.
Table 15: Level 1 HW FR Table - Bass Guitar
Modules
Inputs
Outputs
Functionality
Bass Guitar
- String movement
- Analog voltage amplified by standard guitar amp
The strings will be played by the solenoids, and the signal will be
amplified by a standard guitar amp.
20 JK
Level 2 Hardware Block Diagrams and Functional Requirement Tables:
Figure 12: Level 2 Hardware Block Diagram shows the entire hardware system. The block
diagram, along with its corresponding functional requirement tables, gives a detailed look at each
component.
PC
iPAD
120 Volts
Table Key:
A-Picking Solenoid
B-Fret Board Solenoid
C-Stepper Motor
D-Stepper Driver
E-Secondary Microcontroller
Sensor Feedback
(JK) Vdd
Power
Master
Microchip
E
E
D
Vdd
Vdd
A
Vdd
B
Vdd
B
D
D
Vdd
C
E
E
Vdd
Vdd
A
B
Vdd
B
Vdd
C
Vdd
A
Vdd
B
Vdd
B
D
Vdd
C
Vdd
Vdd
A
B
Vdd
B
Bass Guitar
Sweet Music
Figure 12: Level 2 Hardware Block Diagram
Table 16: Level 2 HW FR Table - iPad
Modules
Inputs
Outputs
Functionality
iPad
JK
- Touch
- Sensor Information
- iPad Control Data
Play the guitar using a GUI on the “Play Live” page. View technical
information pertaining to the BassBot project on the “Tech Specs”
page. View and change settings on the “Settings 1” page. Data is sent
over the Redpark Serial Cable. Data is received over the same cable.
Table 17: Level 2 HW FR Table - External Data Storage Source
Modules
Inputs
Outputs
Functionality
PC
-Key Strokes
- MIDI File
Load songs, that are MIDI format, directly to the control
21 JK
C
Table 18: Level 2 HW FR Table - Primary Microchip
Modules
Inputs
Outputs
Functionality
Primary Microchip
- RS-232 (iPad Control Data)
- I2 C
- Data from PC
- MIDI Files
- I^2C to the Secondary Pics
Processes the data from the iPad or the PC. It will determine the
desired position of the stepper motor. It will send this data in the
timing accurate for the song.
JK
Table 19: Level 2 HW FR Table - Secondary Microchips
Modules
Inputs
Outputs
Functionality
Secondary Microchips (E)
JK
-I^2C from Primary Microchip
-Bit stream
Will receive data from the Primary Microchip on how many steps and
what direction the stepper motor will operate. The driver then uses this
information to energize the correct phases of the stepper motor. Will
activate the solenoids at the proper time.
Table 20: Level 2 HW FR Table - Stepper Drivers
Modules
Inputs
Outputs
Functionality
Stepper Drivers (D)
JK
- Bit stream
- Digital Logic
Can be programmed for stepping type and direction. Energized outputs
are indexed at the rising edge of the input.
Table 21: Level 2 HW FR Table - Stepper Motors
Modules
Inputs
Stepper Motors (C)
-Digital Logic from Stepper Driver
Outputs
Functionality
- Rotational Force
Will move the sliders along the steel beam to the desired fret position.
22 JK
Table 22: Level 2 HW FR Table - Plucking Solenoids
Modules
Inputs
Outputs
Functionality
Plucking Solenoids (A)
JK
- Limited Current
- Linear Force
Will be energized when pulled to ground by an N and P FET circuit
connected to Secondary Microcontroller. Once energized, the solenoid
will pull inward, plucking the string.
Table 23: Level 2 HW FR Table - Fret Board Solenoids
Modules
Inputs
Outputs
Functionality
Fret Board Solenoids (B)
JK
- Limited Current
- Linear Force
Will be energized when pulled to ground by an N and P FET circuit
connected to Secondary Microcontroller. Once energized, two
solenoids wills simultaneously pull the bar and slider to the string. It
will wait for the plucking solenoid to strum the string and release.
Table 24: Level 2 HW FR Table - Power
Modules
Inputs
Outputs
Functionality
Power
JK
- 120 VAC
- 12~24V max
Supplies power to the microcontrollers, drivers, solenoids, and stepper
motors.
Table 25: Level 2 HW FR Table - Bass Guitar
Modules
Inputs
Outputs
Functionality
Bass Guitar
- String movement
- Analog voltage amplified by standard guitar amp
The strings will be played by the solenoids, and the signal will be
amplified by a standard guitar amp.
23 JK
Electrical Considerations
(MP/GH)
The electrical system is composed of the control system, power parameters, radiation
considerations, specifically Electromagnetic Interference (EMI), thermal effects and its
corresponding considerations, communication, computing, and software.
Control System
The BassBot will have minimal sensory feedback. An optional photodiode sensory feedback
circuit may be used, time permitting, to acknowledge the correct position of the slider.
Additionally, the position of the cart can be computed by counting the number of steps of the
stepper motor. These two readings each represent the position of the cart; if the numbers are
very different, and error may be set to warn the user.
The primary PIC will determine where each cart needs to be and will send a command telling
each secondary PIC the position that it needs to be in. The secondary PIC will then move its
designated cart to the appropriate position by comparing the actual position to the desired
position, and then rotate the stepper motor in the appropriate direction to get the cart to the
correct position.
Power (Voltage and Current)
The BassBot will be powered from a typical 120VAC wall outlet. This will be converted into
DC voltages suitable for operation with the BassBot. It is anticipated that a standard PC power
supply will be used to obtain DC voltages. PC power supplies are inexpensive, easy to come by,
and supply 5V and 12V lines that should be suitable for the operation of the components of the
BassBot.
The sources of power consumption on the BassBot are the stepper motors, solenoids, PIC
microprocessors, optical sensors, and the bass guitar and amplifier. The bass guitar and
amplifier will be powered separate from the rest of the system, also with a 120VAC outlet.
Power dissipation in the stepper driver can be found with
!
!!"! = 4 ∙ !!"(!") ∙ !!"#(!"#) .
!!"(!") is the resistance in each FET in the H-bridge of the stepper driver. This resistance
increases with temperature, so as the device heats, the power dissipation increases. Because of
this, some form of heat sinking must be taken into consideration. !!"#(!!") is the RMS output
current applied to each winding and is approximately 70% of the full scale current. These two
values are multiplied by four because, at maximum, you will have both phases on at the same
time and current will be going though two transistors per phase.
The following table shows the power considerations that will be completed as parts are specified.
The guitar and amplifier are not represented as they will be powered separately from the other
devices.
24 Table 26: Current Requirements
Item
Total Current
Draw per type
(A)
Current
Draw (A)
Qty
Stepper Motors
4
.96
3.88
Picking Solenoids
8
1.5
12
Lifting Solenoids
8
3
24
Primary PIC
1
.2
.2
Secondary PIC
4
.2
.8
Optical Sensor
4
.02
1.76
----------
---------------
42.64
Total
The specified power supply (AC to DC) must meet the current consumption needs of this system.
PC power supplies typically rate the source current for each output (+5V, +12V, etc.).
Therefore, as parts are specified, parts should be categorized by their supply voltage. In the
interest of cost, if one PC power supply will not satisfy the power needs of the BassBot, multiple
power supplies may be used as needed. It should be noted that the max current draw should
never exceed this amount. The stepper motors will not move when the lift solenoids are
energize. Also, the picking solenoids are only energized, on average, half of the time.
Radiation
The main form of radiation relevant to the BassBot is EMI from the stepper motors and
solenoids. The chosen bass guitar for the BassBot (Fender Precision Bass) uses magnetic
pickups. Pickups convert the mechanical vibration of the strings into a usable electrical signal
representing the notes played. Electromagnetic radiation has the potential to interfere with these
pickups and cause unwanted noise. The two main sources of EMI, the servo motors and the
solenoids, contain coils that will produce an electromagnetic field. It will not be known if these
sources will be large enough to interfere with the pickups until construction is nearing
completion.
In the event that EMI is playing a factor in the sound quality of the BassBot, the solenoids and
motors may need to be shielded. It will be impossible to instead shield the pickups as their
exposure to the strings is mandatory. To shield the solenoids and stepper motors, EMI shielding
tape can be used.
Thermal
Very few thermal considerations need to be taken in the design of the BassBot. Since size is not
a limiting factor, components such as solenoids and stepper motors that may produce heat can be
placed further apart and do not need to be enclosed. Additionally, these components would be
25 placed adequately far from any material or other component that would be affected by extreme
heat.
A notable thermal consideration however is the proper cooling of the stepper motor drivers.
These devices are likely to produce enough heat to be damaging to themselves. To account for
this, appropriate actions will be taken as per the recommendations of the manufacturer of the
stepper driver. Additionally, the stepper drivers will be placed in an enclosure and this enclosure
could be cooled by a small fan. Without having assembled stepper drivers, it is difficult to
calculate their predicted thermal output; as such, a simple fan should be adequate to cool the
drivers.
Software
(GH/MP)
Communication
(GH)
The BassBot has two major areas where communication occurs, between the iPad and the
primary microprocessor and between the primary and four secondary microprocessors. These
will most likely use different communication protocols because of the nature of the devices. The
most robust solution for communication between the iPad and the microprocessors is using RS232. A company, based out of California, has a cable that connects to the 30 pin plug of the iPad
and a DB9 male connector. The Software Development Kit (SDK) associated with the cable
allows any developer, developing an iPad, iPhone, or iPod app (using iOS 4.3 or later), to
transmit and receive serial data over RS-232. The iPad offers two other ways to interface with
external devices, both of which are more complex on the microprocessor end. The first is
sending the data over Wifi. Not only does that option make it harder on the microprocessor end,
it requires a fast, steady, Wifi connection, which cannot always be ensured, especially in an
environment such as RoboGames. The second would be Bluetooth. This is more difficult on
both ends because it would require jail breaking the iPad, an option that the owner of the iPad is
against, even with his extreme dedication to the project.
For communication between the primary microprocessor and the four secondary
microprocessors, Inter-Integrated Circuit (I2C) and Serial Peripheral Interfacing (SPI) stand out.
Each allow for serial communication, but I2C outperforms SPI for our purposes. I2C has two
active wires and a ground connection. The Serial Data Line (SDL) and Serial Clock Line (SCL)
are used for data transmission. I2C is considered to be a multi-primary bus, where each
microprocessor can be the primary. When a microprocessor requests to send or receive data, it
becomes the primary and the other microprocessors become secondary. It then addresses which
microprocessor it wishes to communicate with and then sends data once the line of
communication is open. After it is done sending, a stop signal is sent. When it is done they are
all equal until the next data transmission. This allows for multiple devices to “talk” to one
another.
SPI on the other hand is more limiting when dealing with multiple devices. It has one primary
that can address multiple secondary microcontrollers. However, to do that it needs separate pins
for each device, where I2C only needs the three pins. Therefore, SPI has much more overhead on
the microprocessor than I2C.
26 Computing
(MP)
Song data will be sent to the BassBot in the form of a Musical Instrument Digital Interface
(MIDI) file. A MIDI file consists of groups of data bytes that represent different aspects of
musical notes including duration, tone, and volume. While BassBot will only use a fraction of
the information stored in a MIDI file, the widely-used MIDI format will make it much easier to
generate and locate song data. The MIDI file will be transferred to the primary PIC via a SD
card or USB thumb drive.
An analysis of the MIDI file will be necessary before the BassBot plays a song to ensure that any
sequence of notes within the song can be played. During this analysis, the software will create a
table of the locations that each cart needs to be at and when to play it. It is possible that a note
sequence will not be achievable with the BassBot as the mechanical movement of the carts takes
time to move from position to position. A given MIDI file will tell the exact note to be played at
a certain tone. If this exact desired note cannot be played (because the cart cannot be moved in
time), the software will try to supplement by using a different string. This however is not ideal
as the tone will be slightly different. If a certain sequence of notes cannot be played at all, the
user will be notified with an error. The user will also be notified of the total number of notes that
could not be exactly represented. This will give the user an idea of how accurately the song will
be played.
Once the analysis has completed, the user will be able to start playing the song. At this time, the
primary microcontroller will tell each secondary microcontroller where its cart needs to be.
Once the cart has been moved to the correct position, the secondary microcontroller will notify
the primary microcontroller. When it is time, the primary microcontroller will tell the secondary
microcontroller to pluck the string. This will continue for the remainder of the song.
If an iPad is plugged in, the primary microcontroller will update the iPad with the location of
each cart and the iPad can update its display accordingly.
Level 0 Software Block Diagram and Functional Requirement Tables
(GH)
The software development for the BassBot consists of two main sections: iOS development and
embedded system interfacing on the PICs. iOS apps are writing using Objective-C and the
software on the PICs is written in C.
Figure 13: Level 0 Software Block Diagram shows a high level view the software development.
The software inputs and outputs, as well as functionality, are shown in Tables 26-28. Table 26
and 27 show the outputs of music data from the iPad 2 and a PC respectively. They are used to
create the data and send it to the robot microcontroller. Table 28 shows the data from the iPad 2
and the PC as inputs and control data as outputs going to the solenoids and motors to control
position, note selection and string striking.
27 iPad 2
MUSIC DATA
MicroController
PC
CONTROL
DATA
MUSIC DATA
Figure 13: Level 0 Software Block Diagram
Table 27: Level 0 SW FR Table – iPad 2
Modules
Inputs
Outputs
Functionality
iPad 2
GH
- Note Information
- Music Data
Create and send the data to the robot. This will feature a touch
interface for the user to interact with. The iPad will also display the
notes being played by the robot when the robot is playing a song from
MIDI Type A Data. RS-232 will be used for communication.
Table 28: Level 0 SW FR Table - PC
Modules
Inputs
Outputs
Functionality
PC
GH
- RS-232
- MIDI Type A Data
The PC parses a MIDI file to make it easier to use in the robot. The
MIDI data will be broken up into notes, which correspond to positions
on a string. The PC will also make sure the notes can be played in the
positions determined. The PC will receive information over RS-232
from the microcontroller.
Table 29: Level 0 SW FR Table - Microcontroller
Modules
Inputs
Outputs
Functionality
Microcontroller
GH
- MIDI Type A Data
- Sensor Feedback
- Control Data
- Note Information (to iPad)
Interpret the data sent from the iPad 2 or PC and then control the
movement of the robot based on that data. Sensor feedback is an option
if the robot were to not function as precisely as needed.
28 Level 1 Software Block Diagram and Functional Requirement Tables
(GH)
Error! Reference source not found. gives a more detailed look at the graphical user interface (GUI)
of the iPad, as well as the communication between the different devices. The associated
functional requirement tables give a detailed description of each block. It should be noted that,
as in the mechanical design, the PC was removed and an External Data Storage Source was
added.
iPad/iOS
Main
Main
Menu
Menu
Tech
Specs
Play Live
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
Secondary
Microcontroller
Sensor
Data
Stepper
Motor,
Solenoid, and
Servo Motor
Data
Sensor
Data
Secondary
Microcontroller
Stepper
Motor,
Solenoid, and
Servo Motor
Data
Sensor
Data
Figure 14: Level 1 Software Block Diagram
Table 30: Level 1 SW FR Table - iPad/OS
Modules
Inputs
Outputs
Functionality
iPad/iOS
GH
- Touch
- Type A MIDI Data (RS-232)
- iPad Control Data (RS-232)
Gives the user an interface to interact with the robot in an easy way. The
application is based on a tab bar view controller, with five main views.
These views are Main Menu, Play Live, Tech Specs, Settings, and
Watch Me. The application will use the Redpark Serial Cable (Rs-232)
for iOS to communicate with the main microcontroller. Redpark
provides an SDK for this.
29 Table 31: Level 1 SW FR Table – Main Menu
Modules
Inputs
Outputs
Functionality
Main Menu
GH
- Touch
- RS-232 (iPad Control Data)
First and main view of the iOS application. A button on the screen will
be used to connect to the microcontroller once the iPad is plugged in.
When the iPad connects, it will send data identifying itself to the
microcontroller. A tab bar on the bottom will allow navigation to the
other views.
Table 32: Level 1 SW FR Table - Play Live
Modules
Inputs
Outputs
Functionality
Play Live
GH
- Touch
- RS-232 (iPad Control Data)
The user will be able to use sliders (UISlider) to change the location of
the hardware arms to play the guitar. Buttons (UIButton) will be used
to trigger the actuation of the picks. A tab bar on the bottom will allow
navigation to the other views.
Table 33: Level 1 SW FR Table - Main Menu Settings
Modules
Inputs
Outputs
Functionality
Settings
GH
- Touch
- RS-232 (iPad Control Data)
The user will be able to change the baud rate iOS uses to communicate
with the microcontroller. To do this, the user selects a new baud rate on
the segment button control. The app will then send a command saying
that the baud rate is changing, along with the new value for the baud
rate. The app will then change the baud rate.
Table 34: Level 1 SW FR Table - Tech Specs
Modules
Inputs
Outputs
Functionality
Tech Specs
GH
- Touch
- None
The user will be able to view the technical specifications of the BassBot
project. This will include technical information as well as photos and
diagrams.
30 Table 35: Level 1 SW FR Table - Microprocessors
Modules
Inputs
Outputs
Functionality
Microprocessors
GH
- RS-232 (iPad Control Data)
- Sensor Data (optional)
- Solenoid control data (I2C)
- Stepper motor control data (I2C)
- Servo motor control data (I2C)
- Type A MIDI Data (RS-232)
Controls the solenoids, servo motors, and stepper motors based on
information received from the iPad PC. This information is interpreted
by the Primary Microcontroller and then sent to the Secondary
Microcontrollers. The Secondary Microcontrollers control the
actuation of the solenoids, servo motors, and stepper motors. If sensors
are deemed necessary, the Secondary Microcontrollers will compare the
actual position versus desired to ensure proper placement of the carts.
Table 36: Level 1 SW FR Table - Primary Microcontroller
Modules
Inputs
Outputs
Functionality
Primary Microcontroller
GH
- RS-232 (iPad Control Data)
- I2C (Sensor Data)
- Data from External Data Storage Source
- MIDI Files
- I2 C
- RS-232 (Sensor Data)
Processes the data from the iPad or the PC (Type A MIDI Data). It will
route the proper position data to each of the Secondary
Microcontrollers. It will also be in charge of timing data, telling each
of the Secondary Microcontrollers when to play the individual notes.
Table 37: Level 1 SW FR Table - Secondary Microcontroller
Modules
Inputs
Outputs
Functionality
Secondary Microcontroller
GH
- Sensor Data
- I2C (Sensor Data)
- Solenoid Control data
- Stepper motor control data
Takes the processed data from the Primary Microcontroller and uses it
to control the stepper motors, servo motors, and solenoids. The actual
position of the carts moved by the stepper motor is determined by the
number of steps of the stepper motor. This allows the microcontroller
to easily and quickly determine the location without the added cost of
the sensors.
31 Table 38: Level 1 SW FR Table - External Data Storage Source
Modules
Inputs
Outputs
Functionality
PC
GH
- None
- Type A MIDI Data (RS-232)
Creates Type A MIDI Data from a .mid file. Type A MIDI Data is data
that combines all the bass guitar tracks into one array, with timing for
each note and rest. The program will determine the optimal location for
each note to ensure that the robot is capable of playing them. The data
is then sent to the main microprocessor over RS-232.
32 iPad App Description and Functionality
Figure15 shows the flow chart for iPad functionality. Following the figure is a broad overview of
the flow of the chart.
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
Figure 15: iPad Software Flow Chart
33 Prompt User to
Disconnect iPad
and Connect PC
When the iPad app is started, the main MenuView is the first to load. A pop-up shows on screen
prompts the user to connect to the microcontroller. Once the cable is connected and the
“Connect” button is selected, the iPad will send its identifier information to the microcontroller
so the microprocessor knows the iPad is the peripheral that is connected. The primary
microcontroller then sends the status to the iPad. This status is whether there is a preloaded
MIDI file on the microcontroller and the iPad is only being used to display the notes, or if the
microcontroller is waiting for an initial connection.
When the iPad is used to display the notes being played by the guitar from the MIDI file, the
iPad first has to organize the data in a way so that it can display the proper notes on the screen.
This is done in a way so that when the iPad receives the “Go” command, it can display the note
for the length of the note, and then move on to the next one. This continues until the “Done”
command is received, at which point the iPad will display three options to the user. These three
options are: “Play Again”, which will then tell the primary microprocessor to start the sequence
over; “New Song”, which will then tell the primary microprocessor that a new song will be
loaded from the PC, and then display on the screen, “Disconnect iPad, Connect PC”; “Play on
iPad”, which will then tell the primary microprocessor that the iPad will be controlling the
system.
When the iPad is in control, it is easiest to look at the interface rather than describe the flow chart
block by block and decision by decision.
The main menu of the application is shown below in Figure16. The app is navigated through the
tabbed bar on the bottom of the screen. The five views are of Main Menu, Play Live, Watch
Now, Tech Specs, and Settings.
34 Figure 16: iPad Main Menu
Starting with the Main Menu, the user must select “Connect to BassBot” before the app will
function with BassBot. This is only necessary should the iPad become disconnected during
operation because the pop-up on start up should take care of the connection. Once the iPad is
connected, the user can go to any of the other views. However, if the status is “iPad Control”,
then the user will be unable to even select Watch Me. Alternatively, if the status is “PC
Control”, then the user will be unable to select Play Live, Tech Specs, or Settings. This is done
to keep the app running properly and displaying the necessary information on screen to the user.
When Play Live is selected, the screen will appear as seen in Figure 17.
35 The user will be able to move the sliders up and down. As the slider moves, the labels
displaying the values of each slider update in real time. When it is released, the iPad will send
the location of the slider to BassBot so it can update the slide locations. When the buttons
underneath the sliders are selected, the iPad will send the pluck command to BassBot. If RESET
Figure 17: iPad Play Live
is selected, the iPad will send a reset command to BassBot while also updating the screen. The
sliders will return to their home positions and the corresponding labels will update as well.
Finally, the text fields allow the user to enter their own values for each slider. When the set
buttons are selected, the values will be set to the sliders and also sent to BassBot.
The Watch Me screen, not shown, will simply display what note is being played by BassBot. As
the BassBot sends “Go” commands, the app will update its display. Again, this view is only
available when the status is “PC Control”. When the song is done, the screen will display three
options to the user, “Play Again?”, “Play New Song?”, and “Play Live on iPad”.
36 Tech Specs, when selected, will bring up a screen showing information about the BassBot
project, seen in Figure 18. Shown as of the writing of this report is only an image of the BassBot
mock up used on the poster. Technical information from this report will be added, as well as
pictures of the final project.
Figure 18: Tech Specs
The final screen is Settings, seen in Figure 18.
37 Figure 19: iPad Settings
Here, the user can select a new baud rate. As mentioned above, if the baud rate is changed, the
iPad will tell BassBot the new baud rate and then make the change. After, the baud rate is
confirmed and the user is free to continue playing with the application.
38 PC App Description and Functionality
Songs will be played on the BassBot from MIDI song files (file extension .mid). Before playing
a song on the BassBot, the MIDI file must first be converted into a usable format. This
preprocessing will be performed on a PC. This action could be done on the primary PIC,
however due to lack of processing power and ease of file handling, it will be much simpler to
complete on a PC. Once this preprocessing is complete, the song data is transferred to the
primary PIC via serial RS-232.
Figure 20 shows a flowchart of the MIDI preprocessing process. A MIDI file is opened and all
of the MIDI data is copied to an array within the program. All MIDI data is stored as 8-bit data
types.
The header chunk is located first in the program. The header chunk contains much of the setting
data required for interpreting the MIDI file such as the number of tracks contained within the
file, timing/tempo information, and the actual format of the file. A given MIDI file may contain
many tracks, such as tracks for percussion, piano, and many other instruments. For the purpose
of the BassBot, only bass guitar tracks are needed, as this is the only data relevant to the
BassBot.
Once the number of tracks is known, the program will search for the first track and confirm that
it is for a bass guitar. If the track is indeed for a bass guitar, all of the data for this track is copied
to another array. The track data is comprised of timing information (known as delta time) and
note data (A, A#, C, etc.). The track data is copied such that the delta time and the notes are
stored in separate, yet corresponding columns. If there are more than one bass guitar tracks in
the file, each is copied into the same array, inserting rows for delta times that are not yet present.
Next, the notes need to be assigned to strings. It is important to ensure that there is enough time
to move the slider on the rail to get to the next note before it needs to be played. Even though a
song may specify that a certain note needs to be played on one string, it may not be possible for
this system. Instead, the note may be played on a different string. This would result in playing
the note on a different octave, but the overall sound of the note will remain the same and should
be undetected by the casual observer.
The program will first check to make sure that at a given time instant, there are enough strings to
play the number of notes at that time instant (ie. There cannot be more than 4 notes at an instant).
Next, the program suggests an arrangement of notes, assigning one note per string and checks to
make sure that the sliders have enough time to get to that note from the notes they were playing
before. If there is no possible arrangement to make the notes work at an instant, the program will
go back to a previous time instant and rearrange the notes there and then check if this new
arrangement will work. This process will continue until all notes have been assigned to strings.
If during the reassigning, the process traces back to the very beginning of the song, and there are
no more time instances to rearrange notes, one note is dropped from the time instant that caused
the problem, and the process continues. This is not ideal, as it alters the song, but it is a tradeoff
39 that allows for the completion of the song. Once all notes have been assigned to strings, the
MIDI data is ready to be transferred to the primary PIC.
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
NO
Have all note
arrangements
been
attempted?
YES
NO
YES
Write Track Data
(Delta Time and
Notes) to
MIDI Array
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
Reassign notes to
NO different strings at
this instant
Is this the end
of the file?
YES
DONE!
Figure 20: MIDI Flow Chart
40 YES
Can Available
Strings Play
These notes
with enough
time to move?
Level 2 Microcontroller Software Flow Charts
At this level of detail, it is more practical to represent the logic in the microcontrollers with a
flow chart instead of a block diagram. Figure 21: Primary Microcontroller Flow Chart shows the
logic for the primary microcontroller from the programs beginning to end.
Start
Sequence
Get iPad
Song Data
NO
Is it MIDI
Data?
YES
Get MIDI
File
Interpret
Data
Interpret
MIDI File
Send Control
Signals to
Secondary uP
Send Control
Signals to
Secondary uP
Is the song
finished?
YES
NO
NO
Done
Is the song
finished?
YES
Figure 21: Primary Microcontroller Flow Chart
When the microcontroller gets a new data set, it determines if the data is MIDI or from the iPad.
After that decision is made, it goes into a separate thread and interprets the data in a unique way.
After the signals are sent, it checks to see if the song is finished. If it is not finished, it will
continue to send. Once it is finished, it will quit the thread and wait for the next data set.
41 Figure 22 represents the logic in the secondary microcontrollers to control the position of the
sliders on the rail.
Get
Position
Actual=Desired?
NO
Not Far
Enough?
NO
Reverse
YES
YES
Wait for
pluck
Go Forward
NO
Time to
Pluck?
YES
Pluck
Figure 22: Secondary Microcontroller Flow Chart
The position value that the flow chart starts with is provided from the position sensor. The actual
position is compared with the desired position, and the proper changes to the actual position will
be made. To change the position, the secondary microcontroller will drive the stepper motors in
the proper direction. After the desired position is reached, the microcontroller will send the
pluck signal, if necessary. This logic will be used for both the MIDI data and iPad song data.
Level 3 Microcontroller Flow Charts
While these flow charts are useful to understand the general operation of a small section of the
software, a larger, more detailed flowchart is needed. Figure 23 shows the flow chart
representing the software for the Primary Microcontroller.
42 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
PC
Send String 1 Data
to Microprocessor
3
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
Display
“Connected to
iPad” on LCD
Send Data to
Microcontroller 3
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
Figure 23: Primary Microcontroller Flow Chart
Upon start-up, the device will wait for data from either the PC or iPad. Whichever device is
connected will send a string of data identifying itself. To do this, all three have to use the same
initial baud rate to ensure proper flow of data. This baud rate can later be changed in the settings
page on the iPad app or PC program. After the microcontroller identifies which peripheral is
connected, it will send the status (which peripheral is connected) to the secondary
microcontrollers via I2C.
When the iPad is the peripheral that is connected, the primary microprocessor will confirm the
connection and then display “Connected to iPad” on the LCD. After that, there are three options
for data that the microcontroller may receive from the iPad. The first is changing the baud rate.
If this is the command, the baud rate will be changed and then confirmed with the iPad and then
the primary microcontroller will wait for a new command. If an abort command is received, the
microcontroller will revert back to the first step of waiting for a peripheral to connect. This is
done so if the app is exited it will not stay connected with the microcontroller as well as if the
user decides to use the PC instead of iPad once using the app. The final command is if “Song
43 Data” is received. In this case, song data is either a position for a cart on a string, or a pluck
command for a certain plucking solenoid.
When the PC is the peripheral that is connected, the primary microprocessor will confirm the
connection and then display “Connected to PC” on the LCD. The microprocessor will receive
“Type A MIDI Data”, which is the parsed data from the PC. This data consists of notes, note
lengths, and timing for each note, parsed into separate arrays for each string. Once this data is
sent, the primary microcontroller will parse it even further, ordering the timing and string
number into an array for its own use, and then sending the note arrays to their correct secondary
microcontroller. The end of each of the arrays sent to the secondary microcontrollers is a stop bit
sequence, letting the controllers know that the song is over for them. After the data is sent to the
individual microcontrollers, the LCD will prompt the user to disconnect the PC and connect the
iPad. This is done so the iPad can display the individual notes that are being played on the guitar
in real time. Once the connection to the iPad is confirmed, the primary microcontroller will send
all of the data that it received from the PC to the iPad. The microcontroller then uses the timing
array to set pins high to let the secondary microcontrollers know when to play their note. This is
done to avoid the time required for I2C. A “Go” command is also sent over RS-232 to tell the
iPad to play the next note as well. However, in this case, the iPad knows the note length so it
will not wait for a “Stop” command, where as the Secondary Microcontrollers stay active on a
note as long as the “Go” pin is high.
When the song is finished playing, the microcontroller will wait for a command from the iPad.
One the iPad, the user is prompted with three choices, to play the song again, play a new MIDI
song, or play the guitar using the iPad. If the choice is to play the song again, that information is
sent to the primary microprocessor and then forwarded to the secondary microprocessors and the
process will start again. If the user chooses to play a new song, the LCD will prompt the user to
disconnect the iPad and connect the PC on the LCD and iPad screen. Once the PC is connected,
“Type A MIDI Data” is sent and the process starts over. If the user chooses to play the guitar
using the iPad, the process jumps to the beginning of the iPad process.
While the primary microprocessor controls the robot, the secondary microprocessors are the
workhorses of BassBot. They control the movement of the carts, lifting the rails, and actuating
the servo motors. Figure 24 shows the flow diagram for the secondary microcontrollers.
44 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?
No
Play Again?
Yes
Restart Song
Yes
Figure 24: Secondary Microcontroller Flow Chart
The secondary microcontroller, when starting, waits for a status from the primary
microcontroller. When the iPad is connected to the primary microcontroller, the secondary
microcontrollers wait to be addressed until they are sent data from the primary microcontroller.
Once data is sent, it can be one of four types of data. The first would be an abort command,
which would put the microcontroller back to its original state. The second type of data is
position data, which is the desired position of the cart. The controller uses the number of steps
the stepper motor has taken to get a relative position, with can be correlated to an absolute
position. If an issue arises with the position not matching up, IR LEDs and sensors will be added
to determine absolute position. Once this desired location is reached, the microcontroller will
wait for a new command. The third type of data is a pluck command, which will cause the
45 plucking solenoids to actuate. The final type of data is the reset command, which will put the
cart in the home position as well as allow the solenoids to extend.
When the PC is connected to the primary microcontroller, the secondary microcontrollers wait to
be addressed until they are sent position. This data consists of the position of the carts for each
note as well as the length of time the cart will be lowered in that position. As soon as the cart is
in position, the secondary microcontroller will send a “Ready” command to the primary
microcontroller. Once at this point, the microcontroller will wait for the “Go” pin to go high and
then the rail will lower and the solenoid will fire, plucking the string. When the “Go” pin goes
low, the servo motor will actuate, muting the string, the rail will lift, and then after a set amount
of time the servo motor will rise. Once the rail lifts, the cart will move to the next position and
wait. If the song is done, the microcontroller will wait for the user’s selection from the iPad.
Again, if play again is chosen, the microcontroller will loop back and restart the song. If the new
song choice is made, then the microcontroller will loop back and wait for new song data. If
using the iPad is chosen, the microcontroller will revert to the beginning of the iPad section.
46 Mechanical
(LB)
Figure 25: Mechanical Structure Mechanical Hardware
(LB)
Main Frame
(LB)
The frame of the BassBot uses the 80/20 extruded strut (seen in Figure 25). This design is
implemented to give maximum flexibility to the design and also to add adjustment for fine
tuning of the BassBot. The two 6 ft lengths run parallel to the neck of the guitar and are the main
frame of the mechanical design. From these two struts, the rest of the assembly is built.
Perpendicular to these are three one foot sections that keep the six foot lengths parallel, support
the bass guitar (in particular the neck), and also will support the one foot vertical pieces that will
hold the lifting solenoids and sliders for each string (only one string system is shown for clarity).
47 Two one and a half foot struts are also connected parallel to the main frames which are used as
part of the “C” frame support.
Vertical Strut
(LB)
Two vertical struts hold the lifting solenoid platform (a three inch piece of 80/20) and are
adjustable in both x and y directions. The solenoid platform is held in place by a short piece of
80/20. The lifting solenoid is attached to the platform.
The spring (not shown) is positioned on the plunger of the solenoid and the 1/8”x2”x72” flat
steel bar is positioned inside the solenoid plunger groove and attached with a pin.
Flat Steel
(LB)
The flat steel is mounted to the two vertical struts via a two hole plastic bearing that slides into
the groove of the 80/20 strut. Short bolts are inserted through the flat steel and into the plastic
bearing. This is done on either end of the bass.
Stepper Motor and Idler Wheel
(LB)
The stepper motor is positioned on one end of the flat stock and attached using a custom built
acrylic mounting plate. The motor is attached to the acrylic mount and then the mount is
connected to the flat steel using screws. Similarly, the idler wheel is attached to an acrylic idler
wheel mount and attached to the flat steel on the opposite end similar to the stepper motor
mount.
Cart
(LB)
The groove belt is placed around the idler and stepper motor and attached to the acrylic cart that
slides up and down the flat steel. The cart will have three acrylic wheels. Two wheels will ride
on one side of the rail while the third is triangularly placed on the opposite side of the flat steel
rail.
Plucking Solenoids
(LB)
The plucking solenoids are mounted to two “C” frames made of short pieces of 80/20 which
holds the body of the bass guitar in place. The “C” frame is also attached to the main frame. One
side of the 80/20 is lined with a cushioning material to preserve the finish of the bass body, but
more importantly, to help absorb the shock from the solenoids firing to reduce noise generated
through the body of the guitar.
An acrylic mounting plate with through holes to house the plucking solenoids is attached to the
“C” frame.
Damping Servos
(LB)
Damping servos are used to dampen the stings after a note is played to prevent the string from
ringing continuously. The damping arm is connected to the servo motor as shown.
48 Electrical Schematics
(JK)
The master board will take the input data, from either an iPad or PC, through RS232 (Figure 26)
and send it to the master microcontroller. The data will be processed by internal software and
then sent to the proper slave device through I2C protocol. The external programming pins allow
the user to easily program the microcontroller from the PCB. A LCD will be able to display
important data and status information through I2C communication. Two LEDs and two
momentary switches have been connected to the master controller to allow easier debugging and
status warnings.
Figure 26: RS-232 Input
The secondary boards take the information, given to them by the master through I2C, and
implement it through either the activation of a solenoid or stepper motor. The stepper motor is
operated through sending a PWM signal to the stepper driver. On each rising edge, the stepper
driver indexes the stepper motors position. The current through the motor windings is regulated
by fixed-frequency PWM current regulation, or current chopping. When the H-bridge in the
DRV8825 is enabled, current rises through the winding at a rate dependant on the DC voltage
and inductance in the winding. Once the current hits the chopping threshold, the bridge disables
the current until the beginning of the next PWM cycle. The chopping current is set by ISEN pins
and the reference voltage with
!
!!"#$ = !∗!!"#$ .
!"#$"#
49 The chopping current can be adjusted by the voltage divider for the reference voltage and the
resistance in the ISENx pins (Figure 27).
Figure 27: Stepper Driver
The solenoids (Figure 28) are operated by activation through an N and P FET circuit. With the
microchip pin normally low, the N-FET is not conducting and the gate of the P-FET is pulled
high. This keeps current from flowing through the solenoid. When the pin goes high, the N-FET
is turned, pulling the P-FET gate to ground. This turns on the P-FET, allowing the proper amount
of current to flow through the solenoid. The desired current draw per solenoid is approximately
three amps.
50 Figure 28: Solenoid Driver
Both the primary and secondary microcontrollers have status LEDs and momentary switches
(Figure 29 and Figure 30) connected to inputs to allow for status checks and debugging ease.
Figure 29: Status LEDs
Figure 30: Momentary Switches
51 An external I/O expander is available for optional sensor feedback (Figure 31). These sensors
will be connected through DB25 connector or via soldering.
Figure 31: I/O Expander with DB-25 Connection
The full schematic of the Primary and Secondary boards are located in the Appendix.
52 Parts Lists
The below tables show the parts for this project as well as the budget sheet.
Table 39: Parts List
Qty.
7
4
4
2
4
32
12
1
4
8
1
------------
Part Num.
20-2020
---55M048D1B
-C16-321012DC-AY
-----
50
--
--
--U1,U4
U2
25-6797
-PIC18F2620-I/SP
MAX232IN
CMP25S-ND
CFP25S-ND
A32100-ND
A32126-ND
A32038-ND
A32092-ND
DRV8825PWP
--MAX7300AAI+
NHD-0216B3Z-FL-GBW
8
1
5
1
4
4
4
4
2
1
4
4
1
4
1
12
10
3
4
4
4
4
4
16
4
4
Refdes
J13
J1
U6
--U7
U3
-SW1,SW2,SW3,SW4
C5,C6,C11
C1,C2,C3,C4
C7
C8
C9
C10
R1,R4,R15,R16,R17
R9
R5
507302B00000G
B3F-1022
ECA-1HM100
ECA-1HM010
5YH103ZAAJA
M20R104K1-F
C320C474M5U5TA
ECK-F1E473ZVE
HVR2500001003JR500
CF14JT39K0
ERD-S2TJ333V
53 Description
Aluminum Metric T-Slotted Framing (8ft)
1/8' x2" x 72" flat steel (Donated Conti Corp)
K'nex Idler Wheel (Donated From Greg Haren)
Solenoid springs (Pack of 6pc)
Stepper Motor, .25" shaft diameter
Nylon Washers (pack of 50)
Lift/Pluck Solenoids
Nylon Washers (pack of 50)
Pulley, 1/4" bore, 1.019 diameter, .08 pitch
End Feed Fasteners - Double - 20 mm (Pack of 4pc)
Acrylic Sheets (Donated by Alphamicron)
Screw-On Extrusion to Extrusion Brackets - 90deg
Plates - Single, 2 Hole - 20 mm
Top Mount Bearing Pads (Not Available through
McMaster Carr)
Dense Foam (Donated by Enertech Electrical)
Micro Controller PIC18F2620(free samples)
Max232 Chip for Voltage level Conversion
DB-25 Connectors
DB-25 Connectors
DB-25 Connectors
DB-25 Connectors
DB-9 Connector
DB-9 Connectors
Stepper Drivers(free samples)
Power supplies (Donated)
Redpark Cable
I/O Expanders(free samples)
LCD
Heat Sinks for Solenoid and stepper drivers and
Regulators
Pushbuttons
Capacitor-through hole Electrolytic 10uF
Capacitor-through hole Electrolytic 1uF
Capacitor-through hole ceramic 0.01uF
Capacitor-through hole ceramic 0.1uF
Capacitor-through hole ceramic 0.47uF
Capacitor-through hole ceramic 47nF
Resistor-through hole 100k
Resistor-through hole 39k
Resistor-through hole 31k
5
3
3
5
4
8
14
5
5
9
12
5
50
5
5
100
10
7
R2,R3,R6
J10,J11,J12
J10,J11,J12
J7,J2
J9
J3,J4,J5,J6,J8
Q1-Q7
D1,D3
D2,D4
Q8,Q9,Q10
J3,J4,J5,J6,J8,J9
J7,J2
-U6
U8
--UI, U4
CF14JT10K0
WM2011-ND
WM4200-ND
WM4204-ND
WM4202-ND
22-05-3031
2N7000_D26Z
HLMP-1640
HLMP-1301-E0002
IRF9Z24PBF
WM2012-ND
WM2015-ND
08-50-0114
LM7805CT
LM1086IT-3.3/NOPB
EL-PD204-6B
WP2523SURC/E
1-390261-9
54 Resistor-through hole 10k
Solenoid 2-pin Connector Female
Solenoid 2-pin Connector
Programing 6-Pin connector
Stepper Motor 4-Pin Connector
I2C 3-pin Connector
NMOS Transistor
LED Green
LED RED
PMOS Power Transistor
I2C 3-Pin connector Female
Programing 6-Pin connector
Header Pins
Voltage regulator 5V
Voltage regulator 3.3V
Photodiode
LED Red
Dip Socket
Part Budget
Table 40: Parts Budget 1
Qty.
7
4
4
2
4
32
12
Part Num.
20-2020
---55M048D1B
-C16-321012DC-AY
1
4
---
8
---
50
--
8
25-6797
1
5
1
4
4
4
4
2
1
4
4
1
4
1
-PIC18F2620-I/SP
MAX232IN
CMP25S-ND
12
10
7
A32100-ND
A32126-ND
A32038-ND
A32092-ND
DRV8825PWP
--MAX7300AAI+
NHD-0216B3Z-FL-GBW
B3F-1022
1-390261-9
Description
Aluminum Metric T-Slotted Framing (8ft)
1/8' x2" x 72" flat steel (Donated Conti Corp)
K'nex Idler Wheel (Donated From Greg Haren)
Solenoid springs (Pack of 6pc)
Stepper Motor, .25" shaft diameter
Nylon Washers (pack of 50)
Lift/Pluck Solenoids
Nylon Washers (pack of 50)
Pulley, 1/4" bore, 1.019 diameter, .08 pitch
End Feed Fasteners - Double - 20 mm (Pack of
4pc)
Acrylic Sheets (Donated by Alphamicron)
Screw-On Extrusion to Extrusion Brackets 90deg Plates - Single, 2 Hole - 20 mm
Top Mount Bearing Pads (Not Available
through McMaster Carr)
2 Hole T-Nut
Dense Foam (Donated by Enertech Electrical)
Micro Controller PIC18F2620(free samples)
Max232 Chip for Voltage level Conversion
DB-25 Connectors
DB-25 Connectors
DB-25 Connectors
DB-25 Connectors
DB-9 Connector
DB-9 Connectors
Stepper Drivers(free samples)
Power supplies (Donated)
Redpark Cable
I/O Expanders(free samples)
LCD
Heat Sinks for Solenoid and stepper drivers and
Regulators
Pushbuttons
Dip Socket
55 Cost
$19.10
0.00
0.00
9.15
22.66
1.84
22.66
Total Cost
$133.70
0.00
0.00
18.30
90.64
58.88
271.92
11.79
12.26
11.79
49.04
1.99
0.00
15.92
0.00
0.43
21.50
2.00
16.00
0.00
7.68
0.83
0.00
0.00
0.00
0.00
0.00
0.00
7.25
0.00
59.00
0.00
20.00
0.00
38.40
0.83
0.00
0.00
0.00
0.00
0.00
0.00
29.00
0.00
59.00
0.00
20.00
0.20
1.83
0.41
2.40
18.28
2.87
Table 41: Parts Budget 2
Qty.
3
4
4
4
4
4
16
4
4
5
3
3
5
4
8
14
5
5
9
12
5
50
5
5
100
10
Part Num.
ECA-1HM100
ECA-1HM010
5YH103ZAAJA
M20R104K1-F
C320C474M5U5TA
ECK-F1E473ZVE
HVR2500001003JR500
CF14JT39K0
ERD-S2TJ333V
CF14JT10K0
WM2011-ND
WM4200-ND
WM4204-ND
WM4202-ND
22-05-3031
2N7000_D26Z
HLMP-1640
HLMP-1301-E0002
IRF9Z24PBF
WM2012-ND
WM2015-ND
08-50-0114
LM7805CT
LM1086IT-3.3/NOPB
EL-PD204-6B
WP2523SURC/E
Description
Capacitor-through hole Electrolytic 10uF
Capacitor-through hole Electrolytic 1uF
Capacitor-through hole ceramic 0.01uF
Capacitor-through hole ceramic 0.1uF
Capacitor-through hole ceramic 0.47uF
Capacitor-through hole ceramic 47nF
Resistor-through hole 100k
Resistor-through hole 39k
Resistor-through hole 31k
Resistor-through hole 10k
Solenoid 2-pin Connector Female
Solenoid 2-pin Connector
Programing 6-Pin connector
Stepper Motor 4-Pin Connector
I2C 3-pin Connector
NMOS Transistor
LED Green
LED RED
PMOS Power Transistor
I2C 3-Pin connector Female
Programming 6-Pin connector
Pins
Voltage regulator 5V
Voltage regulator 3.3V
Photodiode
LED Red
56 Cost
$0.20
0.20
0.36
0.65
0.49
0.22
0.42
0.08
0.09
0.08
0.00
0.00
0.69
0.71
1.10
0.68
0.86
0.49
1.55
0.00
0.00
0.19
0.69
2.39
0.11
0.25
Total
Total Cost
$0.60
0.80
1.44
2.60
1.96
0.88
6.72
0.32
0.36
0.40
0.00
0.00
3.45
2.84
8.80
9.52
4.30
2.45
13.95
0.00
0.00
9.50
3.45
11.95
11.00
2.50
$958.22
Project Schedules
Final Gantt Chart
Error! Reference source not found. 32 shows the timeline that the BassBot team is working with.
The chart contains a detailed list of each team member’s responsibility and due dates. To the
submittal date of this report, all tasks that should have been completed have been by their
scheduled date.
Figure 32: Gantt Chart - Final
Proposed Implementation Gantt Chart
Figure 33 shows the timeline for the Spring semester’s implementation of the designed proposed
here. The chart contains a detailed list of each team member’s responsibility and due dates.
57 Figure 33: Implementation Gantt Chart
58 Design Team Information
• Michael Prechel, Electrical Engineering—Project Leader
• Greg Haren, Electrical Engineering—Software Manager
• Joshua Kuzman, Electrical Engineering—Hardware Manager
• Louis Begue, Electrical Engineering--Archivist
Conclusions and Recommendations
The BassBot is an electromechanical robot designed to play autonomously through MIDI files or
play live through an I-Pad application. The technical design allows room for adjustment and
expansion.
If the possibility presents itself that the cart’s movement is not as predictable as anticipated, the
schematics for the secondary microcontrollers have left room for an I/O expander. The I/O
expander will be used to interface with photodiodes. There will be one LED on each cart,
pointing up. The LED has a half power angle of 12 degrees, which for this purpose is narrow
enough. The photodiodes will be placed above each position, so when the cart moves or stops
underneath it, they will sense the light, telling the microcontroller that the cart is in the correct
location. If the cart is not sensed, the microcontroller can figure out where it is based on the last
two diodes it was underneath. Therefore, direction and position can be determined.
Overall, the mechanical design without the sensors is acceptable because of the high level of
confidence the designers in the performance of the stepper motors. Also, the software design
should allow adequate room for adjustment of the performance of the robot to ensure proper
functionality.
59 References
Objective-C Information:
http://developer.apple.com/devcenter/ios/index.action
MIDI Information:
Maximum MIDI by Paul Messick
Works Cited
3M. (n.d.). EMI Shielding Tape. Retrieved 10 9, 2011, from
http://multimedia.3m.com/mws/mediawebserver?mwsId=SSSSSu7zK1fslxtUnx_vNxTSev7qe17zHvTSe
vTSeSSSSSS--&fn=EMI%20Shielding%20Tapes.pdf
GeorgiaTech. (n.d.). Crazy-J. Retrieved 9 21, 2011, from
http://www.me.gatech.edu/mechatronics_lab/Projects/Fall00/group3/index.htm
THIS, G. T. (n.d.). Retrieved from
http://www.me.gatech.edu/mechatronics_lab/Projects/Fall00/group3/index.htm
Toolbox, E. (n.d.). Friction and Coefficients of Friction. Retrieved October 9, 2011, from The
Engineering Toolbox: http://www.engineeringtoolbox.com/friction-coefficients-d_778.html
60 Appendices
61 62 Datasheets:
63 Microcontroller:
http://ww1.microchip.com/downloads/en/DeviceDoc/39626e.pdf I/O Expander:
http://datasheets.maxim-­‐ic.com/en/ds/MAX7300.pdf N-­‐Channel FET: http://datasheets.maxim-­‐ic.com/en/ds/MAX7300.pdf P-­‐Channel FET: http://www.vishay.com/docs/91090/91090.pdf Max 232: http://www.ti.com/lit/ds/symlink/max232.pdf LCD: http://www.newhavendisplay.com/specs/NHD-­‐0216B3Z-­‐FL-­‐GBW.pdf Stepper Motor: http://media.digikey.com/pdf/Data%20Sheets/Portescap%20Danaher%20PDFs/55M048D.pdf Solenoid: http://www.electro-­‐nc.com/oak/pdf1313.pdf 64