EE 300W Lab 2: Optical Theremin Critical Design Review

Similar documents
Lab 2: Designing an Optical Theremin. EE 300W Section 5 Team #3: Penn Power United Gregory Hodgkiss, Nasser Aljadeed 10/23/15

Optical Theremin Critical Design Review Yanzhe Zhao, Mason Story, Nicholas Czesak March

Optical Theremin CDR

THE PENNSYLVANIA STATE UNIVERSITY. Lab 2: Designing Optical Theremin Instrument. EE 300W Section 001. Nathaniel Houtz, Ji Eun Shin, Peter Wu 2/22/2013

EE 300W 001 Lab 2: Optical Theremin. Cole Fenton Matthew Toporcer Michael Wilson

Lab 2: Optical Theremin Team 2 Flyback By Brian Pugh, Andrew Baker, and Michael Betts

Optical Theremin Critical Design Review

Lab 8: Beer Bottle Symphony

Dept. of Electrical, Computer and Biomedical Engineering. Inverting and non inverting amplifier

EKT 314/4 LABORATORIES SHEET

Lab 3 Final report: Embedded Systems Digital Potentiometer Subsystem TEAM: RAR

LabVIEW 8" Student Edition

Data acquisition and instrumentation. Data acquisition

INSTRUMENTATION BREADBOARDING (VERSION 1.3)

Operational Amplifiers (Op Amps)

Lab 3: Embedded Systems

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

Auntie Spark s Guide to creating a Data Collection VI

Digital-to-Analog Converter. Lab 3 Final Report

Laboratory Project 4: Frequency Response and Filters

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 3084 Fall 2017 Lab #2: Amplitude Modulation

Learning Objectives:

EE-4022 Experiment 2 Amplitude Modulation (AM)

UNIVERSITI MALAYSIA PERLIS

Infrared Communications Lab

EE 210: CIRCUITS AND DEVICES

Lab 3: Digital Multimeter and Voltage Generator

CHAPTER 7 HARDWARE IMPLEMENTATION

Part 1. Using LabVIEW to Measure Current

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

Theremin with Onboard Effects by Patrick Tarantino Shaun Cinnamon PHYCS 398

Embedded Test System. Design and Implementation of Digital to Analog Converter. TEAM BIG HERO 3 John Sopczynski Karim Shik-Khahil Yanzhe Zhao

Pre-Lab. Introduction

P a g e 1. Introduction

Stereo Tone Controller

Lab 7: Let s Make a Little Noise

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

Description of a Function Generator Instrument

EKT 314/4 LABORATORIES SHEET

EE43 43/100 Fall Final Project: 1: Audio Amplifier, Part Part II II. Part 2: Audio Amplifier. Lab Guide

ECE3204 D2015 Lab 1. See suggested breadboard configuration on following page!

Laboratory 8 Operational Amplifiers and Analog Computers

BENE 2163 ELECTRONIC SYSTEMS

ELR 4202C Project: Finger Pulse Display Module

Sampling and Reconstruction

GENERATION OF SIGNALS USING LABVIEW FOR MAGNETIC COILS WITH POWER AMPLIFIERS

cosω t Y AD 532 Analog Multiplier Board EE18.xx Fig. 1 Amplitude modulation of a sine wave message signal

Lab 2: Common Base Common Collector Design Exercise

Development of 4/16-Channel Data Acquisition System Using Lab VIEW

Analog Synthesizer: Functional Description

PHY 351/651 LABORATORY 5 The Diode Basic Properties and Circuits

Capacitive Touch Sensing Tone Generator. Corey Cleveland and Eric Ponce

Report on Dynamic Temperature control of a Peltier device using bidirectional current source

I1 19u 5V R11 1MEG IDC Q7 Q2N3904 Q2N3904. Figure 3.1 A scaled down 741 op amp used in this lab

MUSIC RESPONSIVE LIGHT SYSTEM

University of North Carolina, Charlotte Department of Electrical and Computer Engineering ECGR 3157 EE Design II Fall 2009

University of Pennsylvania Department of Electrical and Systems Engineering Digital Audio Basics

