Theremin as proximity sensor for interactive pole (like the "theremin bollard")

Posted: 12/31/2018 4:21:02 PM
wvmarle

From: Hong Kong

Joined: 11/23/2018

Hi all,

For an arts project I'm trying to design an interactive pole - a bit similar to the "theremin bollard" (showcased here: https://www.youtube.com/watch?v=j_lsG3Fi2ow).

The theremin part of my project is basically a proximity sensor for an Arduino (Pro Mini with ATmega328p controller), it can sense whether someone is nearby (where nearby would be 2-3 meters), and react to a person's presence by e.g. changing the colour of its lights or so. I'm hoping to get some input from the experts on how to improve my project and bring it to completion, not interested in reinventing the wheel here or so, just wanting to get it done.

I built this circuit: http://interface.khm.de/index.php/lab/interfaces-advanced/theremin-as-a-capacitive-sensing-device/ and it works quite well. A piece of wire, an inductor from my parts box (no idea on the Q factor or any other parameters, it's a cheap ferrite core I-shape type) and a 74HS00 NAND chip, again that happened to be in my parts box. Works quite well - about 100 ppm short term stability but longer term it deviates more. Frequency came to about 6 MHz (much higher than the expected ~4 MHz - as if the inductor is just 5 µH instead of the stated 10 µH). It reacts significantly to my movement up to some 30-40 cm away (change of >100 ppm).

A simple and inexpensive circuit, I like that. It's not for an instrument, the square wave output this produces is a plus for me. Also no need for a secondary (heterodyne) oscillator, an Arduino can measure that frequency just fine. It'll have to autotune as of course the frequency will vary with the environment it's in.

Obviously the first thing that needs attention is the frequency itself. My Arduino had no issues measuring it, but I do suspect that part of the 100 ppm is due to instability of its clock. That appears to be a simple matter of changing the 10µH inductor to 220µH, keeping the 150 pF capacitor. It seems that the lower the value of this capacitor the higher the sensitivity, as the change of antenna capacitance is in the 0.1-1 pF range. Is this so?

I'll probably be able to gain stability using better inductors, higher Q factor specifically.

The second part is the sensitivity which has to increase. The greater the better; in software I can always make it less sensitive by requiring a greater change before it reacts.

Larger antenna means larger sensitivity: the pole we're designing will be some 80 cm tall, the antenna can extend the full length (control board will be in the base of the pole). Some searching on this forum got me to this post http://www.thereminworld.com/forums/T/26533?post=178817#178817 and the spreadsheets linked in it, suggesting to add an inductor in between the tank circuit and the antenna (in my case I'm estimating 13 pF antenna capacitance and 275 kHz frequency for 25 mH inductance) to increase the sensitivity. Is it that simple?

My idea is to use the centre of the pole for the antenna, this centre would be a rod with a string of WS2812B LEDs wrapped around it. On second thought this may not be too great an idea as the LEDs are bound to interfere with the antenna big time, especially as they'll be running off the same power supply (battery power for portability - probably a USB powerbank). Not sure what to do about this - I could make a wire ring at the top of the post, along the edge. Also pretty much invisible (the pole itself will be translucent as the LED light has to shine through, probably milky or frosted acrylic).

Thanks for your valuable comments on this.

Wouter.

Posted: 12/31/2018 7:03:56 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"For an arts project I'm trying to design an interactive pole - a bit similar to the "theremin bollard" (showcased here: https://www.youtube.com/watch?v=j_lsG3Fi2ow)."  - wvmarle

If you notice, most of the Theremin audio doesn't seem to track the hand / body movements in that video (a pet peeve of mine).

"Obviously the first thing that needs attention is the frequency itself. My Arduino had no issues measuring it, but I do suspect that part of the 100 ppm is due to instability of its clock. That appears to be a simple matter of changing the 10µH inductor to 220µH, keeping the 150 pF capacitor. It seems that the lower the value of this capacitor the higher the sensitivity, as the change of antenna capacitance is in the 0.1-1 pF range. Is this so?"

Yes, ideally you want oscillation and the LC resonance to occur with the the L and just the antenna intrinsic C, with no C padding.

"I'll probably be able to gain stability using better inductors, higher Q factor specifically."

Yes, for that small L value it isn't too hard to hand wind a single layer solenoid.  Air cores can give the highest Q and the best temperature stability.

"Larger antenna means larger sensitivity: the pole we're designing will be some 80 cm tall, the antenna can extend the full length (control board will be in the base of the pole). Some searching on this forum got me to this post http://www.thereminworld.com/forums/T/26533?post=178817#178817 and the spreadsheets linked in it, suggesting to add an inductor in between the tank circuit and the antenna (in my case I'm estimating 13 pF antenna capacitance and 275 kHz frequency for 25 mH inductance) to increase the sensitivity. Is it that simple?"

