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

Posted: 11/1/2020 5:03:45 PM

From: Northern NJ, USA

Joined: 2/17/2012

Interference Sniffer

If your Theremin is experiencing instability, is the source of it internal or external?  Since Theremins respond to tiny changes in environmental capacitance, this can be a difficult thing to know.  After eliminating the obvious and coming up short, the next step could be an independent Theremin oscillator with antenna, monitored via delayed scope - it takes a thief to catch a thief.  Today I set up an NPN Colpitts oscillator on my bench to see what was going on environmentally.  It refused to oscillate without a good quality air core inductor, and was quite obviously disturbed by the D-Lev pitch field (but not vice versa), so this wasn't the best choice, and perhaps I shouldn't have ripped up the NPN differential oscillator from the breadboard to make room for it.

But the exercise made me think about what goes on inside LC oscillators.  All use feedback of some sort to sustain the oscillation.  Analog oscillators are limited to feeding back whatever they detect directly to the tank drive, and any gain employed can be a real source of internal noise.  A DPLL is strictly phase oriented and the feedback forms a first order low pass filter for phase, so it is able to directly attenuate noise to some degree.  It is this filtering effect that makes the D-Lev oscillators relatively immune to higher frequency interference.  And high LC Q makes them fairly selective about what can fundamentally disturb them in terms of RF.  But there are all manner of interferers that are low freqeuncy, like mains hum, local rhythmic current draw, and ground fluctuations, and these are of course able to sneak in under the final low pass cutoff and comb filtering.  Some you can deal with, others you can't do anything but try to make as small as possible compared to hand gesture changes in frequency.

It wasn't an entirely fair fight, but it was interesting to directly see the large difference in stability between the bench Colpitts and the DPLL oscillator.

[EDIT] Another advantage of the DPLL approach is the tank stimulus is always there because it is the output of an NCO that never stops.  The next cycle doesn't depend directly on some phase feedback of the current phase, but much more indirectly as integrated phase error, so halting / restart issues are quite a bit less likely.

Posted: 11/2/2020 8:55:03 AM

From: Theremin Motherland

Joined: 3/16/2017

I believe current sensing with differential amp / comparator should be even better than DPLL.
No possibility to introduce noise on the way between PLL and LC tank.
It's hard to stop, too.

Posted: 11/2/2020 4:43:16 PM

From: Northern NJ, USA

Joined: 2/17/2012

"I believe current sensing with differential amp / comparator should be even better than DPLL.  No possibility to introduce noise on the way between PLL and LC tank."  - Buggins

I certainly hope that the differential oscillator works well because it's sensing on the low impedance end of things.  Some oscillators are just too twitchy to use, and unfortunately you can't discover that via simulation.  The comparator is a really high gain device, and I've found that high gain is sometimes associated with instability, though it is also often associated with fewer startup issues.  We shall see!  Or rather, YOU shall see!

Posted: 11/2/2020 5:03:10 PM

From: Northern NJ, USA

Joined: 2/17/2012

Axis Frequency Ordering

I've been fairly guilty with my second and third prototypes (P2 & P3) of just plugging things up, and if it runs then great and moving on to the next big thing (Roger's PWB's have been a godsend!).  This morning I decided to I warm up P2 and the scope and take a close look at what's going on with the AFE's.

The pitch axis uses a 4mH air core inductor, which gives a very clean, pure looking 700kHz, 375V peak to peak sine wave with no obvious fuzz or jitter.  Delayed 16.666ms it is rock steady (if I'm some distance from the plate and don't move).  The antenna voltage is so high I had to adjust the capacitive divider to keep it at a reasonable amplitude so as not to have any ESD protection diodes conduct.  The capacitive divider waveform shows small glitches near the peaks and zero crossings which are consistent with internal switching on the AFE.  Interestingly, if I wiggle my hand near the plate, I see the glitches near the peaks wobble around in time, which I believe is caused by the error integration time of the DPLL.

The volume axis uses an 8mH air core inductor, which gives a somewhat fuzzy looking 455kHz, 240V peak to peak sine wave.  Single scope sweeps show some cycle-to-cycle bobble in the amplitude and waveshape, hence the fuzz, so what's going on here?  I did what I could to minimize stray C and secure all electrical connections, which didn't change the fuzz.  But when I touched the pitch antenna to kill its oscillation the fuzz went away!  So the fuzz seems to be an interference thing between the pitch and volume oscillators.