EE 368 Electronics Lab. Experiment 10 Operational Amplifier Applications (2)

ME scope Application Note 01 The FFT, Leakage, and Windowing

Lab 15: Lock in amplifier (Version 1.4)

LAB 5 OPERATIONAL AMPLIFIERS

Fig. 1 Tachometer Built from Old CD, DC Motor, and Photogate

Designing High Power Parallel Arrays with PRMs

Practical 2P12 Semiconductor Devices

Operational Amplifier

Electronic Instrumentation ENGR-4300 Fall 2002 Project 2: Optical Communications Link

When you have completed this exercise, you will be able to relate the gain and bandwidth of an op amp

Auto-Seq Documentation Written April 6th, 2014

ETEK TECHNOLOGY CO., LTD.

EET 438a Automatic Control Systems Technology Laboratory 1 Analog Sensor Signal Conditioning

Physics 262. Lab #1: Lock-In Amplifier. John Yamrick

Week 8 AM Modulation and the AM Receiver

Interactive Tone Generator with Capacitive Touch. Corey Cleveland and Eric Ponce. Project Proposal

MEC751 Measurement Lab 2 Instrumented Cantilever Beam

Music 171: Amplitude Modulation

ELEG 205 Analog Circuits Laboratory Manual Fall 2016

Final Report (Group 15-22)

UNIT-3. Electronic Measurements & Instrumentation

EE 210 Lab Exercise #5: OP-AMPS I

LabVIEW Day 2: Other loops, Other graphs

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

Each individual is to report on the design, simulations, construction, and testing according to the reporting guidelines attached.

First Results from the HP 3562A Dynamic Signal Analyzer with Data Acquisition. Chris Orban Fall Semester, 2002 UIUC P398EMI Student

The following examples explore some of the possible uses of these preamps.

UNIVERSITY OF CALIFORNIA, BERKELEY. EE40: Introduction to Microelectronic Circuits Lab 1. Introduction to Circuits and Instruments Guide

Laboratory Project 1B: Electromyogram Circuit

Operational Amplifiers

Goals of the Lab: Photodetectors and Noise (Part 2) Department of Physics. Slide 1. PHYSICS6770 Laboratory 4

Mini Mixer. Learn It! Build It! Core Concept Instructor Set. Materials:

Analog Effect Pedals. EE333 Project 1. Francisco Alegria and Josh Rolles

Basic operational amplifier circuits In this lab exercise, we look at a variety of op-amp circuits. Note that this is a two-period lab.

Experiments #7. Operational Amplifier part 1

Rowan University Freshman Clinic I Lab Project 2 The Operational Amplifier (Op Amp)

EE 233 Circuit Theory Lab 4: Second-Order Filters

Assist Lecturer: Marwa Maki. Active Filters

1. An engineer measures the (step response) rise time of an amplifier as. Estimate the 3-dB bandwidth of the amplifier. (2 points)

Optical Modulation and Frequency of Operation

L02 Operational Amplifiers Applications 1

4. Digital Measurement of Electrical Quantities

Transcription:

EE 300W Lab 2: Optical Theremin Critical Design Review Team Drunken Tinkers: S6G8 Levi Nicolai, Harvish Mehta, Justice Lee October 21, 2016

