<!--
title: Theremin
date: 2013-07-01
-->
A [Theremin](https://en.wikipedia.org/wiki/Theremin) is a rather old electronic music instrument, invented in 1928. It is played by approaching hands to two antennas, without touching them. One antenna is used to manipulate the frequeny of the tone, the other one to manipulate the volume.

![](foto-am-30-06-13-um-20-021.jpg)

This is just another Theremin. Only basic structure of the circuit was taken from many other published Theremin circuits.

![](scan_005006-1024x654.jpg)

Completely new (or at least not found during my Theremin googling) is the digital zero-calibration.

The both left-hand-side oscillators together with the mixer+filter block provide the signal to control the volume, the right-hand-side oscillators and mixer+filter block provide the signal to control the frequency.

Each of these both couples consists of two oscillators and a mixer+filter block. Both oscillators have to swing on exactly the same frequency, in this case of about 1.3MHz. While the exact frequency does not matter, it is significant that both oscillators have the same frequency. The signals of both oscillators will be mixed, which means, multiplied.

$$\sin(\omega_0 t) sin(\omega t)$$

Here $\omega$ is the frequncy of one of the oscillators while $\omega_0$ is the frequency of the other one.

This term can be modified using the addition rule for trigonometric functions into

$$\frac{\cos((\omega_0-\omega)t)-\cos((\omega_0+\omega)t)}{2}$$

Due to this transformation, two signals, one with the sum and one with the difference of both input signal frequencies, are accumulated.
When both frequencies are exactly the same, one part of the sum appears as a DC offset, while the other part is the doubled frequency.
If one oscillator is de-tuned by only a few Hz'`s, one part are this few Hz'`s (a very low, hearable frequency) and the other part is still (roughly) the doubled frequency (a high frequency). The high frequency part can now be suppressed using a lowpass-filter.
Multiplication of two signals can be done using an analog four quadrant multiplier, like the AD633. So, this is the schematic of the mixer+filter block:

![](scan_005006_5-1024x717.jpg)

The output signal of this block is the difference of the detuning of the one oscillator.

Detuning of the oscillator will be achieved by approaching the hand to the antenna of the oscillator.

![](scan_005006_3.jpg)

The antenna acts as a kind of a capacitive sensor and by approaching the hand a very small amount of capacity is added into the LC resonator.

The other oscillator is a fix-frequency oscillator which can be tuned to swing on the same frequency as the first oscillator in a not detuned state.

![](scan_005006_4.jpg)

This tuning is achieved by biasing the two varactor diodes.

Here is automated tuning circuit steps in:

![](scan_005006_6.jpg)

The low-frequency output signal of the mixer+filter block is provided through a 2-to-1 multiplexer (the four NAND-gates) into a microcontroller. The microcontroller measures the frequency and as long as it is above a frequency $\epsilon$ of say 10Hz, the bias voltage $U_{tune}$ is increased.

These both oscillators with mixer+filter and one channel of the zero-calibration appear twice in the whole circuit, one for frequency manipulation and one for volume manipulation.

The low-frequency, hearable, signal and the volume-control signal are brought together in the volume-control circuit

![](scan_005006_2-1024x553.jpg)

Here, the low-frequency signal $U_{Lf1}$ is passed through a high-pass filter. The high-pass filter is calculated that way that the whole detunable frequency range comes onto the ramp of the filter. So, the not detuned output signal of the mixer+filter is a DC signal, which is suppressed completely by the high-pass filter (beginning of the ramp) and the maximum detuned output signal of about 2kHz matched roughly to the end of the ramp. This filtered signal is rectified and only the negative half-wave of the signal passes the diode. This half-wave signal is sieved by the larger capacitor to get a DC signal between 0 and the maximum amplitude which passed the fiter. This negative DC signal is fed into the FET, which is configured as a voltage controlled resistor. This voltage controlled resistor and the fix resistor (5k6) are building a voltage controlled voltage divider. The hearable frequency signal $U_{Lf2}$ is fed into this voltage divider  and passed to an amplifier.

The output signal of this block in turn is the volume-controlled and frequency-controlled signal which is the output signal of this Theremin. It is passed into a power-amplifier and into a speaker - done.

[Calibrating the Theremin](https://www.youtube.com/watch?v=5US8LY_FbQ4&amp;w=420&amp;h=315)

[Playing the Theremin](https://www.youtube.com/watch?v=lDld71HI66o&amp;w=420&amp;h=315)

