* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download TIIC2015- 7Deadly Synths, a non contact
Immunity-aware programming wikipedia , lookup
Power inverter wikipedia , lookup
Variable-frequency drive wikipedia , lookup
Audio power wikipedia , lookup
Stray voltage wikipedia , lookup
Public address system wikipedia , lookup
Oscilloscope types wikipedia , lookup
Distribution management system wikipedia , lookup
Schmitt trigger wikipedia , lookup
Oscilloscope history wikipedia , lookup
Voltage regulator wikipedia , lookup
Voltage optimisation wikipedia , lookup
Alternating current wikipedia , lookup
Pulse-width modulation wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Power electronics wikipedia , lookup
Electronic musical instrument wikipedia , lookup
Buck converter wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Mains electricity wikipedia , lookup
EEL4924C Senior Design Final Design Report Spring 2015 Title: Non-Contact Synthesizer Team: 7 Deadly Synths Submitted By: Troy Bryant [email protected] (321)525-6792 Sean Lyons [email protected] (321)289-8729 Videos can be found at our youtube channel: https://www.youtube.com/channel/UCk2SaEY NehMW4xsHywsIrdQ Pictures, and more interactive descriptions are found at our website 7deadlysynths.wordpress.com Table of Contents Abstract ......................................................................................................................................................... 4 Project Features ............................................................................................................................................ 4 Technical Objectives ..................................................................................................................................... 5 Analog Hardware ...................................................................................................................................... 5 Digital Hardware ....................................................................................................................................... 6 Software Sound Generators/Effects ......................................................................................................... 7 Power Supply ............................................................................................................................................ 8 Technology Selection .................................................................................................................................... 8 Processor................................................................................................................................................... 8 Audio Output ............................................................................................................................................ 8 User Interface ........................................................................................................................................... 9 Analog Synthesizer Modules ..................................................................................................................... 9 Power ...................................................................................................................................................... 10 Bill of Materials ........................................................................................................................................... 11 Division of Labor ......................................................................................................................................... 12 Gantt Chart ................................................................................................................................................. 14 TI Innovation Challenge Information .......................................................................................................... 15 Appendix ..................................................................................................................................................... 18 Schematics .............................................................................................................................................. 18 Code ........................................................................................................................................................ 32 Abstract The history of the electric synthesizer dates back to the late 1800’s, since that time many different synthesis techniques have been invented and explored. Robert Moog built a modular synthesizer prototype in 1963, which combined with advances in solid state electronics, allowed synthesizers to become commercially available. Since that time many artists from the Rolling Stones to Depeche Mode have used synthesizers in popular music. The digital age ushered in even more growth for synthesized music. Software synthesizers & mixers are now widely available and affordable. The electronic dance music movement- which is a product of the synthesizer- was recently estimated to be worth 6.2 billion. While electronic and digital music is enjoying a renaissance, there is a need to innovate and create something radically new. Just as the modular analog synthesizer and software synthesizer changed the way musicians envision soundscapes, we would like to create an instrument that is completely novel. Music creation can be influenced by the instrument that it is performed on. By connecting to motional instead of tactile touch, we feel that we can create a new way to interact with an instrument. A touchless keyboard enables the body and mind to come together in the act of composition. It also opens the door for persons who have disabilities that impair their fine motor skills to play music. Infrared technology has been used for years in various remotes, it is now a simple and cheap way to influence electronic circuits wirelessly. The Seven Deadly Synths is a senior design project that aims to control both analog and digital synthesizers using a large scale infrared array. Project Features This non-contact synthesizer includes an analog synthesizer and a digital synthesizer, each offering different capabilities. An array of infrared (IR) sensors act as the user interface and detect ‘key presses’ by constantly monitoring the distance of the user’s hand from the sensor, implementing a contactless macro keyboard. These key presses are relayed to either the DSP or the analog modules to trigger sound events. The digital synthesizer consists of a digital signal processor (DSP) and a suite of customizable software sound generators, such as oscillators and envelope generators. Additionally, the DSP adds digital sound effects such as flanger, delay, or filters to the synthesized sounds. A simple sequencer is available to store note patterns in memory implementing a looper. All of these features can be set and modified through a graphical user interface (GUI), which updates the DSP in real time. The analog portion of our synthesizer acts as a modular analog synthesizer, giving the user a ‘plug and play’ experience. A keyboard interface circuit monitors the output of each IR sensor and relays the necessary information to the analog modules to trigger the proper sound events. A variety of analog modules are available to the user, and include a voltage controlled oscillator (VCO), a low frequency oscillator (LFO), an envelope generator (EG), and a voltage controlled amplifier (VCA). The user is able to control each module through panel mounted switches and knobs. These modules can be interconnected in different ways to create a variety of sound effects. Finally, the analog and digital portions are both mixed together and output to headphones or a line-out connection. Technical Objectives The block diagram of the synthesizer is shown in Figure 1. Figure 1 The four main components of this project include analog hardware, digital hardware, software sound generators/effects, and a power supply. The objectives of these respective sections are detailed below. Analog Hardware Keyboard Interface o o o Voltage Controlled Oscillator o o o o o o Generate multiple different waveforms (ramp, sawtooth, square, triangle, and sine) with frequencies based on user input (a control knob) Produces frequencies between 0.3 Hz and 30 Hz, roughly Visually display rate of output through an LED Envelope Generator o o Generate multiple different waveforms (sine, triangle, ramp, square) with frequencies based on a control voltage input A 1V increase in control voltage will correspond to an increase in output frequency by one octave (double the frequency) Able to produce accurate output frequencies over at least 3 octaves Can produce any frequency within the audio range (approximately 20 Hz - 20 kHz) Low Frequency Oscillator o Monitor each of the 12 IR sensors to determine which keys are active and which keys are not. Generate a control voltage based on which key is pressed. Generate a gate and trigger signal, which represent an active key and a key change, respectively. Generate an envelope waveform with four variable parameters (attack, decay, sustain, release) The rate or level of each parameter will be controllable through knobs or switches by the user Voltage Controlled Amplifier o o Amplify or attenuate an input signal based on other input voltages, such as an envelope waveform. Generate an output signal within safe voltage levels specified by the IC used to mix the analog and digital sounds. Digital Hardware DAC o o o o o DSP o o o Interface with a two channel stereo digital to analog converter (DAC) Send samples to DAC in real-time at a sample rate of 44.1kHz Use a 16 bit data format for high quality sound Communicate using modern I2 S (audio data) and I2C (control) protocols Drive headphones and line-out connections from integrated amplifiers Use peripherals to interface with analog data from keyboard, send digital data to DAC, and control data from user interface Optimize usage of internal hardware for real-time sound synthesis Realize I2 S protocol using serial hardware Bluetooth Co-Processor (Reach Objective) o o o Utilize a simple microprocessor to implement bluetooth SDK/stack Send control messages to DSP via UART Process bluetooth data via Application Controller Interface (ACI) over SPI to communicate with the GATT layer of the Bluetooth Low Energy (BLE) stack Software Sound Generators/Effects A graphical overview of the software block diagram is shown in Figure 2, a flowchart is shown in Figure 3. The software is largely an interrupt driven system. Figure 2 Figure 3 ADC Drivers o o Envelope Generator o Interface onboard analog to digital converter (ADC) module to IR array Sequence samples from all 12 IR keys at a reasonable sample rate Use an efficient algorithm for scanning IR array in order to create an envelope for the output sound based on the location of the user’s hand Unit Generator (Digital Oscillator) o o o o o Create multiple frequency scalable waveforms that are generated in software Should have a low memory footprint Use numerically controlled oscillator (NCO) algorithm combined with a wavetable to produce output waveforms Support basic waveforms: sine, square, sawtooth, triangle Operate at frequencies within audible range Sound Effects (SFX) o o Sequencer o o Allow user to customize the SFX stack and operation parameters Support simple effects such as: chorus, delay, reverb, flanger Allow user to record a sequence of key presses and continually loop them back Support new key press data being added to the currently looping data UART Drivers for Control (Reach Objective) o o Interface with BLE stack co-processor Adjust audio processing parameters based on control data Power Supply Provide multiple voltage levels (±12V, 5V, 3.3V, and 1.8V) from a single battery Provide low noise voltage rails due to sensitivity of audio circuits/applications Technology Selection Processor TMS320F28335PGFA: Digital Signal Controller o Clock Speed: 150 MHz o On-chip Memory: 256KB Flash and 34KB SARAM o 6-Channel DMA o 6 32-bit Input Capture or Auxiliary PWM Outputs o 12-bit ADC with 16 Channels at 12.5 MSPS o 3 32-bit CPU Timers o 2 Multichannel Buffered Serial Port (McBSP)/SPI o 1 SPI Peripheral o 3 SCI Peripherals o 1 I2C Peripheral o 88 General Purpose I/O’s (shared) o 8 External Interrupts o Dedicated floating point unit (FPU) We chose this processor because of the FPU which would make fractional calculations fast and efficient to satisfy our real time constraint. The processor also has a rich peripheral set including the configurable McBSP which can be used for I2S data framing. TI’s hand optimized signal processing library allows the processor to perform robust DSP algorithms in real time. The DMA peripheral allows the processor to sample the onboard ADCs in rapid succession and put the results directly in memory buffers, this allows the processor to focus on more critical audio processing tasks. Audio Output TLV320DAC3101: Low Power Stereo Audio DAC with Stereo Class-D Speaker Amplifier o 95-dB DAC SNR o 32-bit DAC Resolution o o o o o I2C Control Interface I2S Digital Audio Interface Stereo 1.29-W Class-D BTL 8Ω Speaker Driver Supports 8 kHz to 192 kHz Sample Rates Programmable PLL for Flexible Clock Generation This DAC was selected because of its high level of integration and customizability. It satisfied our needs of running 16 bit stereo at 44.1kHz and also supports I2C and I2S interfaces. It has built in Class D speaker amplifiers and headphone drivers which gives a lot of functionality that common synths have. It also contains a variety of customizable filters which are useful for producing certain audio effects. User Interface GP2Y0A41SK0F: IR Sensor o 4cm to 30cm Range o Optical filtering circuitry and physical filtering built in We chose these IR sensors because they are widely used, supported, and very integrated. They should be very easy to interface with our on chip ADC SN74CBTLV16292: 12-Bit 1-Of-2 FET Multiplexer/Demultiplexer This 12-bit bus multiplexer/demultiplexer allows the 12 IR sensors to control either the digital synthesizer or the analog synthesizer based on a switch controlled by the user. This IC was chosen mainly for its bus size, but it also boasts a small footprint and internal pull down resistors, reducing the number of external components needed. BlueFruit BLE (nRF8001): Bluetooth module (Reach Objective) o Establishes BLE connection with iOS or Android Devices o Has example SDK and code for apps available The BlueFruit was chosen because of its rapid prototyping environment. Using it with an arduino should be a quick and easy way to add bluetooth control to our project without taking time from the focus on audio. Analog Synthesizer Modules A variety of operational amplifiers and other IC’s were used in the analog module designs. Table 1 displays each component used, along with a short description. Component Description Slew Rate (V/µs) Noise (nV/√Hz) OPA164x High Performance, Audio 20 5.1 LM13700 Current Controlled, Transconductance Amplifier 50 Not Given TL07x/TL08x General Purpose Amplifier 13 18 CD40106 Hex Schmitt Trigger N/A N/A CD4066 CMOS Quad Bilateral Switch N/A N/A CD4001 Quad 2-Input NOR Gate N/A N/A Table 1 The TL07x and/or TL08x were chosen based on availability and cost. Both can be used for any general purpose op-amp where noise is not a critical factor. In the cases where noise must be kept low, the OPA164x will be used. It was designed for high performance audio applications, maintaining low noise, and was chosen based on this feature. The LM13700 will be used when it is necessary to control the output current of an amplifier externally. This chip was chosen due to its cost and for the fact that it also includes output buffers on chip. The CD40XXX IC’s were chosen due to their availability, low cost, and ability to perform over a large voltage range (±12V). No other performance characteristics were necessary in these IC’s, so any other IC with similar functionality that can handle the given voltage range could be used in place of these. Various transistors and diodes were used in the analog modules and are listed below. The components chosen were all general purpose transistors/diodes and were mainly chosen based on availability. SSM2212: Dual-Matched NPN Transistor 2N3904: Small Signal NPN Transistor 2N3906: Small Signal PNP Transistor J112: N-Channel JFET Transistor 1N4148/1N914: High Speed Switching Diode 1N5225B: 3V Zener Diode 1N5242B: 12V Zener Diode Panel-mounted potentiometers, switches, buttons, and audio jacks were chosen to mount to the faceplates of each analog module. Finally, a multitude of through-hole resistors and capacitors were used in each analog module design. Power 7.4V 5000mAh LiPo Battery This battery was chosen mainly based on availability and convenience. It has a large enough capacity to power our system for multiple hours and comes with charging and protection circuitry. LM1084-5: 5V 5A Low Dropout Positive Regulator o Chosen for its regulated output voltage and large output current, which would be necessary since the 5V line will drive all other power lines (±12V, 3.3V, and 1.8V) as well as supply power to the IR sensors TPS70351: Dual-Output Low Dropout Voltage Regulator o This component was chosen because it was used in a dev board, and was proven to work with the system we were using. This component provides the necessary 3.3V (1A output current) and 1.8V (2A output current) to power our processor. TPS65131: Positive and Negative Output DC-DC Converter o This part was chosen because it offered both a dual output voltage of ±15V from 5V in a single package. This component is rated for over 300mA of output current for either output voltage which is enough to drive the analog synthesizer modules. UA78M12: 12V Positive Voltage Regulator o This component was chosen to regulate 15V down to 12V for the analog modules and has a sufficient output current (500 mA) for our application. UCC384-12: Low Dropout 0.5A Negative Linear Regulator o This component was chosen to regulate -15V up to -12V for the analog modules and offers a sufficient output current (500 mA) for our application. Bill of Materials A list of the components and materials used in the final product of this project are displayed in Table 2 below. Item Cost DSP DAC IR Sensors 12Bit Bus Mux/Demux Bluefruit BLE (nRF8001) OPA1642 LM13700 TL07x CD40106 CD4001 CD4066 SSM2212 2N3904 2N3906 J112 1N4148 7.4V LiPo Battery LM1084-5 TPS70351 TPS65131 EVM UA78M12 UCC384-12 LM324 FT232RL Epson 15MHz Oscillator ATMEGA 328 Supplied by UF $4.54 $98.42 $2.55 $19.95 $4.23 $7.96 Supplied by UF $1.04 Supplied by UF Supplied by UF $7.10 Supplied by UF Supplied by UF $2.25 Supplied by UF Previously Acquired $3.02 $6.09 Supplied by TI $1.48 $12.30 $1.20 $4.50 $1.71 $3.92 16MHz Crystal 6 SPST Switch Bank 8 Blue Surface Mount LED’s 1k SIP Resistor Audio Connector Resistor Pack Array Surface Mount Caps/Resistors Thru-Hole Resistors (Specific) Thru-Hole Resistors (General) Thru-Hole Caps 1N5225B 1N5242B Trimmer Potentiometers Panel Mounted Potentiometers Metal Potentiometer Knob Panel Mounted SP3T Switch Panel Mounted SPST Switch Panel Mounted Push Switch Acrylic Sheet Enclosure Material 4 Layer DSP PCB Analog Module PCB’s $0.81 $0.68 $2.32 $0.40 $1.26 $0.35 $10.00 $10.00 Supplied by UF Supplied by UF $0.12 $0.11 $14.00 $10.28 $13.30 $3.14 $3.31 $1.70 $2.66 Supplied by UF $66.00 $103.00 Total Cost $425.70 Table 2 Division of Labor The division of labor is shown in Figure 4 below. This table lists each objective, the projected start/end dates, and the person responsible for that objective. The objectives have been split in a way that Sean oversees the digital portion and Troy oversees the analog portion. Although certain members were responsible for overseeing certain tasks, we deliberated as a team on all aspects of the project. Figure 4 Gantt Chart Our projected timeline is shown in the Gantt chart of Figure 5. The orange blocks represent the objectives overseen by Troy, the blue blocks represent those overseen by Sean, and the green blocks represent those overseen by both. Our goal was to have all basic functions working by the end of February. This left the month of March for stretch goals and system integration. The weeks before our final demo were to be used for fine tuning and assembling our system. Figure 5 TI Innovation Challenge Information 7 Deadly Synths University of Florida TI Innovation Challenge 2015 Project Report Team Leader: Team Members: Sean Lyons [email protected] TeamT Troy Bryant [email protected] Team Advising Professor: Dr. Karl Gugel [email protected] Video Provide link to video that you’ve uploaded to www.ti.com/videos We provided two videos, one is a short teaser video, the second is an in depth technical review Teaser Video: https://youtu.be/RpbRVDXVeZw Technical Overview: https://youtu.be/-o38CmUGFgg Pictures, and more documentation can be found at our website: Please visit our website for in-depth explanations about our product! More videos are linked here as well. https://7deadlysynths.wordpress.com/ Texas Instruments Mentor (if applicable): N/A Date: 5/20/2015 Qty. List all TI analog IC and TI processor part number and URL 1) Explain where it was used in the project? 2) What specific features or performance made this component well-suited to the design? 1x TMS320F28335 1. 2. 1x TPS70351 1. 2. The c28x DSP was chosen to be the heart of the digital portion of the synthesizer. It was responsible for reading the IR keyboard, generating samples, handling serial data from a computer GUI, creating sound effects, running a sequencer, and sending data back to the GUI Our main requirement was handling stereo audio in the I2S format at 44.1kHz per channel. We also needed to handle fast floating point operations (dedicated FPU was a must). Accelerations such as hardware circular buffers also contributed to meeting our real time requirement. A rich peripheral set such as the McBSP (for I2S data) and the sequenced ADC (for sampling IR keyboard) was essential. This integrated LDO and SVS was used to provide power to our c28x DSP. It takes a 5V input and creates the supplies required to boot the DSP (3.3V, 1.8V) We chose this part because it is marketed as a solution for TI’s DSP products, it generates the split supplies needed for the digital core and the IO voltages of the DSP. These supplies were then filtered to create an analog 3.3V and 1.8V rail. We also needed split supplies for our DAC IC and this LDO being to provide up to 3A (both supplies combined) was a good fit for our design. It also allowed for a system wide POR thanks to the integrated SVS. 1x TLV320DAC3101 1. 2. 3x LM324N 1. 2. 3x LM324N 1. 2. 1x SN74CBTLV16292 1. 2. 14x TL07X 1. 2. 3x LM13700 1. 2. 1x OPA1642 1. A DAC was needed to convert the samples generated by the DSP to analog audio waveforms. We also used the integrated hardware signal processing blocks for user controlled real time filtering of the digital waveforms. The main requirement for a DAC was handling the 44.1kHz/channel I2S format stereo audio stream from the DSP. We decided on this IC because of the integrated headphone, lineout, and speaker drivers, which we thought would allow for a noise free, simple method generating our output audio waveforms. Upon further investigating, we were really sold on the integrated signal processing blocks as we thought they could add some interesting features to our product (real time adaptive filtering of signals) These op amps were used in a comparator configuration to drive LEDs that provided feedback to the user when a synth key was “pressed”, they monitored the IR output voltage and compared it to a fixed voltage to determine whether or not to light the LED when the IR beam was tripped. Though a dedicated comparator chip with a LED driver would have been a more ideal solution, we chose these chips because this circuit was a non-essential part of the project and we had the chips on hand already. After testing we found that the LM324N worked perfectly for our application, so we kept the design in place. These op amps were used as input buffers/low pass filters to isolate the IR sensor array from the DSP’s ADC inputs. The low pass filtering removed the high frequency spikes that are characteristic of commercial IR sensors. The unity gain buffering isolated the ADC from unsafe voltages and provided a better impedance match. We chose the 324N because they are versatile, cheap, and very effective for our application. They were used in single supply mode, running of the 3V3A rail on our processor board. Since each IR sensor required an op-amp the quadruple package size also reduced board size. This bus mux was used to switch the analog output from the IR sensors between the digital and analog portions of the project. A switch was connected to the select signal. We selected this bus mux because of the low resistance connection between the ports, and because it offered a simple solution for switching all 12 analog signals in one package. The internal pulldown resistors set the outputs to a known state. These op amps were used in each of the four analog synthesizer modules and also in the keyboard interface. Many different op amp configurations (summing amplifiers, inverting/non-inverting amplifiers, integrators, voltage followers, and comparators with hysteresis) were necessary for the signal manipulation needed in the oscillators, amplifier, and envelope generator. These amplifiers were chosen for our design because of their affordability, availability, wide supply voltage range, and their low power consumption. These amplifiers also offered low noise and a high slew rate, which were necessary for audio applications. This component was an integral part of the voltage controlled amplifier, providing a way to manipulate the amplitude of one signal with a control voltage. These were also used in the oscillator modules in order to better calibrate the triangle to sine wave conversions. These transconductance amplifiers were used mainly for their amplifier bias current input and wide supply voltage range. The high SNR was necessary for this audio application and the on-board high impedance buffers minimized the number of external components needed. This op amp, in conjunction with a dual-matched transistor, was used in the voltage controlled oscillator module in order to convert a linear 2. 1x LM1084-5 1. 2. 2x TPS65131 1. 2. 3. 2x UA78M12 1. 2. 2x UCC384-12 1. 2. voltage change to a logarithmic current change. This allows the output frequency to be increased by 1 octave for each volt of input voltage. This op amp was specifically made with audio applications in mind, and was chosen for its high performance. It boasts a high slew rate, with low noise and very low distortion. This component also operates along a wide supply voltage range, which was necessary for our analog synthesizer modules. This LDO was used to regulate a 7.4V source down to 5V in order to provide multiple other power IC’s with the necessary input voltage. This component was chosen for its fixed 5V output and its 5A output current. The large output current was necessary to provide power to our entire project while leaving enough headroom for any future additions to the synthesizer. It also has a maximum dropout of 1.5V at 5A of load current, which was sufficient for our application. This dual output DC-DC switching converter was used to provide ±15V sources from a single +5V source. The TPS65131 was ideal for our application because it could produce a dual voltages large enough to power the analog modules from a single 5V source, which was already needed for the IR sensors and the LDO to power the DSP. We were not able to achieve the ideal output supply current listed in the TPS65131 datasheet, so we used two components to split the current load of the analog synthesizer modules and the keyboard interface. These LDO’s convert the +15V sources from each TPS65131 to +12V sources in order to directly power the analog synthesizer modules and the keyboard interface. This component was chosen for its fixed output voltage, reducing the number of external parts. Since the analog synthesizer would draw no more than 200mA from the positive power supply, the 500mA output current limit of this component was sufficient for our application. These LDO’s convert the -15V sources from each TPS65131 to -12V sources in order to directly power the analog synthesizer modules and the keyboard interface. This component was chosen for its fixed output voltage, reducing the number of external parts. Since the analog synthesizer would draw no more than 200mA from the negative power supply, the 500mA output current limit of this component was sufficient for our application. Submit your TI Innovation Challenge project to http://tiic-na.hartehanks.com. Your team is encouraged to post your project as early as possible- Your submission will be kept offline until the contest has officially closed! Instructions: Submit your project and include the following documents o Your full class report, which much include this TI project report. o Upload a video of demonstrating your project to www.ti.com/vidoes (must log into my.TI) and provide the link to that video in this project report. We’d love to see your team engaging with TI products! o Link to supplemental photos Our project is to create an analog and digital synthesizer. Unlike a traditional synthesizer, it is not controlled by a keyboard, but is controlled an IR sensor array. The IR array detected the position of the player’s hand within the 2D space and synthesize a note based on the position of the hand. The analog synthesizer is made with discrete analog components. The digital synthesizer is made with embedded software running on a TI DSP that is controlled through a GUI. Our motivation behind creating this product was to allow musicians who do not have fine motor control to create music. The result was a product that created a new way of interacting with music. Appendix Schematics Motherboard Motherboard USB/UART Motherboard DAC Motherboard Bypass Capacitors and LDO Motherboard Arduino Motherboard Input Buffers Pg. 1 Motherboard Input Buffers Pg. 2 Motherboard DSP Power Power Board Keyboard Interface IR Comparators CV, Gate, and Trigger Synthesis Voltage Controlled Oscillator Raw Saw Wave Synthesis Output Waveform Synthesis Low Frequency Oscillator Low Frequency Waveform Synthesis A.D.S.R. Envelope Generator A.D.S.R. Waveform Synthesis Voltage Controlled Amplifier Voltage Controlled Amplifier Code The following github repositories contain all code written for this project. Embedded DSP: https://github.com/seanmlyons22/EEL4924C-Senior-Design GUI: https://github.com/seanmlyons22/EEL4924C-Senior_GUI