You are on page 1of 6

- 1 -

Optical Theremin Design










Christopher Farion
Steven Detwiler
Gonghao Sun

Redbull Design Team
March 9, 2014

Electrical Engineering Department
Penn State University








Submitted to
Professor Timothy F. Wheeler
Electrical Engineering Department
Penn State University

- 2 -
Abstract

An optical theremin was designed using Texas Instruments TL074 Low-Noise
JFET-Input Op-Amps in transimpedance amplifier configuration, LabVIEW programming,
two photodiodes (Digikey, P/N: 365-1084-ND), two 1 M resistors, and a National
Instruments myDAQ to generate an audio tone of which the amplitude and frequency
can be controlled by the user. It will also allow the user to set the range of audio tones
the theremin generates and configure the intensity range that each sensor sees.

Introduction

In 1928, a theremin, the first electronic musical instrument playable without any
physical contact was invented by Professor Leon Theremin. Users would move their
hands over two antennas, acting as plate capacitors, to control the frequency and
amplitude of the audio tone. Moving a hand near one of the antennae changes the
electromagnetic field near it causing a change in the frequency and/or amplitude.
Our design implements an optical theremin where the antennae are replaced by
photodiodes. However, photodiodes utilize light to produce current. The myDAQ can
only read voltages. Therefore, using an op amp in transimpedance configuration
converts the current source into a voltage sufficient enough for the myDAQ to read.

Rationale

The inputs provided to the optical theremin are two varying light levels and the
output is a sound wave produced by the myDAQ. Since photodiodes utilize light to
produce current and the myDAQ can only read voltages; an op amp in transimpedance
configuration with a 1 M resistor in the feedback loop converts the current source into
a voltage ranging from 0V to 5V which is sufficient for the myDAQ to read. The myDAQ
samples the two signals, manipulates them and sends them into a sine wave generator.
The sine wave is sent to the audioout port on the myDAQ, where speakers can play the
audio tone.

Implementation

In order to produce an audio tone through the myDAQ, our LabVIEW code
required analysis of the voltages coming from the two photodiodes. This was done by
averaging the incoming voltages, and coercing the value to either a high (1) or low (0)
number. Using the coerced values, the VI generates a sine wave playable through the
audioout port of the myDAQ.
A DAQ Assistant was placed at the beginning and end of the VI to acquire the
signals coming from the photodiodes or ports a0 and a1 of the myDAQ. The DAQ
Assistant sampling the currents from the photodiodes was set to receive the voltages in
a range of 0 to 10 volts while having 2 samples to read at a rate of 150 kHz. The low
number of samples avoids a buffer error. When the DAQ Assistant samples the two

- 3 -
signals, they are split and converted from dynamic data in order to control the
frequency and amplitude separately.
For the amplitude component, the average is coerced within a range inputted by
the user and sent to the simulate signal VI in the amplitude node. The frequency
components average is coerced within a range determined by the user in the front
panel and then that value is divided by the high and low inputs in order to produce the
middle tone for the new range. This value and the range was provided to the frequency
modulator consisting of multiple case structures, refer to Figure 1.
The first case structure is for the option auto-tune. If it is false, then the base
scale is arranged into an array that is compared to another array in which there are
twelve sections from 0 to 1. These twelve sections represent the twelve different tones
in the chromatic scale. Whenever a voltage value is within a certain range, the
corresponding frequency is matched and outputted to a case structure which multiplies
the frequency by a scalar to match a different octave. This range is controlled by the
user in the front panel, see Figure 2. The true case requires other options selected by
the user, refer to Figure 3.
The next case is the key selector. If false, the key selector goes to the base
frequency of 32.7 Hz or note C
1
. This goes through the octave multiplier based on the
input. The true case allows the user to select the starting frequency as the first tone of
the octave. The last case structure allows the user to select the major or minor key. If
true, the key is a natural minor scale and the false statement goes to a major scale.
The simulation signal express VI produces a sine wave that outputs 40,000
samples per second while 30,000 are written. The VI finally merges the amplitude and
frequency signals and outputs them to a DAQ Assistant which generates a voltage signal
for the myDAQ to output. The DAQ Assistant outputs the voltage to audioout left and
audioout right with a voltage range of -2 to 2 volts, writing 20,000 samples at a rate of
50kHz. This enables the audio signal to be heard through the audioout port on the
myDAQ, refer to Figure 4.

Conclusion

By using photodiodes, a myDAQ, LabVIEW programming and an op amp we
successfully created an optical theremin. It generated a user-controlled audio tone,
allowed the user to adjust the frequency and amplitude of the audio tone, set the range
of audio tones generated, and configure the intensity range the sensors measured.











- 4 -
Appendices



Figure 1: Frequency and Amplitude Alteration



Figure 2: Front Panel

- 5 -

Figure 3: Autotune


Figure 4: Simulate Signal


Figure 5: Gantt Chart
Task Week 1 Week 2 Week 3 Week 4 Week 5
Initial Block Diagram
Bill of Material
LabVIEW Altered frequency code
LabVIEW Altered Amplitude code
LabVIEW Auto-Tune SubVI
LabVIEW DAQ Assistant
Sampling Rates

Implementation of Detector
Circuits

Refine Front Panel and LabVIEW
code

Review Design Requirements
Design Review Document

- 6 -

Figure 6: High-Level Block Diagram

Item No. Description Quantity Total Price
1 TL074CN Operational Amplifier 1 $2.04
2 1M Resistor 2 $0.04
3 Photodiode 2 $1.10
4 National Instruments myDAQ 1 $175
5 Breadboard 1 $30
6 Jumper Wires 1 $0.30
7 Engineer Time 20 hours $2100
Total Cost: $2308.48
Figure 7: Bill of Materials

You might also like