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

Posted: 1/17/2013 11:24:59 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

" I can't tell if I'm on a wild goose chase after having my mind poisoned by articles like this, or if the hams have a lot to teach me and I'm crazy not to listen." - Dewster

I think the hams often have a lot to teach us - but they also have a lot of myths which get expounded.. It a bit like the theremin technical sources.. there are some sites which have been established for decades, and have gained a reputation because they have (or had) SOME useful stuff (like details of winding coils) - But are full of complete rubbish otherwise.

The trouble is that newbees to the field dont realise whats sound or whats rubbish.

One good thing about hams (as opposed to theremin "developers" or "hobbyists") is that they must go through a formal theory examination (or certainly this was the case when I did it in the mid '70s) which is quite comprehensive - Every licenced ham therefore has (or had) basic understanding of electronics and radio theory.. One does not get any completely ignorant licenced ham "hobbyist" - wheras with theremins there is no "licence" and no way to instantly identify if a "developer" or "hobbyist" has even the most rudimentary knowlege .

Interesting article - The HF VCA shown was really interesting - quite a useful idea.. I have a HF VCA in my 24A mixer "clone" emulator - but I think the one given in that paper may be better..

Fred.

Added > I have just taken the on-line RAE.. The electronics/radio theory stuff is really basic these days, even for the advanced level.. Sad - it used to be a really tough exam! - I still have one of my C+G RAE course books, and refer to it ocassionally, and its no walk through for me even now!

[EDIT] " I can't count on two fairly identical oscillators drifting together and cancelling it out."

I cant either - which is why thermal drift has now become a problem. I am using a crystal oscillator for my reference, because I use this for both heterodyning and for the fixed-frequency volume antenna resonator.. With two identical oscillators differential drift was minor, and could be compensated with a couple of small NTC capacitors if needed - It quite surprised me just how well like oscillators track, and how serious the problem can become if one references the VFO against a truly stable oscillator . Particularly if the VFO uses ferrites! (much less problem using an air coil - but I am using the ferrites for saturable reactance, and using this mechanism for tuning and current-controlled equalization.. Two 42IF106 IFTs wired together in the strangest configuration you could ever imagine! LOL ):

Posted: 1/18/2013 9:14:03 AM
Thierry

From: Colmar, France

Joined: 12/31/2007

Bob Moog solved this problem in the Etherwave Pro in a very elegant way: Using basically the same differential pair oscillators as in the Etherwave Standard, there are no independende common emitter resistors but a 3 npn transistor current mirror system, the emitters all on -12V, one as the input sink which gets a reference current through a fixed resistor from ground and two output sinks which go to the common emitters of both oscillators. This increases greatly the stability of the pitch oscillators.

Anthony Henk did it the same way as you: A 150.3kHz xtal oscillator is used as the fixed pitch oscillator. Its output is at the same time doubled and those 300.6kHz serve in the volume circuit. The variable pitch oscillator is a single FET Clapp-Gouriet oscillator around a 2N3819 which is much more stable than one would expect. One factor could be the fact that Mr Henk set the operating point 0.65V above the pinch-off voltage which is known for being the point where all resulting drain current vs temp curves cross and temperature drift is though minimized.

Posted: 1/18/2013 12:16:06 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

Thanks for that insight, Thierry.. Interesting to me is the fact that the Henk theremin used a fixed reference of different topology to the VFO.. I have heard from discussion with one theremin developer who knows the Henk theremin, that it was thermally unstable.. but this person never disclosed any of the details.

My VFO frequency is adjustable by a control current - adjusting this current as a function of monitored board temperature corrects the thermal errors and cancels gross drift.. Temperature variation due to current in the inductors (and this is higher than normal because I am deliberately controlling DC current for tuning) is still a minor problem - heat transfer from the inductors through the board to the sensor/s has a time constant.. I will either need to sum more sensors, or encapsulate the assembly in thermally non-conductive material and deliberately heat the board to a controlled constant temperature (50c probably) or encapsulate the oscillator in thermally conductive material to keep thermal differences low.

At the moment the thermal conductive encapsulation is ahead in the race - particularly as I dont want to waste power on heating.

Fred, 

 

Posted: 1/19/2013 7:42:06 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Using basically the same differential pair oscillators as in the Etherwave Standard, there are no independende common emitter resistors but a 3 npn transistor current mirror system, the emitters all on -12V, one as the input sink which gets a reference current through a fixed resistor from ground and two output sinks which go to the common emitters of both oscillators. This increases greatly the stability of the pitch oscillators."  - Thierry

I'm guess I'm not seeing how a current mirror would help here.  Could you explain?  Why don't people use matched pairs, or better yet one of those arrays where all the transistors are on a common monolithic substrate (fabbed the same and at the same temperature)?

"I have heard from discussion with one theremin developer who knows the Henk theremin, that it was thermally unstable.. but this person never disclosed any of the details."  - FredM

Interesting.  Why don't we hear more about drift?  I imagine it plagues many designs.

Posted: 1/19/2013 10:04:54 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

" Why don't people use matched pairs, or better yet one of those arrays where all the transistors are on a common monolithic substrate (fabbed the same and at the same temperature)?" - Dewster

I have done this in many past designs - the CA3083 is an ideal array, having a matched NPN pair and 3 other NPN's on the same substrate, and its not expensive.. and is available in DIL unlike almost every other array which are only available as SMD.. I use these parts for exponential / log converters mainly - they are not ideal for this application (dynamic range of the transistors not as good as other, now obsolete arrays) but just good enough usually.

However, it seems that the improvement is only extremely marginal in my expierience (there is some improvement with an EW type oscillator - but it is seems to be more the function of the current sinking CCG that confers improvement rather than the transistor matching) - however, I still think it is worth using an array rather than individual transistors - adds only about 40p to the component cost.. one has two spare transistors, one of which can be used as a temperature sensor, and the other used as a heater.. doing this it is possible to run the part at a constant 50C and eliminate all thermal effects caused by the semiconductors.. But the major thermal problems come from the inductor/s - and the above does nothing to eliminate those.

"Interesting.  Why don't we hear more about drift?  I imagine it plagues many designs."

I think if we were talking keyboards, we would hear a lot more about it - its a problem which bugged early synthesisers to a level where solutions had to be found (the early Moog synths drifted like hell - it was only when keyboards became the primary controller that thermal compensation schemes became important, and Tempco resistors and thermal bonding of transistorswere introduced to the exponential converters which were the primary source of thermal problems)..

With theremins, the fact that there is no 'absolute' note positions and that playing is "by ear" means that a given semitone shifting a few cm over a say 20 minutes can be corrected unconsciously - it is only really gross drift which becomes noticable / bothersome.

Also, capacitance being what it is, other drift factors can really confuse matters - When testing for drift, I replace the antenna with an equivalent NPO/COG fixed capacitance, simply because it is impossible to do things any other way.. But even the antenna will"drift" - it expands as temperature increases - and although this expansion is tiny and hardly influenses hand-antenna capacitance at all, it is quite significant against background capacitance - particularly near-field, as in, coupling to the theremins ground (circuit board, leads etc).

For me, the biggest problem is knowing where to draw the line at trying to improve performance.. Does one glue a thermal sensor to the antenna and compensate for this? My H1's had their antennas covered in black heat-shrink.. When the hallogen spotlights were focussed on them, these antennas went from being quite cold to really warm, as as they warmed up the pitch changed proportionally! Some of this may also be to do with changes in the dielectric constant of the air 'round the antenna due to the (radiated) heat.. - They were aluminium tube screwed over studding (some iron, some brass) the black heatshrink seemed to have the "right" properties to interact with the incident light and get disproportionately warm.. Then the construction was far from ideal - lots of large ground (loudspeaker etc) close to the antenna inside the theremin..

Fred.

<EDIT - for general information..>

It should be noted that most capacitors used in RF have a positive temperature co-efficient (capacitance increases as temperature increases). COG / NPO have (or are supposed to have) no variation with temperature, but nothing is perfect - and low quality NPO/GOG capacitors can increase OR decrease their capacitance marginally with temperature.

Usually, one needs to deliberately add capacitors with a negetive TC to compensate for temperature variation, unless some other component is giving a negetive TC effect on capacitance, or is otherwise increasing the oscillator frequency as temperature increases.

If antenna expansion occurs, this will (most likely) have a positive temperature coefficient - pitch from a theremin will increase as the temperature increases, because the VFO frequency is decreasing as a function of the increase in capacitance.

Posted: 1/20/2013 8:20:20 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Using a current mirror for EW common emitter biasing might also keep the transistors from burning up if the tank is mis-tuned?

"For me, the biggest problem is knowing where to draw the line at trying to improve performance.. Does one glue a thermal sensor to the antenna and compensate for this"  - FredM

I'm not sure either.  Reducing drift to a minimum at the sources seems like best measure, and to this end I'm probably going to go with a higher operating frequency and smaller value hand wound air core inductors.  Perhaps you could do the same by removing the ferrites from your IFTs, then use crystal based direct digital synthesis to get your beat frequency?  Now that you don't have to tune the tank to the EQ coil (since you're not using EQ coils) all sorts of techniques may be at your disposal.

