3
\$\begingroup\$

First of all, excuse my layman terminology but electrical engineering is not my speciality.

I am currently trying to measure the delay of a sound wave travelling through different pieces of wood. I have already read on here that this is obviously possible with two piezo sensors (and a knocking device, e.g. a hammer) and an oscilloscope. Since I'm on a tight budget I am not willing to buy one just for this experiment.

Now I was wondering if I would get accurate measurements if I was to use a Raspberry Pi and an ADC (I have a MCP3008 lying around) as well as two piezo sensors. Is the sampling rate high enough to measure delays in the µs range?

If this is not possible, I would appreciate other low-budget suggestions. I was maybe thinking of a circuit which first subtracts the two signals which I can then convert via my ADC.

\$\endgroup\$
1
  • \$\begingroup\$ Others have commented about limited sample rate leading to a low temporal resolution, but I see that you have asked some interesting questions on stackoverflow, showing that you have a lot of clues about mathy things. Instead of sending one pulse, maybe you can send lots of pulses and average the result to get a higher precision. \$\endgroup\$
    – pipe
    Commented Jun 14, 2016 at 17:05

3 Answers 3

2
\$\begingroup\$

Rather than building counters and threshold devices, if your software foo is up to it and you have a PC, then using a sound card oscilloscope or a recording application like Audacity (which can show you waveforms just like a 'scope) could give you all you need. Building a thresholding device to get a nice logic edge from the sensors is a job that will probably need an oscilloscope to be successful.

At most, all you need is a pre-amplifier per channel, but with a sufficiently sensitive input, even this might not be required. Connect the two sensors to the two input channels.

As soon as you hook the sensors up to the PC, you can make a recording and see what you have.

As you would be recording analogue waveforms, your temporal resolution is not limited to the sampling rate. Programs like Audacity allow you to shift time waveforms with sub-sample resolution. Shift one waveform until it lines up with the other, and the shift you needed is the answer. Often PC hardware is capable of higher rates than 48kHz, 192k is not uncommon.

Using an existing PC and a free program like Audacity is about as low budget as you can get.

\$\endgroup\$
2
  • \$\begingroup\$ I think this solution will be the easiest solution regarding my skillset. I just built a pre-amplifier based on these schematics: eleccircuit.com/acoustic-guitar-pickup-circuit-using-tl071 . \$\endgroup\$ Commented Jun 19, 2016 at 9:30
  • \$\begingroup\$ What would be the frequency range for a piezo sensor? Besides measuring the delay I would also like to analyze the frequency spectrum of the knock. Is a piezo sensor sufficient for capturing 10s of Hz or do I need another measuring device, like an accelorometer? \$\endgroup\$ Commented Jun 19, 2016 at 9:43
1
\$\begingroup\$

Per the datasheet, the max sampling rate of the MCP3008 is 200 ksps. 1/(200kHz) = 5 us. That means, at best, you will have a temporal resolution of 5 us. I suspect this is much too slow for your purposes.

However, you don't need an ADC, and you might be able to do this with a microcontroller. The Raspberry Pi is not a great solution for this because it is not really designed to operate in realtime.

Basically, by designing an amplifier/peak detector circuit, you can convert the analog-ish piezo signals into digital peaks, and use those to trigger interrupts on a low-cost microcontroller. Depending on the speed of the microcontroller, I'd expect you'd be able to get a temporal resolution of at least 1 us, and likely much faster.

You could also design a counter circuit with discrete logic that would run very fast. Basically, use a free-running counter, with one piezo triggering reset and one piezo triggering a capture (or a stop, for that matter). Running the counter at say, 20 MHz, would be fairly easy, giving you a theoretical temporal resolution of 50 ns.

One final suggestion: there are very inexpensive USB logic analyzers out there with relatively high sample rates that you could also use for this purpose. Again, convert the piezo pulses to digital, capture the edges with the logic analyzer, and then measuring the delay is trivial.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, very helpful. The counter circuit sounds like a good idea. Where could I find more information on how to build one? I will check out those USB logic analyzers. Could you recommend one? I am just more comfortable to work with digital information (I am a CS grad). \$\endgroup\$ Commented Jun 14, 2016 at 16:16
  • \$\begingroup\$ Saleae USB logic analyzers are pretty great. The cheapest one does 12 Msps and is very inexpensive, while ~220USD gets you a very capable lab instrument. As far as digital counters go, a 4040 counter IC (12b) might be a good place to start. The number of bits depends on the required maximum acquisition length and temporal resolution (clock speed). \$\endgroup\$
    – uint128_t
    Commented Jun 14, 2016 at 16:22
1
\$\begingroup\$

I presume all the wooden blocks will be identically shaped to make good comparisons and, if so why don't you use the idea behind such musical instruments as the marimba. The wooden blocks resonate when hit and give off a distinctive pitch that is related to the speed at which sound travels through the medium.

Use a microphone and a sound card to capture the signal and analyse the fundamental frequency produced. From this calculate the speed of sound in the block.

\$\endgroup\$
4
  • \$\begingroup\$ That sounds like an interesting idea. I assume that since its big wooden sheets there might also be very low frequency responses when knocking on the wood. I don't think a microphone would be able to capture these frequencies (probably in the 10s of Hz). Do you have other suggestions for recording such frequencies. \$\endgroup\$ Commented Jun 19, 2016 at 9:38
  • \$\begingroup\$ Most electret microphones will get down to sub Hz. They are often used as door opening/closing sensors to detect changes in pressure on entry detect systems. \$\endgroup\$
    – Andy aka
    Commented Jun 19, 2016 at 9:42
  • \$\begingroup\$ Thanks, perfect. I will give that a try. Could you also suggest a way in which I could capture as much wood vibration as possible while at the same time reducing the captured direct sound, i.e. the sound travelling in all directions from the source of knocking (I hope you know what I am trying to express). \$\endgroup\$ Commented Jun 19, 2016 at 11:27
  • \$\begingroup\$ The initial impact sound will rapidly decay just as it does in a percussion instrument - try and make sure you differentiate between the resonant modes of the wood due to its shape having different dimensions. This might make it untenable of course. \$\endgroup\$
    – Andy aka
    Commented Jun 19, 2016 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.