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

Posted: 11/1/2024 8:03:30 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"The varnish brand is Luxens. Clear satin finish. Dries completely in 2 hours.
It contains acetone and n-butl acetate.
It is said to have a good adherence on wood, metals and PVC.
It can be cleaned with acetone
It's also said to have a low toxicity."  - André

They don't sell that brand here in the US?  I've got some spray matte clear enamel from Rust-oleum that has acetone and n-butyl actetate in it.  May give this experiment a go on my end too.

Posted: 11/2/2024 11:12:01 AM
André

From: 30 km south of Paris (France)

Joined: 12/23/2022

Here are the results.
No significant effect on inductance value.


I will make all remaining coils with varnish and shrink tube.

Posted: 11/2/2024 2:32:16 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Here are the results.  No significant effect on inductance value."  - André

My feeling is that the PVC former is the main dielectric the windings "see" due to its bulk and location within the electric field, so the varnish and heatshrink tubing contribute little to this.  I'll try something a bit different here, and try to measure any change in free air resonance of a couple of my coils (which are headed out the door shortly).  I may also check to see if start-up drift is affected.

Thanks for taking the time to perform this "basic experiment" André, I do appreciate it!

Posted: 11/2/2024 8:48:02 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

The Varnished Truth

I performed the same experiment as André, but I measured free air resonance instead of inductance, hoping to detect any changes in self capacitance.  Test subject was an unwitting 1.7mH coil that was accidentally wound with double coat magnet wire, so no loss if it got messed up.  Varnish was "Rust-oleum Matte Clear Enamel" in a spray can.  It contains acetone, liquefied petroleum gas, n-butyl acetate, dimethyl carbonate, petroleum distillates and aromatic hydrocarbons.  I think I may opt for the "satin" version on my next coil.  Drove one end of the coil with an FY6900 function generator, 3V sine wave.  Sensed with a test lead placed a few inches away from the other end of the coil that went to my scope, with 256 sample averaging to reduce the noise.  Coil was on top of two (count 'em) empty plastic boxes to minimize stray environmental capacitance.

Free air resonance:
- 2.554 MHz bare
- 2.557 MHz with varnish
- 2.546 MHz with heatshrink
- 2.546 MHz with varnish & heatshrink

These numbers are so close and so dependent on the setup that I'm reluctant to squint too hard to see any trends, or draw any conclusions.  But I do think varnishing is a very likely a good move as it further immobilizes the turns, and so probably combats thermal expansion and therefore electrical drift.

I had a feeling something like this would crop up and render home-made coil dope a non-issue - often you just have to wait long enough for it to do so.  Anyway, yet another experiment i should have performed years ago.

Posted: 11/2/2024 9:52:43 PM
André

From: 30 km south of Paris (France)

Joined: 12/23/2022

Glad if I could help !

Posted: 11/9/2024 11:23:00 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Testing Oscillator

A fun little project: yesterday I assembled a Theremin oscillator to help a young interested person generate the data for the hand / antenna capacitance experiments we all end up doing at one point or another in this biz:

It has a 1.7mH coil and my 8 transistor oscillator, and when attached to a small mesh plate it operates around 1.2MHz with ~200Vpp.  Using a 9V battery for power (on-board 3.3V regulator) it draws a bit more than 6mA.  The "enclosure" is 3D printed in 6 parts, and it's remarkably rigid after assembly - the 3D layer "ribs" help to lock the tubes into the receiving faces.  The tubes are 15mm in diameter, the overall height 112mm.  The printing took 8 hours or so on my modified Ender 3.

A video of it running on the bench: https://youtu.be/JmPqv-L0bUA

Been puttering around with analog oscillators in LTSpice (what I do for recreation).  One issue with them that I've never quite appreciated until now is that they rely on the output oscillations as input stimulus - so it's a double whammy when the hand gets near and damps the output amplitude.  You can make up for this somewhat with excess gain, but gain means noise.  Of course, the D-Lev DPLL AFE uses excess gain too in order to square up the inputs back to the FPGA - ideally one would use ADC here to employ whole waves rather than just the edges, and use a DAC to drive the coil with a sine wave rather than square.  The I/O sampling rate could probably then be considerably reduced from the current ~400MHz without a loss in data quality, and would also remove the need for dithering the output waveform.  I keep wondering if there is an SDR (software defined radio) solution out there that might be a good fit?

Posted: 11/10/2024 1:19:54 AM
sarob

Joined: 10/27/2024

@ Dewster... Following up on your previous post with the helpful rotary encoder debugging hints. If you remember from a few weeks ago, I am bringing up the system module by module, and was having some difficulties with the encoders. You gave me some very helpful instructions on how to debug them. It turns out both the encoders and wiring were good. Instead, I tracked down the issue to my FPGA being damaged (e.g. not reading the encoder inputs, even though it was receiving the correct signal. I left it running for a few minutes and eventually the FPGA totally failed). I just received a new FPGA board from Waveshare, and now both encoder modules are working as expected ;-)

