Is Open.Theremin.UNO worth it? Cannot it be drastically simplified?

Posted: 9/6/2018 3:05:30 PM
Buggins

From: Porto, Portugal

Joined: 3/16/2017


The Teensy 3.x processors are definitively worth a look. But one can't simply rely on the internal 12bit DAC if one wants an audio quality which satisfies sensitive musician's ears and a "professional" dynamic range. Either you'll have to do lots of post-DAC analog filtering or you make a pre-DAC effort to upsample the signal with a digital polyphase FIR filter to virtually increase the resolution. -- Thierry

For Teensy 3.x there is an Audio Board ($14.25) which supports 16 bit 44.1KHz stereo input and output.


Teensy has a good audio processing library and even GUI for generation of audio processing apps.


Frame size can be decreased (in .h file) to provide lower latency.
Teensy 3.6 ($29.25) is 180MHz ARM with hardware floating point - which allows even DSP processing using floating point instead of integers.
In general, I think that teensy sound generation capabilities are good enough for digital theremin.

Hardware timers allow to measure signal period with 60MHz precision.
Reference clock may be generated by timers as well.

Teensy -> Audio board -> Theremin board may be stacked one into other via headers.
It could be a good replacement for next generation Open.Theremin hardware.

Arduino IDE and a lot of ported libraries would allow easier transition from Arduino to Teensy

Posted: 9/7/2018 8:25:22 AM
SergeiZaslavsky

From: Moscow, Russia

Joined: 6/17/2009

Sergei: your subscope has been the very basic one at that time and for that price. It is always nice not to write in general but to point out that maybe some technical changes have happened in the meantime. Sorry for being off-topic. And: no experiences so far with the Open Theremin..

Dominik, yes, I know that Subscope I have is the basic model and since 2010 you advanced a lot. I wrote about what I have had experienced with the instrument all along, from the very beginning and not due to some recent changes. And you are right it was not necessary to mention the issues with Subscope as the topic is about Open Theremin.

Posted: 9/7/2018 8:27:47 AM
SergeiZaslavsky

From: Moscow, Russia

Joined: 6/17/2009

I would appreciate if anyone who owns and experiments with Open Theremin may answer my questions.

Posted: 9/7/2018 10:33:54 AM
xtheremin8

From: züriCH

Joined: 3/15/2014

hi sergei,
the open-theremin has a very good pitch linearity.
and you can upload your own waveforms, turn it easily into a midi controller and it's very small.
but if you want to hold a note steady: it's to unstable to become a pro-instrument.

Posted: 9/7/2018 11:43:17 AM
Buggins

From: Porto, Portugal

Joined: 3/16/2017

Idea for simple extra sensitive Open.Theremin sensor.

Instead of oscillator and heterodyne, use simple phase detection (as suggested by dewster).

Compare phase shift of reference clock passing through LC tank.
XOR based phase shift detector gives PWM output.
LP filter converts PWM to voltage which can be measured by ADC.
When input frequency equals to LC tank resonant frequency, PWM is 50% duty cycle, and OUT is VCC/2.
When hand approaches antenna, OUT increases, when hand distance increases - OUT decreases.

Q correction: R1 value (and R2) may be chosen to tradeoff between sensitivity at higher hand distance and near distance.
Output voltage depending on R1 (sumulate C_hand changing from 0 to 3pF with 0.1pF steps).
Lower line - C_hand=0pF, upper line - C_hand=3pF

R1 = 330

R1 = 470

R1 = 680

R1 = 1000

Probably, such R1 and Fref may be chosen than OUT voltage linearly correspond to hand distance.

Calibraton stage:
    when hand is far from antenna, tune reference frequency F0 to get output voltage somewhere in range 0.8..1.5V
    detect Q: measure output voltage for F0 + diff, F0 - diff : this will provide K for

Fine tunable reference clocks are required.

For Teensy, internal PLLs may be used to generate reference clocks.
For Arduino, following one may be used:

Clock Generator: SI5351 with I2C interface.
ADAFRUIT  breakout ($7.95)

2 PLLS - allows to generate reference frequency with very high precision
25MHz base clock * multiplier (5..90) / divider (4..900)

10bits of Arduino ADC may be not enough.
13bits of Teensy 3.X ADC - more than enough

For Arduino, following external ACD may be used:
16bit ADC with I2C interface.
ADS1115 breakout board  ($14.95)

Getting value from sensor.

Measure OUT using ADC.
1) Calculate C_hand by linearisation depending on Q using atan() based formula
2) Convert C_hand to hand distance based on known C_hand/distance graph
3) Convert hand distance to note/frequency
All 3 steps may be combined into pre-calculated conversion table on calibration stage - just perform linear interpolation.

When using Teensy instead of Arduino, only following external components are needed:
    2 74HC86 ICs (don't use one for both LC - for better decoupling).
    2 L air core coils, e.g. D20-40mm, length = 1*D..2*D - use different coils for pitch and volume (e.g. winding length 2 times bigger for volume)
    1 2-channel opamp AD8616 - for two LP filters
    2 SP721 for ESD protection
    8 caps, 9 resistors

Can anyone minimize digital theremin more?

Idea for high quality minimalistic Teensy 3.6 audio out:

Teensy 3.6 has 2 12-bit DAC pins.
12 bits seems too low for high quality, but only when we applying volume control directly to DAC input value.
We can use external VCA - using second DAC channel as volume control.
In this case we need
* 2 LP filters on DAC outputs
* VCA
* mono amplifier


Posted: 9/7/2018 11:51:03 AM
SergeiZaslavsky

From: Moscow, Russia

Joined: 6/17/2009

Thanks Xtheremin8. So, if I need a portable theremin to play, for example, Vocalise by Rachmaninoff using Electro-Harmonix Stereo Talking Machine, open-theremin would not be a good choice to rely on due to unstability? Correct?

Posted: 9/7/2018 1:21:36 PM
xtheremin8

From: züriCH

Joined: 3/15/2014

sergei, you could try it. maybe it works for your purpose without any problems. 
i mean, some people seem to have no issues at all with it, judging by some "ave maria" youtube videos.
i tried it in many different places, with all the different power sources and grounding solutions and still wonder why, but all i get out of mine are jittered notes.
bloody arduino.

Posted: 9/9/2018 8:07:59 AM
SergeiZaslavsky

From: Moscow, Russia

Joined: 6/17/2009

Thank you! Well, I ll just have to try playing it and see for myself if it suites me Once I get my hands on it and play, I will post what I feel about this instrument)

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