I've pointed to them before, but the two papers by Knight (Solenoids.pdf & Self-res.pdf) on inductors are pretty fantastic, fun reads (as these things go), and invaluable if one is contemplating winding one's own Theremin coils.  Today I incorporated the self-resonance calculation into the inductor design worksheet of my Theremin design spreadsheet and played with it some.  I was worried that the PVC schedule 40 pipe I was planning on using for coil forms would lower the self-resonant frequency (increase winding capacitance) due to the roughly 3 relative permittivity and thick walls.  Turns out the wall thickness isn't a huge deal, and the relative permittivity of ~3 isn't overly important either.  You can't get much below 3 with plastics or cardboard, can't get below 2 even with balsa wood.  I believe polyolefin heatshrink is around 3 as well, and putting this on top of the windings will further lower SRF, but so would varnish or epoxy or just about anything else.  And I'll need some kind of spacer layer to make a transformer winding on top.

While pawing the web yesterday I ran across this article which states "In order to ensure that a large inductor works correctly, it must be vertically positioned below and in line with the pitch antenna because the wide electromagnetic field it produces must in some way be in phase with that radiated by the antenna because the action of the hand in the electromagnetic field of the antenna has a simultaneous effect on that radiated by the inductor, and probably contributes towards providing maximal linearity. In the case that the inductor is positioned horizontally, linearity is considerably reduced and leads to a certain instability in the central octave."  Any truth to that?  Seems like a lot of hand waving (pun intended).