You do want a larger surface area antenna to work over larger distances.  If the oscillator tank is low impedance then adding a series L can increase the voltage swing and sensitivity, but everything has to be designed together for this to work correctly.  The series L is also often used to help linearize the near field, something you probably don't care about with this project.

"My idea is to use the centre of the pole for the antenna, this centre would be a rod with a string of WS2812B LEDs wrapped around it. On second thought this may not be too great an idea as the LEDs are bound to interfere with the antenna big time, especially as they'll be running off the same power supply (battery power for portability - probably a USB powerbank). Not sure what to do about this - I could make a wire ring at the top of the post, along the edge. Also pretty much invisible (the pole itself will be translucent as the LED light has to shine through, probably milky or frosted acrylic)."

I would cover the inside pole wall with conductive tape or similar to get maximum intrinsic and mutual C, then consider putting the LEDs at the top or bottom shining up into the plastic.

Unless you're going full digital for the oscillators, for stability I'd maybe stay away from CMOS and try one of the many single transistor oscillators.  There are two buffered NPN Colpitts in this post (you only need one and no mixer either): http://www.thereminworld.com/forums/T/30562?post=209258#209258
and the "Cant" 10pFs are antenna dummy loads for simulation purposes only.

Posted: 1/1/2019 11:03:28 AM
wvmarle

From: Hong Kong

Joined: 11/23/2018

Thanks for the quick reply!

The poles in that video at times seemed to react a bit strangely indeed. I don't have enough experience with theremins to really see whether it's wrong or not. To make them "playable" as the comments suggest they should be reacting quite predictable.

For the antenna I was thinking of a piece of copper water pipe, the kind that comes with white PVC liner, 25 mm/1" diameter or so. The size is limited by the dimensions of the project, I realise bigger is better. Wiring could go through the inside of the pipe (maybe through a second PVC pipe to keep it away from the antenna itself). Invisible and minimal interference with the antenna's capacitance.

