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

Posted: 3/7/2014 6:06:54 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

"More the oscillator sensitivity is low and more it must be "amplified" in some way. Heterodyning is a good method to amplify little frequency changes of the oscillator but, doing this, you amplify also the oscillator instabilities and the temperature induced frequency changes." - livio

Oh hell - you might be right.. But I dont think you are, and my expierience says your not.

I dont see heterodyning as "amplification" I see it as removal of redundant data - a way of eliminating the "dead time" and therebye allowing increase in the resolvable data more quickly - as in, you can resolve the data from direct-oscillator period to the same resolution as you can from heterodyning, but doing so will take much longer - an the order of 10 times longer or more probably.

As I see it, division of a HF oscillator is equivalent to integrating any individual HF cycle errors, in the same way as the integration like function of a fixed antenna capacitance - there is a reduction in sensitivity, as in, the changing antenna capacitance is || to a fixed capacitance - but this IMO actually could under certain circumstances improve SNR.

But I probably dont know what I am talking about, so im going to leave this thread - at least until it returns to being a "Let's Design and Build a (mostly) Digital Theremin!" thread rather than being the "Theremino" thread.

I think the only thing I have said on this matter which is really valid is this:

"As you are both "open" projects, why not collaborate? Get the best of both of your designs and software - I really think that with your software, open.theremins heterodyning topology, and perhaps an oscillator improvement / redesign, some really good digital modular theremin stuff could get to market." 

But I think any advice to you  that includes heterodyning will fall on deaf ears, deafer than an EW with its antenna inductor removed!

;-)

Fred

ps - I really do think you should start your own Theremino thread  - this thread IMO needs to get back on track. Dewster has hinted that he wants this, but is too polite to keep pestering you - I, on the other hand, am an impolite uncouth arrogant unpleasant arsehole who says what he thinks - And I no longer give a damn about what people think of me.

THE FOLLOWING WAS ADDED AFTER THE REPLY BELOW, After I had fully checked out the links given - --

"Here you can see a PDF with the sensivity of the most known oscillator configurations:
www.theremino.com/files/Theremins_Sensitivity.pdf"

