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

Posted: 3/11/2014 6:45:44 PM
livio

Joined: 2/2/2014

Dewster, my simulations demonstrate that a 330 pF can suppress 50 Hz by 160 dB, without reducing oscillator sensitivity.

But about the TDK inductor you are right, I have simulated it with serial resistence and parallel capacitance and (with your circuit DewsterV3 with 100pF input cap) the sensitivity decreases from 4% F/pF to 2.32% F/pF 

It is interesting to notice that in the CapSensors original circuit (with parallel inductor) this inductor decreases the sensitivity only from an ideal 2.66 F/pF to 2.20% F/pF 

SIMULATIONS HERE

 

[EDIT 1]

"So I set the trigger delay  to 2.5/60Hz = 41.66ms and am seeing about 50ns of variation with a 5pF capacitor in place of the antenna.  The coil, and possibly everything else connected to the oscillator, is picking up 60Hz.  First order of the day then is to construct a counter-wound coil and give that a go." - dewster

IMO it is better to include all in a metallic box grounded.

I do not understand the 50ns, you mean an instability (noise)? If this is the case it is exaggerated, with 2.5 MHz the total cycle is 400ns and 50ns is more than 10% of the base frequency. With a scope the wave must appear completely steady. 

"Looking at some VFO circuits, many include a diode from ground to gate in order to control amplitude.  This might be able to do double duty in helping with ESD." - dewster

Yes some people adds this diode, I was preferring do not add it, because it worsens the characteristics of stability with respect to temperature. But I believe, that with the serial inductor circuit, we will have to add it. Tomorrow I will make the simulations. This diode is expected to much change the operation point, because it it greatly reduces the voltage swing on the gate.

Posted: 3/11/2014 10:38:27 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

"FredM,
please, let us design these oscillators without burning them, every day, with your lightnings.

When it will be finished, every one of us will be able to add any additional device, discharge tubes, temperature and atmospheric pressure corrections, heterodyning... But before we must try to make a heart with good features." - Livio

That isnt the way I do things - IMO there is no point in designing a "heart" which has a potentially fatal flaw in it.. You could get a heart that works beautifully when a person is resting, but claps out as soon as they start moving..

By not looking at protection devices as part of the initial design, and by rejecting every comprehensive analysis which includes reality and isnt just in an ESD-free simulation, you risk getting a perfect oscillator that is so sensitive it dies.. Thinking about these issues right at the start is as essential as selecting realistic and obtainable components.

But the reason I mentioned ESD wasnt because I wanted to "pound my drum" - it was because you made claims about the intrinsic "protection" in your design due to the FETs diode effect - This claim was an error, just like your claim about protection afforded by your 18pF capacitor was an error... Making errors is FINE, we all do it - And having our errors pointed out helps us to improve our designs... But ONLY if we learn from our mistakes. You, on the other hand, argue about everything and keep going in the same direction making the same claims as if oblivious.

If you dont want me to speak about ESD, dont tempt me by making erroneous declarations about your designs immunity to ESD! - And the same is true about other declarations on matters such as sensitivity and resolution etc - Dont make claims that are or might be untrue unless you are willing to have these claims examined and errors exposed if they are found. In all science and engineering, one can make hypotheses and float ideas freely to be validated or refuted - but when one makes declarations as "facts" you need to be able to justify your claims - particularly if you use these "facts" to denigrate a competitor..

The other aspect of design is up a level - There is absolutely no doubt that the best way to counter thermal drift is by having two identical oscillators, one as a reference, and one as a variable, and heterodyning these - So its not just about designing an oscillator and then tacking on ESD protection and heterodyning later if one feels so inclined - Likewise the issue of oscillator sensitivity - the requirement for sensitivity is hugely influenced by the way one derives difference behaviour - One could have less than 1/10th of the oscillator sensitivity if one was using heterodyning, and still end up with greater resolution.

Fred.

Posted: 3/11/2014 11:27:39 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

"  The coil, and possibly everything else connected to the oscillator, is picking up 60Hz.  First order of the day then is to construct a counter-wound coil and give that a go." - Dewster

It may be the coil - but dont be too sure about that!

I found that electrical fields (as opposed to magnetic) from local wiring was the major cause of most problems I had on this matter, and that the "antenna" was the primary source.

An easy way to determine whether its capacitive or inductive coupling is to have an insulated wire connected to your live mains feed, move this wire towards your antenna in a way so that capacitive coupling to the antenna is maximised, but inductive coupling to the coils etc is minimised..

If you find the mains "hum" increasing as you approach the antenna, its a strong indicator that the problem is electrical (capacitive) coupling IMO.

