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

Posted: 3/12/2014 10:21:04 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"Fred, based on your experiences I think all designers should consider the main form of SNR in Theremins as the ratio of antenna voltage swing to environmental interferers." - Dewster

I think that any "rule of thimb" for theremins should be questioned - Yes, my expierience leads me to think SNR as a function of antenna voltage is to be highly regarded, but there are many other factors that MIGHT be just as important - The "trouble" with theremin designs is the numerous subtle things to think about..

An example of this is demonstrated by some experiments I did on deliberately modulating the VFO using voltage control (I was feeding temperature compensating, equalization, tuning and audio modulation to a summing amp,and the output of this amp was varying the tank capacitance).

I got a load of mains frequency FM, and assumed this was antenna interference - spent ages trying to track this down at the antenna end until I discovered a floating input to my summing amp - I had checked this amp before connecting it to the VFO modulation input, so was sure it wasnt the source of the problem - but this input had gone to a preset's wiper (to set DC bias) and this had gone OC.

There are loads of potential inputs for LF (and other) modulation - Antenna, coils, CV's from tuning circuits, PSU.. All one needs is enough to modulate an oscillator by a few Hz for any of these to become a problem.

Fred.

"I haven't done a thorough search yet, but a part like this would likely work better:http://www.onsemi.com/pub_link/Collateral/ESD7181MU-D.PDF"

Yes, that part looks almost ideal. A unidirectional version with its K connected to the Drain and its A connected to the gate would prevent G from going +Ve WRT D, and limit the gates -Ve to safe levels.. But IMO one still needs an antenna-side discharger of some kind to limit transients to <100V by the time they reach this secondary protection.

Added ->

Working a lot with PLL's had an advantage that modulation is easy to observe - A simple 4046 without any divisor allows one to observe the demodulated signals after the filter (VCO CV in)

Added -> [pure hypothesis] Re PLL's and amplification  vs  heterodyning "amplification" ;-)

Just thinking about PLL's got me thinking about another way to derive CV from a "front end" - If one has a reference and variable oscillator each driving a PLL, and one took the error voltages from both into a differential amplifier, you should, all thing being equal, get a voltage proportional to the frequency difference between the two oscillators..

This is a bit like heterodyning in a way - deducting the variable frequency from the higher fixed one - gain would be determined by the VCO sensitivities and/or the differential amplifiers gain.. Viewed this way, I can see a reason to think of heterodyning as "amplification" - But the difference is that with heterodyning there is actually no way to "amplify" or "attenuate" the resultant difference frequency, because this is simply the difference...

On the other hand, perhaps if one did derive a difference voltage using PLL's and a differential amplifier, and this had sufficient gain from whatever means, one could get extremely low latency (the error filter would have extremely small TC) and could use a fast ADC to get digital data from this....

Added ->

Thinking about things in the above terms - One would only "need" a single oscillator (VFO) and PLL (demodulator) , and one could deduct a reference voltage from the error output to get a voltage proportional to changing capacitance. This is a closer analogy to the direct-digital scheme perhaps - You would need to amplify the difference (something you cannot do if dealing with a period, as you are with direct-digital)), or accumulate the difference additively over a period of time, to get the required resolution.. The differential method using two oscillators has the advantage that if these oscillators are similar, errors will be reduced on the difference output, but some form of amplification will still be needed. Whatever way one does things though, standard heterodyning always comes up as the winner AFAICS. 

Posted: 3/13/2014 4:50:49 AM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

Dewster,

Just looking at the picture of your breadboard and (lovely) coil, one thing bothers me..

I dont see a solid central grounding point - all the wires look quite fine guage -

I wonder if you might be observing some problems which wouldnt be there if there was a low Z ground connection to your 0V point, and im not primarily thinking resistive here - at the frequencies you are playing with, any inductance in your ground lead could cause havoc.) you might even get more HF coupling from your 0V to ground capacitively via this seperate "ground antenna" route than by your ground wire, and this could certainly confuse 60Hz interference matters.

Fred.

Posted: 3/13/2014 8:43:39 AM
livio

Joined: 2/2/2014

"My air cores are very thermally stable.  I put one in the freezer and measured the inductance as it warmed up, almost no change.  Way better than almost any ferrite you'll find." - dewster

It is possible, but the dimensions are so large that they inevitably receive any disturbing electric field. And also some magnetic field because the two middle are not in the same spatial position.