This is a butchered version of Fred Nachbaur article, and the conclusions you have drawn are simply wrong and do not relate in any way to the Theremino design (Fred Nachbaur's paper only relates to heterodyning - the frequency variation as a function of capacitance is meaningless when you are using the HF oscillator period variation to derive data ).

I also really dislike the way you put down the open.theremin in this paper -

THE ABOVE IS JUST COMPLETELY IRRELEVANT and INNACURATE NONSENSE  IMO! - and heterodyning does NOT have "instability and temperature problems" !!!!  the ideas of "sensitivity" are completely irrelevant - the relevant matters are RESOLUTION and LATENCY and the open.theremin topology is not being compared on these grounds, but on latency is better than the theremino and also probably beats the theremino on resolution, or certainly has the potential to (Because it uses heterodyning!)!

Comparison of your theremino vs the open.theremin using Fred Nachbaur's kHz/pF is like multiplying apples with tomatoes - and in fact, gives FALSE -Ve representation of the open.theremins performance against the BOGUS and meaningless "results" given for theremino.

In my view, given that your facts are WRONG, and that MANY of the specifications, particularly with regard to resolution are WRONG, your agenda becomes clear.. Despite being "Open" you identify open.theremin as a competitor to be put down.. Suggestion of a collaboration with open.theremin is therefore the last thing you wanted and something you dont want to even comment on.

I also want to make it clear that I am not involved with open.theremin in any way, do not own one, and have been critical of some aspects of its design in the past - But I can see some well implemented aspects to it, and get angry when I see any product, particularly an open project, being bashed with false data and false comparisons by a competitor.

"And here a test of the CapSensor sensitivity:
CapSensor oscillator sensitivity - YouTube Video"

Theremino Theremin, eight octaves range with steady notes - YouTube video

A large area antenna for CapSensor tests - YouTube video

These videos shows nothing that proves anything with regard to the specifications being discussed here (resolution vs latence etc)

The following video IMO however, demonstrates your great strength - the software! - I have not seen any theremin software that comes close to what you are producing:

Theremino Theremin, chords played at great distance - YouTube video

Posted: 3/7/2014 8:12:12 PM
livio

Joined: 2/2/2014

Listen Fred , I'm talking purely of oscillators, and once they oscillate and behave well, the two ways to use or not heterodining could also be tested and compared at a later stage.

I was not advertising Theremino System, but really trying to plan with you a good oscillator.

Maybe not everything that I propose is OK, or applicable to your case or that of Dewster. But some good ideas, I gave it for sure. Also I, like Dewster I would like someone to explain to me clearly why you MUST do in a rather than in another, so I ask, explain and insist. And I was thinking OK about this.

I also wanted to mention other particulars (ESD and more), but now I think it's best not to bore you further.

And many many thanks for all the ideas you have given me with this fruitful collaboration.

Now really it is best to remove my subscription for some time, because I must also take care of other things, I hope that in the meantime you think a little (maybe this video could help) about modularity.

Bye
Livio

Posted: 3/7/2014 11:25:30 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

livio, if you're still here I think I'm hearing some frequency stepping in your videos?  I can't tell if it is an intended effect introduced by the processing, or YouTube audio compresson, or what.  You get some good distance playing from that plate antenna.

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

Fred, I see what you're saying, and I could be thinking about it wrong, but I believe heterodyning does aggravate things like drift and phase noise.  Just as tiny capacitance changes are amplified as heterodyned pitch changes, I believe the tiny inductance changes due to temperature would be amplified as well.  It seems it is best in a digital scenario trading increased noise for increased resolution.  Is there an optimal amount of heterodyning here?  Or are we better off not using it and increasing the resolution by using a faster sample clock?

I agree with you that one can't really compare the base sensitivity of Theremin oscillators without taking heterodyning gain into account.  For instance, if one has a conventional analog Theremin operating at a higher than normal frequency, then one would likely intentionally capacitively pad the tank down to tame the otherwise excessive sensitivity.  This padding capacitance would be NP0 or similar, which would be more stable than environmental and antenna capacitance, so in some sense the oscillator noise would be decreased (but would get jacked up again with heterodyning).

Posted: 3/8/2014 12:31:22 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

"  Is there an optimal amount of heterodyning here? " - Dewster

 Personally, I think (but must declare that I have little or no real evidence for this) that heterodyning works best when the VFO does not have "excessive" variation - I dont know whether this should be as a percentage (I suspect so) or as a frequency variation, but arround the 500kHz oscillator frequencies I tend to use, about 10kHz variation is as far as I like to go - more than this seems to introduce noise or instabilities etc.. Oh, nothing excessive, but there nonetheless (I think ;-) ..

However, with normal heterodyning, one doesnt need this much deviation - My experiments with greater deviation were for a mixed signal scheme where I divided both oscillators down by common divisors before heterodyning - my thinking was that the action of division would produce cleaner output than the oposite route of multiplication with PLL's - but when I went above 10kHz deviation I didnt get better results.

( if one is using antenna equalization, one needs to limit deviation far more for the linearization to work IMO - under 5kHz or even 3kHz.. )

"Or are we better off not using it and increasing the resolution by using a faster sample clock?"

Personally, I suspect that if one has a fast enough clock that one can get the required resolution in a sensible time (say <3ms) Then (and only then) does this method have a possibility of being equal or superior to heterodyning - But I dont think this will give any improvement in terms of thermal stability or noise per-se, I think the only additional source of noise one gets from heterodyning to a digital capture is the "edge" noise and any errors from the mixer/filter/comparator - a "direct digital" scheme where the oscillator is pre-divided down to a nominal say 500Hz and period measured with a high speed clock wont get these errors.

I really dont see heterodyning as a form of amplification - But I could be wrong (I often am even if I rarely admit it ;-) - To me its more a time division combined with a subtraction - or perhaps analogous to a unity gain differential amplifier in the time domain.. This is probably a case where maths trips me up again..

But basically, one wants to get the change of frequency that is produced bt the sensor oscillator, and doesnt want anything else except this and some form of reference against which this change is evaluated - with a "direct" scheme, the reference is a numeric value thats deducted from the measured value, with a heterodyning scheme the deduction is "automated" and one ends up with only the data one wants - Because the "data" is in the form of a period, it looks like 'amplification' ... Oh hell - im probably talking rubbish - but I just cant see amplification in heterodyning!

;-)

Fred.

(I should also say that its been a hell of a long time since I played with direct to digital circuits)

Just pondered this for ages:

"Just as tiny capacitance changes are amplified as heterodyned pitch changes, I believe the tiny inductance changes due to temperature would be amplified as well."

And I cant see it! - Variations from any source, be this inductance or capacitance or noise or whatever, will equally affect the output "value" whether derived from counting (effectively) the individual periods and summing these, or from heterodyning - There is no real magic in heterodyning - one is simply getting the sum of the input frequencies (which is thrown away) and the difference of these frequencies - By what mechanism can there be any "amplification" of this difference? - If there is no amplification of the difference, then how can data derived from this difference be any "dirtier" than data derived from cumulated periods from which a constant baseline value is deducted?

I am not saying im right! But just saying that I cant see it! - If its there, I want to see it, but need to be guided step-by-step through the reasoning process as I cannot even see the first step to how the idea of heterodyning being "amplification" can be derived - If this is a mathematical derivation, then I may not be able to grasp it and will just be forced to accept it despite not being able to see it - if this is the case, just say so and I will shut up and sculk off to some corner.. ;-)

