Light Theremin (Advanced)
Is it possible to create a musical instrument that can be played without direct contact?
- A photoresistor changes its resistance based on how much light it sees
- A speaker can be run by sending an alternating current through it
- An operational amplifier can be used to create a sine wave
To build a more advanced version of the Simple Light Theremin discussed in another C21 article (http://c21.phas.ubc.ca/article/light-theremin-simple). There are two primary differences with this version: first, the volume is controlled by another light sensor instead of a potentiometer, and second, the signal produced is much closer to a sine wave than the square wave of the simple version. Both of these changes make this Theremin more like the original.
What is a Theremin? Put simply, it is an electronic instrument that does not need physical contact from the musician: to play it, you simply need to move your hands closer and further away to control pitch and volume. The Theremin was created by Leon Theremin in the early twentieth century, who invented it while doing research into proximity sensors. It has since evolved into a musical instrument in its own right, and has been used in a wide variety of situations.
The Theremin in this article is different than the one created by Theremin – he used two antennas which act as capacitors when the player’s hands pass over them to change the pitch and volume, while this activity uses light sensors instead. Nevertheless, the final result will behave similarly and produce an equally electronic sound.
This activity is a more complicated version of the simple Light Theremin, found at http://c21.phas.ubc.ca/article/light-theremin-simple on the C21 website. This Theremin is aimed at upper year middle school and high school students, and has more features than the simple Theremin.
- Photoresistor x2
- 220 nF Capacitor x2
- 100 Ω Resistor x2
- 3.9 kΩ Resistor
- 110 kΩ Resistor
- Diode x2
- Operational Amplifier LM358 (abbreviated Op Amp)
- 9V Battery x2
- Battery Clip x2
- Small speaker or earphones (and/or jack for computer microphone input)
- Assorted wires/jumper cables
Note that you may need different values for the capacitor and resistors depending on what photoresistor you have or what the ambient light conditions of your house are. The photoresistor used in the sample has a resistance of 2.7 kΩ in ambient light. Experiment with different values if you find the sound does not have much of a range or has a “tinny” sound.
Before starting the activity, ensure the resistors are cut to an appropriate length. The pictures in the material section can be used for reference
- Put the Op Amp chip into the board along the middle gap, with its leftmost pin in column 10 and its rightmost pin in column 13 (above picture, left). Note the orientation: the grove should be on the left and the circle on the right, so the text is readable from the same perspective the pictures were taken
- Connect the upper “+” rail to column 10 in the block with f-g-h-i-j (which are all connected, so the exact row doesn’t matter) and the lower “-” rail to column 13 in the block with a-b-c-d-e (above, right). They should go in the upper left and lower right pin of the Op Amp respectively
- Connect columns 5 and 9 using a jumper cable, as well as columns 11 and 20 (above, right). Note that both of these are in the upper block (along with all further components unless noted), and that the 5-to-9 jumper does not touch the leftmost pin of the Op Amp (but the 11-to-20 touches the second pin from the left)
- Put the 3.9 kΩ resistor between columns 13 and 17, and connect one of the capacitors from column 17 to 20 (above, left). Try to keep these pieces high on the board, since more components will occupy the space below them
- Put the 100 Ω resistor between columns 9 and 12, and the other capacitor between columns 9 and 13 (above, right)
- Put the other 100 Ω resistor between column 12 and column 15 on the lower part of the board (above, left). You may have to twist the resistor a bit to get it into place
- Put both diodes between columns 15 and 18 on the lower part of the board, one right above the other (above, right). Note that the diodes should be facing opposite directions – their orientation is typically indicated by a stripe, and the stripes should each be on the opposite side
- Place the 110 kΩ resistor between columns 15 and 18, directly below the diodes (above, left)
- Connect column 18 on the lower part of the board with column 20 on the upper part of the board using a jumper cable (above, right)
- Connect one photoresistor between columns 9 and 13 on the upper part of the board (above, left)
- Connect the other photoresistor between columns 20 and 24 on the upper part of the board (above, right)
- Connect the speaker between column 24 and the lower “-” line (above)
- Connect the red wire of the first battery to the upper “+” rail, and the black wire to column 5 of the upper block
- Finally, connect the red wire of the second battery to column 5 of the upper block and the black wire to the lower “-” line. The circuit is now complete!
- The photoresistor closer to the chip controls the pitch, and the other photoresistor controls the volume
Much of the underlying theory behind this Theremin is the same as the simple one: a speaker runs by sending an alternating current through it and a photoresistor controls the frequency of this current and thus the frequency of the sound heard.
As mentioned in the purpose section, the main differences between this and the simple Theremin are that the volume is now controlled by a photoresistor and a sine wave is being generated instead of a square wave. The first of these is easy to explain: since a photoresistor behaves essentially as a potentiometer which is controlled by light, one can simply replace the potentiometer in the simple Theremin and use it to control the amount of current that enters the speaker.
Sine waves produce a more pleasant sound than square waves. At the same pitch, a square wave has more overtones (frequencies higher than the base frequency) and thus sounds rough or “tinny”. In comparison, a perfect sine wave has none of these overtones and is called a pure tone – very similar to what one would hear when whistling. The wave produced by the generator in this Light Theremin is not pure: it has some imperfections and thus will produce overtones. As a result, your Theremin will always sound slightly different than someone else’s – it will have its own unique personality!
Generating a sine wave is much more complicated than generating a simple square wave. The below circuit diagram is what was just built during this activity, and other than the photoresistor (Volume) and speaker every part of the circuit is involved in creating the sine wave.
This circuit is called a Wien Bridge Oscillator, and was actually the first product ever put out by the well-known company HP. While a complete analysis of the circuit is beyond the high school level, a brief explanation is included below to spark interest in those who want to research further.
Essentially, the Wien Bridge is a bandpass filter (i.e. a filter that only lets certain frequencies through – capacitor 1, 2 resistor 2 and phototransistor (pitch) make up the filter) in a positive feedback loop with an operational amplifier. With correctly chosen values for the resistors and capacitors, this feedback loop begins to cause the circuit to oscillate; however, this oscillation will eventually continue growing in magnitude until it hits the maximum output of the Op Amp.
To prevent this continuous growth, a non-linear circuit element (in this case two diodes, but the original circuit by Hewlett actually used a light bulb) is put in a negative feedback loop – this limits the maximum gain of the circuit and prevents the oscillations from going out of control. This allows a steady, precise sine wave to be generated, which will produce a pure tone when it travels through the speaker.
Finally, the reason two 9V batteries are used (as opposed to the single 9V and regulator used in the simple Theremin) is that the Op Amp has a greater input range than the inverter used in the simple Theremin. It is possible to use a 9V without damaging the chip, and by using two it is possible to get a balanced ground (i.e. one that is halfway between the maximum and minimum voltage) which is required for this circuit to oscillate.
© Physics and Astronomy Outreach Program at the University of British Columbia (Alexander Elkholy 2013-08-29)