EPE Theremin Design

Posted: 7/26/2010 8:00:51 AM
el.einad

Joined: 7/26/2010

Hi to all,
I'm going to build the theremin described at http://www.thereminworld.com/EPEArticle.asp

Before soldering up, I want to simulate the circuit and I'm using ltspice for it. I'm not very experienced in electronic design, and I cannot understand why an issue is arising. In fact, when the diode demodulator stage is attached to the circuit, all the signals are seen as dc ones into the simulation, even though when such a diode stage is cut away a correct periodic signal is obtained. I know that the demodulator just performs a rectification of an AM encoded signal, but a new demodulated, low-frequency signal should result after the demodulation, not a pure dc signal.
I know this is a electronic design issue more than a theremin-specific one, but I will appreciate so much any help here.
Thanks in advance.
Posted: 7/26/2010 11:23:49 AM
djpb_designs

From: Escondido, CA

Joined: 2/6/2008

I think the biggest challenge for you is that not all the "components" are in the schematic.

You are dealing with an RF circuit that includes outside influences (your hands near antennas as a starter). Also you might be able to perfectly simulate the effects of hetrodyning the 2 oscillators on the simulation, only to find out your actual circuit seems D.O.A. with regards to producing an audio output.

You will learn more by building as simple of a circuit as possible and experimenting to see what effects what. But DO try building a circuit that mixes 2 RF oscillators rather than the "digital" variety. You will learn a lot more!

Don
Posted: 7/26/2010 11:37:36 AM
djpb_designs

From: Escondido, CA

Joined: 2/6/2008

As for the diode rectifying part, here's the quick explanation:

The modulating signal, which in this case is the audio frequency resulting from mixing 2 very-close-in-frequency RF oscillators, rides on the top and bottom of the "carrier". It is a bit easier to see this when you are dealing with a very high frequency that is purposely varied in volume (AM modulation) by an audio signal. So thinking in those terms ...

After the signal passes through the mixer and RF filter, you still have a high frequency signal that is varying in amplitude. You can think of it as being pinched together top and bottom. Now the same information is available on the top of the waveform and the bottom of the waveform, so you rectify it. The diode chops off half of the waveform.

Now you have half of an RF waveform going up and down at an audio frequency rate. So you filter out all the RF, leaving the audio.

For a theremin, the 2 RF signals are very close in frequency. The difference in frequency is the signal of interest. But the audio is still pinching top and bottom of the overall signal together. So you still want to chop off half of it to work with, and you still need to filter out all of the RF, leaving just the audio.

Hope that helps.

Don
Posted: 7/26/2010 11:43:15 AM
djpb_designs

From: Escondido, CA

Joined: 2/6/2008

Sorry misread your question ...

LTSPICE may not have the required resolution to deal with the 2 RF signals that are very close in frequency.

For example, say your local osc. is running at 900kHz and your pitch osc. is running at 900kHz + 440Hz = 900,440 ... about a 0.05% change. LTSPICE maybe truncating the math to say the output is 0Vdc.
Posted: 7/26/2010 11:43:50 AM
el.einad

Joined: 7/26/2010

Thank you a lot. Your explanation has been very clarifying, and I will try to follow your suggestion of starting building more than just going on simulating. ;-)
Thank you.
Posted: 7/26/2010 12:11:00 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

Hello El..

[b]-- Edit -->[/b]
See next posting - heterodyning in this EPE circuit is not being done by the diodes (the diodes are simply rectifiers, used to get the AM signal from the composite, as Don describes above).. The actual heterodyning is being done by TR3.. The log Ib/Ic relationship is applied to the summing of both input frequencies - simplistically, adding the log of two values results in the multiplication of these values - so one gets a multiplier - and multiplying two frequencies (waveforms) gives the sum and difference frequencies of those waveforms.

TR3(C) will have a high frequency signal (sum of both oscillators) modulated by the difference of these frequencies -The diodes, resistors and capacitors rectify and filter this composite to remove the sum and give only the difference (hopefully audio ;-) frequency.
[b]<-- Edit --[/b]

