stevenarellano

The project I'm going to design is an Acoustic Thermometer(AT). I decided to use Arduino for ease of programming. I would like advice for my approach, if there are any faults or easy fixes. The basic idea of an AT is to time a sound wave over a known distance. implement known atmospheric values, and directly calculate the Temperature. Because of certain factors, I must use a 1kHz audio wave, so a 'typical' Ping sensor won't do the job.

My Approach:1. Use Arduino Tone library to output 1kHz square wave output to a Low Pass Filter, this should produce a sine wave, then output to speaker for approximately 5 microseconds. (verify?) At the same time, I implement: start = micros(); to begin timing.

2. To capture audio signal is where I'm having most trouble. I currently have in mind to use the Freq Counter Lib or an FFT to find the fundamental frequency.(neither of which I'm sure how to implement) Once a 1kHz signal is detected, interrupt (need help with) is used to implement: end = micros(); to end timing.

3. The difference of the timers divided by the set distance is the Speed of Sound, which allows the calculation of the Temperature. The Sound Speed Calculation will be done at least 20 times, average taken, and output the Temperature every few seconds.

Thanks in advance for all your responses. Stephen

PeterH

I don't quite get why you're thinking about measuring the returned frequency. Unless you're getting a bounce off a moving object, sure the frequency you get back will be the same as you sent. What you're looking for is the round-trip time, and I would have thought that the way to time that would be the same as any other 'ping' based sensing.

Have you calculated the effect of the temperature change you're trying to measure to see what sort of timing resolution you need to achieve? Gut feeling is that this sort of method would be difficult to apply over long distances due to attenuation, but the shorter the distance the less effect temperature will have on the round-trip time which would result in poorer resolution on the calculated temperature for a given timing resolution.

stevenarellano

PeterH,The reason for the frequency detect instead of simple amplitude detect is that it will be used on a student launched high altitude weather balloon, so at very high altitude, attenuation would put the return ping almost in the noise floor. (This is where freq detection has the advantage over amplitude detection.)

The speed of sound at 1atm and 21C is approximately 29 microseconds/cm. The effect of temperature change on sound speed is near 600 milliseconds/degree C. From this, the resolution should be fairly accurate.

Ps. I am planning approximately a 1foot long audio isolated device to eliminate outside noise.

The effect of temperature change on sound speed is near 600 milliseconds/degree C

I'm trying (and failing) to get my head around the dimensions in that statement.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.Do not send technical questions via personal messaging - they will be ignored.I speak for myself, not Arduino.

stevenarellano

It's a change of a change. If you calculate the change of Velocity of sound speed w.r.t. temperature(from 0C to 20C) the change of Velocity is approximately 11.5m/s. Divide this number over a change of 20 degrees, and you get approx. 0.575(m/s/degreeC), or approx 600 mm/s/degC.(forgot the /s in the last dimension statement)

PeterH

Have you got reason to believe this measuring technique is feasible? I don't think you said what altitude range you need to support, but Wikipedia says that the speed of sound drops from circa 340 ms-1 at sea level to circa 295 ms-1 in the 11,000 - 20,000m altitude range and then rises slightly up to 29,000 m. So the speed does vary with altitude, not by a huge amount and not in a linear way. At sea level the propagation time would be about 1ms and it would reduce by about 100 us over the entire altitude range. I don't know how much resolution you expect to get over that 20,000m range, but I suspect that the resolution you are able to achieve based on measuring variations in the sub 100 us range will be rather poor.

I'm not convinced the frequency detection approach you describe makes any sense. If anything, I would have thought you needed a hardware phased-locked loop to have any chance of detecting the presence of your signal, and just looking for changes in a binary signal in a noisy environment seems to me to be utterly futile. Even supposing you get it working, what you'd be measuring is the propagation time plus the signal acquisition time where the acquisition time is unknown and varying. Using FFT suffers from the similar problem (that it only works on the basis of a sample over an interval) plus requiring high speed analog-to-digital conversion and the ability to process a significant data set, which is not something Arduino is really well suited for.

If you want to measure the speed of sound, I would have thought your best chance was to implement a conventional ping sensor and arrange for the amplitude to be high enough to be reliably detectable within the range of conditions you expect to encounter. I think that what you'd really be measuring, if you succeed, would be temperature. In that case I wonder whether you might not be better off just measuring temperature and/or pressure and calculate the altitude from that. However, I know that this problem has been solved many times and no doubt you know of, or will be able to find, somebody who has found a workable solution. In that case, I suggest you try to copy it.

The speed of sound changes due to pressure and temperature and humidity.

- pressure: = more molecules in a same room => they will bump into each other more often => faster propagation- temperature = molecules moving faster => they will bump into each other more often => faster propagation- humidity = more (water) molecules in same room => they will bump into each other more often => faster propagation

