Arduino Theremin With Variable Pitch and Volume

21K7610

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

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

Nevermind, fixed it by using an MCP41010.

In your circuit diagram you've got the 4 caps, 100nf, 50nf, 220uf, and 10uf. In the photo I see a 33nJ100, a u1k63, the blue 220uf and a black 10uf. My question is: is the 33nJ100 you have in the photo in the place of the 50nf in the diagram, and what voltage are we looking for on the 220uf? The same? I'm thinking 16V, but I'd like confirmation. Thanks!
never mind about the voltage... doh. Can be anything higher than the power source I get that now.

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.

Hi!

Yes, they are resistors or potentiometers. I use a 7.4V Lipo accu for powering the circuit. Good luck, Christoph