(Just thinking bout it, the other way is to remove the antenna and replace it with an equivalent capacitor - if hum is from the antenna, it should drop hugely.. why didnt I think of that before... ;-)

Fred

Posted: 3/11/2014 11:59:44 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I found that electrical fields (as opposed to magnetic) from local wiring was the major cause of most problems I had on this matter, and that the "antenna" was the primary source."  - FredM

Yeah, I think you're right.  I made a coil consisting of two 0.3mH windings on the same form but wound in different directions (CW & CCW) spaced ~20mm apart so the destructive coupling is only a few percent.  With my scope trigger delay at 41.66ms (2.5 60Hz periods) I'm seeing pretty much the same 60Hz wobble.  I've got a bit of a rat's nest going, but I'm inclined to think it's coming in the antenna because it is much lower when (as you suggest) I replace the antenna with a capacitor.

"An easy way to determine whether its capacitive or inductive coupling is to have an insulated wire connected to your live mains feed, move this wire towards your antenna in a way so that capacitive coupling to the antenna is maximised, but inductive coupling to the coils etc is minimised.."

Makes sense, I'll give it a shot - thanks Fred!

There's something going on with the RF in our house.  In the morning it's pretty quiet, then all hell seems to break loose until the evening.  Working on these exquisitely sensitive circuits is kinda weird.  I'm pretty sure I can see when my wife is walking around upstairs in the room above my workbench!

Putting a 10pF in series does seem to cut hum, but it also cuts sensitivity.  I think the reduction in both is likely the same, and is governed by the ratio of the antenna capacitance to the added series capacitance.  So I'm inclined to believe this series C thing isn't all that applicable to this circuit.  And I kind of wonder if it is applicable to any Theremin circuit, because the antenna has to be a high impedance for the whole Theremin thing to work, but the only way a small C can form a high pass filter is if it "sees" a fairly low impedance.

Though there may be some value in letting the antenna "float" up to the voltage potential found at that height off the earth.

Another thing I see with the series C is a fairly long settling time before the frequency is really stable.  Could be any number of causes but I want to snap the Theremin on and start playing, and not wait around for it to "warm up".

There are several ways to get around the 60Hz field problem:

1. Integrate measurements over an exact period.  But this limits response time too much.

2. Add a high Q comb filter like I pointed to above.

3. Make the antenna somehow respond differentially to 60Hz fields, but not to hand capacitance.

People who make EEGs and such incorporate all of these methods to squash 60Hz hum.

Posted: 3/12/2014 12:33: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

"And I kind of wonder if it is applicable to any Theremin circuit, because the antenna has to be a high impedance for the whole Theremin thing to work, but the only way a small C can form a high pass filter is if it "sees" a fairly low impedance." - Dewster

Yeah - I had similar ponderings some years ago - But I know that replacing my original large antenna series capacitor with a tiny one did make a huge difference to the SNR.. Sure, sensitivity was reduced, but LF sensitivity was reduced much more..

And I think it may work something like this..

think of the "background" capacitance as a plate connected to a "ground" that has a lot of LF ripple on it.. If one thinks about the cables carrying mains, one probably has a reasonably large percentage of the "ground" plate actually having 110/220V AC on it - possibly 10% or more of the total background "plate"..

Think of the player ideally being better coupled to a less noisy ground - they are hopefully not standing on a live-carrying cable, and are more likely to be capacitively coupled to a cleaner ground.

The small series capacitor acts to attenuate the LF from the background (or perhaps desensitise the background capacitance). If the player is well grounded, they will not be "carrying" much LF "on" them as they approach the antenna - Also, as the hand approaches the antenna, often there is greater hand coupling to the theremins clean 'internal' ground.

Within this hypothesis, high-pass filter operation is probably a less important function of the capacitor - but when one is talking about such low frequencies (rolloff) and such tiny capacitances, I still think that even with the high Z of the antenna, SOME effective HPF may also be working..

Who knows ;-) All I know is that this method got me out of trouble a few times.. What you say does beg some questions though.

Fred.

" I'm pretty sure I can see when my wife is walking around upstairs in the room above my workbench!"

LOL ;-)  - Its spy stuff!  Thats what the theremin was originally invented to do - detect people moving about in other rooms, bug embasies, that sort of thing .. Turning it into a musical instrument was just a way to get the spy into enemy territory ;-) The fact that some were gullible enough to actually believe it was a musical instrument...........

;-)

"People who make EEGs and such incorporate all of these methods to squash 60Hz hum."

Yes - but they have multiple signals to play with and compare.(monitoring biological signals and removing noise from these is a lot simpler than deriving changes of a few tens of femto Farads and keeping things clean .. I have done both! - well, at least I managed the bio monitoring - not so sure about the theremin.. ;-) The only thing which makes biological monitoring "trickier" is the safety issues.