I have used LT-Spice to simulate the EW front-end, complete with diode heterodyning.. You may find these helpful:

Lt Spice for theremin circuits (http://www.element-14.com/community/message/2945#2945) (this is just a thread with some comments, and link to LT-Spice download)

Simulation of Etherwave Front-end (including diode mixer) with Lt-Spice (http://www.element-14.com/community/docs/DOC-16875/l/etherwave-front-end-simulation-antennaoscs-mixer—ltspice) (this is a .zip with the full LT-Spice project / simulation)

If you havent seen these before, you may find the documents in Element-14 theremin-general-resources (http://www.element-14.com/community/groups/theremin-general-resources?view=documents) useful.


Simulation for Theremins is great from an educational perspective.. BUT it can be more time consuming than it is worth.. Do not rely on the results from your simulations - only use them as a rough guide.

The accuracy of any model you use is absolutely critical.. A simple diode model which does not accurately model the non-linear Vf/If relationship will not give accurate (or any) results when used as a mixer - it is the diode nonlinearity which makes the mixer work!

Use ONLY FULL Spice models for EVERY component in a Theremin simulation (unless you are absolutely sure you can get away with a simpler primative) - and (particularly with oscillators) you may need to create some stimulus signals just to get things to start.

Good luck!

Fred

ps.. Don said [i]"LTSPICE may not have the required resolution to deal with the 2 RF signals that are very close in frequency."[/i]

This is true - you need to take care that the "simulation card" is set up to give the required resolution - and this can be a difficult trade-off... High resolution transient analysis can take a long time.

LT-Spice is one of the best simulators I have found for Theremin circuits - it is optimized for high speed analogue (as seen in switching regulators etc) - I can run simulations with it which take 10 minutes, but on ISIS take over an hour!
Posted: 7/26/2010 1:21:53 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

Some more advice on simulating..

Work with minimum circuit blocks first.. For example, with a Theremin front-end..

'Build' ONE oscillator and test it.. usually the oscillators are almost identical.

'build' the mixer - but instead of using 'actual' oscillators, use sine generators (these can have their frequency and amplitudes set to whatever you want - specify the amplitude you got from your 'real' oscillator, and set one frequency (variable oscillator) at the frequency of your 'real' oscillator, and the other at say 200Hz higher..

You can now test the mixer quickly - the simulation does not need to compute all the signals to make each oscillator run - there is no delay while DC levels stabilize - the simulation will run at least 1000 times faster!

When you have tested each block independently, select a time when you wont need to use your PC for severaL HOURS, put all the blocks together, and run the simulation... It is a good idea to do a complete simulation (if possible) once each block has been verified - because you may have missed something... For example, any loading caused by the mixer would not affect signal generators, but may affect 'real' oscillators.. Also (as in the case of the EW simulation) the oscillators may couple to each other via the mixer components (with the EW, coupling is provided through C2 and C6) and this changes the waveshape seen from the mixer (on C23) and can cause the oscillators to pull to the same frequency (giving a DC level, and no difference frequency on C23).

When running the full simulation, it is a good idea to set the oscillator free-run frequencies to have about 1kHz difference - unless you particularly want to examine oscillator locking.

(in the case of the EPE circuit you are looking at, the mixer circuit block should include the buffer circuit - R9,C11,R10,C12,R11,R12,TR3,C14 - and feed the supply into the top of R12.. you dont need R13/C13 for simulation - it just slows the simulation down - You should not need to run a full simulation of the whole system - there is no loading or oscillator coupling of any relevance with this Theremin)

... In fact, looking at this EPE circuit again.. mixing is not occurring at the diodes - I think TR3 is doing the mixing! - it is the non-linear Ib/Ic relationship which does the multiplication.


[b] One final thing.. ;-) [/b] .. If you do create some simulations, PLEASE (please?) post these up to Element-14 (http://www.element-14.com/community/groups/theremin-general-resources?view=documents) .. I am getting kind of lonely there, all on my own! ;-)

Fred


Posted: 7/26/2010 2:16:08 PM
el.einad

Joined: 7/26/2010

Thank you so much Fred, your informations are vital and I need them, since I am a sort of newbie in this field. At this moment, I simulated each oscillator alone and it goes quite well (i.e. calculating the FFT the most important peak is within rf). Then I simulated the two oscillators coupling through the TR3 transistor. The resulting signal describes, without any doubt, a beat frequency, since I can recognize the beat pattern. Then, cutting away any diode, the C14-R14 filter brings down this beat oscillation between 100mV and -100mV. This could be right, since the demodulator diode could rectify the signal and the resulting one could describe the right audio signal, with the successive filtering stages provided in order to really obtain it. The only problem is that, when I attach any diode to this circuit, any signal I can observe in the simulation becomes a dc signal. One hypothesis could be the one suggested by Don, i.e. LTSPICE fails to calculate the right resulting signal, thus it approximates such a signal as a dc value.
It sounds good! :-)

Daniele
Posted: 7/26/2010 2:38:28 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

[i]" The resulting signal describes, without any doubt, a beat frequency, since I can recognize the beat pattern."[/i]

First thing to do is check the frequency of this beat.. If the frequency is too high, it will be greatly attenuated by the filter.


[i]" Then, cutting away any diode, the C14-R14 filter brings down this beat oscillation between 100mV and -100mV. "[/i]

I think the above is way too low! - Dont forget, the diodes have a forward voltage drop of about 600mV .. This is, I think, why the diodes are causing a problem!


[i]" when I attach any diode to this circuit, any signal I can observe in the simulation becomes a dc signal. "[/i]

Not surprised ! ;-)

Get the signal levels much higher - I suspect your beat frequency is too high.. Replace your oscillators with signal generators, set their amplitudes to say 2.5V (RMS), set their frequencies at about 150kHz and 151kHz, and test the mixer with these..

[i]" One hypothesis could be the one suggested by Don, i.e. LTSPICE fails to calculate the right resulting signal, thus it approximates such a signal as a dc value."[/i]

No - its not that. If the simulation is performing the heterodyning, and you can see a beat frequency, then all the intensive stuff is working ok - Diode models can cause big simulation problems - but LT-Spice is working fine, by the sounds of it.

Fred.
Posted: 7/26/2010 2:49: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

... Just in case you didnt notice..
I have a bad habit of going back and editing past posts to add information (and to avoid hogging a thread - as I am now doing! LOL ) - sometimes these additions can be important, so its worth checking back to see any [b]-- Edit --> [/b] tags!

[b]-- Edit --> [/b]
[i]" Then, cutting away any diode, the C14-R14 filter brings down this beat oscillation between 100mV and -100mV. " [/i]

Check the amplitude before you add C14-R14 .. You should be able then to determine the attenuation these components cause, and from this determine the frequency.. You can also (in LT-Spice waveform display) place cursors on the waveform, and these will give you a readout of the time between the cursors from which you can accurately compute the frequency (I think one can get a direct frequency display as standard.. I know I have this, but cannot remember if I added this myself or if it is in-built.. I use so many different simulators I cannot remember the 'modifications' I have inserted to each).. [i]Using FFT to determine frequency is not accurate enough to resolve the tiny frequency differences one gets with Theremin oscillators.[/i]

[b]<--Edit--[/b]

[b]-- Edit --> [/b]
The filter components in this design are not simple - and are not mainly R14/C14..

C14 (100n) is simply there for DC isolation, R14 and its diode are there simply to limit the -Ve on C14/D2A (probably).. C15,R15 and C16 form the main filter.. looks to me like these components were all put in place by trial rather than by calculation - and this is the way the best sounding 'designs' often happen - the values will determine the charge / discharge paths, and therebye influence the wave shape and tonal qualities...

Oh hell! - Im going to have to run a quick simulation on ISIS, so I can hear what it sounds like! ;-)

[b]<--Edit--[/b]

Fred.

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