Posted: 3/13/2014 5:31:12 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"The "trouble" with theremin designs is the numerous subtle things to think about.."  - FredM

We are, in a sense, trying to build good solid buildings on top of shifting sands.

"There are loads of potential inputs for LF (and other) modulation - Antenna, coils, CV's from tuning circuits, PSU.. All one needs is enough to modulate an oscillator by a few Hz for any of these to become a problem."

The circuit and physical design differences between the average Ham VFO and the average Theremin are somewhat larger than I would expect.  With the former everything is done to stabilize frequency (outside of the front panel control to change it) including sturdy metal boxes, single sided PWBs and long standoffs to minimize parasitics, separate power supplies, elaborate buffering, etc.  With the latter everything goes in a wooden box, on a single PWB with maybe a few chokes and a bit of tin shield for isolation, but that's usually the extent of it. 

The absolute reference nature of the VFO, along with the requirements of fixed amplitude and spectral purity understandably impose much harsher specification limits on it.  The relative frequency requirements of a Theremin are much easier to meet, and a certain amount of coupling may actually be seen as beneficial.  But given all that, a marked difference remains. 

Hams have a larger and richer pool of knowledge and "best practices" to draw from.  And they seem absolutely compelled to share their knowledge with anyone who will listen via their publications, the web, and (highly conveniently) yacking to each other via their creations.

"But IMO one still needs an antenna-side discharger of some kind to limit transients to <100V by the time they reach this secondary protection."

Yes, there's no way around hard clamping that I can see.  It would be great if protecting the FET were sufficient - the impedance is lower there due to the larger capacitance.  If combined with a sufficiently insulated antenna an ESD clamp there might be enough?  It all obviously needs testing to be relatively sure it will survive in the wild.  Wish I had access to one of those discharge guns we had in the lab.

"On the other hand, perhaps if one did derive a difference voltage using PLL's and a differential amplifier, and this had sufficient gain from whatever means, one could get extremely low latency (the error filter would have extremely small TC) and could use a fast ADC to get digital data from this...."