I only really had problems with 50Hz when I had low voltage on the sensors - Originally I had <2V P-P, and it was hopeless, even adding a C never helped - Then I went up to 10V P-P and the C made results almost acceptable (this was with my Epsilon instrument) - But all theremins I have built since have had >20V p-p and I havent had any problems with any topology (I have fitted a small antenna C to everything without thinking about it - they may not be needed anymore) - My H1's never had a problem even with high power spotlights being moved close (just needed a to tune them by screw adjusting antenna length to compensate for the changed capacitance)  The EW has no small antenna C, did you notice any mains noise on it? I havent noticed any extensive reference to a problem with mains FM on theremins..

"Though there may be some value in letting the antenna "float" up to the voltage potential found at that height off the earth."

Are you referring to the fact that the potential increases the higher one goes up?  - My understanding of this is that the electrosphere can be regarded as a +Ve charged spherical plate encompassing the earth, with earth being the other -Ve "plate, and air being the dielectric seperating these plates..

Any enclosed containment (building or whatever) which has any quantity of grounded stuff in it, can be regarded as at ground potential for all practical purposes - even trees tend to extend the area of earths plate ... Yes, there is higher +Ve potential as une goes above sea level, but if the theremin is connected to the local ground, I believe the potential difference between this ground and the air the antenna is in is likely to be trivial.. Certainly nothing like the 100V/m that the potential increases if you are not connected to ground.

Even the highest impedence antenna is low Z compared to the impedence of the dielectric we are swimming in - and the Z of grounded equipment / walls / trees etc is so low that one can ignore the potential gradient if one is close to any of these.

I had great problems trying to "capture" this gradient when doing research in this field - Needed long insulated poles that were placed on the top of hills so the 'collector' was way above the altitude of any tree tops.

"Another thing I see with the series C is a fairly long settling time before the frequency is really stable."

I dont see how adding a series C can cause this - Is this perhaps due to the oscillator frequency being higher as a result of the lower (total)  antenna capacitance?.. What happens if you add a small capacitor to ground before the series C, to drop the oscillator frequency?

It may just be that the oscillator requires more time to get stable the higher its frequency is..

Posted: 3/12/2014 12:26:48 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Tried some series capacitance tests last night after the PCs, washing machines, etc. were off. 

1. I didn't see the warm-up drifting with it in-circuit.  I think the drifting I saw previously was due to temperature adjustments from my handling the capacitor, and to my poor choice of a likely rather low voltage "padding" part here (I don't have specs on them, a pack of tiny caps from Radio Shack).  This cap gets exposed to some rather high voltages.

2. With my scope trigger delayed to 2.5 60Hz cycles I saw maybe 50ns of 60Hz hum FM modulating the 2.63MHz operating point.  With a 22pF cap in series this dropped to maybe 30ns at 2.84MHz.  And with a 10pF cap in series this dropped to around 15ns at 3.01MHz.  These FM amplitude numbers are fairly sketchy, but the trend is clear that the noise drops in proportion to the ratio of series capacitance impedance to that of the antenna capacitance (~7.3pF calculated from the 0.5mH tank inductance, and which includes confounding stray C).  We can safely assume that series capacitance lowers sensitivity.  So my tentative conclusion is that a series cap lowers both the noise and the signal roughly (if not exactly) equally.  The clincher for me was using a 220pF series C, where the hum was clearly essentially the same as no series C.

The reason hum isn't a gargantuan problem in the first place is because it is so poorly coupled to the high impedance antenna, and it's my feeling that a series cap doesn't really alter the scenario other than by making everything less coupled.

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.

"The EW has no small antenna C, did you notice any mains noise on it?"  - FredM

Not always, but sometimes.  Once I had it near the wall upstairs that must have had wiring coming down feeding the outlet it was plugged into, and it was a hum monster!   Kind of fun playing with the intermodulation effects.

Posted: 3/12/2014 12:58:16 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Dewster, my simulations demonstrate that a 330 pF can suppress 50 Hz by 160 dB, without reducing oscillator sensitivity."  - livio

I took a quick peek at your simulation, but I disagree with the premise.  It shows 60Hz directly connected to the antenna.  If this were the case there would be no way any Theremin would work without the series capacitance.  I believe the 60Hz is coupled through the antenna static capacitance, which means it is already massively attenuated.  If this is the case then the series capacitance lowers both noise and sensitivity together, so it actually hurts overall SNR.

"But about the TDK inductor you are right, I have simulated it with serial resistence and parallel capacitance and (with your circuit DewsterV3 with 100pF input cap) the sensitivity decreases from 4% F/pF to 2.32% F/pF

