LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting and Acquiring the Value of a Peak Voltage of an Audio Real Time Signal

Hi!

I was browsing for the forums and it seems that my question is quite not related to the answered questions.

I am trying to make a system utilizing the use of LabVIEW and NI myDAQ.

I will need to detect sudden sound bursts using microphones.

 

I wanted to detect the peak of a sound burst. What i saw was using a peak detector. But it seems the peak detector functions differently to what I wanted.
What I wanted to do is to detect that "peak" of a burst, and acquire the voltage of that peak and save make that voltage value as an input to the X-Y axis graph.

 

Thank you in advance if you have any idea how i will detect and acquire the value of the voltage peak.

P.S. I do not need to determine how many peaks or what, i only need to detect the highest peak on a certain time and save the peak value so that i can use that value as input to something else.

 

Best Regards,

Falsehope

0 Kudos
Message 1 of 12
(4,226 Views)

You'll have to do some of the work yourself.  How are you acquiring the sound?  What are the characteristics of the data acquisition system you are using?  What sort of sampling rate are you using?  What sort of frequencies are present in the signal?  Over what period of time are you acquiring data?  What do you mean by "the peak" (positive peak? negative peak? peak RMS? peak "peak-to-peak"?).

 

Show us some code and ask code-related questions.

 

BS

0 Kudos
Message 2 of 12
(4,209 Views)
Hmmm i am going to aqcuire sound bursts. Lets say for example there is a typical environment sound, then a sound burst started to sound. The program must detect the peak of that sudden burst. So in short, the system will be running realtime and will wait for that sound burst. I am planning to use a low pass filter to reject unnecessary environment sounds and detect only the burst which i assume has higher frequency and amplitude. Then acquire its positive peak and use it as an input to another system. Thank you so much sir for responding from my post.

P.S i will use a microphone on the audio or analog input of mydaq.
0 Kudos
Message 3 of 12
(4,183 Views)

@FalseHope wrote:
Hmmm i am going to aqcuire sound bursts.
How?  Show us the code you are writing.  You managed to answer none of the questions I asked.  Show us the code you are writing.  Tell us the sampling rate you are using.  Show us the code you are writing.  If you had done any work on this, you would not use phrases such as "I asssume has higher frequency and amplitude", but would show us a trace and be able to parameterize the data you want to collect.  Show us your code.
0 Kudos
Message 4 of 12
(4,157 Views)

@Bob_Schor wrote:
You managed to answer none of the questions I asked.  Show us the code you are writing. 

In all fairness, most of the questions you asked the first time didn't make sense.  If he's acquiring sound, the lowest you'll ever find is the noise floor.  You're clearly not looking for negative peaks or peak to peak.  His original problem made it rather clear he was looking for a peak voltage value that related to a suddenly louder noise.  That's going to be a positive voltage.  The rest of your questions confused the issue rather than helped work towards a solution.

 

But, you're right.  They should show the code.

 

Here's my question, why are we assuming the burst is a higher frequency?  If you're looking for the sudden louder noise, you're looking for amplitude, not frequency.  Have you been able to successfully bring sound in from the myDAQ yet?  Start small.  Get that working. 

 

You started off saying "real time."  You should define that.  What does real time mean to you?  How quickly do you need a response?  What kind of period are you working with in terms of highest peak during this time?

Message 5 of 12
(4,130 Views)

@ natasftw

Thank you so much sir for trying to understand me. I'm quite new in the forum and I am not quite familiar how it goes around here. Anyways...

 

___________________________________________________________________________

Yep I want to acquire the positive peak amplitude of the sound burst. Can I upload my created VI here? I think I'm quite wrong for using the term "frequency". So yeah, it should be the amplitude. I wanted to detect the amplitude of the sound burst and acquire the value of that in voltage. Then I'll use the value to plot it on a Graph.

 

I will attach my VI here. Please have time in checking it. Thank you so much! I'll put explanations on the VI on how it works and what it is for.

 

Best Regards,


Falsehope

 

P.S. The device should run in real time. It should acquire a sound burst at any time it "hears" a sound burst.

And yeah I was able to connect NI myDAQ to the LabVIEW program and made it read signals from microphone (I used the Audio Jack Input) but i can't seem to find out how I will acquire the peak amplitude of the sound it receives and how I will save that sound.

Download All
0 Kudos
Message 6 of 12
(4,101 Views)

OK, now you've provided sufficient information to make some assumptions about what you really want to accomplish.  Indeed, the most useful thing you provided are the two JPegs showing the microphones and the sound source, and the diagram showing a multiplexer connected to four microphones.  You also seem to be using a single myDAQ, which has a single (stereo) Audio Input capable of sampling at 200K Samples/second.

 

Here are some questions.  How do you propose to record 4 channels of sound data on a myDAQ that has two audio inputs?  You show a multiplexer running at 25KHz, but how are you going to coordinate this with your 2-channel A/D system?  How will you synchronize the multiplexor's clock and the A/D's clock?  [I, personally, have no idea how to do this -- I would naively say that you can't record 4 microphones simultaneously with a myDAQ, but I'm not an engineer, so don't take my work for it].

 

I think you might be "overanalyzing" the problem.  Consider a two-channel audio input system, sampling at, say, 44KHz.  Take two microphones, space them about 6 inches apart, point them left and right (maybe angled slightly forward), and let them "listen" to sounds.  Can they localize the sounds in the horizontal plane?  Does the sound need to have "peaks" (I take it you are talking about a fairly abrupt "noise burst" or something like that)?  Does the nature of the sound (duration, frequency content, pure tone or noise, etc.) matter?

 

You should, of course, be able to figure out the "instrument" I'm describing in the previous paragraph.  If not, close your eyes and have a friend talk to you -- can you point to him/her without opening your eyes?  

 

Think a bit more about the question, think a bit more about the hardware present in the myDAQ, think a bit more about what you want to do, rather than worrying up front about how to do it.  I haven't looked at the myDAQ hardware recently, but I'm pretty sure that with the software that comes with myDAQ, or with MAX, you should be able to easily acquire a stereo sound sample, but what do you want to do with it?

 

Bob Schor

Message 7 of 12
(4,080 Views)
@ Bob_Schor
my good sir. Thank you so much for that feedback.

_________________________________________________________________________________

ears. That's the best description of the "instrument" you are referring to. However, i am working on a certain constraint and my proposed microphone array is a four pieces microphones. It is easier to detect sounds using two microphones at shorter distance. However, i am targetting on detecting sounds on long distances (let's say 10 to 20 meters) . The farther the sound source, the greater the uncertainty of where the sound came from.

with regards to how i will synchronize the multiplexer and the myDAQ, i plan to do that by experimenting and ofcourse following a few concept of the Nyquist theorem. And i'll be leaving that as a problem to myself and my groupmate.

as of now, my concern is how i will detect the peak voltage. The rest will follow.


Regards,
Falsehope
0 Kudos
Message 8 of 12
(4,070 Views)

Yes, ears!  How do ears localize sounds?  They use two "algorithms", ITD (Interaural Time Difference) and ILD (Interaural Loudness Difference).  Both are easy to implement in LabVIEW, neither requires finding the "peak voltage".  There is, however, a "threshold" issue.

 

BS

0 Kudos
Message 9 of 12
(4,026 Views)

ITD (Interaural Time Difference) and ILD (Interaural Loudness Difference)

 

Sir, I'm quite interested in this two methods in localizing sounds. Where can I find more information about this?

 

 

Best Regards,

Falsehope

0 Kudos
Message 10 of 12
(4,013 Views)