So to calculate the temperature from speed of sound you must at least also measure pressure and humidity to make a reliable reading.

For some of the math involved, see - http://www.rane.com/pdf/eespeed.pdf -

stevenarellano

Have you got reason to believe this measuring technique is feasible? I don't think you said what altitude range you need to support, but Wikipedia says that the speed of sound drops from circa 340 ms-1 at sea level to circa 295 ms-1 in the 11,000 - 20,000m altitude range and then rises slightly up to 29,000 m. So the speed does vary with altitude, not by a huge amount and not in a linear way. At sea level the propagation time would be about 1ms and it would reduce by about 100 us over the entire altitude range. I don't know how much resolution you expect to get over that 20,000m range, but I suspect that the resolution you are able to achieve based on measuring variations in the sub 100 us range will be rather poor.

I'm not convinced the frequency detection approach you describe makes any sense. If anything, I would have thought you needed a hardware phased-locked loop to have any chance of detecting the presence of your signal, and just looking for changes in a binary signal in a noisy environment seems to me to be utterly futile. Even supposing you get it working, what you'd be measuring is the propagation time plus the signal acquisition time where the acquisition time is unknown and varying. Using FFT suffers from the similar problem (that it only works on the basis of a sample over an interval) plus requiring high speed analog-to-digital conversion and the ability to process a significant data set, which is not something Arduino is really well suited for.

If you want to measure the speed of sound, I would have thought your best chance was to implement a conventional ping sensor and arrange for the amplitude to be high enough to be reliably detectable within the range of conditions you expect to encounter. I think that what you'd really be measuring, if you succeed, would be temperature. In that case I wonder whether you might not be better off just measuring temperature and/or pressure and calculate the altitude from that. However, I know that this problem has been solved many times and no doubt you know of, or will be able to find, somebody who has found a workable solution. In that case, I suggest you try to copy it.

Thanks for your insight PeterH,In this project, I am worried solely about Temperature calculation, this is the reason this project seems feasible(at least to me). Altitude and pressure(down to about ) has very insignificant effects on Sound Speed when compared to the effect Temp has. As Wikipedia cites those changes with respect to altitude, they are occurring because of the Temperature variations that occur within the different "spheres" rather than the altitude itself. (ex. "However, there are variations in this trend above 11 km. In particular, in the stratosphere above about 20 km, the speed of sound increases with height, due to an increase in temperature from heating within the ozone layer.") http://en.wikipedia.org/wiki/Speed_of_sound#Altitude_variation_and_implications_for_atmospheric_acoustics

This project is meant to monitor the changes in Temp. inside of the balloon as it rises and will reach at maximum, the stratosphere(<50km). The greatest challenge this project faces is the lack of molecule interaction at such height. The low pressure and lack of molecules attenuates the audio wave. This is the reason that one must use an Acoustic thermometer instead of a Conventional one. The attenuation is also the reason past experiments have had trouble once the balloon passes certain heights. This is also the reason I considered frequency detection. If this method doesn't pan out, I may attempt the increased amplitude you suggest, once we get to testing in the vacuum chamber.

stevenarellano

The speed of sound changes due to pressure and temperature and humidity.

Thanks for the clarification robtillaart,The reason we can ignore the effects humidity for this project is because it will be placed in a large Helium filled balloon (nearly 1million cubic feet), for which gas constants are known. Pressure adversely affects attenuation, so this is my biggest challenge.

stevenarellano

Thanks for this link. I think it is very similar to what I am proposing, possibly the only difference is the frequency at which we need to emit the Ping. which is 1kHz. This is the reason I've opted to use Arduino libraries instead of the 40kHz Ping sensor.Thanks again.

Yes, it will be positioned somewhere near the center of the balloon. The only way that Helium changes the project versus dry air is the constants which are used during the Temperature calculation. Sound Speed is still calculated the same way.

Yes, it will be positioned somewhere near the center of the balloon. The only way that Helium changes the project versus dry air is the constants which are used during the Temperature calculation. Sound Speed is still calculated the same way.

It's going to have another huge effect though - how much is the temperature at the sensor going to lag behind the ambient temperature? The effect you are trying to measure is dominated by thermal effects and now you are introducing an unknown but potentially very substantial lag in the temperature changes.

stevenarellano

It's going to have another huge effect though - how much is the temperature at the sensor going to lag behind the ambient temperature? The effect you are trying to measure is dominated by thermal effects and now you are introducing an unknown but potentially very substantial lag in the temperature changes.

That is a very interesting observation. It is definitely something that I will have to include in the presentation. NASA has sponsored this project and has set those requirements already. They are trying to determine the temperature inside the balloon as it rises through the atmosphere, not necessarily the environmental temperature.