Abstract The objective of this lab is to create an Optical Theremin, which is a musical sound device that is controlled by two light sensing photodiodes. The Optical Theremin consists of a TL074 op-amp, LabVIEW, mydaq, speaker, and two photodiodes. The current emitted from the photodiodes is converted to a voltage and amplified through the TL074 op-amp. This voltage is inputted to the mydaq, and processed by Labview to outputted into an audio out signal and three digital outputs on the mydaq. These ports control the speaker, and three LED indicators. Introduction The goal of this lab was to design an Optical Theremin that controlled the frequency and amplitude of the output signal. The input signal enters the optical theremin and becomes a modified output. Using two photodiodes, we designed a circuit that would allow the user to control the output sound s frequency and volume. By changing the intensity of the light received by the photodiodes, thon could increase or decrease the output amplitude and frequency. The level of frequency played would be shown through LEDs. The benefit of having this device over the regular instrument is the lack of overlapping controls for amplitude and frequency, which is often found in a regular device. This way the user has more control over the instrument. As a result, people who want to have the frequency of their instruments separated from the volume would find that the Optical Theremin fulfills the requirements. To process the input signal, we used LabVIEW and a National Instrument mydaq. For simplicity, the voltage supply was also provided by the mydaq. The photodiodes generate a current which is then converted into a voltage by the TL074 op-amp and inputted into the mydaq. The mydaq inserts the data into LabVIEW. LabVIEW then normalizes the voltage input and runs it through several algorithms to allow the input voltage to control the output signal s pitch and volume. An auto-tune, octave selector, and equalizer were also implemented. The autotune was implemented to compare the input frequency values to an array of notes and coerce the frequency into being outputted as that note. The octave selector allowed the input frequency to be limited to only a certain octave of notes while still being autotuned. The equalizer took the input frequency and lit up specific LEDs relative to the range of frequencies being outputted.

