You are on page 1of 10

Analog sound synthesizer and FM Theremin

Create your very own sounds synthesizer and FM Theremin out of simple and cheap parts.
Create new sounds. Amaze your family! Annoy your friends!

Well start by first explaining how to build an analog sound synthesizer and then how to
extend it to add frequency modulation and play it via a Theremin interface.

Theory of operation

Music notes we hear from different instruments are actually a combination of pure tones, and
can be thought of as the sum of a lot of sine waves. However, not all of the pure tones that
contribute to the sound of the note have the same weight. The base tone that will dominate
is called the fundamental frequency, and the secondary sine waves that contribute to a lesser
extent are called harmonics. Notes from a musical instrument are mainly made up of the
fundamental and its harmonics, which are multiples of the fundamental. This is what gives
notes a pleasant sound. If we were to simply add random frequencies to a fundamental
frequency, odds are that it would sound pretty terrible.

Figure 1 illustrates an example. F5 has its fundamental at 698 Hz. Square waves, incidentally,
are made up of a fundamental frequency, plus its odd harmonics. So we can see in the FFT
that the frequency spectrum is made up of a dominant fundamental frequency at 698 Hz, and
increasingly smaller harmonics (at 2098 Hz, 3490 Hz, etc).

Figure 1 Waveform and FFT of a square wave with fundamental frequency at 698 Hz.

So how can we use this to make a sound synthesizer? Well, we could make different sounds by
simply playing sine waves at different frequencies. But those sounds would sound simple and
boring. But if we were to imitate actual musical instruments, and produce richer tones, we
could make more interesting sounds.

Components list:

1 uF capacitor x 9
.1 uF capacitor x 11
.01 uF capacitor x 8
Diodes x 8
Miscellaneous resistors (mostly 10 kOhm)
Op amps (LT1056) x 11
PLL chips (CD4046) x 9
10 kOhm potentiometer x 2
500 kOhm potentiometer x 2

Quick overview of the circuit

Figure 2 Block diagram of sound synthesizer

The main idea is to produce a fundamental tone, enrich it with harmonics, and then be able
to control the frequency of these tones, moving them up and down the audio spectrum as we
please. To cover a wider range of sounds, we opted to have two fundamental frequencies that
could be controlled independently. These correspond to the light blue boxes in the block
diagram. For each one, we added its respective 3
and 5
harmonic (the other two boxes
next to the fundamental frequency). To make them into a single signal, we put them through
an adder to combine them into one note. In order to control this new note, we put it through
a frequency mixer, which can shift the input signal up and down the in frequency. As a side
note, the frequency of each initial tone can also be controlled independently with the PLL
(more on that later). In order to drive the speaker and to combine the two new notes, we put
them through an amplifier, and after that they can finally be played through the speaker. The
output should be two sounds, whose pitch and timber we can independently adjust to create
new sounds!

Building the circuit

Making the tones: PLLs

To produce the tones, we opted to use square waves instead of sine waves, since they already
have harmonics, giving them a more interesting sound than plain sine waves. So to build a
sound synthesizer that can reproduce a wide range of sounds, we needed a way to control the
frequencies of the fundamental frequency and its harmonics. So we used a phase locked loop
(PLL) chip, which gives out a square wave at a specific frequency, depending on resistor and
capacitor values, and also on the input voltage.

Figure 3 CD4046 PLL chip and its relevant pins.

For example, our first tone we chose to be middle C (C4). Its fundamental frequency is at 262
Hz. To get this from the PLL, we chose the following values:

Harmonics Capacitors (uF) Resistors (Ohms)
C1 = .01 // .1 R1 = 39 k
C2 = .1 R2 = none
C1 = .01 // .1 R1 = 3.3 k
C2 = .1 R2 = 27 k
C1 = .1 R1 = 100 k
C2 = .1 R2 = 820 // 150

For our second note we chose F5, with a fundamental frequency of 698 Hz, so we obtained
the new values of the resistors and capacitors that would output these different frequencies.

Figure 4 FFTs of our two fundamental frequencies (C4 and F5) and their

As mentioned before, the frequency of the square wave output by the PLLs can be controlled
by the PLLs Vdd. To control the Vdd, we can simply use an op-amp with a variable resistor,
with Vout being the PLLs new Vdd that we can easily adjust. With this, we can separately
control each tones frequency.
V out

Figure 6 Adjustable Vdd that powers the PLLs, allowing us to control the resulting square waves frequency

Adding signals together

To add all 3 harmonics together, we can simply put them through an op amp.

Figure 7 Adding circuit

Frequency mixing

Because we wanted to control the notes harmonics as a group, we put the note through a
frequency mixer. What we were hoping to accomplish was to change both the timbre and the
pitch of our note. Frequency mixing takes two frequencies f1 and f2, and produces two new
ones: f1+f2 and f1-f2. This would change the relationship between the harmonics, since they
are no longer multiples of the fundamental frequency. While this sounded fine for middle
frequencies, it ended up sounding pretty bad at higher frequencies.

Figure 9 shows how to build a frequency mixer with op amps and diodes, which is much easier
than building typical ones, which normally involve inductors. In the schematic, LO refers to
local oscillator, and RF to radio frequency. For our circuit, we used a range of 400Hz to 21
KHz for RF, to keep the output on the audio range, and we put our notes into LO. To generate
RF, we used a PLL with C1 = .02 uF, C2 = .1uF, R2 = 1 MOhm, and a 500 KOhm potentiometer
for R1.
R1 1k

VS1 5
R1 1k
R2 1k
R3 1k
R4 1k
1st harmonic
3rd harmonic
5th harmonic

Figure 9 Frequency mixer circuit

Driving the speaker

One last amplifying stage was used to the signals from both notes, and to drive the speaker. It
is very similar to Figure 7, but instead were adding the outputs from both mixers, and Vout
can be represented as a load resistor, which is the speaker itself. As a side note, it might be
useful to put decoupling capacitors (we used 1uF) between stages, since the op-amps tend to
introduce a DC bias, which can build up and become annoying after a few stages.

Making music!

Were done building, and now you should have a bunch of potentiometers that can help you
control the sounds you can make. The ones that control the PLLs can change each individual
frequency, and you can learn why its a good idea to keep the overtones as multiples of the
fundamental frequency. Overtones that are not harmonic partials tend to produce dissonant
notes, which are not fun to listen to.

The potentiometers that control the PLLs that feed into the frequency mixers RF will
determine how much you shift the frequencies in your notes by. You should primarily hear a
change in pitch, but you should also be able to hear the timbre change.

Figure 10 Music!

Adding FM Modulation

To get a sense of how frequency modulation changes the sound of a tone check this out:
The way we modulate frequency is by creating a circuit that converts voltage to frequency
and so you can control the amount of modulation by controlling the input voltage into the

Heres what youll need to build the voltage to frequency converter:
AD654 Chip x1
10 kOhm resistor x1
6 kOhm resistor x2
100 Ohm resistor x3
0.1 uF capacitor x1
0.01 uF capacitor x1
1 mOhm resistor x1
5 kOhm resistor x1
IRLZ34 x1
BJT x1
6.2 Ohm resistor x1
Well be using the AD654 which is a voltage to frequency converter IC and gives us a square
wave output. We will be recreating the following circuit from the datasheet:

Figure 11: AD654 Voltage to Frequency Converter Circuit

What you need to know is that the AD654 is that Vin (the input of pin 4) is bounded by the
following equation:
-Vs => Vin >= Vs -4
This means that we need a DC offset on Vin so that it is always greater than Vs and we need
to make sure the peak of Vin is 4V less than the positive rail.

First lets build the DC offset:

Figure 12: DC Offset Circuit

In this circuit, R1 = R2 and we chose R and C by setting:

In this case we choose a minimum frequency for the Vin (we will show you how we set the
frequency for Vin later), for now lets call the minimum frequency 262Hz. Solving this
equation we get R1 = R2 = 6100 Ohms and C = 0.1uF, and we set VCC to 9V which means that
Vin cannot be any more that 5V.

Going back to creating the Voltage to Frequency Converter Circuit, we use ground as Vs so
there is no need for a diode between pins 5 and 2. We also set Vs to 9V, ie connect it to the

The input stage of the AD654 is a voltage controlled current source (for more info see and hence we set the current to a fixed amount of
1mA with the following equation:

We choose C so that Fout is the highest possible frequency in the output band, lets set that at
3kHz. So we set C to be 0.033uF.

You can choose R1 to be 100 Ohms and set R2 as a potentiometer that can be tweaked. You
will have to tweak R2 and look at the output frequency on an oscilloscope until you are happy
with the output wave.

Also, we set Rpu at 5kOhms and watch our voltages be modulated by frequency!

Creating a Theremin Interface
In order play your frequency modulated sound output as an instrument, we create a Theremin
interface using a photocell.

Similar to what we did previously, create a PLL circuit as shown in Figure 3. Here we use Vdd
as the same input as we do for the other PLL circuits, select C1 as 0.01uF, R2 as 1mOhm
resistor and use the photocell as R1. Now you can vary the output voltage by using your hand
to cover your photocell by varying degrees. Measure Vout at both extremes (no coverage and
completely covered), this gave us a range of 600Hz to 1500Hz, but you should tweak C1 and
R2 to ensure you get a range you like because each photocell in reality varies in resistance.

Driving the Speaker
Now if you connect the Fout of the AD654 Chip to a speaker, you wont hear any sound. And
this is because the current of the output is way too weak. For this we need a current source,
and we use the one depicted in Figure 13. Here we dont use a PWM input, but instead we
substitute it as the output of the voltage to frequency converter. We use an IRLZ34 as the
MOSFET and most BJTs will work fine.

We set R1 using the following equation: R1 = 0.6/I

We set the current to be 0.1A and get R1 = 6 Ohms.

And there you have it, play your FM Theremin!

Figure 13: Current Driver with PWM

Thats it! Have fun making music!