The action of this Theremin is based on a measurement of capacity. Moving the palm in one coordinate, you can change the frequency, and moving in the other - the volume. Anything that uses other physical principles can be called "thereminvoxes" only in quotation marks. But these are also interesting EMPs. So, in the seventies and eighties, some authors experimented with designs consisting of a photodiode and a multivibrator that allow you to adjust the frequency by blocking the light from the lamp located on top, and the volume - changing the pressure on the touch contacts. Well, nowadays, the author of Instructables under the nickname dhawan.sunidhi10 made a "theremin", which determines the distance using an ultrasonic range finder. They play it by moving a large plate (frequency) and rotating the handle of a variable resistor (volume). Raising the plate so that it is outside the "field of view" of the range finder, you can get pauses between the notes.
The device diagram is shown below:
The method of adjusting the volume is applied not the most energy-efficient, but the simplest - using a variable resistor connected in series with the dynamic head. With a 16-ohm head and a 10-kilo-ohm variable resistor, the volume control range is wide, up to a very quiet, almost inaudible sound. Firmware to repeat homemade can take here. She uses the Ultrasonic and toneAC libraries. Previously, the master instead of the first of them experimented with the NewPing library, but with it it was not possible to obtain the required range of distances - up to 1.2 m, in addition, when the plate was lifted, the sound did not stop, but remained at the same frequency. After changing the library, I had to redo the program, since NewPing gives the program a delay in microseconds, and Ultrasonic sends the distance in centimeters immediately calculated on it. The formula for converting the distance to frequency in the program is selected so that the range of the EMP is close to one and a half octaves. The master puts the assembled and debugged musical instrument into the body:
The speaker with a dynamic head is external, also home-made, it is shown on the KDPV.The following is a video where the wizard plays the instrument:
In order to make the device more similar to theremin without quotes, you can redo the code, scheme and design of the instrument so that there are two ultrasonic range finders located at right angles to each other. Then it will be possible to adjust the frequency by moving the palm along one coordinate, and the volume by moving it along the other. In this case, you have to apply PWM to get sounds of different volumes.