Optical Theremin VI Schematic

advertisement

Optical Theremin Critical Design Review

EE 300W Section 2

Team: Threee

George Fanala

Connor Schaeffer

Jeff Thorne

1

Table of Contents

Abstract………………………………………………………………………………………...03

Introduction……………………………………………………..……………………………..03

Rational…….…………………………………………………………………………………..03

Implementation………………………………………………………...……………………...04

Value Statement…………………………………………………………...………………….08

Con clusion……………………………………………………….…………………………….08

Appendix

Gantt Chart…………………………………………………………………………….09

Optical Theremin VI Schematic……………………………………...……………...09

Optical Theremin Front Panel………………………………………………………..10

Auto Tune Sub VI

Schematic………………………………………………………...10

Bill of Materials………………………………………………………..………..……...11

LabVIEW DAQ Assistant Settings………………………………………...…..……..11

2

Abstract

During Lab 2 of EE 300W, we were required to build an Optical Theremin that would allow the user to control the volume, frequency, and pitch of the output audio signal and waveform.

The user is able to control the volume and the frequency by their hand placement relative to two photodiodes. The photodiodes generate leakage currents proportional to the light intensity received by each diode. The currents are put through an Op Amp circuit and are converted to a voltage.

The voltage of the Op Amp circuit is sampled by a NI MyDAQ and then processed using

LabVIEW. We are able to normalize the Amplitude and Frequency signals sampled by the MyDAQ and give the user the option of setting ranges of the signals. The user also has the option to Auto-Tune the frequency of the output audio signal and waveform.

We used the combination of the NI MyDAQ and LabVIEW to give the user a lot of control over the Optical Theremin. These devices allow the controls of the device to be simple and intuitive.

Introduction

An Optical Theremin is an electronic musical instrument that is operated without physical contact by the performer. The volume and the frequency of our Optical

Theremin is controlled by the position of the operator’s hands relative to two sensors.

The electric signals created from the Optical Theremin are amplified and then sent to a speaker.

During Lab 2 of EE 300W, students are put into groups and are required to design an

Optical Theremin. This design requires the use of two photodiodes as light detectors for the physical circuit and the NI MyDAQ to generate a sine wave to be played as an audio tone. The signal processing for the design will be handled by LabVIEW. The LabVIEW design will consist of a front panel for the user to control the intensity of light reaching the two detectors, adjust the pitch, and the volume of the tone produced by the Optical

Theremin.

Rational

The optical Theremin will consist of a light detecting circuit and a LabVIEW circuit to handle the signal processing. The photodiodes produced a leakage current that was proportional to the amount of light the photodiode absorbed. Using the amplifying circuit we were able to convert the leakage current to a voltage that the MyDAQ can use as an input. Knowing the gain of the op-amp circuit is Vout=-I*R, we can find a suitable resistor R that can be used in our amplifying circuit to convert our current into a voltage. We used two amplifying circuits because we needed to one to control the frequency and the other to control the amplitude of our optical Theremin. Using what we have learned in previous classes, we decided that LabVIEW will be the best solution to solve this problem.

3

Implementation

To design an Optical Theremin, we had to use photodiodes, resistors, and operational amplifiers. We created two voltage signals, one to control the volume and one to control the pitch that will be measured by a MyDAQ. We used photodiodes as current sources to be the input of our op-amp circuit. The light that the photodiode receives creates a leakage current proportional to the light intensity. A one mega ohm resistor was used in our current-to-voltage converter circuit to amplify the leakage current produced by the photodiodes to convert it into a voltage signal that can be read by the MyDAQ. Two current-to-voltage converter circuits were created; one that will control the volume and the other will control the frequency that our Optical Theremin will produce. The user can control these by changing the amount of light received by the photodiodes. The two output voltages from our circuits are read by a MyDAQ and inputted into our LabVIEW code. The current-to-voltage converter that was used is shown below in figure 1 and the constructed circuit is shown in figure 2.

Figure 1: Amplifying circuit

4

Figure 2: Constructed Diode Amplifier

5

The two voltage signals were transferred into LabVIEW using the MyDAQ. Next we split the signals from the DAQ Assistant so that one could be used for amplitude and the other for frequency. The signals got averaged and normalized so that they can be manipulated to produce the wanted outputs. The frequency signal gets bounded by user input from the front panel. The next option for frequency is auto tune. The user selects if the frequency is to be auto tuned or not. If auto tune is selected, a key must be selected to auto tune against. We designed the auto tune to relate to a specific octave. Once it is in the octave, the correct pitch will be used to auto tune the signal. A sine wave will be produced based on the new specifications and it will produce a corresponding audio tune. The amplitude signal gets bounded from user inputs from the front panel. The combination of the auto tuned frequency and bounded amplitude will generate the new sine wave. This sine wave will represent the audio tone that the optical Theremin produces. Below is the block diagram that represents the optical Theremin based on inputs and outputs.

6

Figure 3: Block Diagram

7

The top level of the block diagram or the N=0 level shows that the users hand movement controls the amount of light that is received by the photodiodes. The light intensity creates a leakage current which is transformed into a voltage output from the op-amp circuit. The user can then manipulate the signal into the wanted audio signal and waveform.

The N=1 level shows that the light intensity creates the leakage current which is inputted into the physical circuit. Then the MyDAQ creates a signal from the output of the physical circuit and inputs it into the virtual circuit. The signal is manipulated through the virtual circuit and a signal is generated. The N=2 level shows the physical circuit that contains two circuits which produce a signal that control both the amplitude and the frequency. Both signals go through a current-to-voltage op-amp circuit which converts the leakage current into an output voltage. The signals from both circuits are sampled by the MyDAQ and put through data manipulation in the LabVIEW code. In the data manipulation both the amplitude and frequency signals are normalized and scaled based on the us er’s needs. The user has the choice to use auto tune to a specific octave. Then an audio signal and waveform is then generated.

Value Statement

Tackling a complex problem is easier when it is a group effort. The most important takeaway from this lab is teamwork. Three very different individuals came together and worked to accomplish a complex task. Communication and problem solving skills were used with regularity to work through difficult parts of the project. Determining and utilizing everyone's strengths was the main reason that this project was successful.

Conclusion

We have successfully constructed an Optical Theremin using an operational amplifier circuit containing photodiodes and resistors, our MyDAQ, and LabVIEW code. The user of our Optical Theremin can control the volume and pitch of the sound produced by our instrument and also can use an auto tune feature to correct the pitch of the sound.

8

Appendix

Figure 4: Gantt Chart

Figure 5: Optical Theremin Main VI

9

Figure 6: Optical Theremin Front Panel

Figure 7: Autotune Sub VI

10

Table 1: Bill of Materials

Bill of Materials

Material

TL074CN J-Fet Op Amp

Quantity Cost

1 $0.62

OP906 Photodiode 2 $0.59

NI MyDAQ

1M Resistor

1 $175.00

2 $0.10

Total Cost $176.90

DAQ Assistant Settings

Input DAQ Assistant

Signal input range (Voltage 0 and Voltage 1)

Max: 2

Min: 0

Acquisition Mode: N Samples

Samples to read: 100

Rate (Hz): 200k

Output DAQ Assistant

Signal input range (Voltage Out)

Max: 2

Min: -2

Acquisition Mode: Continuous Samples

Samples to write: 100

Rate (Hz): 1k

11

Download