Posted: 3/8/2014 2:42:56 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"By what mechanism can there be any "amplification" of this difference? - If there is no amplification of the difference, then how can data derived from this difference be any "dirtier" than data derived from cumulated periods from which a constant baseline value is deducted?" - FredM

I can't find anything to argue with in your post!   If anything you are responding to my own inexactness of describing technically what I'm trying to convey. 

An example of what I'm getting at by using the word "amplification" is that temperature drift of the inductor value will be magnified by heterodyning.

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

I'm looking at livio's Theremino (oddly close to the "Theremini" moniker - I wonder which came first?) oscillator a bit and it seems well designed from a simulation perspective.  Casually poking at the component values doesn't seem to increase the voltage swing at the antenna so that seems optimal.  It draws maybe 1/2 mA on average which is nice.  I can't say I've ever really had a strong conceptual grasp of these in-phase oscillators, so now is as good a time as any to gain some insight.

I'd like to simulate the Open.Theremin oscillator but can't find a decent linear spice model for the 4069, or 74C04, or anything similar it seems.  There's one model out there but it gives almost no gain at 5V so I won't post it here and add to the general confusion on the web.   Perhaps my google-fu is just at an ebb.  I believe it's just a matter of knowing the parameters to the MOSFET complementary pair.

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

When it comes to oscillators and what to do with the output, it seems one can all too easily end up in a hole from which there is almost no escape.  I suspect livio is avoiding heterodyning because direct the approach he is currently using is yielding "good enough" results, and he doesn't want to magnify the ferrite temperature drift, which is an entirely valid position to take.  I find the direct approach tantalizingly "just good enough" and so am looking for something better.  (But better is the enemy of the good, and I find myself literally retiring on this project!)

Posted: 3/8/2014 4:35:36 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

"An example of what I'm getting at by using the word "amplification" is that temperature drift of the inductor value will be magnified by heterodyning."

"I suspect livio is avoiding heterodyning because direct the approach he is currently using is yielding "good enough" results, and he doesn't want to magnify the ferrite temperature drift, which is an entirely valid position to take."

Hoo boy ... ;-)

I just cant see it! - Sorry!

You are using the word "magnify" - Which to me, is the same as "amplify"..

But where is any "magnification" or "amplification" coming from ? - I see absolutely no mechanism by which "temperature drift of the inductor value will be magnified by heterodyning." or any rationale in the " he doesn't want to magnify the ferrite temperature drift, which is an entirely valid position to take."

Yes, it would be an "entirely valid position to take." if its true - But tell me how it can be true!

It may be true - But I just cant see it! - As I see it, any drift or errors or whatever will be equally "revealed" by heterodyning and by direct counting.

The only difference I can see is that heterodyning can get the data faster and / or with higher resolution, because one is not wasting time counting events one is just going to throw away!

Where's our mathematician ? I feel sure that there must be a mathematical way to cut through this - a theorem or something... Oh, I probably wont understand it, but I would really like to know if my "visualisation" fits mathematical "reality".

Fred.

Posted: 3/8/2014 5:12:54 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

No math other than what happens to the LC resonance point when you change either capacitance or inductance.  Changing the C a little bit by moving your hand is the same as changing the L a little bit by changing the temperature (if it is ferrite).  Either of these effects will be magnified (in terms of frequency change) if heterodyning is employed (and if your reference oscillator isn't temperature drifting along with the VFO).  Capisce?

Posted: 3/8/2014 5:42:05 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

"Either of these effects will be magnified (in terms of frequency change) if heterodyning is employed " - Dewster

LOL, Hi again, Dewster ;-)

Ok, my last attempt at this.. ;-) I dont see "magnified" I see removal of the redundant data - as in, you have a VFO at 1Mhz varying by 10kHz, you get rid of everything except the 10kHz variation - in terms of period (which is what we are interested in if we are counting a clock) the data we get from the difference can be obtained far quicker and with far greater resolution than we can get from counting the entire (divided) period and deducting the invariant part of this period.

But lets forget any argument over "amplification" or "magnification" - Because this is in fact a red herring...

If there was "amplification" this would "amplify" both signal and noise equally - there is absolutely (and of this I am completely certain) no mechanism by which heterodyning could possibly "amplify" thermal drift or other errors to a greater degree than it amplifies the signal (changes in frequency / period as a result of player actions) -

Therefore, even if heterodyning was amplification, this would simply become a "sensitivity" function - this function would apply to wanted and unwanted data in EXACTLY the same way as would happen with a direct period counting scheme.