My next step it to try to bring up the pitch and volume AFEs, and hopefully get some sound. Eventually I plan to coil my own inductor (I realize it will be much more temperature stable and also higher Q), but in the short run I was wondering if it might be possible to test basic functionality using an off-the-shelf inductor. Any thoughts if these 1mH inductors could work (two in series for the 2 mH AFE), or any other off-the-shelf inductor ideas you might have? The datasheets unfortunately don't seem that helpful.

1) https://www.digikey.com/en/products/detail/bourns-inc./5258-RC/774815
2) https://www.ebay.com/itm/395361013880 (likely similar to the discontinued https://www.digikey.com/en/products/detail/bourns-inc/6310-RC/3193293 )
3) https://www.digikey.com/en/products/detail/delevan/1641R-105K/1115260

Thanks!

Posted: 11/10/2024 11:59:03 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I just received a new FPGA board from Waveshare, and now both encoder modules are working as expected ;-)" - sarob

Yay!  Of the 45 or so boards I've received from Waveshare, only one was bad, and to their credit they replaced it even though it was somewhat out of warranty.  I appealed to them that the warranty period wasn't clear - which is true! - so I didn't think I needed to power it up immediately upon receipt.  Just obviously a brick, even though the regulators, oscillator, etc. were functioning fine.

"...in the short run I was wondering if it might be possible to test basic functionality using an off-the-shelf inductor."

Theremin's curse: there are few off-the-shelf components that are ideally suited for use in a Theremin.  It's only gotten worse with the death of tube radio, because old pi-wound RF chokes aren't necessary anymore, and the vast majority of the chokes which remain have been miniaturized to the point of uselessness for our purposes.  It's very much like trying to find a commercial choke to base a Tesla coil around - you similarly need high Q and low self C (high SRF), and a physically large-ish (by today's standards) build that separates the terminals.  I'm not saying it's impossible to find something that might sorta work in a pinch, but it will likely be low Q and drift a lot with any current through it at all if the wire is too fine.

Here's an old version of the 4600 series Bourns / Miller choke datasheet: https://d-lev.com/research/4600_series.pdf.  In somewhat later versions they gray out most of the lower part of the table and tell you not to use them in newer products.  The Bourns spec of SRF @ 2.6MHz seems OK (you need the SRF to be comfortably above the operating frequency, for the D-Lev the pitch side runs around 1.2MHz, the volume side around 800kHz).  The Q is specified as 83 @ 1kHz, hard to know what it might be at 1.2MHz.  But you would need 10 of them in series for the pitch side, and 20 for the volume side, and at $6.54 a pop you're talking rather serious money for something you could wind yourself for a few bucks, and which would be much more ideal for this application. 

These folks claim to have a $12.50 2.5mH choke: https://www.ctrengineeringinc.com/rf-chokes-and-inductors/

Searching for "pi-wound choke" turns up some older chokes.

If you have an inductance meter (I recommend the inexpensive resonance types) you could try scramble winding some fine wire around a ferrite core, perhaps in separate donuts, until you hit the mH target.  Then play with the AFE C divider until you get a healthy enough signal to lock.  But if you're going to that trouble why not just bite the bullet and make the real thing?

[EDIT] And there's a possibility of me winding you some coils.  Do you live in the US?

Posted: 11/10/2024 10:07:16 PM
sarob

Joined: 10/27/2024

I can imagine how the Theremin's need for high Q, but relatively low frequency and not miniaturized inductors, is becoming a a very small niche. I just wished manufacturers posted a Q vs frequency, or complex impedance vs frequency plot. I guess there is not much demand for this information, and the measurement can be tricky, especially if you want to show a fair "curve" that gives margin for device variability. Theremin inductors reminds me of the story that one of the key technologies that enabled radio frequency ICs was the development of planar on-chip spiral inductors, even though they performed far worse than larger discrete inductors. 

I am based in the US, and I would be delighted if you could wind me some coils (I'll message you).

Posted: 11/10/2024 10:24:54 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I just wished manufacturers posted a Q vs frequency, or complex impedance vs frequency plot." - sarob

Same here!  Q at 1kHz is kinda useless for many applications, though I suppose this is how many inductance meters do things.  Drift vs. temperature would be great too, one might be able to infer the otherwise top secret ferrite formulation from the curve.

"I am based in the US, and I would be delighted if you could wind me some coils (I'll message you)."

Ah, great, US postal interactions are significantly easier and cheaper than international.

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