I'm trying to find out suitable osciller and heterodine schematics for digital theremin.
Yesterday I was experimenting with d-trigger in mixer.
- Variable pitch oscillator on unbuffered hex invertor (mostly like in Open.Theremin V3) with separate voltage regulator for power supply. Frequency ~ 500kHz.
- 10mm copper tube as antenna.
- Reference pitch - generated by MCU - as 60Mhz / K.
- Mixer: D-trigger, powered with separate voltage regulator (just in case).
- Mixer output frequency - somewhere in range 1kHz..10Khz
- Measurement of frequency - using Teensy 3.6 (ARM based MCU board) - counting number of 60MHz pulses during measured signal interval.
Results were strange. Measured values were jumping in strange way. Some values appeared often, others - never appeared.
Making histogram INTERVAL / COUNT - measured number of 60MHz pulses / count of measurements gives results like
Best: 15000 79
Best: 15120 102
There are peaks near some value N and N+1 or N-1 e.g. 15120, 15119 and 15121 (this is expected). But as well there are side peaks - e.g. 15001, 15239. I've modified my program to show new found peaks in histogram while hand is approaching to antenna.
Peaks are distributed equally in distance 119. But what is 119? 60000000/119=504201 - very similar to reference (fixed pitch) clock.
So with D-trigger as a mixer, there is alias - dependence from reference clock frequency. Aliased positions are located in 1-3cm intervals when hand is near antenna. Although it's possible to do some averaging to get measure distributed between aliasing peaks, but it looks ugly.
Why people ever using D-triggers for heterodine mixer? As I see, OpenTheremin.V3 and UNO are using D trigger. OpenTheremin.RC uses XOR mixer.
What is best mixer for digital theremins?
Next time I'll try XOR with 3 stage lowpass filter...