creating an analog sound synthesizer and fm theremin
DESCRIPTION
How to guide on creating an analog sound synthesizer and FM thereminTRANSCRIPT
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
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 toextend 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, andcan be thought of as the sum of a lot of sine waves. However, not all of the pure tones thatcontribute to the sound of the note have the same weight. The base tone that will dominateis called thefundamental frequency, and the secondary sine waves that contribute to a lesserextent are called harmonics. Notes from a musical instrument are mainly made up of thefundamental 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 fundamentalfrequency, 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 FFTthat the frequency spectrum is made up of a dominant fundamental frequency at 698 Hz, andincreasingly smaller harmonics (at 2098 Hz, 3490 Hz, etc).
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
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 bysimply 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, wecould make more interesting sounds.
Components list:
1 uF capacitor x 9.1 uF capacitor x 11.01 uF capacitor x 8Diodes x 8Miscellaneous resistors (mostly 10 kOhm)
Op amps (LT1056) x 11PLL chips (CD4046) x 910 kOhm potentiometer x 2500 kOhm potentiometer x 2
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
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 ableto control the frequency of these tones, moving them up and down the audio spectrum as weplease. To cover a wider range of sounds, we opted to have two fundamental frequencies thatcould be controlled independently. These correspond to the light blue boxes in the blockdiagram. For each one, we added its respective 3rdand 5thharmonic (the other two boxesnext to the fundamental frequency). To make them into a single signal, we put them throughan adder to combine them into one note. In order to control this new note, we put it througha frequency mixer, which can shift the input signal up and down the in frequency. As a sidenote, 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 putthem through an amplifier, and after that they can finally be played through the speaker. Theoutput should be two sounds, whose pitch and timber we can independently adjust to createnew sounds!
Building the circuit
Making the tones: PLLs
To produce the tones, we opted to use square waves instead of sine waves, since they alreadyhave harmonics, giving them a more interesting sound than plain sine waves. So to build asound synthesizer that can reproduce a wide range of sounds, we needed a way to control thefrequencies of the fundamental frequency and its harmonics. So we used a phase locked loop
PLL
PLL
PLL Adder Frequency
Mixer
PLL
PLL
PLL Adder Frequency
Mixer
Amplifier Speaker
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
(PLL) chip, which gives out a square wave at a specific frequency, depending on resistor andcapacitor 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 262Hz. To get this from the PLL, we chose the following values:
Harmonics Capacitors (uF) Resistors (Ohms)
1st C1 = .01 // .1 R1 = 39 k
C2 = .1 R2 = none
3rd C1 = .01 // .1 R1 = 3.3 k
C2 = .1 R2 = 27 k
5th 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 obtainedthe 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 controlledby the PLLs Vdd. To control the Vdd, we can simply use an op-amp with a variable resistor,with Vout being the PLLsnew Vdd that we can easily adjust. With this, we can separatelycontrol each tones frequency.
4
5
6
7
8
11
16
R1
R2
V out
C1
Vdd
C2
12
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
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, weput the note through afrequency mixer. What we were hoping to accomplish was to change both the timbre and thepitch of our note. Frequency mixing takes two frequenciesf1andf2, and produces two newones:f1+f2andf1-f2. This would change the relationship between the harmonics, since they
are no longer multiples of the fundamental frequency. While this sounded fine for middlefrequencies, 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 easierthan building typical ones, which normally involve inductors. In the schematic, LO refers tolocal oscillator, and RF to radio frequency. For our circuit, we used a range of 400Hz to 21KHz for RF, to keep the output on the audio range, and we put our notes into LO. To generateRF, we used a PLL with C1 = .02 uF, C2 = .1uF, R2 = 1 MOhm, and a 500 KOhm potentiometerfor R1.
R1 1kP1
5k
-
++3
2
6
7
4
OP1 !OPAMP
+ VS1 5
Vin
Vout
Vdd Vdd
R1 1k
-
++3
2
6
7
4
OP1 !OPAMP
R2 1k
R3 1k
R4 1k Vout
Vdd1st harmonic
3rd harmonic
5th harmonic
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
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. Itis very similar to Figure 7, but instead wereadding the outputs from both mixers, and Voutcan be represented as a load resistor, which is the speaker itself. As a side note, it might beuseful to put decoupling capacitors (we used 1uF) between stages, since the op-amps tend tointroduce 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 youcontrol the sounds you can make. The ones that control the PLLs can change each individualfrequency, and you can learn why its a good idea to keep the overtones as multiples of thefundamental frequency. Overtones that are not harmonic partials tend to produce dissonantnotes, which are not fun to listen to.
The potentiometers that control the PLLs that feed into the frequency mixers RF willdetermine how much you shift the frequencies in your notes by. You should primarily hear achange in pitch, but you should also be able to hear the timbre change.
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
Figure 10 Music!
Adding FM Modulation
To get a sense of how frequency modulation changes the sound of a tone check this out:http://www.youtube.com/watch?v=I59Xk054EPIThe way we modulate frequency is by creating a circuit that converts voltage to frequencyand so you can control the amount of modulation by controlling the input voltage into thecircuit.
Heres what youll need to build the voltage to frequency converter:AD654 Chip x110 kOhm resistor x16 kOhm resistor x2100 Ohm resistor x30.1 uF capacitor x10.01 uF capacitor x11 mOhm resistor x15 kOhm resistor x1IRLZ34 x1BJT x16.2 Ohm resistor x1
http://www.youtube.com/watch?v=I59Xk054EPIhttp://www.youtube.com/watch?v=I59Xk054EPIhttp://www.youtube.com/watch?v=I59Xk054EPI -
5/21/2018 Creating an analog sound synthesizer and FM theremin
Well be using the AD654 which is a voltage to frequency converter IC and gives us a squarewave 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 thefollowing equation:
-Vs => Vin >= Vs -4This means that we need a DC offset on Vin so that it is always greater than Vs and we needto 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 thefrequency for Vin later), for now lets call the minimum frequency 262Hz. Solving this
-
5/21/2018 Creating an analog sound synthesizer and FM theremin
equation we get R1 = R2 = 6100 Ohms and C = 0.1uF, and we set VCC to 9V which means thatVin cannot be any more that 5V.
Going back to creating the Voltage to Frequency Converter Circuit, we use ground as Vs sothere is no need for a diode between pins 5 and 2. We also set Vs to 9V, ie connect it to therails.
The input stage of the AD654 is a voltage controlled current source (for more info seehttp://www.linear.com/solutions/1403)and hence we set the current to a fixed amount of1mA with the following equation:
We choose C so that Fout is the highest possible frequency in the output band, lets set that at3kHz. 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. Youwill have to tweak R2 and look at the output frequency on an oscilloscope until you are happywith the output wave.
Also, we set Rpu at 5kOhms and watch our voltages be modulated by frequency!
Creating a Theremin InterfaceIn order play your frequency modulated sound output as an instrument, we create a Theremininterface using a photocell.
Similar to what we did previously, create a PLL circuit as shown in Figure 3. Here we use Vddas 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 handto cover your photocell by varying degrees. Measure Vout at both extremes (no coverage andcompletely covered), this gave us a range of 600Hz to 1500Hz, but you should tweak C1 andR2 to ensure you get a range you like because each photocell in reality varies in resistance.
Driving the SpeakerNow if you connect the Fout of the AD654 Chip to a speaker, you wont hear any sound. Andthis 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 wesubstitute it as the output of the voltage to frequency converter. We use an IRLZ34 as theMOSFET and most BJTs will work fine.
We set R1 using the following equation: R1 = 0.6/IspeakerWe set the current to be 0.1A and get R1 = 6 Ohms.
And there you have it, play your FM Theremin!
http://www.linear.com/solutions/1403http://www.linear.com/solutions/1403http://www.linear.com/solutions/1403 -
5/21/2018 Creating an analog sound synthesizer and FM theremin
Figure 13: Current Driver with PWM
Thats it! Have fun making music!
Sources
http://electronicdesign.com/analog/make-frequency-mixer-op-ampshttp://www.vaughns-1-pagers.com/music/musical-note-frequencies.htmhttp://www.i-love-guitar.com/guitar-harmonics.htmlhttp://homepage.ntu.edu.tw/~karchung/phonetics%20II%20page%20eight.htmhttp://www.eleccircuit.com/the-100-hz-to-10-khz-square-wave-generator-by-phase-lock-loop-ic/http://www.everythingrf.com/Uploads/Content/File/Phase%20Locked%20Loop%20Design%20Fundamentals.pdfhttp://synthesizeracademy.com/fm-synthesis/http://www.propellerheads.se/blog/tutorials/thor-demystified-9-an-introduction-to-fm-synthesis-part-1/https://coursework.stanford.edu/access/content/group/F13-EE-122A-01/Lab5%20EE122A%20R0.1.pdfhttp://www.linear.com/solutions/1403http://www.analog.com/static/imported-files/data_sheets/AD654.pdf
Speaker
http://electronicdesign.com/analog/make-frequency-mixer-op-ampshttp://electronicdesign.com/analog/make-frequency-mixer-op-ampshttp://www.vaughns-1-pagers.com/music/musical-note-frequencies.htmhttp://www.vaughns-1-pagers.com/music/musical-note-frequencies.htmhttp://www.i-love-guitar.com/guitar-harmonics.htmlhttp://www.i-love-guitar.com/guitar-harmonics.htmlhttp://homepage.ntu.edu.tw/~karchung/phonetics%20II%20page%20eight.htmhttp://homepage.ntu.edu.tw/~karchung/phonetics%20II%20page%20eight.htmhttp://www.eleccircuit.com/the-100-hz-to-10-khz-square-wave-generator-by-phase-lock-loop-ic/http://www.eleccircuit.com/the-100-hz-to-10-khz-square-wave-generator-by-phase-lock-loop-ic/http://www.everythingrf.com/Uploads/Content/File/Phase%20Locked%20Loop%20Design%20Fundamentals.pdfhttp://www.everythingrf.com/Uploads/Content/File/Phase%20Locked%20Loop%20Design%20Fundamentals.pdfhttp://synthesizeracademy.com/fm-synthesis/http://synthesizeracademy.com/fm-synthesis/http://www.propellerheads.se/blog/tutorials/thor-demystified-9-an-introduction-to-fm-synthesis-part-1/https://coursework.stanford.edu/access/content/group/F13-EE-122A-01/Lab5%20EE122A%20R0.1.pdfhttps://coursework.stanford.edu/access/content/group/F13-EE-122A-01/Lab5%20EE122A%20R0.1.pdfhttp://www.linear.com/solutions/1403http://www.linear.com/solutions/1403http://www.analog.com/static/imported-files/data_sheets/AD654.pdfhttp://www.analog.com/static/imported-files/data_sheets/AD654.pdfhttp://www.analog.com/static/imported-files/data_sheets/AD654.pdfhttp://www.linear.com/solutions/1403https://coursework.stanford.edu/access/content/group/F13-EE-122A-01/Lab5%20EE122A%20R0.1.pdfhttp://www.propellerheads.se/blog/tutorials/thor-demystified-9-an-introduction-to-fm-synthesis-part-1/http://synthesizeracademy.com/fm-synthesis/http://www.everythingrf.com/Uploads/Content/File/Phase%20Locked%20Loop%20Design%20Fundamentals.pdfhttp://www.eleccircuit.com/the-100-hz-to-10-khz-square-wave-generator-by-phase-lock-loop-ic/http://homepage.ntu.edu.tw/~karchung/phonetics%20II%20page%20eight.htmhttp://www.i-love-guitar.com/guitar-harmonics.htmlhttp://www.vaughns-1-pagers.com/music/musical-note-frequencies.htmhttp://electronicdesign.com/analog/make-frequency-mixer-op-amps