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

Posted: 11/22/2012 9:22:46 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

"But I would gladly give it up for an xyz sensor. For what I do, two extra dimensions of control over the sound would more than compensate. Some impact-proofing measure might be advisable though. I get a little excited at times."- Gordon

Yeah - Sorry Gordon.. You have been the person I have let down most by failing to deliver this long "promised" 3d volume antenna.

I aint going to make any promises or claims now - but I think I am getting back to the point (both physically and psychologically) where I may just get back into this and really complete that project.

Its been the one item I have spent more effort on than anything else - and the one which slipped from my grasp at the final stage every time, the last time due to health.. I am almost afraid to go back to it and finish it off! (if felt, last time, like it was trying to finish me off!)

Fred.

"Maybe use the ears for extra articulation" - Dewster

LOL - Just want to share the absurd image which came into my head when I read that.. Have just been watching Star Trek with the kids, and I "saw" Spock using his ears to provide "extra articulation" while standing in front of a pitch antenna..

Yeah - Theyre coming to take me away.. ;-)

Posted: 11/23/2012 10:51:03 AM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

No apologies necessary, Fred. Some things are worth waiting for, and I wouldn't want to think I was a contributory factor in "finishing you off."

Posted: 11/23/2012 5:17:59 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

I haven't quite reached the point where I feel brave enough to add a volume antenna(s) to my prototype.  I'm kind of afraid it will interfere with the pitch side.  And not having a local pitch oscillator I can't use Fred's very clever idea of using that to drive the volume side of things.

In terms of a Y-Z controller, I put two mode 0 tanks on a breadboard yesterday (minus the EQ coils, which likely aren't necessary) and looked at the relative amplitudes on the scope.  The coils I'm using (for now Bournes 8250 100mH, to be replaced with 6300 50mH) and caps (Xicon 10pF 1kV 5% NP0) seem to be matched closely enough so that both tanks have sufficiently close resonance points to give simultaneous peak voltage swings at the same frequency.  If this wasn't the case, small capacitive padding could certainly be used to pull any mismatch into long-term alignment.  (It would be a neat trick to somehow use only one inductor and two caps in some kind of split tank with two separate resonance points, but I don't think that's possible - the series drive resistor and tank inductor positions could be swapped, thus giving some resistive isolation between the two caps, but that doesn't seem to be enough).

It occurred to me that one might possibly drive these two volume side tanks 180 degrees out of phase with each other (via a simple inverter) thus minimizing radiated power and interference with the pitch side of things.

Anyway, I need to hook them up to separate phase detectors in the FPGA, and use the combined (added) phase error to close a DPLL feedback loop.  The subtracted phase error could then be used as Y axis control.

Spending too much time procrastinating over coils, the next mouser order, etc. to get any real work done.  Need to get off my ass an at least do an Electronic Sackbut first pass:

Hugh LeCain knew the huge value of a functional prototype early on, and didn't give a damn about how it looked.  All I need is a tattered board or two from the dump but I'm dragging my feet and perusing vinyl horse heads on the web.  That's the problem with soup-to-nuts projects, you start worrying about cost, manufacturability, and esthetics too early on (function has to follow the forms readily available and known to the designer).

Posted: 11/23/2012 11:17:12 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

"That's the problem with soup-to-nuts projects, you start worrying about cost, manufacturability, and esthetics too early on (function has to follow the forms readily available and known to the designer)." - Dewster

Yeah.. "but I'm dragging my feet and perusing vinyl horse heads on the web" rings too true! - Before I have even finished running simulations, I am doing things which I shouldnt even be thinking about before I have a fully functioning prototype!

The "horse heads" really made me laugh!  I think this is one of the great things about having kids - One can sometimes indulge in sillyness and pretend (to everyone else, but mainly to yourself) that you are doing it for them!

I built a mushroom theremin with my youngest daughter over tha last schools holidays - Asked each of my children to think of some project they wanted to build.. Enya (my youngest) wanted to make a mushroom - something to do with Wii games they play - She wanted it to make noises - So we built this 'shroom using polyurithane foam coated in a air drying clay - I laid out an antenna under the clay, and we built a simple theremin which briefly pulses every second and turns on if a hand is detected close to it - it then becomes a pitch only theremin..

It was all far more than Enya wanted (all she really wanted was a mushroom she could paint) - It was me who drove the absurd expansion of the project, all the while thinking about other applications.

Quin (my boy) wanted a metal locator - His was by far the easiest and he really enjoyed building it - but has never used it!

