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:
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).
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).