## Introduction: Soda Can Theremin

Remember those old-school sci-fi movies with squeaky and eerie background music? Those unique sounds were made using a theremin, an electronic instrument that can be played without physical contact. When playing a theremin, the operator can control volume and pitch with his or her hand position relative to two antennas.

This project is going to demonstrate how to build a simple theremin on a breadboard using a soda can as the antenna! With simplicity in mind, the theremin in this project will only demonstrate pitch modulation. The design that is implemented is shown in the block diagram above. However, it doesn't take too much extra work to add volume control, so I encourage you to try it if you're looking for an extra challenge.

To keep it short and sweet, we won't get too deep into the theory of how a theremin works. Briefly though, the antenna (our soda can) acts as one plate of a capacitor. Your hand will act as the other plate of the capacitor. Thus, by moving your hand nearer and further from the can, you are changing the capacitance. This takes place within the variable-frequencyoscillator portion of our circuit. As the capacitance in the oscillator changes, the oscillator's output frequency changes as well. This change in frequency can be heard at the speaker at the end of our circuit.

## Step 1: Gathering the Materials

This project is completed using the Digilent Analog Discovery and Analog Parts Kit. The only other part needed is the soda can! Any metal object with a reasonable surface area would work as well.

The specific parts used in this design are shown in the picture above.

• OP27 Operational Amplifier (x2)
• OP37 Operational Amplifier
• Small speaker
• 100pF Ceramic Capacitor
• 0.047uF Ceramic Capacitor
• Small-signal Diode (1N3064)
• 10kΩ resistor (x2)
• 20kΩ resistor (x2)
• 47kΩ resistor (x2)
• 100kΩ resistor (x3)
• a few breadboard pins and jumper wires
• Soda can (not pictured)

All of these parts are right out of the Analog Parts Kit.

## Step 2: Variable-Frequency Oscillator

Before getting started with the design process, a clarification on these instructions should be mentioned. The circuit will be built all on the same breadboard, one part at a time. I recommend starting towards the left of your breadboard and working towards the right to make sure it all fits. Towards the end, in step 6, an image of the circuit in its entirety is included so you can check and make sure each portion of the circuit is connected properly. It wouldn't be a bad idea to take a look at the image in step 6 first to get an idea of what the final product looks like.

Moving on with the design process now. For the variable-frequency oscillator, we will be using the OP27 operational amplifier. The pin out and specifications of the OP27 can be seen in the data sheet.

1. Place the op-amp such that it straddles the valley of the breadboard and the notch is to the left.
2. Since we will be connecting power and ground at several locations, it is easier to use jumper wires. As a personal preference I like to keep my jumper wires color-coded.
• Connect one end of a red jumper wire to the spot marked "+5V". This is pin 7 of the op-amp.
• Connect one end of a white jumper wire to the spot marked "-5V". This is pin 4 of the op-amp.
• Connect one end of an orange jumper wire to the spot marked "Vout". This is pin 6 of the op-amp.
• Connect one end of a black jumper wire at the spot marked "GND".
3. Now we'll place the resistors. All the resistors used in the oscillator are 100kΩ.
• Place one resistor across the op-amp from pin 2 to pin 6.
• Place another resistor across the op-amp from pin 3 to pin 6.
• Place the last resistor between the grounded row of the breadboard and pin 3 of the op-amp.
4. Place the 100pF capacitor between the grounded row of the breadboard and pin 2 of the op-amp.
5. The soda can is to be placed in parallel with this capacitor.
• Connect one end of a green jumper wire to pin 2 of the op-amp. You will hold the other end of this wire in your right hand when operating the theremin.
• Connect one end of another black jumper wire to the grounded row of the breadboard. Connect the other end of this wire to the soda can. A slightly longer jumper wire is easier here. I place the wire such that it is held on by the tab on the top of the can. Taping the wire to the can would work as well. Just make sure there is metal-to-metal contact.
• By holding the green wire in your right hand, your body is now part of the circuit. This allows you to use your left hand to act as a plate of a capacitor with the soda can.

## Step 3: Weighted Summer

To save space on our breadboard, we will use the Analog Discovery's Arbitrary Waveform Generator (in the WaveForms Software) to act as the fixed oscillator. On the Analog Discovery device, this is the yellow wire labeled "W1".

This next portion of the circuit, the weighted summer, mixes the signals from our fixed and variable-frequency oscillators. We will be using another OP27.