It also states "I can assure you that the use of large coils, which necessarily need to be wound by hand (hundreds of metres of 0.2 enamelled copper wires) is infinitely preferable to using the small ready-made commercial inductors because their larger diameter increases the capacitance between one winding and another, and this helps to correct linearity." Which strikes me as dubious.  Interwinding capacitance is a myth, a larger diameter (wire? coil former?) wouldn't increase capacitance, and larger capacitance wouldn't be a good thing anyway, would it?  I mean, who wants a lower SRF?

Posted: 1/20/2013 9:40:13 PM
Thierry

From: Colmar, France

Joined: 12/31/2007

I'm not sure if choosing higher oscillator frequencies will help to reduce drift.

Thought experiment:

Let theoretically drift both oscillators away one from another by 0.1%. These 0.1% will create a pitch shift of 150Hz with 150kHz oscillators but a pitch shift of 800Hz (more than 2 octaves more) with 800kHz oscillators...

Posted: 1/20/2013 10:09:10 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

Hi Dewster,

Tis truly facinating the BS one reads! - particularly with regard to "electromagnetic field's " and the alledged interaction of these with the "plate" of a capacitance sensor. (or fot that matter the player) Magnetic fields radiating from unshielded inductors can (and do) cause problems - but these are due to inductive effects.. If you have a large energetic unshielded coil above a circuit board, it can induce signal into tracks - and tracks can act as coupled "windings" which could even behave like shunted turns and affect the performance of the coil..

"the capacitance between one winding and another, and this helps to correct linearity"

Not in my expierience! LOL. But it is possible that someone got "good linearity" fron messin about with their theremin, and put it down to interwinding capacitance, when this is (IMO) extremely unlikely - I cannot see a simple mechanism wherebye IWC could improve linearity - but the whole analogue theremin front-end linearity correction scheme is full of "devils in the detail".. So open to misunderstanding and wrong conclusions.

"Reducing drift to a minimum at the sources seems like best measure, and to this end I'm probably going to go with a higher operating frequency and smaller value hand wound air core inductors." -Dewster