Joy (my oldest non-adult daughther) wants a robotic dog - We have got as far as building a head with motor driven mouth parts - I think it will be a complete 'dog' by the time she has children of her own, LOL ;-)

Posted: 11/30/2012 4:40:57 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

"If you pick mode 0 (series tank, LPF) they aren't nearly the problem they are in mode 1 (parallel tank, BPF) because there is only one resonance controlling things (EQ coil & antenna + hand capacitance)." - Dewster in This Thread

I am missing something (or being thick.. or, most likely, both!) .. But I dont see how Mode 0 is a LPF.. Z1 (the EQ inductance) in series with the antenna capacitances surely forms a series resonant BPF in the same way that Z1 in series with the antenna capacitances forms a series resonant BPF in Mode 1 ?

As I see it, the difference between Mode 0 and Mode 1 is primarily that with Mode 0 one would tune the antenna network to operate in the capacitive zone, (as in, the antenna resonant frequency would never be greater than oscillator frequency) so that Xc is always > Xl, and XC would be in parallel with the tank capacitance.

With Mode 1, the antenna circuit is tuned such that Xl is always > Xc, and this Xl is in parallel with the tank inductance. I do not see how mode 0 can work with an analogue oscillator as means of linearizing the response - but I have only used something similar to Mode 0 with fixed frequency for deriving volume control voltage, and this was actually more like a single resonant circuit formed by the antenna circuit.

I thought I had understood your Mode 0 - But I never noticed your "LPF" statement before - So I now wonder if I understood it at all, LOL ;-)

I suppose this matter is of more interest now, because the Lev oscillator tank is a series resonant circuit - But Lev's design is still based on the resonant antenna circuit operating with Xl > Xc, so that Xl was acting on the tank inductance.

Fred.

 

Posted: 11/30/2012 6:04:29 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Fred, thanks for bringing our conversation over here.  Others are probably silently thanking you as well, I'm yacking about it too much.

If you go back 9 posts in this thread I covered this in some detail because I wanted to get in one spot my current thinking about the two ways I know of to make a Theremin oscillator with EQ coil.  I'm likely using  different (or wrong!) terminology, but there are a variety of way to generalize, conceptualize, and describe oscillator and filter networks.  I had some networks and control theory classes back in college, but the capacity to learn tragically carries with it the equal or greater condition of slowly, constantly forgetting everything we aren't using day to day.

Mode 0: If you look at the topology from input to output, there is a series L, C to ground, series L, C to ground, which is the form of a 4th order low pass filter (which is why I label it LPF).  As implemented it is minimally damped, so simulation shows a transfer function of two resonant peaks and two resonant dips, though it does display large scale LPF behavior.  The lowest frequency resonant peak has the highest voltage at the antenna, most sensitivity, and clearest phase quadrature at resonance, so this is the one I use.  Tuning is so uncritical I don't need any variable components (I can't stress enough how important this is).  Output voltage swing is completely determined by the input voltage swing and input drive resistor value.  Input drive is low impedance and the voltage swing can be quite small - the AFE presently has 5V p-p drive (I'll probably be dropping this to 3.3V to be more compatible with less old logic) through a 4.7k drive resistor, which develops ~50V p-p in the tank and >100V p-p at the antenna. 

I've had the best results so far with a very small tank capacitance (currently 10pF) and very large, roughly equal inductors for the tank and EQ inductors (currently 100mH each, just got the 50mH Bournes 6310 and haven't tried them yet, but they look purdy).  The EQ inductance can be somewhat larger than the tank inductance, but if it's too much larger the quadrature resonance point isn't clear in simulation and the DPLL won't lock (though I've only played with this scenario for a couple of hours or so on the bench).

A mode 0 circuit can also be used for the volume side, possibly with no EQ coil, thus saving some money and simplifying things a bit (as well as raising the frequency somewhat higher that of the pitch side if identical inductors are used throughout the Theremin tuned circuitry).  Two or more mode 0 circuits with closely matching component values can be identically driven (through separate resistors) from a single source, giving multi-dimensional gesture control.  If one is designing a two dimensional controller, the two networks could possibly be driven 180 degrees out of phase, lowering overall emissions and therefore minimizing disturbance to the frequency side of things.  I'll be investigating this in the coming weeks, but I think you've already done something highly similar to this Fred.

