Arduino Theremin With Variable Pitch and Volume
Intro: Arduino Theremin With Variable Pitch and Volume
Hello!
My intention was to build an easy and cheap theremin, using the arduino. I've already finished a classic variant (the model 144; www.theremin.us/144/144.htm; https://www.youtube.com/watch?v=DhvwaoKn7CY&t=4s) but now I wanted something cheaper.
The theremin was invented by Leon Theremin in 1919. Classically a theremin consists if two oscillating circuits, one fixed and one variable. The variation is achieved by moving the hand in front of an antenna. When those two slightly different oscillations are being mixed you get beats. The frequency of those beats is the difference between the frequencies of the two oscillations. This signal can be heard.
STEP 1: Parts You'll Need and Circuit
In my case I determine the distances of the hands with the ultra-sonic distance-sensor HC-SR04. You will also Need a digital potentiometer MCP41010, of course an arduino nano or similar, an audio-ic LM386 and some other small electronic parts (resistors, capacitors...). With the 470 kOhm-potentiometer you can adjust the maximum volume.
STEP 2: Sketch & Settings
The sketch is very simple. You just have to initialize the two distance-sensors, measure the two distances and convert them into the pitch and volume of the Signal. A small subroutine is responsible vor the Variation of the digital potentiometer.
There are two Options concerning the dependence of the pitch and volume from the distance of your hand to the sensor. You can either use a linear or an 1/distance-dependency. I've Chosen a linear-dependency for the volume and a 1/distance-dependency for the pitch.
STEP 3: Results
The whole circuit can be placed on a small wooden board. Intead of the HC-SR04 you can also try the sharp distance-sensor GP2Y0A41SK0F, which can measure distances between 4 - 30 cm.
I hope you liked this and maybe you want to take a look at my YouTube-channel: www.youtube.com/user/stopperl16/Videos
more physics projects: https://stoppi-homemade-physics.de/
7 Comments
Frettje 5 years ago
I had to go with an MCP4151 instead of an MCP41010 and my volume doesn't change when moving in front of the volume distance sensor, I know the sensor is fine since I can get the values from the serial write on the adruino. Does someone know what might be wrong?
Thanks in advance
Frettje 5 years ago
Nevermind, fixed it by using an MCP41010.
JohnV175 6 years ago
JohnV175 6 years ago
philserpa 6 years ago
Hey! Your theremin is amazing. I have some doubts: 1) in the diagram, the rectangles are resistors? 2) What would be the voltage used to operate? thanks for listening. Phil.
stoppi71 6 years ago
Hi!
Yes, they are resistors or potentiometers. I use a 7.4V Lipo accu for powering the circuit. Good luck, Christoph
Swansong 7 years ago
This is fun! :)