It is interesting to notice that in the CapSensors original circuit (with parallel inductor) this inductor decreases the sensitivity only from an ideal 2.66 F/pF to 2.20% F/pF"

The windings inside the TDK parts are too close together, which produces significant parasitic parallel capacitance.  The CapSensor oscillator has a parallel tank, so this parasitic capacitance isn't as much of an issue.  My oscillator has a series tank with very small C, so it is more of an issue.  The smaller C increases the operating frequency.

The TDK parts are nice but they were made for disk drives and such, not Theremins.  I've pretty much given up on ferrite.  Luckily, I can easily wind my own coils which are superior in almost every way.

"IMO it is better to include all in a metallic box grounded."

Maybe.  Shielding is generally a good thing, but this interferes with the air-coil capacitance which can actually work for you if you locate the top of the coil near the antenna (Theremin did this and it makes a lot of sense).  I think sticking the oscillator in a metal box and locating the coil at the base of the antenna might be the best solution but I haven't tested this yet.

"I do not understand the 50ns, you mean an instability (noise)?"

FM due to 60Hz.  If your oscilloscope trigger delay is really long (for 60Hz try 41.66ms; for 50Hz try 50ms) you will likely see this with your CapSensor oscillator.

"Yes some people adds this diode, I was preferring do not add it, because it worsens the characteristics of stability with respect to temperature. But I believe, that with the serial inductor circuit, we will have to add it. Tomorrow I will make the simulations. This diode is expected to much change the operation point, because it it greatly reduces the voltage swing on the gate."

Perhaps a 2 or 3 diodes in series would work.  This would keep them from turning on, and would lower the capacitance quite a bit.  Since the gate is biased to ground with a resistor, a second string with reversed diodes could protect against swings of the opposite polarity.

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

Bi-directional, low capacitance, level 4, made for RF and protecting antennas and such.

Posted: 3/12/2014 1:50:51 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Split Counter-Wound Air Core Coil

Here is a quick snap of the air core coil I wound yesterday, plugged into the newest oscillator:

Each winding is 120 turns of 34 AWG on 3/4" schedule 40 PVC cut to 100mm long.  One winding is CW, the other is CCW.  The windings are approx. 17mm apart (I was aiming for 20mm).  The windings measure 0.305mH each, and when combined the total is 0.5822mH, for a coupling factor k=-0.05 (the coupling is destructive due to the counter winding of the coils).  Windings held in place with a coat of nail polish.

I was hoping this would reduce environmental magnetic pickup, and it probably does, but it seems 60Hz is getting in (surprise!) mainly through the antenna.  So I'm not convinced at this point that a split coil is worth the trouble.  It should significantly reduce RF emissions from the coil, and call me crazy but I'm not convinced at this point that that's a big deal either.

And, yes, it's not nearly as clean as it should be, the oscillator is going right to the scope unbuffered, etc.

It occurs to me that one could use a longer section of 1/2" (~21mm OD) PVC maybe 300mm long.  Wind a 40mm tall coil (~0.5mH) near the base and put conductive tape up one side to make a curved plate antenna.  Apply heat-shrink tubing and - presto! - an all-in-one unit.  I just can't find anything to adapt the 1/4" CTX plumbing I'm using to 1/2" PVC.

Posted: 3/12/2014 6:05:28 PM
livio

Joined: 2/2/2014

IMO a so great coil is impossible to balance perfectly. Impossible to be not microphonic. Difficult to be stable with temperature. And also, it will receive any magnetic and electric noise from the 50 or 60 Hz. And from hi frequency fluorescent lamps and halogen lamps with dimmers. I would use it only if enclosed in a large metal box, but it seems to me a solution too much extreme.

I'm sure you could get the best features with few turns on a high frequency toroid. The magnetic field emitted and received would be almost zero and the dimensions become reasonably small, so as not to pick up the electric fields at 50 or 60 Hz

"Perhaps a 2 or 3 diodes in series would work.  This would keep them from turning on, and would lower the capacitance quite a bit.  Since the gate is biased to ground with a resistor, a second string with reversed diodes could protect against swings of the opposite polarity." - dewster

I am simulating exactly this. It is a good idea. It appears also that we can add a resistor before the diodes and the gate, to increase the ESD resistance. I am trying also your, very promising idea, to use two 150 uH in series.

Posted: 3/12/2014 7:52:29 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Difficult to be stable with temperature."  - livio

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.

"I'm sure you could get the best features with few turns on a high frequency toroid."

That would position the drive and sense ends next to each other, something you want to avoid in order to reduce self capacitance and maximize sensitivity.

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