All of my prototypes run with the pitch oscillator frequency above that of the volume oscillator.  I've never investigated this ordering very closely as I've never experienced an interference issue; it's been more of a theoretical decision of what's better for the pitch side in terms of resolution and such.  P2 places the axes closer together than my first prototype, and the coil axes are aligned, both of which could cause a bit of coupling.  It seems, on P2 anyway, that the pitch axis frequency should be placed above the volume axis frequency.  We want to keep the pitch axis as quiet as possible, and a bit of perturbation on the volume axis probably won't be noticed.

[EDIT] Then again, it occurs to me that maybe the interferer is just the oscillator with the highest peak to peak voltage, rather than highest frequency?

[EDIT2] It makes sense that this final interference is the one that has been the most likely all along: between sensitive high Q oscillators running at hundreds of volts sitting right next to each other.

Posted: 11/3/2020 7:39:33 PM

From: Northern NJ, USA

Joined: 2/17/2012

It Was The Best Of 3D Prints, It Was The Worst Of 3D Prints

16+ hour and a not insignificant portion of a reel of PETG print that was coming along quite nicely until the corners pulled up off the table:

I set it aside and a little later it started making cracking noises.  You can see the separation point, as well as the curling up of the front plate corners.  Lotsa internal stress (and the part clearly has some too).

Found a big clear plastic bag to put over the printer to keep out drafts and contain the heat a little, cranked the nozzle and table up 10 degrees, turned off the cooling fan, and ran some test parts.  I think I've got it under control, but am having second thoughts about performing such long runs, and may try to break it up into two pieces that somehow snap, glue, or tape together.  Tried some solvent glue but it didn't work on PETG.

With this white plastic you could make an iTheremin.

Posted: 11/4/2020 6:57:56 PM

From: Germany

Joined: 8/30/2014

With this white plastic you could make an iTheremin.

Rad! Then you can sell it for 3x the price it's worth? And make customers jump through hoops at set intervals. And they'll sleep in front of the store to get the new model. Selling "premium" cables that aren't compatible to the rest of the world... almost endless possibilities of abuse people will be thankful for that's otherwise only seen in the BDSM establishment!

Posted: 11/4/2020 8:41:49 PM

From: Theremin Motherland

Joined: 11/13/2005

Don't laugh, but my iVox is 10-th year under construction...

Posted: 11/6/2020 4:19:30 PM

From: Northern NJ, USA

Joined: 2/17/2012

You guys are too much!

Posted: 11/6/2020 8:42:22 PM

From: Northern NJ, USA

Joined: 2/17/2012

Axis Interaction

As I stated over on Vadim's thread:

For all of the difficulty in implementation, I still think the LC DPLL approach is inherently superior to an analog LC oscillator.  Phase noise above the loop BW and below the operating frequency gets rolled off at a first order rate (6dB/octave, 20dB/decade), and there aren't start-up or harmonic locking issues if you design the AFE correctly and somewhat limit the low end of the NCO operating range.  This means, unlike an analog LC oscillator, the instantaneous phase has almost no influence over the current or next cycle (or the one after that, etc.).  On the scope the 16.667ms delayed antenna waveform is rock steady. 

With the P3 guts, I can set the pitch plate right on top of the volume plate face-to-face, do an ACAL, and almost play the thing - pretty remarkable because that's a butt ton of direct capacitive interaction:

Posted: 11/7/2020 10:13:30 AM

From: Minnesota USA

Joined: 11/27/2015

"With the P3 guts, I can set the pitch plate right on top of the volume plate face-to-face, do an ACAL, and almost play the thing - pretty remarkable because that's a butt ton of direct capacitive interaction:" - Dewster

Working with my D-Lev has upended what I thought I understood about the effects of bulk capacitance from nearby metal swamping out the variable capacitance presented by the player.  Even though there is nothing mystical going on it's pleasantly surprising behavior when compared to how problematic the environment can be for analog theremins.

I've been clipping shunt capacitances onto the pitch element that would shut down my Etherwave or Subscope, yet the D-Lev plays just fine after running ACAL and sometimes adjusting linearity or other parameters.

A while back I described how there seemed to be an interaction barrier somewhere within the body of my D-Lev Pro, roughly aligned with the center of my vertically-oriented enclosure.  To the pitch side of this barrier there is almost no influence on volume, and more importantly the volume hand has no effect on pitch until you move past this wall.  With my analog theremins I can always hear some volume influence on pitch (mostly at low pitches of course), but the D-Lev seems much more non-linear as you move your volume hand closer to the pitch side.

Just goofing around with this one morning I brought my two hands closer together on either side of this barrier or wall of separation as I was playing.  It was ridiculous.  I had my two hands maybe 8-10 inches center to center and it played just fine with very little cross controlling.

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