So as I see it, saying ""temperature drift of the inductor value will be magnified by heterodyning."" is like saying that if you crank up the volume of your power amplifier, there will be more noise - This is true - but there will also be more signal!

And its only the Signal to Noise Ratio which is relevant.

And SNR will be the same whether using heterodyning or counting the period - but heterodyning will give the advantage of hugely increased resolution ot hugely decreased time or a mix of both.

Fred.

"(and if your reference oscillator isn't temperature drifting along with the VFO)."

If you have an oscillator referenced to a fixed numeric value, any variations in that oscillator frequency will be presented to whatever method you use to acquire data -

The same is true if you heterodyne against a fixed oscillator frequency.

In terms of SNR there is no difference in the above.

If however one heterodynes against a reference oscillator whos thermal behaviour follows that of the VFO, then one greatly reduces the thermal error component of the output period.

In all these cases heterodyning can only be better or equal to direct period counting in terms of thermal drift - I cannot see any way that heterodyning can make this worse!

Posted: 3/8/2014 6:13:58 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"If there was "amplification" this would "amplify" both signal and noise equally - there is absolutely (and of this I am completely certain) no mechanism by which heterodyning could possibly "amplify" thermal drift or other errors to a greater degree than it amplifies the signal (changes in frequency / period as a result of player actions) -

Therefore, even if heterodyning was amplification, this would simply become a "sensitivity" function - this function would apply to wanted and unwanted data in EXACTLY the same way as would happen with a direct period counting scheme."  - FredM

I agree 100%.  I think any confusion is because we're coming at things and categorizing them in our heads a bit differently.

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

I finally got the Open.Theremin oscillator to oscillate using an ideal opamp in LTSpice and I see what's going on there:

- The antenna voltage is going right into the CMOS inverter input, which limits the voltage swing between VCC and ground (and likely makes it quite suceptible to ESD). 

- The inductor is "wiggling" between two caps, so the caps look like they are in series, and the ends of the inductor give a 180 degree phase shift, with the inverter giving the rest of the 180 needed to sustain oscillation.  This is perhaps like Theremin's designs, which use a split inductor for the tank?

- If it stalls it looks like it will start up again on its own (this is mandatory for Theremin use IMO).

So the tank uses a split capacitance, the ratio of which can provide significant voltage gain.  I like this a lot, but it really needs work. 

I don't know why I don't Spice more.  Like I said, I started out with this circuit and should have pursued it more at the time.  I guess I got caught up in the direct approach and saw an opportunity to use my FPGA DPLL.  In my defense I didn't really understand inductance very well then either (or all that well now, for that matter, inductance is an endless mystery).

When people encounter noise issues using CMOS linearly, I think it may often be due to switching noise of other inverters in the package being used more or less digitally in phase with the linear processing.  What may seem like excessive thermal noise might just be poorly decoupled switching.  Though maybe livio's onto something - maybe every little bit of noise brings with it noticeable degradation?  There sure are a lot of analog designs that seem to work OK though.

Posted: 3/8/2014 10:01:09 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Back To The Future

OK, my examination of the Open.Theremin oscillator seems to have borne fruit, at least in simulation.  Here is a significant variation on it which seems to optimize some important facets:

The tank consists of L1 and C1, C2, C3 in series, which for these values gives ~1.46MHz.  Drive on the right through R1, sense on the left through R5.  Zeroing out L2 I'm seeing sensitivity of approx 2.3% delta F with 1pF delta C.  With L2=L1 I'm seeing approx 3.4% delta F with 1pF delta C.  (Maximum theoretical delta F is 4.65%.)  Also seeing quite low average current drive of several hundred uA through R1 (with ideal inductors).  Around 25V peak (~50V p-p) at the antenna.  If it breadboards OK this one looks like a keeper!

Superficially, this differs from my previous "series tank" designs by the larger resistance drive, which makes the ends of the coil flail in opposite directions with amplitudes set by the ratio of C1 : (C2 & C3 in series).  Significantly, this changes the phase through the network from 90 degrees to 180 degrees lag, which enables a simple inverter to provide the final 180 degrees.  L2 somewhat resonantly unloads the tank, which brings the sensitivity back up some.  I believe it is self starting due to the inversion and the inverter gain.  Due to the lack of a decent linear CMOS model, the inverter shown in the sim is an idealized opamp with open loop gain of 100 - in reality one would likely use CMOS here.

livio helped me consider higher frequencies which opened the door to much smaller air core coils.  The Open.Theremin project helped me consider a different phase mode that allowed me to utilize some of my own ideas.  Both helped me throw a bit of sensitivity away in order to simplify sense / drive.

Here's the LTSpice file: http://www.mediafire.com/download/95fz2c9knyw6525/new_osc_2014-03-08.asc

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