Electronics > Metrology

Triggering a scope/frequency counter off of audio tones

<< < (5/5)

Kleinstein:
Just using an analog trigger (e.g. comparator(s)) will be sensitive to noise. Ideally one would need filtering to reduce noise, and than super low noise parts, not to add new noise.

The more modern way is to use and ADC (e.g. soundcard) to digitize the signal and than do the rest  in software. The simple / fast way would be an FFT, but here frequency resolution is limited. The lowest noise version would be using a full nonlinear least squares fit - with modern PCs this is not that slow anymore and can also include decay as an extra parameter. The FFT could be used to get a good starting point. The fit can give really good resolution, way higher than the FFT. With a reasonable signal/ADC one is limited by the clock (crystal) used for the ADC. I did that some time ago with a rather low cost sound card and old DDS generator: I got something like 8-9 digit resolution/noise limit for a 1 second sample of a 1 kHz signal - however with visible drift, e.g. from crystal temperatures (sound-card and DDS). The limit could have been due to the old DDS generator - theoretical limits from the ADC are even lower.

There is a faster software method using Hilbert transformation - nearly as good as the least square fit, but much faster, lower memory needed (could be important if an µC is used) and less sensitive to a good starting point. It can also handle decaying signals and noisy background quite well.

Analysis of the harmonics is than a second step. Here the FFT should be good enough.

VintageNut:
I have experimented with audio doppler. The source will most likely transmit all kinds of different wonky phase versions of itself bouncing off of anything that can be bounced off of. Move your microphone a fraction of an inch and the demodulated  signal changes drastically.

This is the stuff of PhD dissertations that relate to ultrasound imaging.   

DaJMasta:
It's fascinating stuff!  I've got a friend who's in grad school for acoustic engineering, and as a musician I've played in a good range of halls, from some that are a pleasure to play in and listen to (one does not always mean the other), to those that are probably should be used to house noisy children and nothing more.  In some of my recording experiments I've gotten really strange artifacts from how things are reflecting and moving just a few inches has sometimes made a huge difference.  In my last recording at home, I had a mysterious +6dB or so increase in amplitude on one note of my instrument using equipment and a room layout I had used before, but just one one mic of the three I was using.  Eventually found out that extending the boom arm of my mic stand to full instead of keeping the mic centered over the stand led to some sympathetic vibrations that could overcome the shockmount and some weights damping the other side of the bar...

I hadn't heard of the least squares fit before, that sounds like an interesting lead.  I still haven't found a good way to get an ADC to take samples clocked to a high precision reference (at least, one that wasn't a few grand), but this audio stuff is fascinating to me and I already had some plans for FFT analysis software using an interface, so I can at least add that to the list.


Did some more looking into components and put together a schematic that should produce some good results, provided my layout is acceptable and I mange not to overlook something facepalm worthy.... but I'll have a couple floating pads for trimming resistors by adding another and a couple of test points for monitoring voltages, current consumption, and other stuff so at least there's sanity checks if something goes wrong.  Right now the signal path looks like:

AD797 as a preamp with a little under 500 gain - slightly lower drive current than the OPA1612, but ~15% less noise (0.9nV*Sqrt(Hz) vs. 1.1 at 100Hz, with only 1.7 at 10Hz) at the cost of slightly higher rated distortion, but while the resistors will still be the majority, I want to get as low as possible for the input stage.  I looked into some higher current first stages (in metal cans, mostly), but none seemed to be low enough noise on their own to make the resistor size savings worth it.

OPA1612 as an autogain stage (up to about 10).  I don't know exactly how the jfet will perform, so there's some trimmable spots, a pot to limit current through the jfet, and a second one to try if the first one doesn't seem to work (J112 or J113)

RC 22.5KHz low pass filter

OPA1612 buffer amp so you can see the waveform on a scope or what have you

OPA1612 based peak detector (in parallel with the buffer amp) with a fair amount of capacitance to hold it - there's a bleeder resistor too, since I want to be able to catch a note at a lower amplitude after the louder one is done sounding, but the RC time constant is in the 10s of seconds because I don't want the peak to decay so much as to make the comparator trigger at a different part of the next wave.  I'm considering this part highly tweakable in terms of exact values and if the opamp takes enough current from the peak hold, I may just drop the bleeder resistor all together.

Finally a LT1711 comparator to catch the part of the wave above the peak detector circuit (there's also a small voltage divider and pot to make this amplitude distance trimmable between about 91% and 100% of the captured peak).  The ADCMP580 chips are fantastically fast, but this one is actually only 1ps more in rated jitter, and there's no need for GHz level responsiveness when dealing with audio tones, plus it outputs in TTL instead of trying to hack something together by terminating the CML or ECL of the other chip and just ground referencing one side.  It's also 20% if the price.

Then for the power supply, I've a linear reg and two switchmode (for negative rail and phantom and which are MHz range switchers), all of which are spec'd to 0.01%V regulation and expect to be using copious amounts of capacitors, as well as a selection of bypass values on every IC.

Then I'm aiming for wide traces, 2oz copper, ground plane over everything, and inside an aluminum box.  Will be individually matching some resistors and things on the input to be sure the differential signal comes together properly, and then whatever fanciful bodges I deem necessary when the thing's actually being tested out.


I appreciate the help so far, does it seem like I'm missing anything obvious?

Kleinstein:
For the input, usual microphones have quite some noise compared to an 16 Bit ADC. So a super low noise input is only needed with something like a dynamic microphone. But there is also acoustic background noise - so needs to be fan - less.

Even rather simple audio ADCs can use a rather constant clock. Usually this is just a normal crystal clock.  This is already quite good compared to the stability you can expect from an mechanical instrument. Changing the clock to a more stable one can be possible if really needed. Alternative one could periodically measure a stable clock in the 10 kHz range (e.g. TCXO derived).

The equivalent time resolution of the 16 Bit audio ADCs is really good, so high resolution ADCs need a stable low jitter clock. Alone for this reason audio hardware already cares about the clock. With just an level trigger, it should be impossible to beat the frequency resolution that is possible by looking at the full waveform, even if without harmonics. Even with an of the shelf sound-card the resolution is not limited by the ADC-clock or ADC but more due to the noise from the microphone, room acoustics, the instrument itself.

One big difficulty for the analog trigger is, that a fast comparator will have high bandwidth and thus reacts to high frequency noise too. Slower comparators will have intrinsic jitter / nonlinearity as the delay depends on the slope. One can slightly get around this limitation by doing amplification with graceful limiting, and than high frequency filtering before the actual trigger. But already this gets complicated.

So of you want an FFT to look at the harmonics anyway - I would leave out the trigger and classical counter.

I would expect to see things like a slight dependence of the frequency on amplitude. So during decay of the tone, the frequency will move by something like a few ppm or at least ppb. At least that is what I saw with miniature tuning forks made from silicon.
 

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod