final design report - university of florida · eel 4924 electrical engineering design (senior...
TRANSCRIPT
1
EEL 4924 Electrical Engineering Design (Senior Design)
Final Design Report 23 April 2013
Responsive Music Player
Team Members: Brittany Finch, Adam Rozenberg
Project Abstract: The purpose of the Responsive Music Player is to design a device that plays music based on the physical state of the user. We will measure heart rate, temperature, and perspiration using corresponding data collection circuitry that is placed on the wrist. We refer to this combination of measurement tools as the Collaborative Measurement Device (CMD). The microcontroller on the CMD will use the collected information to determine the condition of the user relative to a predetermined set of thresholds and select a category corresponding to one of the three preset playlists in the music library. This category is then transmitted via Bluetooth to the Music Player Device, or the MPD. This module consists of an LCD/touchscreen and circuitry required to play music from the preset music library on the SD card. The MPD will randomly play the preloaded songs from the appropriate playlist based on the current physical category. The physical measurements will be taken on the CMD once every ten seconds and sent to the MPD. Then the musical category will be adjusted accordingly and displayed for the user on the LCD. The touchscreen enables user input for options such as “play”, “pause”, “next song”, and “previous song”. The LCD displays up-to-date information to the user concerning the current physical state and what song is being played.
2
Table of Contents Project Features ...................................................................................................................................... 3
Technical Objectives ............................................................................................................................... 4
Concept / Technology Selection.............................................................................................................. 5
Flowcharts / Diagrams ............................................................................................................................ 6
Division of Labor ................................................................................................................................... 12
Bill of Materials .................................................................................................................................... 13
Gantt Chart ........................................................................................................................................... 15
List of Figures 1. Project Block Diagram ................................................................................................................ 6
2. Song Bank Diagram .................................................................................................................... 7
3. CMD Program Flowchart ........................................................................................................... 8
4. CMD Interrupt Flowchart ........................................................................................................... 9
5. MPD Program Flowchart ......................................................................................................... 10
6. Division of Labor ...................................................................................................................... 12
7. Bill of Materials ........................................................................................................................ 13
8. Gantt Chart............................................................................................................................... 15
9. CMD Schematic 1.…………………………………………………………………………………………………………………….16
10. CMD Schematic 2.…………………………………………………………………………………………………………………….17
11. CMD PCB.…………………………………………………………………………………………………………………………..…….18
12. MPD Schematic 1.…………………………………………………………………………………………………………………….19
13. MPD Schematic 2.…………………………………………………………………………………………………………………….20
14. MPD PCD.……………………………………………………………………………………………………………………………..….21
15. Recharge Schematic.……………………………………………………………………………………………………….……….22
16. Recharge PCB.………………………………………………………………………………………………………………………….23
3
Project Features
• A smarter way to “shuffle” music
• Two hardware modules: the Music Player Device (MPD) and the Collaborative
Measurement Device (CMD)
• Collect physical data with three analog circuits on the CMD corresponding to heart rate,
temperature, and sweat rate
• Communicate between the MPD and CMD using Bluetooth
• Input the playlist via an SD card
• Play the responsive music through headphones or speakers with 3.5 mm jacks
• Report the current physical categories, musical category, and song that is playing on the
LCD
• Update the physical state every ten seconds
• Recharge circuit
4
Technical Objectives
• A very sensitive heart rate monitor circuit is required in order to pick up the low voltage
heart rate signal. An imprecise circuit allows potential for noise voltage to be misinterpreted
for heartbeats, which would skew musical selection.
• Physical information will be gathered by the three sensors on the CMD (the heart rate
monitor, thermistor, and perspiration circuitry). This raw information will be processed,
categorized, and then transmitted to the MPD via Bluetooth.
• Upon receiving data from the CMD, the microchip in the MPD will map the physical state to
one of three subsets of music that corresponds to the user at that point in time. It will then
select a song randomly from that playlist.
• Once a song is chosen, the music data from the corresponding WAV file is sent via SPI from
the SD card to the microprocessor. The microprocessor then sends the data via SPI to the
DAC, which feeds into an amplifier circuit and out to the headphones.
• The music library will be a predefined list that does not vary. Each song will be placed into
one of three categories (calm, neutral, and active).
• The LCD will display what physical category applies to the user at that time, what musical
category is being played, and what specific song is being played. The resistive touch screen
will be used for “play”, “pause”, “next song”, and “previous song” buttons.
• We are limited by speed. The code must be efficient enough to gather data/ touch screen
input, communicate to each other, process data, play music, and update the LCD all at once.
• A separate recharge circuit will be included for the 3.7V battery.
5
Concept / Technology Selection
We determined that it would be most efficient to implement this design with two
separate modules, one for data collection/interpretation and the other for visual and audio
output. In order to get the most accurate heart rate measurement we decided to use a
photodiode heart rate circuit. In order to prevent wired connections we chose to use wireless
communication. We decided to use Bluetooth specifically because we would eventually like our
device to work with iPhones or Android phones, which already feature Bluetooth
communication.
A touchscreen controller was utilizes as opposed to interpreting the analog touch
position outputs directly in order to reduce processing time. Reading from the SD card, playing
music, receiving information from the CMD, and updating the LCD are all time sensitive tasks,
and any reduction in processing time is valuable. The controller independently interprets the
touch position, which frees up the microcontroller CPU for other processes. Lastly, we chose
our microcontroller based off of the processing speed and number of GPIO pins.
7
Figure 2: Song Bank Diagram
The music library of the Music Playing Device will be stored on SD card. The music library will be
broken down into three separate categories (calm, neutral, and active). The MPD receives the physical
category from the CMD, which maps to one of three sub-playlists. Once the correct playlist is
determined, the MPD randomly plays songs from the corresponding list. Any updates in the physical
category will change the musical sub-playlist.
12
Division of Labor
Item Brittany Finch Adam Rozenberg MSP430 development board design and PCB population 100% Bluetooth development board design and PCB population 100%
SD/DAC/Op amp/Headphone development board PCB design and PCB population 100%
Combined measurement circuits development board design and PCB population 100% Thermistor circuit design and testing 100% Sweat circuit design and testing 100% Heart rate monitor design and testing 100% Bluetooth functionality 100% SD functionality 100% Loading SD card with music 100% Audio amplification design and testing 100% LCD functionality 100% Touchscreen controller interface 100% Recharge circuit design and PCB population 100% Final PCB design (MPD and CMD) 100% Final PCB component population and testing 100% Final software design and testing 50% 50%
Figure 6: Division of Labor
13
Bill of Materials (excluding shipping and PCB fabrication) Part Quantity Price (Per Component) Total Price Programming Circuit MSP430F5438AIPZR 2 $0.00 $0.00 47k Resistor 2 $0.00 $0.00 10 uF Cap 2 $0.55 $1.10 0.1 uF Cap 2 $0.00 $0.00 10 nF Cap 2 $0.00 $0.00 3.3V Voltage Regulator 2 $0.00 $0.00 JTAG Header 2 $2.57 $5.14 2x1 Header 2 $0.00 $0.00 3.7V Battery 2 $6.39 $12.78 Temperature Circuit 10k Thermistor 1 $1.55 $1.55 10k Resistor 1 $0.96 $0.96 Sweat Circuit $0.00 56K Resistor 1 $0.00 $0.00 10k Resistor 1 $0.96 $0.96 2k Resistor 2 $0.00 $0.00 40k Resistor 1 $1.10 $1.10 100k Resistor 2 $0.00 $0.00 2.3M Resistor 1 $0.09 $0.09 3.3M Resistor 1 $0.00 $0.00 0.1 uF Cap 1 $0.00 $0.00 2x1 Header 1 $0.00 $0.00 TLV2402 2 $0.00 $0.00 Heart Rate Circuit 5k Pot 1 $0.96 $0.96 4.7 uF Cap 2 $0.34 $0.67 47k Resistor 2 $0.00 $0.00 6.8k Resistor 2 $0.00 $0.00 680k Resistor 2 $0.00 $0.00 100 nF Cap 1 $0.00 $0.00 1k Resistor 1 $0.00 $0.00 150 Resistor 1 $0.00 $0.00 2N3904 1 $0.19 $0.19 TCRT1000 1 $0.00 $0.00 10k Resistor 1 $0.96 $0.96 MCP6004 1 $0.48 $0.48
14
Part Quantity Price (Per Component) Total Price Bluetooth RN-42 2 $16.86 $33.72 LED 2 $0.34 $0.68 1k Resistor 2 $0.00 $0.00 DAC/Amplifcation DAC8560 1 $0.00 $0.00 0.1 uF Cap 1 $0.00 $0.00 100 pF Cap 1 $0.00 $0.00 LM386 1 $0.94 $0.94 1 uF Cap 1 $0.00 $0.00 10 Resistor 1 $0.00 $0.00 10k Pot 1 $0.96 $0.96 1 nF Cap 1 $0.00 $0.00 47 nF Cap 1 $1.24 $1.24 10 uF Cap 1 $0.55 $0.55 100 uF Cap 1 $0.00 $0.00 Headphone Jack 1 $1.34 $1.34 SD SD Holder 1 $7.61 $7.61 LCD/Touchscreen LCD/Touchscreen 1 $33.96 $33.96 Controller 1 $0.00 $0.00 40 Pin Connector 1 $2.69 $2.69
Figure 7: Bill of Materials
Total: $137.57