There might be ripple at the PLL LPF output (particularly if you use an XOR phase detector and don't keep an eye on this during the design phase) to deal with (particularly if you post amplify it) that could introduce some latency, but yes that scheme seems very workable.

I just remembered that a PLL XOR phase detector is actually doing heterodyning!  Can't swing a dead cat around here without hitting heterodyning.

"I dont see a solid central grounding point - all the wires look quite fine guage -"

I measure ~2 Ohms from the scope ground clip to the AC wall ground.  Should I use an explicit secondary ground?  (Working in telecom where "ground" is -48VDC I can't tell you how many circuits I popped when innocently connecting the scope ground lead.)

The coil hookup is wire wrap wire which is kind of fine, but it's thicker than the coil wire.  It's a mess, but it's oscillating its little butt off!  Been living with it for 3 days and haven't found anything yet that disgusts me.  I'm satisfied with the stability and noise pickup, and the sensitivity is awesome!

Posted: 3/13/2014 6:24:52 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"It is possible, but the dimensions are so large that they inevitably receive any disturbing electric field. And also some magnetic field because the two middle are not in the same spatial position."  - livio

If it tests anything like my previous and much larger though similarly constructed 6.18mH single winding coil it is quite thermally stable.  I can't say exactly how much because my LC meter is kind of cheesy and only has 4 digits of resolution.  But with that coil I saw 6.183mH @ -9C and 6.180mH @ 14C, or -21 ppm/C.

I believe low frequency common mode electrical fields will not be significantly attenuated by this construct.  But that's perhaps OK if it can be placed near or incorporated into the antenna for better pickup of the player's hand capacitance.

I believe magnetic fields will be significantly attenuated by this construct, both emitted and received.  But primary interference seems to be 50/60Hz hum via the antenna producing FM in the oscillator.  So (other than reducing RF emissions and susceptibility to them) it might be largely moot.

=========

I still tend to believe the main mechanism for Theremin RF emission is a jacked up voltage swing on an otherwise inefficiently small (re. wavelength) capacitive element, something you'll get with a magnetically open or closed coil.  If there is an open coil present it is definitely is producing an oscillating magnetic field, but it is a physically small dipole emitter, so at a distance the field largely cancels itself out.

Similarly, AM "loopstick" antennas are inefficient and only seemingly operate well due to the sheer power of the transmitters stimulating them.  And they function much better when connected to a traditional antenna.

If an open coil Theremin were radiating significant RF this would mean a significant power loss to the environment, likely seen as a lower than expected Q, or lower than expected peak tank swing.  So one way to test for this would be to fully characterize the components, spice the oscillator, then compare it to an actual working circuit.  The problem here would be in characterizing the coil parasitics and intrinsic antenna capacitance without accidentally somehow subtracting any radiated emission factors.  On second thought it's probably easier to solve this theoretically.

Posted: 3/13/2014 7:39:10 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

50/60Hz Hum + Heterodyning

With the latest discussions and experiments I find myself thinking about the nature of received power line noise ("hum").  Setting aside any possible internal issues in a poorly designed Theremin, how does hum influence the capacitive field?

1. I believe hum is largely an electrical - as opposed to magnetic - phenomenon for the Theremin.

2. Due to the low frequency / long wavelength and ground reference, it is presented to the Theremin capacitive field as a common mode electrical field.

3. The theremin capacitive field, being referenced to ground and having a single electrode, is a common mode electrical field as well.

If one accepts the above (and if I am phrasing it correctly) then conceptually we can think of the Theremin as "seeing" power line hum as a person some distance away fluttering their fingers at 50 or 60Hz.  This interference FM modulates the VFO in the same manner as a player standing closer and gesturing at a rate anywhere from DC to ~1kHz.  And therein lies the problem.  Unless one can somehow design a high Q 50/60Hz notch filter into the VFO, any attempt to filter out the hum with simpler means (series capacitor, etc.) will also filter out some of the desired response from the player.

With analog Theremins, I think you just have to live with hum.  With direct digital Theremins you could likely filter much of it out with a digital high Q comb filter in either hardware or software. 

How about heterodyning digital Theremins?  I believe, just as DC to high rate playing gestures sail on through heterodyning, 50/60Hz will make it through as well, where it can be attacked with a digital high Q comb filter.

Any holes in this logic?  I worry about the non-linearity of heterodyning somehow aggravating 50/60Hz hum pickup, but can't put my finger on it.  (Perhaps I'm thinking of the intermodulation that hum can produce on the EWS, but this could be more AM pickup on the volume side than FM on the pitch side?)

Posted: 3/13/2014 9:01:49 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

" we can think of the Theremin as "seeing" power line hum as a person some distance away fluttering their fingers at 50 or 60Hz. " - Dewster

I believe this is a good functional analogy, and that all the following hypotheses you present based on this are sound.

"I measure ~2 Ohms from the scope ground clip to the AC wall ground.  Should I use an explicit secondary ground? "

Not sure that you "should" - But I have found that a common grounding point with low Z (Low R and low L) to ground, and the UUT and all equipment taken to this ground with as low Z wires as possible, tends to remove a big source of confusion if nothing else.

If possible I try to make this common ground point a point on the UUT's board, also, I dont often connect the ground from scope probes etc (leave these clips off, and have a seperate ground lead from the equipment to the common ground point) but if I do connect these probe grounds, I ONLY ever ccnnect them to the common ground point.

One way to identify a prototype board I have built is that they have a big loop of thick TC Wire coming out of the board from the ground point - this is so that I can clip any ground connectors to it easily! ;-)

"With analog Theremins, I think you just have to live with hum."

I dont really agree - I think hum modulation can be reduced below the level where it is audible if good design is employed AND the theremin is positioned sensibly away from mains E-field radiating sources. I also believe that shielded antennas entirely eliminate the problem.

Of course, if one gets rid of long distance sensing and has a short-field capacitive ribbon sensor, the problem goes away completely. ;-) Its the (IMO daft) idea of playing in 1m of free space that causes all the difficulties and problems.

"Wish I had access to one of those discharge guns we had in the lab."

The next best thing is a piezo gas ignitor - not quite the 'oomph' you get from a real ESD gun, not calibrated, but good enough for quick zaps ;-) .... The ones I used are sold for a few £ for lighting gas hobs, have a goosneck "barrel" which one takes to ground - one needs to dissasemble the barrel and shorten it by about 1cm so that the HV "probe" extends out the front and doesnt discharge to the barrel. I still use this - have access to a real ESD gun from a friend, but the ignitor allows me to do quick rough tests. I have blown up circuits with the ignitor, and not managed to blow up anything that survived the ignitor when I use a real gun..