Mode 1: The topology with the parallel LC tank is more like a bandpass filter coupled to a peaky low pass filter.  Drive is high impedance (open collector in the EW).  I believe the tank and EQ leg resonances need to be tuned to the same (or nearly the same) frequency in order for it to work properly.  This means you need at least one tunable element somewhere in the filter network (tank coil, EQ coil, tank cap, antenna geometry, etc.) and it won't automatically give you maximum voltage swing at the antenna without some fiddling.  This to me is the huge downside of mode 1 because it negatively impacts manufacturability and long term maintenance / stability.

~~~~~~~~~~~~~~

Regarding topology and linearity, I experience many quite linear octaves with my mode 0 AFE.  The two octaves nearest the antenna are somewhat cramp (perhaps 2:1 for the penultimate) and almost ultrasonic at the top.  If I carefully set the offset (local oscillator heterodyne frequency if this were an analog Theremin) and use my unmoving body as the final point for my pitch hand, it can go almost subsonic before the linearity finally poops out (as it must, because you can't logarithmically hit the null point of zero Hz). 

I don't think this fairly linear-ish behavior is exclusive to mode 0 but I could be wrong.  I used to think linearity favored certain topologies but now I think it's mistuned mode 1 oscillators and/or poorly implemented EQ networks that are the cause of much of the trouble out there.

Posted: 11/30/2012 9:02:01 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, thanks for bringing our conversation over here.  Others are probably silently thanking you as well, I'm yacking about it too much." - Dewster

LOL ;-) .. Dont worry about it! In my first few years at TW I really worried about what I posted (and where) - And in those days, when the number of posts a thread could contain was limited to (I think) 23, finding that I had taken the last 'slot' really bugged me!

Now I dont care much - We do not willfully go out to hijack threads or bother others - and if one upsets someone by posting something off-topic, removing this posting will upset someone else - You cant please everyone.. Particularly if they have any involvement with theremins... And, at the end of the day, if they find what you post annoys them, well, they can simply avoid reading your posts!

I dont have my head into the mode 0 etc stuff right now (my head is into designing a really complex coil on an AM radio type ferrite rod - this is for my self-linearizing LEV oscillator.. At present there are 7 seperate windings on the thing!) .. But I do intend to study it all .. I did do simulations when you first presented your spreadsheet,which showed the two resonant peaks.. I think that what you are doing is looking at the sharp phase-change which occurs at the lower peak - effectively keeping the antenna in resonance and monitoring the resonant frequency using phase detection..... I think this is where your "LPF" interpretation comes from. As I see it, this is a completely different mode of operation to how conventional / analogue theremins operate - but I have not looked at the idea of using this mode with a heterodyning system.. When I have gone back over it all again I will come back here and probably bombard you with questions ;-)

Fred.

Posted: 12/1/2012 1:07:27 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I think that what you are doing is looking at the sharp phase-change which occurs at the lower peak - effectively keeping the antenna in resonance and monitoring the resonant frequency using phase detection..."  - FredM

Yes, that's it exactly.  Where the phase diagram first drops to -90 degrees is the operating point.

"As I see it, this is a completely different mode of operation to how conventional / analogue theremins operate..."

Different than all mode 1 Theremins, yes.  The Andrey Smirnov D-sensor could be doing  mode 0 with its long line of inverter delays and RC coil drive.  Strikes me as an imprecise and possibly temperature dependent way of doing it though.

~~~~~~~~~~~~~~

The Bournes 6310 50mH coils arrived today - Hokey Smokes!  They're awesome!  Nowhere near as temperature sensitive as the 8250 series, no self-heating effects either.  Thank you (x100) for suggesting these!  So stable they may not even require negative tempco tank caps (though I think I'll get a few and see if I can't iron the last tiny bit of drift out of it).  Wow!

Posted: 12/1/2012 2:48:35 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

"The Bournes 6310 50mH coils arrived today - Hokey Smokes!  They're awesome! "

Yeah, Ive not found better.. They actually behave like inductors not temperature controlled parallel resonant circuits!

Regarding mode 0 - My failure in comprehension is on the issue of linearization.. I cannot see how an antenna resonant circuit which is maintained at resonance, can do anything to linearize the response of the theremin.

Sorry to go over the following again - I know you understand it, but its one of these concepts which if not fully grasped prevents others from following my reasoning..

 

>>

 

My basic linearization philosophy is that one wants to reduce the "effective" change in capacitance as the antenna is approached, and/or perhaps increase the effective change as the capacitance reduces.

