CriticalDesignReview

advertisement
Optical Theremin
Critical Design Review Document
EE 300W
Lab 2
Created By: Jaybirds
Chris Barnard
Brad LeDonne
Jay Sarvaiyn
Abstract:
Our goal for this project was to design and build a working optical Theremin. A Theremin is a
musical instrument which can be played without physical contact. In order to play the
instrument the light intensity that the sensors read would be varied by the user. This was done
by using photodiodes as optical sensors. These diodes would create a leakage current based on
the light intensity. We then converted the current into a voltage through an Op-amp circuit. The
voltage was then input into a myDAQ which processed the data through LabVIEW code, and an
audio signal was output through the myDAQ. An auto tuning feature was incorporated in order
to create a more stable note creation from the instrument.
Introduction:
The purpose of this design project is to design and implement a working optical Theremin. The
implementation was achieved by using simple circuits along with a myDAQ and LabVIEW
programming. The circuits use photodiodes to create currents based on user adjusted light
intensities. The currents are then converted to voltages by negative feedback Op-amp circuits.
The voltages are then processed in LabVIEW through the myDAQ, and then output again
through the myDAQ as an audio signal. The design required us to enable the user to adjust the
input frequency maximum and minimum as well as the amplitude maximum and minimum. We
also built in adjustments for the diode intensity. All of the adjustments were required to be
made on the front panel display of LabVIEW. The design also called for an auto-tuner to be
used so that the pitch would be altered to the nearest half tone. For extra credit on the project
there was an option to design a feature that would allow the user to select the key in which the
Theremin would play. We designed this function into the auto-tuner of our Theremin.
Rationale:
The simple circuit amplifies the leakage current from the photodiodes and is very cost efficient.
Furthermore using LabView and the MyDAQ to process the signals made adjustments to the design
faster and easier. Overall, our design is cost efficient because we are adjusting the signal using
photodiodes depending on the light absorbed. Theremins usually work by moving your hands, which are
electrical conductors, over the antennas to modify electromagnetic field which changes the capacity and
hence changing the frequency and the tone. Our project uses our resources as efficiently as possible
when we comparing it a real Theremin.
Implementation:
Initial Design Block Diagram:
Justification:
The block diagram uses a simple circuit and LabVIEW to output an audio signal from the myDAQ. The
user can control the frequency and amplitude of an audio signal by placing his or her hands above the
two photodiodes to disturb the light intensity. This determines the leakage current from the
photodiodes that changes the frequency and amplitude. The design allows the VI to control the
minimum and maximum frequencies and amplitudes ranges. It normalizes the input signal of the
amplitude and frequency to get a value in the VI. These inputs signals are then processed via myDAQ to
produce an audio output thought the audio out port on the myDAQ.
Circuit Schematic (Frequency/Amplitude identical):
Description of design modifications made during testing:
The initial design of the frequency and amplitude circuits were implemented with too small of a
feedback resistance. This prompted us to use a 10-MΩ resistance for the feedback. This gave us
nearly 4.6-V as an output from each physical circuit under full ambient light. Under these
conditions each diode produced a leakage current near 0.391-μA. These specifications were
chosen to ensure safe operating voltages for the inputs of the MyDAQ.
Upon testing the completed Theremin we discovered the sensitivity of the frequency circuit
was too low. Secondly the auto-tune feature was not working according to the design
requirements. This set in motion a complete design change of the LabVIEW program. In order
to create a more sensitive Theremin we programmed in a diode intensity adjustment. This was
then used in the normalizing of the frequency data which gave a much larger range of
sensitivity to light changes. For the auto-tuner we built an embedded case structure with the
outer being a true or false case for when the auto-tuner is selected on or off. The inner
structure builds an array based off of an eight octave structure for each key that can be
selected. This array is then built into a threshold 1-D array with the input frequency. The output
was then rounded to the nearest integer and then indexed into an array that would be the
output frequency.
DAQ Assistant Setting Parameters and Observations:
For the DAQ assistant input we used the N samples acquisition mode with a samples to read
setting of 2 at a rate of 100 kHz. The signal input range was set from 0 to 10 volts. We chose
this since we designed the input voltages to range between 0 to 5 volts. Which allowed the
extra voltage range incase light intensity was higher depending on the location that the
Theremin was being used. For the output DAQ assistant settings we used the continuous
samples generation mode with a 100 samples to write at 1 kHz rating. The signal output range
was set from -2 to 2 volts.
LabVIEW Circuit Block Diagrams:
Main VI
Amplitude Normalization VI
Frequency Normalization VI
Auto tune VI
LabVIEW Front Panel Displays:
Block Diagram Analysis:
To read the signals from the photo detector circuits we utilized the analog inputs of the MyDAQ Ai0 and
Ai1. Two DAQ assistant express VI’s were used to read in the outputs from each of the detector circuits.
Each DAQ assistant’s acquisition mode was set to N samples at a rate of 100 kHz and the input range
was set from 0 - 10 Volts. The DAQ assistant outputs a dynamic data type of the input signal. The
dynamic data is then converted to an array data so it can be used in sub Vis and functions.
We established user controls on the front panel of the main VI that consisted of maximum frequency,
minimum frequency, maximum volume, minimum volume, diode intensity max, and diode intensity min.
The user can then explicitly adjust the range of frequencies they want the VI to interpret and then
output. The intensity controls are to compensate for different lighting conditions so that a desired
sensitivity of the Theremin can be achieved.
Next, the VI takes the mean of the input array data to find the central value of a discrete set of sampled
information. The mean values of the frequency and volume/amplitude inputs are then normalized with
the corresponding user controls so that the VI has a single adjusted value for both variables. This allows
for a signal to be simulated using the Simulate Signal express VI with an amplitude and frequency
component. The simulated signal is then outputted as an audio signal using the DAQ assistant with the
generation mode set to continuous samples at a range of (-2) – 2 Volts.
The user then has the option to use an auto tuning feature which when selected coerces the frequencies
so that notes levels are easier distinguished with little variation. Also incorporated is a key select feature
that allows for audio output that only includes single note scales. This was done by creating a sub VI that
uses an enum that includes all the single note scales (C, D, E, F, G, A, B) and also auto tuning for all
notes. All the cases are contained in a case structure where we used the build array function to include
all frequencies in an 8 octave scale. The threshold 1D array function then interpolates the input
frequency to the nearest note and then outputs that frequency to the Simulate signal express VI.
Conclusions:
Creating a Theremin can be a complicated task. However by utilizing basic components and the
MyDAQ we were able to create the majority of the Theremin with coding in LabVIEW. This
allowed us to keep component costs at a minimum, with the exception of the MyDAQ. The
design choice of utilizing photodiodes and Op-amps also allowed the overall size of the device
to be compact and simple to use. Our control choices for the LabVIEW interface provides simple
and easy to use adjustments to the output of the Theremin.
Appendices:
Bill of Materials:
Part
MyDAQ
10 MΩ Resistors x2
Photo Diodes x2
TL074 Op-Amp chip
Breadboard
Cost (USD)
225.00
0.014
1.18
0.62
30.00
Download