The core of the project is the LEDs, the plan is to use a string of WS2812Bs (individually addressable RGB LEDs) wound around that pole, to have something like 15-20 LEDs to light up the pole throughout and in different colours and patterns. This is to react to a hand held above the pole (probably we're going to use a time of flight IR distance sensor for this). The ability to react to proximity is an extra I dreamed up :-) LEDs up top and below is likely best for the antenna, but not for the light effects and those have priority here. I do like the idea of having the LEDs more inside the plastic, that may indeed work and allow for much bigger antenna.

Linearity of the sensing is indeed not important at all. Basically as long as the pole can sense the presence of a person it's enough, then it can start attracting attention or so. A reasonably accurate estimate of distance would be a great plus, lots of fun things that can be done with that.

Unless you're going full digital for the oscillators, for stability I'd maybe stay away from CMOS and try one of the many single transistor oscillators.

What do you mean with "full digital" here? To me, oscillators are pretty much inherently analog circuits.

I'll definitely try out those transistor circuits. Looks easy enough to build on a breadboard. Interesting also that the antenna is the only capacitor here, that should indeed give maximum sensitivity (as in change in frequency).

I'll also look into air core inductors. Not too concerned about temperature stability (this will not change fast in normal operations; will have to auto-calibrate anyway).

Posted: 1/1/2019 3:30:01 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"For the antenna I was thinking of a piece of copper water pipe, the kind that comes with white PVC liner, 25 mm/1" diameter or so. The size is limited by the dimensions of the project, I realise bigger is better. Wiring could go through the inside of the pipe (maybe through a second PVC pipe to keep it away from the antenna itself). Invisible and minimal interference with the antenna's capacitance."

You could experiment, but I have a feeling it would still interfere, particularly if you're doing PWM on the LEDs.

"What do you mean with "full digital" here? To me, oscillators are pretty much inherently analog circuits."

If you drive an inductor on one end with a small square wave and connect the other end to your antenna, then if the inductor is high Q at the operating frequency you'll get a huge sine wave.  If the square wave is say +/- 1V and the Q is 100 you'll get +/- 100V.  Higher voltage is important to swamp environmental interference, which gives you a bigger field before SNR kills it.  Even slight phase errors can dramatically lower the antenna voltage swing.  The phase difference between the drive square and the antenna sine is 90 degrees, so phase lock techniques work well here to keep even high Q resonances operating at their peak.  On my digital Theremin (link) I use a digital oscillator and digital phase locked loop in an FPGA (full digital) to maintain resonance, but it might be possible to use analog techniques here too.

Posted: 1/2/2019 10:43:28 AM
wvmarle

From: Hong Kong

Joined: 11/23/2018

The LEDs will indeed do PWM by themselves (at 400 Hz), meaning the current in the strip is going to be irregular. That's a very different frequency from the antenna. Also I'd be working at 5V, so that gives potentially really high voltages at the antenna. Hope that's not going to cause problems in itself. The vastly different frequency and voltage levels give me hope that the interference is not too much.

In the meantime I'm reading that analog theremin thread - the one you linked to is not working as I expect: I see no difference in frequency or amplitude between having antenna, having no antenna, or having a 10 pF cap between antenna and GND. In fact I don't see any oscillations at the antenna with my scope, while I do see it in the output. Used a BC547 NPN transistor for the oscillator, similar characteristics as the 2N3904 as suggested. Ceramic caps throughout.


Lots of different oscillators in there. Some JFET based, argued to be better than BJT. That's one to try out. Going to order some J113 ones, that one should be suitable.

Posted: 1/2/2019 4:04:38 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"In the meantime I'm reading that analog theremin thread - the one you linked to is not working as I expect: I see no difference in frequency or amplitude between having antenna, having no antenna, or having a 10 pF cap between antenna and GND. In fact I don't see any oscillations at the antenna with my scope, while I do see it in the output. Used a BC547 NPN transistor for the oscillator, similar characteristics as the 2N3904 as suggested. Ceramic caps throughout." - wvmarle

If you're not seeing oscillations, it could be due to the parasitics of the inductor you're using.  And I never tested it with larger surface area antennas either.

Posted: 1/2/2019 6:42:58 PM
wvmarle

From: Hong Kong

Joined: 11/23/2018

I see oscillations on the output of the NPN - but not on the output of the PNP, nor do I measure anything at the antenna. Touching that part does give noticeable change.

Next step is to get it connected to the Arduino - my OpAmps are too slow for 1 MHz signals so had to order faster ones. Further testing in a week.

Posted: 1/3/2019 4:50:03 PM
Dominique

From: Switzerland

Joined: 11/5/2018

The antenna system of a theremin, due to its small size toward the wavelength, do have a very high impedance. This is what give us a high voltage even with a low power oscillators (To get 50V on a 50 ohms antenna, we would need 50W output from a power oscillator, and we would not like it at all when touching the antenna!). This also imply the voltage on the antenna can be seriously damped when measuring it, that even with a high impedance measure probe.

Posted: 1/3/2019 5:18:35 PM
wvmarle

From: Hong Kong

Joined: 11/23/2018

I see. I don't know the input impedance of my scope (DSO Quad), probably 1 MΩ based on a reference about a very similar one. Not spectacular indeed.

In the meantime I built two other circuits as given in the "analog theremin" thread linked above, and those don't oscillate at all. It's the "Colpitts PNP" and the "Clapp common base" design. Both ask for a much smaller inductor (I used 0.47mH instead of the 0.5 mH used in the schematic), so maybe parasitics are an issue, or the lack of an antenna (didn't attach anything). The first oscillates without antenna; touching the inductor's lead at the back of the protoboard gives a strong change.

Posted: 1/24/2019 10:55:36 AM
wvmarle

From: Hong Kong

Joined: 11/23/2018

This project is coming along very nicely. I've built an LC oscillator (leaving out the PNP output stage) and got oscillation of just over 1 MHz, 1.8V peak/peak at 5V supply. As that's not good enough for an Arduino I used three NOT gates (half of a 74HC04N logic IC) to condition the signal onto a block wave with 5V amplitude. It's sitting next to me, and even without antenna attached (a 10 mm pin connector doesn't count) it senses my presence up to about 10 cm away, frequency changes ~30 Hz. Frequency is stable down to about 10 Hz though it does take a while to settle down, after 5-10 minutes running it runs by about 300 Hz and is now apparently really stable at 1.17.

Now the problem I'm having is the antenna. I've settled on a 1m long aluminium broomstick. Drilled a hole on one side, and with a screw attached a 10 cm copper wire with connector which connects to the antenna pin. The moment I connect this the frequency of the oscillator drops to about 870 kHz and becomes rather unstable, with a variation of +/- 3 kHz, me not moving.

A piece of wire, about half a meter long, drops the frequency to 988 kHz. Changing my distance from 20 to 40 cm gives a 1-2 kHz response. Looks really good. Unfortunately my work room is too small to make bigger movements (yes, it's tiny). Overall not as rock stable though as no antenna, I guess electrical equipment like my monitor and CFL desk light are too noisy.

Is this pipe simply too big an antenna? My inductor possibly not good enough? Any other suggestions?

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