The series LC antenna network in combination with a correctly tuned tank goes a long way towards achieving this - But it works because the tanks "natural" frequency is always fighting against the antennas resonant frequency, and the two are never the same (as in, the antenna is never in resonance) - This causes the the inductive loading on the tank to change as a function of change in the antennas resonant frequency which is determined by the antenna capacitance, and the point on the curve (just below resonance) where this effect is steepest, is the furthest playable distance from the antenna, and this is where the change in capacitance (from the hand) is lowest, so this change requires "amplification".

As the hand approaches the antenna, the change in capacitance is more rapid, but simultaniosly the "pulling" effect of the antenna circuit is weakening because this circuit is moving further from its resonant frequency to a less steep purtion of the curve.

<<

My problem is that I do not see this "counter-balancing" operation in action with your mode 0 - I am not saying its not there.. I just dont see it!

Alas, when it comes to the 2nd order maths or whatever, well, I am slowly getting to the point where I can, after spending weeks, sometimes solve things, and sometimes get glimpses of understanding.. But I am not even up to basic engineering standards in maths - Mathematically dyslexic! (it has cost me dearly! and is extremely frustrating!) But I still keep trying.. Perhaps this is why I have a passion for sharing what little I know about electronics with those who are genuinely struggling - I know the frustration of wanting to understand, but having a "mental block" in the way.... Its probably also why I am merciless when I find someone who acts like a swine with any "pearls" thrown to them, or who scorns what they cannot understand.

Fred.

Posted: 12/1/2012 3:31:53 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

While on the subject of linearization (and a reason why I am taking a much greater interest in mode 0) -

Playing with the Lev oscillator, and incorperating my reactor (its just a current controlled inductance circuit) in the antenna circuit (I did this for tuning and active temperature compensation, as well as to allow audio modulation of the oscillator frequency for added harmonics), I realised that I possibly didnt need the antenna resonant circuit at all..

I am now playing with feeding the output frequency of the oscillator (I square it up first to get a constant amplitude) into a LC BP filter - much the same as is done in volume control circuits using a variable oscillator - and derive a control voltage from this.. The BPF is tuned close to resonance when the oscillator is seeing minimum capacitance (there is no series inductance between the tank and the antenna - its could be any old  bog standard simple uncompensated theremin front-end)

The voltage from the BPF /Rectifier/integrator/op-amp circuit is then fed to a reactor which is part of the tank inductance (at the moment it is a seperate component, with its inductance strapped across the lower leg of the split series resonant coil in the Lev oscillator), and this acts in the same way as the conventional antenna resonant circuit does - it alters the tank inductance against a resonant BPF curve as a function of oscillator frequency.

The advantage is that linearity can be trimmed (or user adjusted) with a potentiometer which is not handeling any HF, and the BPF consists of a small inductor (I am using a IFT)

One of the ironies is that I do not think the Lev oscillator is the best topology  for this scheme (in fact, the series configuration doesnt work correctly without a resonant antenna circuit without pointless modification), and will probably go to a conventional Armstrong oscillator or a variation of the Moog EW oscillator. I will also probably use a ferrite rod "transformer" to couple to the antenna via extra windings to boost the EMF, and I have just redesigned the reactor so that the ferrite rod can incorporate this..

But I want to explore other options (like mode 0) because it may be possible with this "self linearizing" oscillator scheme to actually have a non-critical antenna inductance and antenna circuit which operated at resonance.

So often on my "theremin journey" I have run with what seemed to be a great idea, simulated, breadboarded, gone to PCB design and even in some cases fabrication - and by the time I am ready to "roll" I get another idea or find some radical "simplification" which I "cannot" ignore - so I shelve my (perfectly adequate) most recent board, and go the whole process again...

I am at the evaluation / breadboarding stage with this idea at the moment - My "steam pressure" is low, and my supply of "coal" is even lower.. I want to look at everything relevant in advance this time - and if I do "run" with it, I dont want to get any better ideas about how to do it after I have ordered the PCB's!

Fred.

 >> When I said "The advantage is that linearity can be trimmed (or user adjusted) with a potentiometer which is not handeling any HF, and the BPF consists of a small inductor (I am using a IFT)"

This is only a tiny part of the possibilities I think - The frequency dependent voltage derived from the BPF could be tailored an all sorts of ways, both analogue (squared, exponentiated whatever) or digitally (A/D referencing a compensation LUT) to trim the EQ curve to greater perfection than has been achieved before - and there would be plenty of time for any processing - 100us updating for example.

 

 

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