Let's Design and Build a (mostly) Digital Theremin!

Posted: 12/13/2020 7:40:31 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Once In A Very Blue Moon

Practicing some bespoke aerial fingering, mostly open and closed hand moves, not the micro-tonal individual pinky joint stuff the pros do.  Using "Blue Moon" because it's a simple tune that has a lot of repeated moves.  [MP3].  Starting with a closed fist is a simple way to get back to some notes.  I'm used to moving my whole arm around though, so holding it really still so the return can happen with just my hand and without being too far off pitch is a challenge.

I'm also trying to shape the volume a little more.  Better players seem to form most or even all of their notes, even if you can't really hear it.  A bit of volume ducking can really hide pitch mistakes.  But all of this is distracting enough to throw my already poor pitch off.  The right way to do it is to play slow enough to get everything right, with speed coming later - I'm too impatient.

Have yourselves a merry little xmas! [MP3].  The lyrics have an interesting backstory:

  https://en.wikipedia.org/wiki/Have_Yourself_a_Merry_Little_Christmas

The song is alternately big jumps and key steps - with no accidentals, which is kinda weird for an older song (the D-Lev tuner reveals not only on-pitch, but overall melodic structure as well, so I'm incidentally learning a lot about patterns in music).

Posted: 12/14/2020 11:14:14 AM
pitts8rh

From: Minnesota USA

Joined: 11/27/2015

"I'm also trying to shape the volume a little more.  Better players seem to form most or even all of their notes, even if you can't really hear it." -Dewster

Curiously I still think of volume envelopes on the theremin in terms of how they appear visually on a midi controller track.  It's not really conscious anymore but I think that's probably where I learned that dips between many transitions are extremely shallow (and fast).

"But all of this is distracting enough to throw my already poor pitch off."

Many, many years ago I read a book on the subject of downhill skiing that referred to the "inner skier", and I have seen this term mentioned for other learned skills to denote a point at which there is some sort of awakening at which the light bulb turns on and the student starts to experience a deeper, more unconscious level of connection. This is an abstract concept, difficult to convey in words until you experience it yourself at whatever skill you are trying to learn.  When that happens the old lessons and tips come back to you and seem to take on new meaning and new clarity.  I think it's more commonly thought of as getting an intuitive feel for whatever you are doing. Anyone who can type on a keyboard with more than two fingers has experienced this, probably without ever recognizing the point at which the skill transitioned from conscious to unconscious. While I've tried a lot of things without reaching any notable skill level in any particular thing, I've been close enough when playing guitar, flying, and skiing to know that this exists.

More specifically to music, guitarist Leo Kottke (no secret that I have been a lifelong fan) once described how he "sort of throws his fingers at the frets" (to paraphrase).  This is of course meaningless to a beginner struggling to hold difficult fingerings while learning to play a piece section-by-section.  But at some point muscle memory begins to rule and the continuity of the music takes over in your head, and you find that an efficiency begins to develop; in this specific case the struggling fretting hand begins to apply forces only when necessary - "throwing" your fingers at the fingerboard.

The whole point as this applies to theremins is that soon your pitch and volume hands will be able to look across at each other and work together while letting your brain concentrate on the big picture stuff like the feel and phrasing of the music.  The reason that I love playing the theremin so much is because when that stage of learning is reached you can pretty much play whatever is in your head without having to go through as much of a conscious stage of learning efficient fingerings.  Of course it helps that you don't have to deal with chords (and it helps to play in solitude where no one can hear you)!


Posted: 12/14/2020 2:15:20 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"...dips between many transitions are extremely shallow (and fast)."  - pitts8rh

Yes, I see many good players quickly "stabbing" in and out at the volume loop between notes.  And to modulate this they just move their hand away some, making it a general thing easily done by the unconscious.  Traditional volume loop sense players have the advantage here, as the arm's stabbing muscles seem stronger and more coordinated, and gravity is working with rather than against the stab in motion.

"Many, many years ago I read a book on the subject of downhill skiing that referred to the "inner skier", and I have seen this term mentioned for other learned skills to denote a point at which there is some sort of awakening at which the light bulb turns on and the student starts to experience a deeper, more unconscious level of connection."

I watched a Kelly Joe Phelps (incredible guitarist / vocalist / composer) video once where he said (I'm paraphrasing heavily) that when he plays a song he tries to find a playing style and rhythm that fits (he tends to play songs in concert quite differently than on his CDs).  I'm no Kelly Joe, but when I pick up my guitar for a whole minute or so every other day, I find that I'm playing something somewhat new (to me) in terms of picking and rhythm, without really thinking about what my picking fingers are doing at all.  My spine just does whatever the hell it currently feels like doing, leaving me free to concentrate more on my left hand position and moves.  It's a strange feeling having that happen with not a lot of effort and zero pre-planing.  Touch typing is the similar, I'm thinking letters (and even words) rather than what to do with my fingers (parents: force your children - at gunpoint if necessary - to learn touch-typing as young as possible).

Also saw Dudley Moore (RIP) in a TV show or documentary a while back, where he said transposing the key of a song on his piano was an entirely unconscious thing.

Posted: 12/14/2020 4:43:50 PM
pitts8rh

From: Minnesota USA

Joined: 11/27/2015

"I'm no Kelly Joe, but when I pick up my guitar for a whole minute or so every other day..." -Dewster

Your dedication overwhelms me - the closest I have been to my guitars in 3 (or more) years has been to add water to the closet humidifier.  I cringe every time I think about what I've forgotten and don't have documented.

Posted: 12/14/2020 6:21:07 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Your dedication overwhelms me - the closest I have been to my guitars in 3 (or more) years has been to add water to the closet humidifier.  I cringe every time I think about what I've forgotten and don't have documented."  - pitts8rh

Keep a beater out on a guitar stand where you can't help but encounter it daily (mine is near the kitchen, where I often have a spare minute or two waiting on food to do its thing).  You'd be surprised how much you can retain by playing for a couple of minutes here and there.  Play whatever you like whenever you like for as long as you like, don't force yourself in any way to do anything you don't want to do.  I tend to play the same C D G over and over, but it keeps those twitchy spine nerves in the habit of firing.  IMO the real killer isn't playing too little, it's letting too much time pass not playing at all.  I didn't play for like a decade just because my guitars were safely in their cases in the other bedroom, and it took me a while to get back into the groove.  I don't play enough to develop any calluses, so a cheeser classical is my go-to axe.  Improvisation of nothing in particular is a lot of fun.

Posted: 12/17/2020 3:53:03 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Q - The Winged Serpent

In the most general sense, Q (quality factor) is the ratio of energy stored vs. energy lost. 

Inductors and capacitors store electrical energy.  Some of this energy is converted via non-ideal parasitic mechanisms into other forms of energy (heat, RF, etc.) which then escape.  Inductors and capacitors are AC devices, and when they are connected together in a closed circuit "tank", any stored energy will rather bizarrely alternately cycle from one to the other at a constant frequency (resonance).  This cycling will gradually decrease in amplitude and eventually cease altogether (for all practical purposes) due to parasitic energy loss. 

A good analogy here is a child on a swing: the swinging rate is fairly constant, and if energy isn't periodically added the amplitude will decrease to zero due to pivot friction, air resistance, etc.  So one way to determine the Q here is to get the kid swinging, then stop pushing and examine the amplitude of two successive swings.  The energy stored is proportional to the swing amplitude, so the energy lost is proportional to the difference in amplitude from one cycle to the next, and the Q is the ratio of these two quantities.

Continuing with the swing analogy, if we give the swing a properly timed push of constant energy each cycle, then the swinging will reach a certain constant amplitude - why?  Because there are more friction and air resistances losses associated with a larger amplitude cycle, and at equilibrium our push is exactly making up for that loss.  If we now try to abruptly stop the swinging child, we will probably get knocked over by the large amount of stored energy from all our pushing.  The Q of the swinging child is equal to this stored energy divided by the energy of one push.

Similarly, if we examine a "ringing down" LC tank, the energy stored is proportional to the amplitude or voltage of the oscillations.  So Q can be calculated by dividing the peak-to-peak voltage (Vpp) of one cycle by the difference in peak-to-peak voltage of the next cycle.  If we do some fancy math, we find that the Q is equal to the the number of cycles it takes for the amplitude to reach 1/2 of the starting amplitude, multiplied by pi/ln(2) (~4.53).

And if we stimulate an LC tank by "pushing" it with a sine wave at the resonant frequency, the amplitude of the oscillations will reach a constant level which is directly dependent on the energy in the stimulus and the parasitic energy losses of the tank.  Again, at equilibrium the energy of the stimulus equals the energy of the loss.  The energy of both the stimulus and the energy stored in the tank is proportional to voltage, so the Q is the ratio of the tank oscillation amplitude voltage to the stimulus voltage oscillation amplitude voltage.  So, for example, if the stimulus is 1Vpp and the tank amplitude is 100Vpp, then Q = 100Vpp / 1Vpp = 100.

Here is another way to view the LC tank: If we place the stimulus, inductor, and capacitor all in a loop, then the voltage across the capacitor will give us the second order low pass response of the stimulus.  If the Q is high there will be a large peak in the response just as the low pass roll-off kicks in.  If the stimulus (at resonance) is a square wave rather than sinusoidal, then the fundamental harmonic will be doing all the work, and the amplitude of this harmonic is 4/pi (~1.27) the peak-to-peak amplitude of the square wave.  So if we wish to employ square waves to stimulate our LC tank, the tank voltage swing (at resonance) will be:

  LC Vpp = square Vpp * Q * 4/pi

or about 27% higher than for sine stimulation.  Working backwards to Q:

  Q = LC Vpp / (square Vpp * 4/pi)

Square stimulation (at resonance) of a high Q LC low pass filter gives a fairly pure sine wave as output because the fundamental harmonic is strongly accentuated and the higher harmonics are strongly attenuated.  This is desirable because square waves are easy to generate digitally.

============

If we're interested in measuring the Q of our Thremin coil and antenna, which method should we use?  I think the ring-down method is probably the easiest, as it can be implemented with a scope and square wave generator running at some arbitrary low frequency, with the square wave used as scope trigger source, and the scope probe positioned somewhat near the antenna:

Not shown is the grounding here, make sure the generator and scope are earth grounded!  And the coil and antenna should be positioned somewhat away from conducting objects.

Here is an example of what you might see on the scope:

The blue trace is the low frequency square wave stimulus, the red trace is from the probe placed somewhat near the antenna.  Counting the cycles to 1/2 amplitude, I see about 23.  Q = 23 * 4.53 = 104.   And this value of Q is very close to what I get when using the sine / square resonance stimulus voltage ratio method.

The impedance of the square wave generator should be somewhat lower than the DCR of the coil under test.  You can lower the drive impedance by driving the coil through a resistive divider to ground (which will also lower the amplitude of the excitation step).

If you employ a capacitive divider in order to measure real voltages for these experiments, make sure it is at least a couple of feet away from the antenna and connected to it via rather thin wire, otherwise it will be bathed in the intense electrostatic field and likely give erroneous results.

[EDIT] And of course I left out what is probably the least intuitive way to measure Q, which also uses filter type concepts.  Using the setup above, set the generator output for sine wave and increase the frequency until you hit LC resonance, which will give a huge peak-to-peak voltage on the scope.  Note the frequency (f0) and amplitude (a0).  Adjust the frequency down until the amplitude drops to a0 * 0.707 and note the frequency (f1).  Adjust the frequency up past resonance until the amplitude drops to a0 * 0.707 and note the frequency (f2).  (f2 - f1) is the absolute -3dB bandwidth, Q is the ratio of the resonance frequency to the bandwidth: Q = f0 / (f2 - f1).

[EDIT2] IMDb link: https://www.imdb.com/title/tt0084556/ (my least favorite of Larry Cohen's works).

Posted: 12/23/2020 4:06:22 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

~DIY ~High Z/V/F Theremin Probe

I've been repeatedly burned measuring antenna voltage swing.  The high electrostatic field near the antenna makes this difficult because everything conducting in the vicinity picks up the field, including any probe voltage dividers, leading to generally high erroneous readings.  Stick a low value capacitor or high value resistor near the antenna and the bulk impedance gets swamped by the leads whipping around in the external field. 

A 10x scope probe, with 10Meg ohms in parallel with 15pF or so, will load a Theremin antenna too much to show what's really going on (Roger dubbed this the "Theremin Uncertainty Principle" - the act of observation changes the experiment).  How about 10x this impedance?  100Meg in parallel with 1.5pF seems like a reasonable goal - anything considerably better is probably pushing it and asking for (more) trouble, anything considerably less probably isn't worth doing in the first place.

We could accomplish this by constructing a single RC voltage divider, 90meg in parallel with 1.666pF, and placing it in series with the scope probe.  Or we could string multiple RC elements together.  If we use the scope impedance as a basis, then nine instances of this in series with the probe would give us the equivalent, and would position the scope probe farther away from the antenna.  I soldered nine pairs of 10meg & 15pF in series and drove the result with my function generator, which can go to 2MHz.  DC gain was spot on at 1/10, but there was increasing attenuation with frequency which confused me, so I cut the interconnecting leads shorter and shorter, which helped but didn't completely fix it.  Adjusting the probe compensation capacitance did fix this, so it seems the series capacitors should be a bit larger, like maybe 18pF or so, to work with a nominal 15pF probe, which is at the end of it's compensation adjustment range with 15pF caps.  Rather than increase the capacitance of each node in my RC network, I dug through my motley assortment of cast-off scope probes (you would be amazed what gets thrown out, but then again if you ever lost a day of work due to a flaky scope probe you'd likely be tossing it too) and found one with sufficient adjustment range for my RC network.

Mounted everything including the old scope probe on a scrap piece of plastic drywall corner, with a bit of 14 gauge solid copper house wiring at the business end (see above).  Using a dedicated scope probe keeps me from having to calibrate it every time I want to use it.  It gives the same 200Vpp reading when sticking it directly on the D-Lev pitch plate as through an 18" alligator jumper, which is rather consistent with the drive (1.9Vpp square * 4/pi = 2.4Vpp) times the Q (approximately 100).  The discrepancy of ~40V here is difficult to rationalize, I think it's a combination of probe conduction and perhaps some phase error.  Then again, there's still a ton of stray C here, and it could be that my probe is just off by 20%, even though I calibrated with 20Vpp from my function generator.  You have to come at quantifiying this stuff from as many angles as you can to have any faith at all in the numbers produced.  I suppose if the antenna is ~10pF, adding 1.5pF could lower the swing almost 15%.  Ah, who knows, but the swing is almost certainly between 200Vpp and 240Vpp and, while the error bar is larger than I would prefer, that ain't exactly small potatoes.

Posted: 12/23/2020 9:11:02 AM
pitts8rh

From: Minnesota USA

Joined: 11/27/2015

Nice work there.  I anticipate a potential 3D printed probe tip in the works to house all of this....

In some cases absolute accuracy isn't as important as the ability to quickly obtain consistent relative measurements.  I could use this right now.

Posted: 12/23/2020 2:46:13 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I anticipate a potential 3D printed probe tip in the works to house all of this...."  - pitts8rh

Get outa my haid!  A while ago, for the heck of it, I designed a parameterized pill bottle in SCAD [LINK] and figured that would probably do:

But the drywall corner is working about as good as the probe is (better than expected in the HF department, but otherwise just OK) so perhaps it's a marriage made in heaven (of a lesser god).

Just now, to protect the RC string better, I moved everything down one hole.  There must be some sort of non-conservation of zip-ties law at work: for every tie in real, actual, long-term use, ten more must end up in the trash.

Posted: 12/26/2020 7:41:30 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Metal Plate In My Head

The Theremini is actually a hybrid rod / plate design (riding my plate hobbyhorse today):

The vast majority of the volume plate area is hidden inside the plastic case.  I'm sure the exposed outer loop portion somewhat functions as such, but it's probably largely stylish / decorative in practice - a target more for the eye than the actual hand.

You must be logged in to post a reply. Please log in or register for a new account.