Theremin Coding

The code behind our project is fairly simple. Based on the voltage received from the distance sensor, we adjust the pitch of the buzzer. This allows one to move their hand up and down above the sensor and play ‘notes’.

The sensor uses sudden bursts of current, and this generates noise in the input voltage to the board. However, using a “simulated capacitor” in the code, we’re able to filter the noise out! Here’s the single line of code that does this:

filteredVoltage += ( inputVoltage – filteredVoltage )*0.02;

The filteredVoltage is the voltage we output to the buzzer. The way this works is that the filtered voltage is ramped up (like a capacitor) to the input voltage. Small spikes in the input voltage do not affect the output because of this.

Schematics Schmematics!











If you notice something familiar about our setup, its because we are using a similar schematic from lab 4! Currently our sound output is basically using the same buzzer output from the A3BU only with an infrared distance sensor (pictured below) controlling what sort of pitch is coming out!

Infrared distance sensor

It may be a little hard to see, but we have included several capacitors in our design in order to stabilize current and voltage being fed to the device!



Schematic 1






The Sound of Music

In our project we are creating a makeshift Thereman device, which sounds like vid related >>>

We decided to create one of these because we knew we wanted to work with input modulation and sound, so naturally we thought of the crazy electronic sounds of the Theremen device!

Input modulation is very interesting to us because of how much you can do with it; your imagination is the only thing that limits you. Our association with music in our project is a byproduct of our collective backgrounds with it since we all know how to play a musical instrument!

a bunch of jackasses


Here we are troubleshooting our Theremin project! Currently at the time of this post we are having the most problems with sound clarity and getting a sweet spot for our voltage running through the circuit! Further information is in the pipes!