Tori Chitwood
Tori QuallsARDUINO THEREMIN
 Invented in 1919 by Russian Physicist Lev Termen (Leon Theremin)
 Brought instrument to US in 1920, but was taken back to Soviet Union by force in
1938
 Different Rock bands have used it in the 60s and 70s including Led Zeppelin
HISTORY
SCHEMATIC
FOR LEON’S
THEREMIN
 Takes a single measurement
at a time and translates it
into a value through code
before outputting a tone
 Pitch control
 Volume control
 Arduino sends data to
speaker
HOW OURS IS DIFFERENT
ARDUINO
CODE
ARDUINO
CODE
 Capacitive Sensing
PITCH CONTROL
 Tone
VOLUME CONTROL
CIRCUIT
SCHEMATIC
FOR PCB
PCB
DESIGN
AND
SOLDERED
BOARD
 Noise and Data Regulation
CHALLENGES
 Capacitor values increase randomly
 Sensitivity
CHALLENGES
VIDEO: PITCH
VIDEO: VOLUME
REFERENCES
https://www.arduino.cc/en/Tutorial/Smoothing
https://www.youtube.com/watch?v=pp36Q5i08HE
https://www.arduino.cc/en/Reference/SPI
http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSe
nse
http://www.thereminworld.com/Article/14232/what-s-a-theremin-
http://www.theremin.info/index.php?module=-
&type=file&func=get&tid=15&fid=image&pid=54

Theremin Presentation

Editor's Notes

  • #3 Musical Instrument that operates off of hand capacitance in relation to the antennae (talk more about this later) One antenna controls sound pitch and one antenna controls volume level Talk about different ranges pitch in picture Nowadays, costs range from $99-$450 The lower end is for single antenna theremin; for pitch and volume control, at least $170
  • #4 How a real theremin works There are multiple oscillators (a couple for pitch and one for volume) that generate the tone of the instrument and control the volume. Tone works by multiplying the outputs of the variable pitch and fixed pitch oscillators, when waves multiplied and low pass filtered, the frequency of the output is the difference of the frequencies of the variable and fixed When playing, the goals is to alter very slightly the frequency of the variable pitch oscillator so that the overall difference in frequency changes This is done by utilizing the capacitive effect that the players hand has on the antenna. Hand acts as ground plate and varies the antenna capacitance by different amounts depending on how close or far it is away. Change in capacitance then causes a change in current. With inductors, change in current causes a change in voltage across the inductor and change in frequency of oscillator. Volume works in similar way but converts the frequency to a DC voltage which controls then is used in conjunction with the difference in frequency gained from the pitch antenna circuit to produce a sound
  • #5 Required to use Arduino or labview We also had two antennae: one for pitch and one for volume Other used oscillators to generate different sounds by comparing an output from a reference oscillator to an oscillator affected by hand movement
  • #6 Here is our Arduino code. It is divided into six main sections ** Capacitive sensign for pitch and volume, reset code, digitpot initialization, data mapping, tone
  • #7 Here is our Arduino code. It is divided into six main sections
  • #8 Have separate Capacitive sensing circuits for pitch and volume Downloaded Capacitive Sensing Library from Arduino website; here’s how it works Capsense Ardunio changes send pin state eventually changes the state of the receive pin. Time delay between send and receive pin is determined by RC with C being the sum of the Cpin and Csensed Cpin used to stabilize Csensed is what we control ** The capacitiveSensor Function argument (where it says 30) represent the number of samples in one sensing cycle and the capacitive sensing library has a built in low pass filter to smooth noise Tone Input value received from capacitive sensing code into map() function Take mapped value and use tone() function to generate sound
  • #9 Capacitive Sensing Used same capacitive sensing library as the pitch control to get a value Instead of directly using the map value, we first constrained the values to ensure we didn’t try to tap into a digipot state that didn’t exist (7 bit digipot with 128 different resistance states) Constrained values were mapped and then rounded and sent to digipot Digipot No simple Arduino method the way there was for pitch Found someone who used a digipot to control light intensity The digipot has 7 bits and 128 states but the lower the state number, the greater the volume, so in our code we constrained the state values to 1-20 to keep the volume audible Arduino has a few different libraries that can be used to communicate with digipot We used SPI library because it better fit our purpose The first block code is how it is initialized, ss is the chip number if have multiple chips, reg is the wipper blade number (some are duel potentiometers), and level is the state number 1P is chip select for if you have more than one potentiometer in your device (we have one) 2P clock which is used to keep track whether it is SDI or SDO 3P is SDI/SDO which is the interpreted and mapped data from our sensing plate 4P is ground 5P is unused 6P is the wiper and leads to the speaker 7P is our tone/pitch input (so the wiper only affects the amplitude of our sound wave but the frequency of the sound wave is still included and regulated by the pitch sensing plate) 8P is power (5V)
  • #10 **Our circuit design (for reference): Sensitivity (#of resistors), stability (extra 100 pF capacitors), linearity (mapping of capsense values to freq range), resolution (mapping, bit range, changed mapping to narrow range of freq outputted), SNR (MAF)
  • #11 Picture with PCB schematic and soldered board Worked, but didn’t seem to work as well Unknown cause, potentially soldering error and we didn’t have time to redo it **Values were all over the place like what happened initially, so possibly charge build up
  • #12 MAF to increase SNR and smooth spikes out Adjusted window width to get best response time Too big = must hold hand a long time to change Too small = didn’t get rid spikes Changed mapping to play within certain range of frequencies Didn’t want to go all way to human hearing range because it was unpleasant and unmusical
  • #13 Reset code If the cap values for pitch went too high, it reset the Arduino without having to press the button and the values go back down Only applied to pitch because the volume values were more stable and less likely to randomly jump up **Charge build up might be cause of increasing values Resistor values More resistors mean slower because you are increasing the time constant (R*C) But increased sensitivity because now smaller changes in capacitance change the time constant