1 Theremillusion Steven Bennett, Imen Ben-Neticha, Snigdha Jonna, Sandra Jenkins, Advisor: Paul Siqueira ABSTRACT The end goal in the design and implementation of the Theremillusion has been the notion of creating a user friendly interface that would teach people how to play a theremin. The theremin is an instrument that has existed for many decades. It can be played easily by moving your hand through the electric field, disrupting the electric field and outputting a note. However, due to lack of a reference, it is very difficult to master playing the theremin, especially those new to music instruments in general. The initial goal of the Theremillusion is to make the theremin more accessible to everyday people by creating a friendly interface that would serve as a guide to the user. As mentioned above, the Theremin is lacking a reference. To address this shortcomming, the Theremillusion is designed with Electro-Luminescent (EL) wires to lead the user through playing a song. The wires are positioned to match specific notes needed to play a song. The Theremillusion allows the user to pick what song they would like to learn. It then teaches the user to play the song on the theremin by lighting up the wire one note at a time. The next note will only appear after the user has played the current note successfully. After the song has completed, the user is shown their score on the Theremillusion. The score is based on how many notes the user has received correctly within a specific time. I. INTRODUCTION A theremin is a musical instrument first designed and demonstrated by a Russian physicist named Leon Theremin in 1921 (Oddmusic). The pitch of the sound from the instrument is produced by two beat frequency oscillators that operate in the radio frequency. One oscillator frequency is fixed while the other’s frequency is modified by a change in capacitance when a person’s hand enters the magnetic field of an antenna. The difference between the two oscillators creates a “beat frequency” which is what creates audible the music note pitch (Dawson). The volume of that pitch is also controlled by a similar system. The Theremin is one of the earliest electronic instruments and thus it received a lot of attention when it was first created. Recently there has been a resurgence of interest in the Theremin and its unique properties as a musical instrument; the instrument is played without physically touching anything and it has a continuous range for both pitch and volume. These aspects make it an instrument that is extremely easy to make sound with, but very difficult to play well. The player cannot tell if the note is correct or not until hearing it played, thus making the technique akin to a negative-feedback mechanism (Skeldon). Consequently, the user must already have extensive ear training; knowledge of not only exactly what pitch they want to play but also the ability to hear the difference between a correct note and one that is slightly off pitch. This has made the device very hard for beginners to learn how to play, and thus has limited its popularity. Our project is focused on making the Theremin easier to play for beginners by incorporating a visual reference and feedback for where the player will place their hand. This feedback will allow players to not only learn to play the Theremin, but to improve their ability to hear tones. We are focusing specifically on the western scale, however further research for this project might include a way to teach different methods for categorizing notes and music besides the western view. II. REQUIREMENT SPECIFICATION AND DESIGN A. System Overview The user should be able to play the Theremillusion and receive feedback. The aim of this project is to have bidirectional communication between theremin and the software designed. The user interacts with the theremin and receives feedback through a display. 2 potentiometer but by the changing capacitance associated with the antenna. The frequency of 172 kHz may seem Figure 1a. Theremin and Discrete Mode Overview The basic system architecture is as follows. The Theremillusion is broken down into two major components, the construction of the Theremin and the software for the sound output and the construction of the display and the software integration of a teaching mode. In figure 1a, it is apparent that there is switching capability. This allows the Theremillusion to play in two modes: Continuous and Discrete. The Theremin is naturally a continuous instrument meaning that there is not a defined range as to when a note ends and begins. This creates a continuous sweep noise. To many, this means that they have a hard time hearing when notes played are in tune or not as the notes are not distinct. The theremin is associated with a very eerie sound and a high level of difficulty to play. In the Theremillusion, the Discrete mode enables the user to play distinct notes, presenting the user with more familiar sounds. This mode is easier for teaching because there is an audible difference between the notes and these notes actually correspond to where they should normally place their hands when playing in continuous mode. Consequently the user can learn the different note types and in turn learn to play the Theremin. B. Traditional Theremin For our discussion of the how the Theremin works, we are using the example Theremin design we began building to deepen our understanding of the instrument. The Theremin is built with three main parts, the pitch control, the volume control, and the output control. fairly arbitrary to some extent it is. As long as the two oscillators operate at the same value when there is no human interference the circuit will work. The frequencies do have to be high enough to give the right offset for changing the audible tone. It is important for the audible range of the Theremin’s sound. In order to fully understand this, an explanation of how the system works is required as follows. The pitch circuitry is made up of beat frequency oscillators (BFO) which are directly used to generate the tone of the instrument. This BFO contains two independent oscillators each with their own angular frequency. The schematics for these two oscillators can be seen in figures two and three. The outputs of these two oscillators are put through a mixer (a heterodyne mixer) which multiplies the two signals together (Skeldon). The schematic for this can be seen in figure four. This has two frequency components: one that is the sum of the two frequencies and another that has the difference. For our purposes, we only want the differences between the frequencies of the two oscillators, so the signal is then passed through a low pass filter . The way the Theremin produces audible frequencies is through altering very slightly the frequency of the Variable Pitch Oscillator in figure three so that the beat frequency (the frequency that results from the difference of the two oscillators’ frequencies) changes. This is done through the interaction of an antenna, or even just interfering with the inductors on the circuit with your hand. Your hand acts like a capacitor, however its effect is not very significant (only around a few picofarads) so the frequency of the oscillator needs to be arranged very high; so that this small change in capacitance results in a big change in the beat frequency. This leads to a trade-off. The higher the frequencies the bigger the range, but the harder are more precise the player must be to stay playing a single pitch. After looking at a number of different circuits and understanding how a beat frequency oscillator works, the circuits were constructed and tested. We were able have a frequency similar to the fixed oscillator. Pitch Control: The Pitch control for the Theremin is composed of a reference pitch oscillator and a variable pitch oscillator . The reference oscillator is designed to operate around 172 kHz and has a potentiometer which can fine-tune the circuit to the correct frequency. The variable oscillator also runs around 172 kHz; it is fine-tuned not by a Example circuit design: 3 Oscillator and a Volume Resonant Circuit and Voltage Controlled Amplifier. The system is very similar to the pitch circuitry and the basic concept is that by changing the frequencies of the oscillators by moving your hand you change the gain on an amplifier. Figure 2. Fixed Pitch Oscillator There are much simpler ways to control the gain of an amplifier, however these involve turning dials . Inexpensive Theremins often opt to have a simpler volume control method than that of the traditional Theremin (namely, one with both a pitch and volume antenna) . We have decided to keep with the traditional method of the Theremin which will allow the user to control both the pitch and volume of the instrument without touching anything. Volume Variable Oscillator: Figure 3. Variable Pitch Oscillator Figure 4. Mixer Volume Control: Volume control is composed of a Volume Variable Choice of circuit design: The circuit design for the volume variable oscillator along with Volume Controlled Amplifier is used to vary the volume of the final output level of the Theremin. This is achieved when the player moves his hand in relation to the volume antenna. As the player approaches the volume antenna, the capacitance of his hand changes the set frequency of the volume oscillator. This produces a DC signal which oscillates at a high frequency of 440kHZ. The circuit that we used in building a Volume Variable oscillator is given below. This overall design of this circuit is similar to the pitch circuitry. The potentiometer in the circuit is used to fine tune the frequency of the volume oscillator. When the circuit is tuned correctly, the frequency from this oscillator will match the tuning of the volume resonant circuit. The gain of the VCA is controlled by the input signal by resistors. The circuit as shown in Figures 5 and 6 were constructed and we were able to achieve the right audio signal. 4 The basic understanding of the Theremin we gained from building our own simpler version has proved useful in trouble shooting and building the kit and integrating it with the rest of the project. C. Software Design Software to run the Discrete Mode: Figure 6. Voltage Resonant Circuit and Voltage Controlled Amplifier The Arduino IDE software is used to read the frequencies outputted by the Theremin in order to run the Continuous Mode and the Discrete Mode of the project. The microcontroller on the Arduino board is programmed using the Arduino programming language. The Arduino board consists of a simple hardware design along with Atmel AVR processor and input/output support on the board. After coding in Arduino, the board is connected to the computer using a USB cable and the code is uploaded onto the microcontroller. Once the frequencies are read from the Theremin using the code (in which we use peak detection to mesure the period and from this obtain the frequency), this information is used to display the notes on a seven segment LED display. A frequency-to-note chart is used as a reference to correspond the frequencies to the appropriate notes. The frequencies and the corresponding notes are stored in two arrays. With the help of these arrays, if the frequencies fall within a specific range, the appropriate notes will output on the display using the code. Decision to use a kit: Software to run the Discrete Mode: After building the simple Theremin described above, we concluded that there was too much noise and instability which hindered the implementation of the Discrete Mode. The volume and pitch circuitry were temperamental due to the weak breadboard connections and excess noise. After careful research we found that the most cost effective and efficient solution was to order the Theremax Theremin kit and construct it. This kit had the advantage of not only being fairly inexpensive but also customizable. The Arduino IDE software is used to read the frequencies outputted by the Theremin in order to run the Continuous Mode and the Discrete Mode of the project. The microcontroller on the Arduino board is programmed using the Arduino programming language. The Arduino board consists of a simple hardware design along with Atmel AVR processor and input/output support on the board. After coding in Arduino, the board is connected to the computer using a USB cable and the code is uploaded onto the microcontroller. Once the Figure 5. Volume Variable Oscillator 5 frequencies are read from the Theremin using the code (in which we use peak detection to mesure the period and from this obtain the frequency), this information is used to display the notes on a seven segment LED display. A frequency-to-note chart is used as a reference to correspond the frequencies to the appropriate notes. The frequencies and the corresponding notes are stored in two arrays. With the help of these arrays, if the frequencies fall within a specific range, the appropriate notes will output on the display using the code. The Arduino software is also used to run the Discrete Mode which will eliminate the sweep between two notes. Using a frequency-to-note chart, the frequencies within a range are grouped together to output a specific frequency. By doing this, the frequencies are distinct and the sweep between two notes can be eliminated. Such a Discrete Mode is desirable to teach the user to play the Theremin and to implement glowing wires which will direct the user to the right position to play accurate notes. A PIC32MX795 microcontroller is used in addition to the Arduino. The PIC32 is used to control the glow wire visual interface. Binary signals are sent from the PIC to the EL Sequencer board which drives eight glow wires. The PIC uses binary encoded signals which are decoded by the EL Sequencer to represent which of the eight glow wires to activate. The PIC32 contains in it "songs" which are C structures used to represent the information needed to model a sing to be played. Notes are mapped to a look of table which is encoded into different bit fields such as sharp, flat, octave and note. This Allows for high performance lookups and ease of use in software. As songs are read on the PIC, the notes will be extracted along with a delay which is sent to the EL Sequencer. In addition to the EL Sequencer illuminating the space that occupies the note, a seven segment display will tell the user which note is to be played. The player can then try to match the note they are playing, with the note being asked for. From here, the PIC will take an analog sample of the audio signal being played by the Theremin user. That sample is then broken down into FFT components and passed to an optimized FFT library function. This function returns the frequency spectrum from which the highest magnitude frequency is extracted. This frequency is compared to a lookup table which maps frequencies to musical notes. Depending on how close that musical note is to the desired note, the PIC will update the Theremin player's score with various penalty points. Each song contains a letter grading cutoff table which, at the end of the song, will be iterated through to see which grade range the player belongs in. That grade is the outputted to the seven segment display for the user to see. The EL Sequencer is a glow wire control board based on Arduino programming. It uses an Atmega 328 chip which can be programmed through the Arduino development environment. This board drives 8 glow wires and has 6 analog pins. The 6 analog pins have been configured as inputs for the Theremillusion project. Binary signals are sent to pins 3 through 6 to represent 0x0 to 0xF. These signals are decoded in software by the EL Sequencer's Atmega 328 which will choose which of the 8 output glow wire drivers to enable. The software on the EL Sequencer is kept to a basic decode table to simplify the control elements of the interacting micro controllers. Electroluminescent Wires: Choice of Electroluminescent Wires for Theremillusion As the implementation of the project progressed, the decision to abandon the fiber optics for the visual interface was made. This was due to the fiber optics loosing brightness as the length of the fiber was increased. This is because the Fibers are not closed at the end, and therefore the light is not reflected back into the fiber. For this reason, electroluminescent wire 6 was chosen as an alternative. Electroluminescent wire (EL wire) is a thin copper wire that is coated with phosphor.This wire glows when an alternating current is applied. EL wire produces a 360 degree unbroken line of visible light. It is also very thin and flexible which is very ideal for this project as it would allow more precision as to the location of the notes on the Theremin. The EL wires need 120 volts of alternating current (VAC) in order to glow. The PIC32 however only emits power of 3 volts of direct current (VDC). For this reason a power inverter or driver had to be acquired. At first, the idea of building a 12VDC – 120VAC driver seemed like a good idea. The plan was to get a transformer from a microwave, and then rewire it and connect it to a circuit board to create the driver. After acquiring a microwave transformer by carefully taking apart a microwave, it was discovered that the transformer was dysfunctional. Due to lack of other resources with transformers and time, it was decided to purchase a driver. This would ensure that the EL wires would be powered correctly and remove any hazards of the team getting electrocuted. Figure 8. Electroluminescent wire Figure 9. Soldering EL wires and Heat shrink tubes To connect the EL wire, it must first be stripped very carefully. After stripping the wire, there are three wires exposed: two thin radial wires and one core wire. The core wire is covered with white phosphorous coating. While being very careful not to tug at the two radial wires, the white phosphorous coating must be removed by using a sharp knife. The next step is to solder the core wire to a black wire, and the solder the two radial wires to one red wire. This is difficult because the radial wires are very frail and can be easily broken if tugged at. If this occurs, the EL wire must be re-stripped etc. Also, it is important to cover the connections between the core wire and the black wire, as well as the radial wires with the red wire with heat shrink tubes. This is important for two major reasons: the first reason is so that the connections are strong and so that the wires will not move and break. The second reason is so that there is no connection between the core wire and the radial wires. If they touch, it can cause the wire to short circuit itself. Preparing the EL wires is a long and tedious process that requires a lot of finesse and attention to detail. After the EL wires were all ready and connected to the red and black wires, the next step was to control them. To control the EL wires, many microcontrollers were researched, and instead of recreating the wheel, a special EL microcontroller was found. The EL sequencer is an ATmega based control board that allows the user to program any sequence of blink, on/off, and even pulse width modulation (PWM) pulsing of EL wire. This was a perfect choice because it can light up to eight EL wires on one board, and the project would require a decent amount of wires to match with the number of notes the theremin can generate. Not only this, but it can be programmed using an Arduino interface and programming. Also, the EL sequencer has a set of analog inputs that can be used to control the EL sequencer from another micro-controller. 7 This was a great aspect because the PIC32 can interface with the EL Sequencer and control it. Another great aspect to buying the EL sequencer was that it cut our costs by eight because one driver sufficed for the equivalent of eight drivers. Although more than one EL sequencer was purchased, this micro-controller was relatively inexpensive for all of its functionality. The EL sequencers were bought on sparkfun.com for $24.95 a piece. Figure 10. EL Sequencer To program the EL sequencer, Arduino was used. This was because the board uses the Atmega328 chip which can be easily controlled using Arduino language. To program the EL sequencer, an FDTI cable was used to connect the EL sequencer to the computer's USB port. Once this was done, the appropriate FDTI cable drivers, and Arduino software was installed. Then coding begins. First the pins needed to be defined and named so that coding the program to blink on and off would be easier. However this process took longer than normal because all of the websites that contained the EL sequencer datasheets were faulty. This was because the sequencer purchased was the latest version, however the datasheets were of the original EL sequencer which is a couple of years old. To fix the problem, all of the analog to digital converter pins, as well as all of the EL wire input pins were defined in the code. They were then tested by inputing VCC power from the EL sequencer to the analog inputs and checking the serial monitor for a signal. Although this process was long and tedious, an accurate result of data pins were attained. After attaining the correct data pins, the code was written so that each EL wire (one by one) turned on for two seconds, and then turned off. This was done as an extra test to make sure that the EL pins work as well as the functionality between the EL wires, the EL sequencers and the EL drivers. First the EL driver had to be connected to the board as well. Since the driver purchased was not fabricated to work with the EL Sequencer, some adjustments had to be made. The wires connecting the driver had to be cut and resoldered into jumper wires with JST connections so that the drivers could be inserted into the board. Also, since the EL Driver was battery operated, the battery had to be removed and soldered onto the EL sequencer in a similar manner to the EL driver re-soldering. Once this step was complete, the EL wires were placed into the EL pins. After switching the EL sequencer to BAT power, and the turning the driver on, the EL wires illuminated. The next step after getting the EL wires to light up was to control them according to an analog input. This is important because it would simplify the code as well as keep the PIC32 and the EL sequencer synchronized. To do this, Arduino code was written onto the EL sequencer that would read the analog input, and detect which input was on. Since the EL sequencer has eight EL wires, the best way to approach the analog inputs is to make them into binary numbers. This means that the ADC1 corresponds to 0001, and ADC2 is 0010, ADC3= 0100 and ADC4 =1000. Since there are only eight EL wires, only four analog inputs are enough (since 1000 is 8 in binary). To do this, the EL sequencer read the inputs, and then shifted them together into one number. This would simplify the code because it allows the code to compare one number. To compare the numbers, switch statements were used. In these switch statements, the code turns all the EL wires off except for the one being played. For example, if EL wire six was to be played, then the code would compare the signal to check that it corresponds to 0110, and then turn off all the wires except for wire six. In the code used, the EL wires were named A-H. The following is a part of the code: case 6: digitalWrite(A, LOW); digitalWrite(B, LOW); digitalWrite(C, LOW); 8 digitalWrite(D, LOW); long and 1'' wide. It has also got two mounting holes to digitalWrite(E, LOW); secure it to a casing. This board is particularly attractive since it is easy to program for fast prototyping. Unlike many traditional microcontrollers, the USB 32-Bit Whacker development board doesn't require a hardware programmer. Instead, the firmware can be quickly rewritten on the board using the USB bootloader. Each project can be developed in Microchip's MPLAB IDE which compiles code to PIC32 native object files with Microchip's MPLAB C Compiler. As each project is built, there must also be a procdefs linker file which tells the C32 linker not to write into the range of code needed to engage the bootloader at the powering up of the board. These firmware sections are essential so that the bootloader method can keep being used to quick updates to the board. If this code is overwritten, a hardware programmer can still make further edits to the onboard firmware. The PIC32MX795 development board is a great selection for the Theremillusion project. There are plenty of options for I/O needed to control lighting elements for the guide interface. The number of I/O ports also allows digitalWrite(f, HIGH); digitalWrite(G, LOW); digitalWrite(H, LOW); break; After coding this onto the EL sequencer and seeing that the PIC32 did infact accurately interface with the EL sequncer, the code for the EL sequncer was finished. III. FPR PROTOTYPE IMPLEMENTATION A. Choice of Microcontroller for Theremillusion The PIC32MX795 32-bit CPU from Microchip will be used to control the Theremillusion. More specifically, Sparkfun's USB 32-Bit Whacker PIC32MX795 Development Board is being used to prototype the Theremillusion. This board has 73 usable I/O pins along it's edges which allow for easy breadboard mounting to prototype quickly. The large amount of I/O gives plenty of headroom to control the lighting elements and offers room for expansion. The PIC32MX795F512L CPU runs at 80 MHz and is more capable than typical 8-bit or 16-bit hobbyist boards like the Arduino, an initial choice for prototyping. With respect to storage the board has for the possibility of many switches. These could be implemented as input for song selection or any other parameters as needed for the project. The USB port is a great expansion option since the project could later on be adapted to include a MIDI interface with a PC. Since a 512K Flash and 128K RAM. This allows work with large datasets such as FFT samples and I/O maps. This CPU is a MIPS based RISC core so it will be student friendly and there is a good source of documentation available for low level routines. The board offers many power options, one of which is power by miniUSB. This means that a separate power supply won't be needed when uploading and testing code while already connected to a PC. The board also features a 3.3V power regulator and a 5V power regulator which allows for a higher voltage (battery) input. The power source can be set easily through an onboard switch and is protected with a 500mA input fuse. External power can also be used and it is protected as well using an integrated diode. There are 5 LEDS on board; one is for power, and the other four are programmable. These can provide debugging at the stages where the USB cable and programming overhead is undesirable. There are three hardware push buttons; one reset and two programmable. Another advantage to using this board is it's small form factor. The board is very thin at 0.28'' high as well as 4.4'' major component of the project is realtime frequency Figure 11. PIC32MX795 analysis, the PIC32MX795's high execution speed of 80 MIPS will be taken advantage of as well. Finally, the PIC32 also brings more memory to the table compared to the earlier PIC16 models so there will be 512K of flash to 9 work with our large datasets without the worry of slow external memory access. Prototype for Theremin: After constructing the Theremin kit by using the knowledge gained from designing our own Theremin, the Arduino software is used to obtain frequencies and output the continuous mode and discret mode. To run the continuous mode, the output from the Theremin is connected directly to the amplifier. On the other hand, to run the Discrete mode, the Arduino code reads the input frequencies, groups them together and outputs discrete values. These different discrete notes will be delineated by a programming aspect that will organize the different sounds from the theremin into notes based off of a main chromatic western scale. This programming aspect from the discrete mode will be integrated with the glowing wires programming and expanded on. These distinct notes will create the Discrete playing mode of our project. As mentioned before, the glowing wires will now be implemented using electroluminescent wires. The next steps to implement these EL wires in the Theremillusion is to successfully build a power inverter. This is so that the EL can be powered by the PIC32 micro-controller. IV. PROJECT MANAGEMENT V. SUMMARY AND CONCLUSIONS The project was divided into two major subsystems. The first subsystem was the construction of the Theremin and the second half was integrating a teaching mode along with a visual interface. Each member chose to work on components of the project that interested them. Two members of our team were responsible for Throughout this semester, we have successfully designed and built the different modules of the theremin including the pitch reference oscillator, the pitch variable oscillators, the mixer, the volume variable oscillator, and the volume reference oscillator - voltage controlled amplifier. We have also successfully implemented the PIC32 micro-controller as well the fiber optics with the LEDs. Through experimentation and reseach , the design has now changed to using electroluminescent wires to make the project more efficient, cost effective, and appealing. We will be integrating the different modules of the theremin so that by implementing all these parts together will create a functional Theremillusion. building the Theremin. Sandy and Snigdha worked on this component and also did all the programing for the discrete mode. The remaining two members, Imen and Steven, worked on creating a user friendly Visual interface for assisting the player and programming for this teaching mode respectively. The group worked together in integrating these components. The pitch circuitry is designed so that when the player brings his hand closer to the antenna, the pitch rises and when the player moves his hand away from it, the pitch falls. Similarly the volume circuitry is built so that the volume changes according to the position of the player’s hand to the antenna. Glowing and side emitting fiber optics are used in order to assist the player to play the right notes. The programming is written so that the user can pick a song of their choice and also get their score on the number of right notes being hit. This feedback will serve as a guidance to better improve their score in the future. VI. REFERENCES "Bildr » Getting Started with Your SparkFun EL Sequencer." Bildr. Web. 23 Jan. 2012. <http://bildr.org/2011/06/el-sequencer/>. Dawson, C. "Theremin: A Weird Music Machine." Electronics Australia 44.6 (1982): 86-91. Holloway, Barry. “Theremin.” 2011. <http://www.strangeapparatus.com/ Theremin.html>. (11/29/11). a. Outlook on Next Steps: Our next steps would be to make the oscillators more stable, work on troubleshooting of the different components and integrating the parts together so that they are not only functional modules but a complete working theremin. After this is accomplished we will start working on the Discrete Playing Mode. In this mode, the user will be able to play the instrument without having a continuous sweep of music when they go from one note to the other . "Home | Product Categories | EL | COM-09203." EL Sequencer. Web. 04 Jan. 2012. <http://www.sparkfun.com/products/9203>. "MAKE | Programming EL Wire Fashion." MAKE. Web. 24 Feb. 2012. <http://blog.makezine.com/2010/04/27/programming-elwire-fashion/>. NeonString EL Wire Electroluminescent Wire and Drivers. Web. 1 Dec. 2011. 10 <http://www.neonstring.com/index.php? tasket=solder>. Oddmusic. “The Theremin: What is a Theremin?” 2007. <http://www.oddmusic.com/theremin/ what_is_a_theremin.html>. (11/27/11). Skeldon, K. D., et al. "Physics of the Theremin." American Journal of Physics 66.11 (1998): 94555. "12V to 120V Inverter." Aaron's Homepage. Web. 01 Dec. 2011. <http://www.aaroncake.net/circuits/ inverter.asp>. APPENDIX A. Application of Mathematics, Science and Engineering The areas of math, science, and engineering that apply to our project are computer systems engineering, hardware organization, data structures and algorithms, circuit analysis, electronics, signal analysis and signal theory. Our project involves a significant programming portion which will be written using the C programming language. Programming practice and theory has been covered extensively through the undergraduate ECE track through the following courses: ECE 122, ECE 242, ECE 353, ECE 354 and ECE 373. Our project will be using a microcontroller from the PIC32 MCU family. Microcontrollers have been thoroughly explored in ECE 353 and ECE354 and we used that knowledge to choose an appropriate chip for the job. Theremin construction and engineering is no small task and this is where the electrical engineering and circuit understanding comes into play. Circuit analysis techniques like those learned in ECE 211 and ECE 212 are essential to analyze our schematics and the parts available to us. The design skills from ECE 323 and ECE 324 have also proven very necessary to understand how to design an analog circuit from a high level and bring it down to a low level implementation. B. Design and Performance of Experiments, Data Analysis and Interpretation 11 C. Design of System, Component or Process to Meet Desired Needs within Realistic Constraints The system requirements of our design are such that our device should be capable of providing anyone with an intuitive guide to theremin playing. A prospective player should be able to approach our theremin, easily calibrate it and then produce music when the provided visual cues from the illuminated fibers are followed. The underpinnings of the system should be transparent to the user. The system must have the capacity to respond to the capacitance of any individual who would like to participate. The system should also be transparent with respect to any delays associated with performing frequency analysis. Hardware delays should not be perceived by the user. Our design must also be safe. Working with proximity sensors is a nonhazardous way to achieve an invisible magic element. There is no radiation. Socially, our design preserves privacy with volume control so minimize disturbance in whatever environment the system may be used in. As the implementation of the project progressed, the decision to abandon the fiber optics for the visual interface was made. This was due to the fiber optics loosing brightness as the length of the fiber was increased. This is because the Fibers are not closed at the end, and therefore the light is not reflected back into the fiber. For this reason, electroluminescent wire was chosen as an alternative. Electroluminescent wire (EL wire) is a thin copper wire that is coated with phosphor.This wire glows when an alternating current is applied. EL wire produces a 360 degree unbroken line of visible light. It is also very thin and flexible which is very ideal for this project as it would allow more precision as to the location of the notes on the Theremin. The EL wires need 120 volts of alternating current (VAC) in order to glow. The PIC32 however only emits power of 3 volts of direct current (VDC). For this reason a power inverter or driver had to be acquired. At first, the idea of building a 12VDC – 120VAC driver seemed like a good idea. The plan was to get a transformer from a microwave, and then rewire it and connect it to a circuit board to create the driver. After acquiring a microwave transformer by carefully taking apart a microwave, it was discovered that the transformer was disfunctional. Due to lack of other resources with transformers and time, it was decided to purchase a driver. This would ensure that the EL wires would be powered correctly and remove any hazards of the team getting electrocuted. D. Multi-disciplinary Team Functions Imen Ben-Neticha, EE: – Visual elements and EL Wire circuitry – Discrete Circuitry Sandra Jenkins, EE: – Pitch Circuitry – Discrete Circuitry Snigdha Jonna, EE: – Volume Circuitry – Discrete Circuitry Steven Bennett, CSE: – PIC32 Microcontroller Programming E. Identification, Formulation Engineering Problems and Solution of To program the EL sequencer, Arduino was used. This was because the board uses the Atmega328 chip which can be easily controlled using Arduino language. To program the EL sequencer, an FDTI cable was used to connect the EL sequencer to the computer's USB port. 12 Once this was done, the appropriate FDTI cable drivers, and Arduino software was installed. Then coding begins. First the pins needed to be defined and named so that coding the program to blink on and off would be easier. However this process took longer than normal because all of the websites that contained the EL sequencer datasheets were faulty. This was because the sequencer purchased was the latest version, however the datasheets were of the original EL sequencer which is a couple of years old. To fix the problem, all of the analog to digital converter pins, as well as all of the EL wire input pins were defined in the code. They were then tested by inputing VCC power from the EL sequencer to the analog inputs and checking the serial monitor for a signal. Although this process was long and tedious, an accurate result of data pins were attained. After attaining the correct data pins, the code was written so that each EL wire (one by one) turned on for two seconds, and then turned off. This was done as an extra test to make sure that the EL pins work as well as the functionality between the EL wires, the EL sequencers and the EL drivers. First the EL driver had to be connected to the board as well. Since the driver purchased was not fabricated to work with the EL Sequencer, some adjustments had to be made. The wires connecting the driver had to be cut and resoldered into jumper wires with JST connections so that the drivers could be inserted into the board. Also, since the EL Driver was battery operated, the battery had to be removed and soldered onto the EL sequencer in a similar manner to the EL driver re-soldering. Once this step was complete, the EL wires were placed into the EL pins. After switching the EL sequencer to BAT power, and the turning the driver on, the EL wires illuminated. F. Understanding responsibility of professional and ethical One of our professional responsibilities as electrical engineers in accordance with IEEE is to treat fairly all persons regardless of such factors as race, religion, gender, disability, age, or national origin. This idea of ensuring any human gets equal treatment from our product is one of the central tenants not only in the design of our Theremillusion, but is also one of the fundamental ideas in the construction of the original Theremin. The Theremin was designed to be a simple classical instrument to be played by all (http://www.pavekmuseum.org/theremin/index.html). Our design is one that keeps this thought of universality in mind. We are aiming to make the Theremin easier to play for all people. Our Theremin will offer tuning so each person customize the tune to both their own unique capacitance and to their liking. G. Team Communication Our team is close and we love each other very much. We maintain a schedule of weekly meetings each Monday to communicate with our Advisor about the status of our project. We also meet later in the week to catch up on any group critical topics that we're unable to cover adequately through our regular email discussions. These regular email discussions are where we share work or notify the group about how our individual work is going . Our group maintains a working set of documents on our shared workstation computer in the SDP lab. We also utilize a “dropbox” (http://www.dropbox.com/) we can each access from our SDP workstation computer as well as our personal computers. The dropbox is a synchronized shared folder dedicated to managing up to date copies of our project files. These project files can include our reports, presentation slides, research, code, website data and media. Finally, we also keep in contact through phone messages to coordinate meetings or exchange information that may break the usual established routines. We are all able to be reached by each other to help, give advice, share ideas and organize meetings. H. Understanding of the impact of engineering solutions in a global, economic, environmental and societal context Our group has gotten in contact with Professor Karpinski of the university music department to discuss our project. Our meeting gave us a more broad view of our project's implications with this additional musican's perspective. Professor Karpinski communicated to us many ideas from a music professional's standpoint. We left with a better understanding of why the Theremin is unpopular, yet fascinating as an instrument. He also recommended several techniques of how to tune a unique instrument like the Theremin. Lastly, he left us with some resources to explore such as the list of books and websites 13 to help us build on the musical foundation of the product . The Theremin is traditionally a very difficult instrument to not only build but to play as well. We can see now that our design is one that would be appreciated by music students, hobbyists and laypersons alike. I. Application coursework of material acquired outside of Theremillusion applies material from many sources including those outside our traditional engineering coursework. We have held a meeting with one of the music professors who took an interest in our project. He enlightened us with many ideas of how malleable the frequency to musical note scale is. He proposed the ideas of equal temperament (http://en.wikipedia.org/wiki/Equal_temperament) which would make our Theremin scale it's notes logarithmically with respect to frequency. In addition to this help we've received from the university music department, we've also gotten project help from the PIC32 development community. Brian Schmalz's UBW32 website (http://www.schmalzhaus.com/UBW32/) in particular has many applications of the PIC32 Development board we're using. We've been able to use a lot of the framework code provided on the website through it's tutorials. This made quickly rolling out a prototype possible and also helped in the understanding of how to program the PIC32 MCU family. J. Knowledge of Contemporary Issues Music is a part of human culture. It can be easy for people today to be so caught up in their work they may feel they don't have the time needed to invest in learning an instrument. That is in itself a great loss. Our project aims to make this plunge into the world of music an easier one. By reducing the learning curve to playing the Theremin, we hope to aid in the understanding of music. This simple, intuitive teaching interface will let anyone play the instrument. Over time players will not only learn some songs, but also learn an appreciation for music which could otherwise be left undeveloped. K. Use of modern engineering techniques and tools 1) Eclipse is a multi-language expandable integrated development environment and has proven invaluable for its aid in quickly rolling out C projects. 2) Microchip MPLab, is the development suite for coding, debugging and simulating PIC code. 3) MPLAB C32, compiles C code to native PIC32 machine code. 4) PSPICE, an analog circuit and digital logic simulation software. 5) Circuits analysis and design as learned from our core ECE courses. This includes the trouble shooting of breadboards. 6) Arduino, an open-source electronics prototyping platform based on flexible, easy-touse hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.