A Theremin is a wonderful musical instrument that makes funny sounds.

Invented by Lev Theremin around 1920 it could be easily recreated with modern makers kit and it gives you happy times experimenting with sound generation.

This version of Arduino Theremin works with 2 sensors:

HC-SR04 that reads the distance of a flat surface moved by the player, it controls frequency, and 1 LDR photoresistor which reads the amount of light and drives the volume of the emitted sound.

The farther the flat surface is from the sensor, the higher the sound emitted in frequency is.

A group of 7 leds displays the distance of the flat surface from the sensor (because leds are always nice).

A potentiometer let the player choose between 5 different algorithms to generate the sound.

The speaker used is a 5 ohm speaker grabbed from a small broken radio, you could made it with a buzzer but the sounds is worst.

A switch lets turn the whole instrument on and off.

To improve performances each sensor is read multiple times and averaged.

During the setup a small sequence of calibration is performed to detect maximum and minimum amount of light (Min with the ambient light,  and Max with a torch that lighten up the LDR).

After developing it on breadboard, components are assembled together and transferred inside a wooden case built with the help of a laser-cutting machine.

The USB cable still keeps data pins and power is sent to the micro USB plug of Arduino so I can upload different sound algorithms without open the case.

The wooden case has been colored with black spray paint.

The full code (that uses volume.h library to control volume) is available here:

https://github.com/giuliopons/Theremin-Arduino

After assembly the circuit in the box I had to wait for the knob... From China...

And finally the knob for the pot has arrived, so I can say that the project is completed.