Download Design Document v0.9 - WordPress@UP

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Resistive opto-isolator wikipedia , lookup

Tube sound wikipedia , lookup

Mains electricity wikipedia , lookup

Islanding wikipedia , lookup

Sound reinforcement system wikipedia , lookup

Phone connector (audio) wikipedia , lookup

Alternating current wikipedia , lookup

Spectral density wikipedia , lookup

Electrical engineering wikipedia , lookup

Audio power wikipedia , lookup

Transmission line loudspeaker wikipedia , lookup

Public address system wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Audio crossover wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Rectiverter wikipedia , lookup

Dynamic range compression wikipedia , lookup

Electronic engineering wikipedia , lookup

Opto-isolator wikipedia , lookup

Heterodyne wikipedia , lookup

Transcript
University of Portland
School of Engineering
5000 N. Willamette Blvd.
Portland, OR 97203-5798
Design Document
Frequency Response Audio Visualizer
Team Members:
Jake Nylund (Fall Team Lead)
Kevin Ratuiste (Spring Team Lead)
Alex Arlint (Treasurer)
Robert Rodriguez (Secretary)
Industry Representatives:
John Turner – Impinj, Inc.
Faculty Advisors:
Dr. Joseph Hoffbeck
Clients:
Will Taylor – Student
Phone 503 943 7314
Fax 503 943 7316
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 2
REVISION HISTORY
Rev.
Date
Author
0.9
1 Nov 2013
Team
UNIVERSITY OF PORTLAND
Reason For Changes
First draft submitted to advisor
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 3
TABLE OF CONTENTS
REVISION HISTORY .........................................................................................................................................................2
INTRODUCTION .............................................................................................................................................................4
Figure 1: Front, Top, and Rear View Concept Sketch ............................................................................................5
HIGH LEVEL ARCHITECTURE ...........................................................................................................................................6
Figure 2: High Level Schematic .............................................................................................................................6
COMPONENT STRUCTURE .............................................................................................................................................7
User Interface ............................................................................................................................................................7
Figure 3: User Interface Component Diagram ......................................................................................................7
Arduino Due Microcontroller ....................................................................................................................................8
Figure 4: Arduino Due Layout ...............................................................................................................................8
Software Component ................................................................................................................................................9
Figure 5: General Signal Process ...........................................................................................................................9
Figure 6: FFT Sample Code ..................................................................................................................................10
Signal Amplification .................................................................................................................................................11
Figure 7: LM386 Audio Amp Pinout and External Components .........................................................................11
Electromagnet .........................................................................................................................................................12
Figure 8: Electromagnet Control Circuit .............................................................................................................12
Mechanical Components.........................................................................................................................................12
SYSTEM TEST PLAN ......................................................................................................................................................13
Microcontroller .......................................................................................................................................................13
Electromagnet/Ferro Fluid Display..........................................................................................................................13
Figure 9: Electromagnet Test Switch ..................................................................................................................13
DEVELOPMENT PLAN, MILESTONES, ASSUMPTIONS, RISKS, AND FACILITIES .............................................................15
Development Plan ...................................................................................................................................................15
Figure 10: Overall Design Process Diagram ........................................................................................................15
Milestones ...............................................................................................................................................................17
Assumptions ............................................................................................................................................................17
Risks .........................................................................................................................................................................17
Facilities ...................................................................................................................................................................18
FINAL BUDGET .............................................................................................................................................................18
CONCLUSION ...............................................................................................................................................................18
REFERENCES.................................................................................................................................................................19
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 4
INTRODUCTION
The overall goal of this device is to visualize the frequency response of an audio signal.
The input will be an analog line level audio signal connected via a standard 3.5mm headphone
jack. This signal will enter the microcontroller where it will be processed and filtered to
separate the various frequencies in the audio signal. Implementing the filters digitally allows
more flexibility in how the microprocessor will process the signal as well as the resulting action
or response. Once the frequencies of the audio signal are separated, they will be output to the
electromagnets, which, in turn, will manipulate the ferromagnetic fluid creating a visual
representation of the audio signal.
Below is a comprehensive list of the anticipated design challenges the project could face
as well as how the challenges could be overcome:
Challenge 1: It could be difficult to find a power supply that produces enough for each
electromagnet and then also have the microcontroller coordinate where the current goes. If a
single, suitable power supply cannot be found, then it would also be possible to use smaller,
separate power supplies that would each be easier to control and locate individually.
Challenge 2: There is a possibility that the synthesized ferrofluid reacts differently or
more inconsistently than expected. In this situation, it would be best to simply buy ferrofluid
from a chemical supplier so that the team’s focus is not on the chemistry of ferrofluid; the main
focus should be on the hardware/software design and construction of the visualizer.
Challenge 3: The team may run into issues constructing certain hardware components,
such as the Plexiglas containers for the ferrofluid or the electromagnets themselves. In such a
situation, there are multiple resources available, including the faculty at the University of
Portland, the design project technicians, or at worst, the library and online sources to help
direct the team in the right direction.
Our final result should resemble the concept sketch provided in Figure 1, below.
The rest of this document lays out the detailed design choices Team Couch Street has
decided upon. Within each section, there will be some recurring words that the team assumes
the reader understands. For example, it is assumed that the reader knows that Arduino is an
open-source electronic prototyping platform; the Arduino Due is the microcontroller that the
team will be using for the project. The team also assumes that the reader knows what an LED,
IC, and electromagnet are; these electronic components will be utilized in the construction of
the Frequency Beats project.
The following sections of this document will include which specific tools and
technologies the team will utilize in the production of the project as well as detailed
descriptions of how the project will physically be laid out, how the project will be wired, and
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 5
how each component will interact with the other components. Each section is broken down as
follows:
1. High-level Architecture
2. Component Structure
3. System Test Plan
4. Development Plan, Milestones, Assumptions, and, Risks
5. Final Budget
6. Conclusion
7. References
8. Appendices
Figure 1: Front, Top, and Rear View Concept Sketch
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 6
HIGH LEVEL ARCHITECTURE
Figure 2 below shows the high level architecture of FreqBeats. The key component of
this project is the Arduino Due, which takes the audio signal at its input, digitally filters it, and
outputs three different frequencies. The three frequencies are low-range, mid-range, and highrange. Each frequency is amplified by its own LM386 and then used to trigger a TIP36C power
transistor. The power transistor, when triggered allows current to flow through the
electromagnet, thus manipulating the ferrofluid. FreqBeat utilizes two power supplies, a 16V
for the electromagnets and a 3.3V to power the Arduino.
16V Power Supply
3.3V Power Supply
Electromagnet
(Low-Range)
LM386
Audio Amp
Electromagnet
(Mid-Range)
Electromagnet
(High-Range)
TIP36C
Power Transistor
Low-Range
Out
Audio Signal In
Arduino
Due
Mid-Range Out
High-Range Out
LM386
Audio Amp
TIP36C
Power Transistor
LM386
Audio Amp
TIP36C
Power Transistor
Figure 2: High Level Schematic
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 7
COMPONENT STRUCTURE
User Interface
The user will plug in their audio signal via a 3.5mm standard line level audio cable on the
back side of the project device. Once connected, the user presses play and watches the audio
visualization of his or her music choice on the front side of the device. Alternatively, the user
may press one of the three buttons present on the front of the device to activate the respective
electromagnet in order to manipulate the ferromagnetic fluid without audio. The following
figure shows the three buttons and audio cable that the user will be able to interact with.
Figure 3: User Interface Component Diagram
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 8
Arduino Due Microcontroller
The primary digital component that will be utilized in our design is the Arduino Due,
which is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU. It is the
first Arduino bard based on a 32-bit ARM core microcontroller. It has 54 digital input/output
pins, 12 analog inputs, 4 UARTs, an 84 MHz clock, a USB OTG capable connection, 2 DAC, 2 TWI,
a power jack, an SPI header, a JTAG header, a reset button and an erase button.
This component will be used to digitally filter the input audio file, separating it into lowrange, mid-range, and high-range, then output those 3 signals to individual audio amplifiers.
Figure 4: Arduino Due Layout
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 9
Software Component
Figure 5: General Signal Process
Figure 5 shows the general process that the signal will undergo as it is sampled by the Arduino.
Simply stated the Arduino will continually sample the input on one of the Digital Input pins
using a Loop. From there using Fast Fourier Transform (FFT) the signal will be separated as Low
pass, Band pass, and High pass filters. Each signal will be output to three different digital output
pins.
init()
Initialize I/O pins to being the sampling and output process
pinMode(2, INPUT); // Set Due pin 2 (Digital Pin 2) to be an INPUT pin
pinMode(22, OUTPUT); // Set Due pin 22 ( Digital Pin 22) to be an OUTPUT pin)
sampleLoop()
This loop will continually sample the audio input in Analog format. Using FFT it will split
the signal and output onto three separate pins for High, Low , and Band pass frequencies.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 10
inputAudio = analogRead(2); // get input from pin 2
Figure 6: FFT Sample Code
http://www.drdobbs.com/cpp/a-simple-and-efficient-fft-implementatio/199500857
Send each split signal continually to their respective pins, for example pins 22, 23, 24.
delay()
In order to achieve real time audio output that produces a response in the
ferromagnetic fluid in time with the music there will need to be a precisely tuned delay. The
specific delay will be modified to produce the best time output.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 11
Signal Amplification
After the audio signal is broken up into three separate low-range, mid-range, and highrange frequencies, it needs to be amplified. This is done with an LM386 audio amplifier which
can provide a gain between 20 to 200. Shown in Figure 7 is the pinout of the LM386 and the
external components that will be connected. Note that varying the values of the resistor and
capacitor connected between pin 1 and pin 8 provides gain control and the ability to select any
gain value between 20 and 200.
Vs
6
2
1
8
5
LM386
250F
To TIP36C Power Transistor
Out
From Arduino
In
10Ω
3
4
Bypass
0.05F
Figure 7: LM386 Audio Amp Pinout and External Components
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 12
Electromagnet
Power Supply
Even with an audio amplifier, the signal from the Arduino is not strong enough to
drive the electromagnet. Thus, the electromagnets will be powered by a 16V power
supply.
Control
The signal from the Arduino will determine when the electromagnet is on and
off. A TIP36C power transistor, which acts as the “on/off” switch for the electromagnet,
will be controlled by the signal from the Arduino. Current from the 16V power supply is
able to flow through the electromagnet when there is an observable voltage seen at the
base of the power transistor, thus turning the electromagnet on.
16V
Electromagnet
From LM386 Power Amplifier
2
1
TIP36C
3
Figure 8: Electromagnet Control Circuit
Build
The electromagnet will be comprised of 16 gauge magnet wire. It will be
wrapped around a 1/2” diameter metal core that is 5 inches in length. The
electromagnet will be mounted above the ferrofluid display.
Mechanical Components
Our project will incorporate several simple mechanical devices. One of which will be the
casing that houses the Ferro fluid. For this, we plan to use a glass cylinder with a diameter of
approximately 2 inches and height of 5 inches. The electromagnetic will be hard mounted
above the cylinder. Additionally, we will construct a wood base to mount the three Ferro-fluid
displays to as well as the Arduino and support circuitry. The base will be approximately 18
inches long and 6 inches wide.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 13
SYSTEM TEST PLAN
Microcontroller
In order to adequately test the Arduino Due microcontroller to verify that the digital
filters are functioning as desired, the following steps will be executed:
1.) Set up a breadboard with 3 different LEDs, one for indicating low
frequencies (20Hz – 400Hz), one for mid-range frequencies (400Hz – 5.2KHz),
and one for high frequencies (5.2KHz – 20KHz).
2.) Manufacture a test signal comprised of 5 seconds of low frequency data
(20Hz – 400Hz), 5 seconds of mid-range frequency data (400Hz – 5.2KHz),
and 5 seconds of high frequency data (5.2KHz – 20 KHz).
3.) Use the manufactured signal as an input to the Arduino.
4.) If the LEDs corresponding to the expected frequencies at time X light up,
then the Arduino is functioning properly.
5.) Otherwise, re-examine the Arduino code for potential errors and then redo
the steps above until the desired result is achieved.
Electromagnet/Ferro Fluid Display
Testing of the electromagnets on each of the three displays will be done as follows:
1.) Construct a simple switch for each of the three displays that allows current to
flow from the power supply, through the electromagnet, and then to ground,
as seen in the diagram below:
Figure 9: Electromagnet Test Switch
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 14
2.) When the switch is in position 1, the electromagnet is connected to the
Arduino.
3.) When the switch is in position 2, there is no current flowing through the
electromagnet and it is off.
4.) When the switch is in position 3, current flows from the power supply,
through the electromagnet, and to ground. This is the test position to simply
show that the electromagnet is working.
5.) If the electromagnet does not work when the switch is in position 1 or 3
check the following:
a. Is the power supply on and working correctly?
b. Are there any shorts in the system?
c. Check each individual component for failures.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 15
DEVELOPMENT PLAN, MILESTONES, ASSUMPTIONS, RISKS, AND FACILITIES
Development Plan
Figure 10: Overall Design Process Diagram
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 16
Project Proposal
Team Couch Street developed the idea for a ferrofluid audio visualizer by combining two
different project ideas; one to work with ferrofluid, and the other to work with software to
digital process audio input. The appeal of this project is the combination of skills required to
successfully design and build a prototype.
Function Requirements
This is the document that details the conceptual design of the ferrofluid visualizer. This
includes primarily the goals, conceptual sketches, and plan for production.
Design Document
See Recursion.
Testing Ferrofluid and Electromagnets
In order to determine the specific calculations for voltage and current requirements, the
team tested multiple electromagnets and ferrofluid with different viscosities. These tests lead
to changes and finalized decisions in the Design Document.
Software Development
To meet the required deadline, team members Robert Rodriguez and Jake Nylund will
being the software aspect of the project over Christmas break. To best get a handle on the
language and chip architecture it is necessary to start as early as possible.
Construct Housing for Ferrofluid and Base
As discussed in the Assumptions portion of this document, the team assumes we will
have the assistance of Alan Hansen in the construction of our ferrofluid containers and base for
our prototype. This will be constructed of Plexiglas and plywood respectively.
Construct Electromagnets
This has its own section as the construction of an efficient and powerful electromagnet
takes significant time and focus, and the team requires three of them.
Test FFT with Board and LED’s
After finishing the software development stage, it will be necessary to test the Fast
Fourier Transform (FFT) algorithm to ensure that it properly splits the signals into High, Band,
and Low pass frequencies. The team will use LED’s and specific High frequencies, Midband, and
Low frequencies individual to test the Arduino’s DSP program.
Test OP Amp Configuration
Team members Alex Arlint and Kevin Ratuiste will test the Op amps construction in the
Shiley lab to ensure the expected voltage increase.
Assemble and Test First Ferrofluid Display
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 17
At this point in the design process everything should be ready to assemble into one unit.
The Arduino will pass a signal through the OP Amp which, with the increase in voltage, will
power the Electromagnet, which will in turn cause the ferrofluid to respond in time to the audio
signal.
Test Second and Third Ferrofluid Displays
With one fully functional Ferrofluid Display the team anticipates a much quicker
turnaround time in production of the second and third ferrofluid displays. The bugs should be
fewer and worked out faster.
Test and Debug
By this point everything will be assembled. Final Testing stages will ensure that all
portions of the visualizer are working together as expected.
Founder’s Day Presentation
The team will present the project to faculty and students at the University of Portland.
Milestones
The milestones for the project have been stated previously in the Functional
Specifications Document. Please refer to that as there have been no changes in the milestones.
Documentation can be found at: http://wordpress.up.edu/egr13couchstreet/visualizer-status/
Assumptions
There are several assumptions that the team is making about the construction phase of
the project.
 Alan Hansen will be available to help with the construction of the base and