"I just remembered that a PLL XOR phase detector is actually doing heterodyning!  Can't swing a dead cat around here without hitting heterodyning."

I dont know exactly why, but I have never managed to get the XOR PD to work well, always use the type 2 (PC2 on the 4046) or my own strange phase/frequency comparator if I am constructing my own PLL. 

"Hams have a larger and richer pool of knowledge and "best practices" to draw from.  And they seem absolutely compelled to share their knowledge with anyone who will listen "

Yes - I recently joined a local Ham group that meets once a month, told them I wasnt into the stuff in the way they were but was into theremins  - they have been interested and helpful, and there is absolutely no "holding back" of information or ideas... I am looking forward to the next get-together in 3 weeks - even though 99% of what is talked about is either of little interest to me or over my head ;-)

To me, its looking more and more like the reason theremins havent advanced is because open projects are hijacked, and a tiny group of individuals promote bad science or deliberate misinformation, and commercial developers (including Bob Moog) keep anything they have developed that isnt already in the public domain, tightly under wraps.. But worse, not only is it "under wraps", but anyone reverse engineering and/or publishing this "secret" data is regarded as a traitor by other developers.

Fred.

Posted: 3/13/2014 9:23:29 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"The next best thing is a piezo gas ignitor - not quite the 'oomph' you get from a real ESD gun, not calibrated, but good enough for quick zaps ;-)"  - FredM

This is awesome!  I've got one in the utility room that's out of gas - time to open a can of ESD whup-ass on my little circuits!

"I dont know exactly why, but I have never managed to get the XOR PD to work well, always use the type 2 (PC2 on the 4046) or my own strange phase/frequency comparator if I am constructing my own PLL."

I like XOR because it rejects noise, and I sometimes need (or can tolerate) the quadrature.  But it can lock to harmonics, is sensitive to duty cycle, and usually requires an opamp in the loop filter to make it optimal.  I recently designed a DPLL that works very similarly to an XOR PLL, and it's exceedingly simple.

Digitally, NCOs are exactly matched, so you can do weird things like separate loops for frequency measurement and phase alignment.  I designed a DPLL this way, and it works in simulation, but I can't theoretically describe / derrive things like BW, overshoot, etc. due to the odd construction, so I can't really use it.  The explicit F measurement means it can't lock to harmonics, and can skew quite quickly when way out of lock.  The F loop by itself is interesting because it forms a DFLL, with no real phase alignment.

Posted: 3/13/2014 9:35:52 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"This is awesome!  I've got one in the utility room that's out of gas - time to open a can of ESD whup-ass on my little circuits!"

If you are like me, you gonna get some painful zaps before you get it right! - The construction of cheaper ignitors can be dodgy, so you need to be careful!

I used a piezo cigarette lighter first, and zapped myself more than I zapped the circuits.. Have always planned to make a better zapper using the ignitors built into gas ovens, but just havent got round to it yet..

;-)

(these Piezo ignitors tend to give between 10kV and 15kV, but unless one fits a HV capacitor and use it to charge this, it wont diliver anything like the same number of Joules that a real zapper will.. I havent bothered adding a capacitor, as I only use this for quick prelim testing... If you dont have access to a real gun, it may be worth fitting a 100pF 20kV capacitor between ground and the HV, and pump the charge into the capacitor before you discharge it - also add a HV resistor if you want to get close to the HBM, or leave it out if you really want your circuit tested hard!)

 

I just realized the above wont work - the reason the Piezo works is because you can place the probe as close to the UUT as you want, before you pull the trigger and generate the voltage..

If you charge a capacitor and then bring it towards the UUT, the discharge will occur as soon as the distance is reached at which it can occur - real ESD guns have a HV switch so discharge only occurs when you tell it to..

Ok - Really not sure I know what im talking about here ;-) See my next post!

Posted: 3/13/2014 11:19:15 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Just operated on mine and haven't gotten shocked (yet)!  Removed the gas cylinder and tubing, cut the end of the metal tube down so the business end is exposed.  If I operate it in the air, the spark jumps to the metal tube.  If I bring it near something metal I see a weaker spark going to it.  Can always run a jumper from the metal tube to the DUT to get a healthier discharge through the loop.  Could stick a 1.5k resistor in the sparky end which is hollow and has a tiny spring.  Neat!

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