1. Move 5 or 6 holes down from the oscillator and place the OP27 such that it straddles the valley of the board and the notched side is on the left.
2. Just as we did when building the oscillator, connect one end of red, white, and orange jumper wires at "+5V", "-5V", and "Vout", respectively.
3. Connect one end of a black jumper wire where "GND" is shown at pin 3 of the op-amp.
4. Connect two 47kΩ resistors in in parallel as shown in the breadboard image. The right side of both resistors should be connected to pin 2 of the op-amp. The left sides of the resistors should be off by one row as shown.
5. In the breadboard image above, "Vin" is the output voltage from our oscillator that was built in the previous step. That being said, connect the other end of the orange wire from the oscillator to the spot marked "Vin".
6. Place a breadboard pin at the spot marked "WaveGen Input". This will be connected to the Analog Discovery to act as our fixed oscillator.
7. Lastly, place a 20kΩ resistor across the op-amp from pin 2 to pin 6.

## Step 4: Envelope Detector

By mixing the oscillating signals with the weighted summer, a "beating" signal is produced. The new signal output from the weighted summer will be passed through an envelope detector which traces the beating pattern.

1. A few holes down from the weighted summer, place the small signal-diode. Note: The orientation of the diode is very important. The diode in the Analog Parts kit is orange with a black band on one side. Place the diode such that the black band is towards the right and the orange side is to the left.
2. "Vin" for the envelope detector is the output of the weighted summer. Connect the other end of the orange wire at pin 6 of the weighted summer's op-amp to the left side of the diode.
3. At the right side of the diode, place the 10kΩ resistor and 0.047uF capacitor in parallel.
4. Connect one side of a black jumper wire at the right side of the resistor and capacitor. This will connect to ground. This location is at the spot marked "GND" in the image above.
5. The output from this circuit is at the junction of the diode, resistor, and capacitor. Connect one side of an orange jumper wire at the spot marked "Vout".

## Step 5: Amplifier

The output signal of the envelope detector is actually ready to send to a speaker, it just wouldn't be very loud. That being said, the final step before sending the signal to the speaker is an amplifier. The amplifier used here is an inverting amplifier built with an OP37 op-amp. The OP37 has an identical pin out compared to the OP27. It behaves similarly as well. If you're interested though, here is the data sheet specific to the OP37.

1. Moving a little further down this time (about 12-15 holes), place the OP37 the same way the OP27's were placed, straddling the valley of the board with the notch to the left.
2. As with the previous two op-amps, connect one end of the red, white, and orange jumper wires at "+5V", "-5V", and "Vout", respectively.
3. Place a 20kΩ resistor across the op-amp from pin 2 to pin 6.
4. Place a 10kΩ resistor such that the right side of it is connected at pin 2 of the op-amp. The left side of the resistor should be connected a few holes to the left of the op-amp.
5. Connect the other side of the orange wire from the envelope detector's output at the spot marked "Vin".
6. Pin 3 of the op-amp would normally be connected to ground through a resistor. It is ideal to use as large of a resistor as possible, hence the infinite resistance depicted in the schematic. To simulate an infinite resistance, we will leave pin 3 unconnected such that it sees an "open circuit". No current can flow through an open circuit it so it acts as an infinite resistance.

## Step 6: Circuit Review and Completion

Above is a breadboard image of the circuit as a whole. The last step to complete the circuit is to connect the power supplies and speaker.

1. Start by placing 4 breadboard pins in a line between the envelope detector and amplifier as shown.
• The pin furthest to the left will be connected to the Analog Discovery's "+5V".
• The second pin in from the left will be connected to the Analog Discovery's "-5V".
• The last two pins will both be connected to one of the Analog Discovery's grounds.
2. By doing this, we have one full row of +5V, one full row of "-5V, and two full ground rows.
3. Connect the free ends of all of the red jumper wires to the +5V row.
4. Connect the free ends of all of the white jumper wires to the -5V row.
5. Connect the free ends of all of the black jumper wires to one of the two ground rows.
6. Place the speaker a few holes down from the amplifer. The speaker's orientation does not matter.
7. Connect the other end of the orange output wire of the amplifier to one side of the speaker. Use a black jumper wire to connect the other side of the speaker to ground.
8. Connect the Analog Discovery to the circuit as labeled in the breadboard image and check all of your connections. Note: "AWG" in the image stands for Arbitrary WaveForm Generator. This is the connection mentioned in step 3 that will act as the fixed oscillator. It is the yellow wire on the Analog Discovery device marked "W1".

## Step 7: Operation

Watch the video above to see the soda can theremin in action!