Rationale Our high level block diagram (see Figure 1), shows the subsystems of our design and the hierarchy of each subsystem. In the N=0 level of our block diagram, it depicts our main design, the optical theremin, which receives an input and produces an output. The inputs to the optical theremin are user controlled and their hierarchy is explain in the N=1 and N=2 levels of the block diagram. At the N=1 level of our block diagram we depict the transformation process that takes effect from input to output. The circuit for our project is drive by light intensity and this is read into the mydaq as a signal. The signal is read into the computer which transforms the input into a waveform signal and is again output through the mydaq. The circuit is one of two user controlled signals. This is the physical user control. The virtual user control is the computer which is discussed in more detail in the N=2 level of our block diagram. At the N=2 level of our block diagram we give the details of the circuit and computer communications with the mydaq. The circuit (see Figure #) consists of two photodiodes to produce two separate currents which are controlled by light intensity. These signals are sent through a TL074 operational amplifier set up as a transimpedance amplifier which converts the current to an amplified voltage. The mydaq reads in these voltages through LabVIEW and uses them to produce two separate signals; a signal for amplitude control, and a signal for frequency control. The user can set the volume of the output using the amplitude signal, and can set the range of frequencies of the output using the frequency signal. When the signals are set to their desired settings, they are sent through the Simulate Signal VI within LabVIEW and this signal is sent back out through the Audio Out port of the mydaq. Implementation Theory of Design The project design asked for user controllability of frequency and amplitude of the output signal. Photodiodes produce a current relative to the light intensity it receives. Op amps receive the current and convert it into voltage signals that the mydaq compile. The NI mydaq is used as the connection between the physical circuit and the LabVIEW software. It inputs the outputs of the physical circuit into the LabVIEW

program. Then it outputs the audio out signals as well as digital output signals from LabVIEW to a set of speakers and LEDs. The LabVIEW is used to construct a virtual environment for processing the input signal. Upon entering the LabVIEW program, the input signal is split into 2 parts: frequency and amplitude. Each part is processed individually. In Max&Min, the max value and min value of the input signals are found and are then used normalize the signals. The normalized signal is then processed into a range of values. For frequency, Autotune matches the input frequency to the nearest musical note. Octave Selector mimics Autotune but only allows notes within an octave to be outputted. These signals are combined and simulated through filters that act as equalizers. The equalizer produces digital output signals that power LEDs and an audio out signal that sends signals to the speaker. Analog Input Circuit Design The physical circuit design to create a voltage signal input into the mydaq utilizes two photodiodes, one TL074 chip, two bypass capacitors, voltage source, and two 1 M ohm resistors. As seen in Figure 1, this circuit operates through light sensing photodiodes. After the photodiodes receive light they create a current that is inputted to a negative terminal of an Op-Amp to which amplifies the current to a voltage signal. The 1 M ohm resistor causes a large voltage signal that is readable in labview. The bypass capacitor creates a reduction of noise at the power source. Figure 1: Analog input circuit design representation portrayed in MultiSim using equivalent parts as physical circuit.

Labview Front Panel Figure 2: Front panel containing controls, indicators, buttons and graphs. The Front Panel consists of the controls for the LabVIEW program as well as indicators to identify any bugs, shown in Figure 2. From this panel, all outputs can be modified accordingly. Frequency Min Set and Max Set: Sets the min and max of the frequency bounds. Frequency, Amplitude, Maximum F, Minimum F, Maximum F2, Minimum F2: Indicators to ensure there are no bugs within the program. Auto Tune: Turns on the Auto Tune subvi. Octave Selector: Turns on the Octave Selector subvi File Read?: Boolean switch to determine whether or not a.wav file will be read in place of the inputs of the photodiodes. Low Freq, Mid freq, High Freq: LED indicators of frequency for Bass, Mid, and Treble. Amplitude, Frequency, Waveform Graph: Graphs showing output Amplitude and Frequency which are used for debugging. The Waveform graph shows Power Density Spectrum of the output signal. Volume, Mid, Treble, Bass: Knobs for controlling Volume, Mid, Treble, and Bass. Octave: Only operates if Octave Selector is on. Determines what Octave will be output.

Main.VI As seen in Figure 3, the main.vi depicts the bulk of the programing done in LabVIEW. These next sections will break the main.vi into Input DAQ Assistant, Normalization, Equalizer, Output DAQ Assistant, and Spectral Measurements. Figure 3: Block diagram of Main.VI incoroporting all Sub.VI s and Main Code Input DAQ Assistant Utilizing the mydaq s AI0 and AI1 analog input ports, we read in the voltages from the output of the transimpedance amplifier. Since the DAQ assistant only has a single output which had merged the two inputs into a single output, we used the split signal VI to separate the signals to utilize for amplitude and frequency separately (figure 3). The voltage range was to -10V to 10V to ensure we did not get any errors if there was a spike in voltage. Normalization The normalization part of LabVIEW is to take the input signal range and limit it to a range between 1 and 0. This allows the range of the input signal to be transferable to any range desired.

Figure 4 : Normalization block diagram implementing mapping equations In order to normalize the input, we used the equation below: y = ( x x max)/(x max x min ) This equation, implemented in LabVIEW allowed us to get a percentage. X is the input while Y is the output. This percentage is then magnified by a constant due to the sensitivity of the diodes, which caused the normalized output to spike initially. This spike caused all other inputs to be drastically smaller so the constant magnified the result to viewable level. Once magnified, the output is then coerced into a limit max of 1 and a limit min of 0. Simulate Signal After mapping the amplitude and frequency to the desired ranges, this data is then fed into the Simulate Signal VI within LabVIEW, as seen in figure 3. This VI produces a sinusoidal wave which we can output to the mydaq through the Audio Out port.

Equalizer Figure 5: Block diagram of the equalizer The Equalizer splits the frequency of the input signal into three different ranges. This is done by using the filter VI within LabVIEW. The treble filter is set as a high pass filter to only let through higher frequencies, the mid tone is set to a bandpass filter allowing only mid tone frequencies, and the bass filter is set as a low pass filter allowing only low frequencies. These signals are multiplied by the control indicators on the front panel to vary the amount of output of each that gets added to the total output. By summing the three outputs of the filters, we acquire a single output which is output through the audio out port on the mydaq. The audio wav file is read through a file read button. When the file read button is on, the case statement is true, and the sound file is outputted. This signal is also outputted through the audio out port. Output DAQ Assistant 2 This outputs an audio out signal from the equalizer that sends a signal to the mydaq. The mydaq then outputs the signal. Spectral Measurements

This takes the input audio signal and shows the power density spectrum in a waveform located on the Front Panel. Max & Min Sub.VI Figure 6: The MM sub.vi seen in Figure 3 This sub.vi (figure 6) utilizes feedback loops to continuously adjust the minimum and maximum voltages read by the mydaq. They compare the current input to the value currently stored in the output and if the input value is greater than the value stored in the feedback node, the feedback node takes on the input value and the input value gets outputted. The Max and Min of the subvi both operate the same way, they are just kept separately and Min takes the smaller value instead of the larger one.

Autotune Sub.Vi Figure 7: Autotune sub.vi as seen in the main block diagram (figure 3) The Autotune subvi (figure 7) takes the input frequency and matches it to the closest musical note. It utilizes a for loop to duplicate an array of 0 octave frequencies of notes and doubles them while adding them to the end of an array to create a long array of musical frequencies from the 0 octave to the 10th octave. A comparator is then used to match the input frequency to the closest constant on the note array. The subvi then outputs the constant closest to the array. Octave Selector Sub.VI The Octave Selector (figure 8 below) takes the input frequency and matches it to the closest musical note of an octave. The user may choose the octave of the range of notes. The output frequency is the closest note matching the frequency. Inside the formula node is a line of constants for each note which is then multiplied by the Octave input to reach the desired octave. There is then a group of if statements to compare the input frequency to the closest note and output the note.

Figure 8: Octave subvi seen as Auto Octave Change in the block diagram (figure 3) LED Sub.VI Figure 9: LED indicator sub.vi located in the main block diagram (figure 3) as LED

The LED sub.vi (figure 9) allows us to set the range of frequencies in which we want the LEDs to turn on. Our total range of frequencies was from 50Hz - 5000Hz. In order to split the range up to 3 LEDs we divided 4950/3=1650 and adjusted slightly to avoid hitting the edges of the range and causing an error. The sub.vi works as follows: if the input frequency is between 45 Hz - 1700 Hz, only LED 1 will be on. If the input frequency is between 1701 Hz - 3400 Hz, LED 1 and LED 2 will be on. Any frequency higher than 3400 will turn all three LEDs on at the same time. The DAQ Assistant digitally outputs the signals within the required frequency range to the LED Circuitry. Each LED corresponds with a range of frequency. Output LED Circuitry Figure 10: The physical output LED circuitry from the mydaq s digital outputs The three LEDs (figure 10) each represent a zone the frequency is in, treble, mid tone, and bass. As the frequency increase the LEDs turn on and off chronologically from bass to treble, and treble to bass. The 10k ohm resistors are inserted to limited the current inputted to the LEDs. Value Statement The optical theremin allows for the separation of the pitch and volume control. In a regular instrument such as the guitar, the user controls the frequency and amplitude of the sound through the vibration of the strings. The length of the string determines the pitch while the force of the vibration determines the amplitude. However, the

relationship between the pitch and volume in the guitar can make it difficult to hold one control as a constant while changing the other, such as changing the pitch while keeping volume constant. The optical theremin allows for the user to hold an exact volume while modifying the pitch to their desire. This separation of pitch and volume controls gives the user a higher level of control that a traditional instrument wouldn t offer. Conclusion The Optical Theremin is a musical instrument that uses two types of user controlled inputs; one physical and one virtual. The physical user control is the circuit depicted in Figure 13 in Appendix C. The user controls the inputs using light intensity by hovering thon s hands at different heights about each photodiode. The virtual control is done using the front panel of the LabVIEW main VI as shown in Figure 2. With the controls given, the user can control the volume, bass, mid tone, and treble of the output signal. The user can also set the minimum and maximum frequency output desired. The mydaq was used as the read and write process. The signal was read in through the mydaq AI0 and AI1 ports and then output through the Audio Out port. On the output side, speakers were used to transmit the signal to an audio tone which was in the range set by the user.

Appendix A: High Level Block Diagram Figure 11 : High level block diagram depicting the hierarchy of the N=0, N=1, and N=2 levels of the Optical Theremin design. Figure 12 : High level block of the LabVIEW component of the Optical Theremin in the hierarchy of N=0, N=1, and N=2. Appendix B: Tables of Schedule and Bill of Materials

Table 1: Schedule of Optical Theremin design depicted through a Gantt Chart Table 2: Bill of Materials of the Optical Theremin Appendix C: Visual Representation of Circuit

Figure 13: Physical representation of the Optical Theremin design project