# Let's Design and Build a (simple) Analog Theremin!

Posted: 2/19/2020 3:30:43 PM

From: Northern NJ, USA

Joined: 2/17/2012

"What I don't get is where the harmonics come from, between the mixer output and the speaker are we supposed to ensure harmonics are introduced?
Are we to introduce them prior to the mixing?"  - innominata

Harmonics are introduced via non-linearities, which can be anywhere in the signal chain.  Usually the mixer and/or after the mixer.  I've only dabbled with mixing, perhaps ILYA or Dominik could answer this better.

"Basically I'm trying to understand why my .wav output sound like a pure sine tone and yours sounds like a theremin."

If you see a sine wave coming from your simulation then you will probably hear a sine wave (distortion invisible to the eye can be audible).  But if your simulation is clearly producing a non-sine wave then you should be hearing harmonics.

Theremin simulations are hard to do right, as often the oscillators can take time to ramp up to their stable operating points.  You should run the sim for a long time and examine where it seems to be constant.  Also, it's really easy to mistake oscillation with LC "ringing" which just dies down, I've done this more times than I can count.

Posted: 2/19/2020 10:34:12 PM

From: 60 Miles North of San Diego, CA

Joined: 10/1/2014

Out of 95,000 views did  anyone or you prove your approached worked or had value? How about a real sample, a sine wave is the foundation of all sound and I do like them if done right. It is from there we move towards a classic sound.

How harmonics are introduced you seem reluctant, a sample of that would also be nice.

Christopher

Posted: 2/19/2020 10:44:54 PM

From: Northern NJ, USA

Joined: 2/17/2012

"Out of 95,000 views did  anyone or you prove your approached worked or had value?" - oldtemecula

ILYA used one of the oscillators in a Theremin of his, which was published in a Russian magazine IIRC.

"How harmonics are introduced you seem reluctant, a sample of that would also be nice."

I don't have the time, and truthfully have only marginal interest in analog Theremins these days, so this thread languishes.

Posted: 2/20/2020 3:17:31 AM

Joined: 2/9/2020

"Theremin simulations are hard to do right, as often the oscillators can take time to ramp up to their stable operating points. You should run the sim for a long time and examine where it seems to be constant. Also, it's really easy to mistake oscillation with LC "ringing" which just dies down, I've done this more times than I can count."

I've checked and oscillations seem like they're fine from the start and continue to stay stable although slowlu dipping in terms of DC offset and then becoming stable again over time. When I try to give an initial condition to an antenna however the actual oscillations take time to begin, a long time. I'm not entirely sure what the point of giving the antenna an initial voltage is since it doesn't vary the capacitance or mimic any useful behaviour. It takes very long to simulate anything doing this. It seems easier to just manual change the antenna capacitance and see how the frequency changes without giving it an initial condition.

Am I completely wrong on this?

Posted: 2/20/2020 4:52:18 AM

From: Northern NJ, USA

Joined: 2/17/2012

"I'm not entirely sure what the point of giving the antenna an initial voltage is since it doesn't vary the capacitance or mimic any useful behaviour. It takes very long to simulate anything doing this."  - innominata

Rather like real oscillators, simulations of them rely on numeric noise to get going, and the "relaxation" calculations used to set the initial conditions before the sim starts can get in the way of this.  So providing a little "ping" somewhere can get it going faster so you don't have to wait so long for it to reach maximum swing and stability.  You often need to experiment with the initial stimulus value to somewhat optimize it, sometimes that's a really tiny value.

I've found the oscillators that tend to work better in real life don't have so many starting issues in simulation, but that's not a hard rule or anything.

Posted: 2/20/2020 7:59:48 PM

From: Germany

Joined: 8/30/2014

.Rather like real oscillators, simulations of them rely on numeric noise to get going, and the "relaxation" calculations used to set the initial conditions before the sim starts can get in the way of this.  So providing a little "ping" somewhere can get it going faster so you don't have to wait so long for it to reach maximum swing and stability.  You often need to experiment with the initial stimulus value to somewhat optimize it, sometimes that's a really tiny value.

I've found the oscillators that tend to work better in real life don't have so many starting issues in simulation, but that's not a hard rule or anything.

Interesting, could you elaborate?
What I've noticed is that some oscillators in LTspice need the "start voltage source at 0V" option to work. Since I figured, in reality, there's no such thing as everything starting at the nominal operating voltage, I wasn't too bothered by that apparent requirement.
Are those things related?

Posted: 2/20/2020 8:39:41 PM

From: Northern NJ, USA

Joined: 2/17/2012

"Interesting, could you elaborate?"  - tinkeringdude

It's just observation, perhaps over-generalized on my part - anecdata.  It really depends on the oscillator being simulated, but if I put too large an initial stimulation on it the LC might take forever to ring down, or take forever to start oscillating.  Sometimes it's like a femto-Volt or such that kicks it just right.  High Q circuits can take a long time to stabilize in simulation, and I've mistaken a bum oscillator simply ringing down for stable oscillation many, many times.  And this is with specifying gobs of time before the data collection starts.

"What I've noticed is that some oscillators in LTspice need the "start voltage source at 0V" option to work. Since I figured, in reality, there's no such thing as everything starting at the nominal operating voltage, I wasn't too bothered by that apparent requirement.

Are those things related?"

It could be the relaxation state, or DC operating point of the sim, at that node doesn't "relax" to exactly zero due to circuit topology (bias) or due to numeric rounding / truncation and such.  In that case, if you constrain the node to 0V during the relaxation calculations, once the sim starts in earnest the hounds are released by the defacto step function.

In real life there's plenty of thermal noise to stir things up, and there's always the gigantic step you get when turning the thing on (though you don't want to have to rely on that to restart oscillation should it somehow stop).