container for the ferrofluid
 The Arduino Due will function as stated in the specifications sheet listed on the
Arduino website.
 All hardware will be available and function properly
 Some hardware components, such as those necessary in the construction of the
OP Amp circuit, will be available from the University and not necessary to
purchase.
Risks
The risks for the project have been stated previously in the Functional Specifications
Document. Please refer to that as there have been no changes in the risks. Documentation can
be found at: http://wordpress.up.edu/egr13couchstreet/visualizer-status/
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 18
Facilities
Throughout the experimentation, design, and construction process of our project will
make use of the bench space and equipment in Shiley 306. As far as software requirements,
there are open source microcontroller environments and/or MATLAB on any Engineering build
computer. The equipment used will likely be limited to a soldering iron, ICs, and various hand
tools for construction.
FINAL BUDGET
Material
2-1/4" OD x 2" ID x 36”
Plexiglass tube
2.5” Plexiglass disk
Arduino Due
½” x 6” metal core
250ml ferrofluid
3.5mm female adapter
LM386
TIP36C
16V power supply
3.3V power supply
Display base parts (Plywood)
Magnet wire 16AWG spool
(500’ each)
Price
12.50
Quantity
1
Total Cost
12.50
12.50
40.00
10
58.25
5
0.94
1.89
< 50.00
<25.00
20.00
20.00
1
1
3
1
1
3
3
1
1
1
2
12.50
40.00
30.00
58.25
5
2.82
5.67
<50.00
<25.00
20.00
40.00
TOTAL 301.74
CONCLUSION
The ferromagnetic fluid audio visualizer is a different way of seeing different frequencies
used in different types of music. It will show the low, middle and high frequencies ranges by
processing the sound form a standard 3.5mm headphone jack, used by almost all music players
and splitting the signal accordingly.
In order to succeed on this project the team will need to continuously work to stay on
schedule. The schedule that we have laid out is reasonable so long as time is used efficiently.
The real key is to effective testing and debugging. In terms of software it is important to ensure
the signal is processed correctly and then output to the proper pin. For hardware the key part is
the construction of the OP Amp circuit and Electromagnet. Teamwork will keep the project on
track.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND
DESIGN DOCUMENT
TEAM COUCH STREET
REV. 0.9
PAGE 19
REFERENCES
http://elm-chan.org/works/akilcd/report_e.html - audio specturm monitor
http://forum.arduino.cc/index.php/topic,37689.0.html
http://playground.arduino.cc/Main/ArduinoSynth
http://arduino.cc/en/Main/arduinoBoardDue
https://www.youtube.com/watch?v=a_flWeIdoBg
http://abhishekjainnsit.blogspot.com/2012/10/digital-filters-on-arduino.html - Digital Filters
http://forum.arduino.cc/index.php?topic=42510.0 – Arduino Digital Filter
http://www.paulodowd.com/2013/06/arduino-38khz-bandpass-software-digital.html - 38kHz
Ban Pass Filter
http://forum.arduino.cc/index.php/topic,42635.0.html – Low Pass Filter Design
http://www.drdobbs.com/cpp/a-simple-and-efficient-fft-implementatio/199500857 - FFT
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JAKE NYLUND