My advice is forget this - IMO (unless you really need to) its moving in the wrong direction. I found when playing with PLL multipliers on both the reference and variable oscillators (for example, multiplying both by x10, so nominal 200kHz became 2MHz) that any differential drift on the lower frequency oscillators became extremely noticable after multiplication..

In fact, IMO, the best performance (in terms of drift) is obtained by running the oscillators at as low frequency as practical - I think Bob Moog's choices were no accident! - having identical oscillators running about 250kHz, from my expierience, is the best choice for a simple analogue theremin.. An 0.001% (EDIT -> this should be 0.1% - See Thierrys post above - I was preparing this posting when Thierry posted his) drift between the oscillators gives a 250Hz audio drift.. At 900kHz, one would have a 900Hz drift for the same error.

This is one of the reasons why it is no myth that lower frequency operation has major advantages.

Fred.

As an aside, I wrote a reply for another thread which I chose not to post, but I am pasting it here - I think it touches on some of the issues regarding how myths get created..

-----------------------------------------------------------------------

"Without testing everything is just wild speculation." - Dewster

What follows is entirely my opinion only - it is not directly addressed to Dewster (as an engineer he will know the following and probably have lived it.. I 100% agree with his statement above)

I think if you spend less than 80% of your time testing new designs, you are either extremely efficient, or not doing the job rigorously. Also, testing less than ten assemblies will not give you much certainty about product quality in production.

One can spend hours crafting your theremin or any other product, by swapping components etc until it is "perfect" - but if you think that by writing down these final component values etc, you can make another just like it, think again! Variations in inductor and capacitor values are substantial, variations in hfe etc of transistors is extremely substantial.. Designers who know what they are doing know what to watch out for - never design anything where hfe is critical, for example.

Unless you are lucky way beyond the statistical norm, the only way to ensure production-ready product is by painstaking calculation of all variable combinations - This task is made a lot easier by simulation.. Then one must test as large a batch of actual product to verify the design.

And this is the gulf between hobby projects and engineering for production. It is quite possible to get a hobby project better than what one can buy in a store - But putting your project into production is a whole different matter.. Unless those using / building the project are at least willing to devote the same effort into crafting their unit as the original developer did.

With a product like the theremin, it is not actually viable for a small developer to test enough units to meet the minimum "normal" engineering requirements, and this fact makes theoretical evaluation even more important.. you must comprehensively model every combination of component variation, and give some "elbow room" - at least an extra 30% - so if modeling a resistor with +/- 5% variation, model it for +/- 6.5%. Once you have theoretically fully verified your theremin, If you build five IDENTICAL theremins, and they all behave exactly like the "master" then you may be ok - but if you need to do any debugging and component swapping on any, you are likely headed for trouble.

The above is the reality, ignore it at your peril.

 

Posted: 1/20/2013 10:13:51 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

Oh, Hi Thierry !

You beat me to it again - and once again your few words give more insight than my longwinded blurb!

;-)

French? - Nah!  I recon your one of those theremin aliens ... ;-)

 

(and whats worse is that you got the sums right - unlike me, LOL...  0.001% in mine should have been 0.1%, I forgot to multiply by 100 when calculating percentage.. )-:

Posted: 1/21/2013 3:00:10 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Thierry and Fred, thank you for pointing out the central issue which I neglected to take into account!  For a digital Theremin one is only looking for good delta F, the absolute F is fairly unimportant.  I think my prototype was less prone to interference from external magnetic and electrical fields when it was operating at a higher frequency (though the 1mH coils it was using at the higher frequency were shielded types).

I haven't messed with mixers yet (and kind of hope I never do in the analog realm) but how about this: run the variable oscillator at ~1MHz, divide the output by 4 to get ~250kHz, and run that into the mixer.  Granted this gives you a square wave (one with a very good 50/50 duty cycle) going into the mixer - not sure if that's a deal breaker or not, but it might allow you to get rid of all of the troublesome drifty ferrite.  Using counters, gates, and resistors the square wave could be turned into a very crude triangle or sine wave.  (My prototype can't go too much above 1MHz without removing the DPLL from the loop due to frequency quantization issues - though it could be pushed to 5 or perhaps even 10MHz, where the ~10uH inductors could be physically quite small and the 1.5m or so of wire wouldn't need much of a coil form).

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