# single-capacitor oscillator choice for digital theremin

Posted: 3/24/2017 3:01:07 AM

Joined: 8/25/2016

Intro

One of the pupils puzzled me with a question of building a theremin- a basic musical instrument which has a pitch manipulated by moving the hand around the vertical antenna.

Due to specifics of our course (and skills of our pupils) I proposed to create a digital solution, like this:

• we have an oscillator with antenna attached to one of its capacitors
• the oscillations are fed to counter input of arduino, which generates sound from the preprogrammed waveform, with the frequency depending on the values from the counter

Well, the part with arduino works right now. We also have tested ultrasonic distance sensor (instead of antenna+oscillator), but it is not very handy.

Oscillator - what I'm trying

But what oscillator to use? The simplest thing I've taught my pupils is the 555-based generator, so I've tried to plug one with a very small capacitor first - like this:

Here `C = 5pF R1 = 400k R2 = 1k`, the output from 3 goes directly to arduino counter input.

This works, giving the frequency of about 200 kHz (decreasing by about 3% when hand is about 1 cm from antenna). It should be higher (judging by `R1*C`, though there is also capacitance of antenna) and I want it be higher (for more accurate count) - however I could not increase it by changing R1. With 100k it is only about 250 kHz. With 21k it is only marginally higher and seemingly stops to react to waving around antenna.

This is puzzling. I think I'm either doing something wrong, or can't get more frequency due to some limitation of the chip (probably it may work better at higher VCC).

The question

So I'm seeking for either advice to improve this design, or suggestion of some transistor based oscillator. The most familiar thing is a symmetric multivibrator, but I'd rather prefer something with a frequency depending on a single capacitor (either in LC or RC setup).

Posted: 3/24/2017 7:06:45 AM

From: Theremin Motherland

Joined: 3/16/2017

AFAIK, RC oscillators are only used in simple theremin-like toys.

The problem is their low sensitivity on higher hand distances. It will work fine at 30 and probably 50 cm from antenna.

But try to measure its characteristics with hand movement in range 70-90 cm from antenna.

Generator suitable for theremin should produce stable frequency (0.1 or even 0.01Hz) when hand is not moving and you must see when measuring its output frequency.

Measuring of generator output must be very precise. You need to detect at least about 10000 distinct values between generator min and max freq position. Measuring range 200KHz..206KHz with 0.1Hz precision is a bit difficult. Therefore heterodins are being used to move frequencies down.

It will give you frequency output in range of a few kilohertz which is more easy to measure with MCU

Experiment: check that you can measure distinct frequencies when hand moves at distance 80cm from antenna.

Measured values should not jump in wide range.

As well if you have possibility to generate fixed frequency in 150..300 KHz range by MCU (Arduino), you can replace second NE555 with this frequency output.

Hints: try using separate voltage regulator for generator power supply, and don't forget 0.1uF capacitor between Vcc and Vss. The same for 74HC86. Use hardware timer to measure frequency (does Arduino have such ability?).

I believe you will not get good enough results with RC generator. In this case, look at LC generators.

E.g. on unbuffered hex invertor CD4069UBE or HEF4069UB

It may be simplified. R1 - removed, R3, R5 - replaced with wires. C1 removed - but then you will need to decrease C2 value. Result: one CD4069UBE, one inductor (use big one with resistance < 5 Ohm), three capacitors. Something like this:

I'm working on my own digital theremin project, and experimenting with different types of generators and mixers. But I'm using Teensy 3.6 instead of Arduino. It's 180Mhz ARM processor with floating point support. Uses Arduino IDE for programming. I believe it fits ideally for digital theremin project.