NI Home > Community > NI Discussion Forums

Wireless Sensor Networks

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

 The Brand of the Hydrophone is named Dolphpin Air. My partner has the specs of the Hydrophone. Do you have any other mode of communication than this? If not I will get in touch with you tommorow has well.

Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

 Also my partner plays the tone contiouly through his windows aplication into the speaker he has inclosed in the PVC pipe. I use the Play back wavefrom to intercept the singal which I'm able to do allsomost perfectly.. And I'm also able to intercept the pusle he send form his aplication. iof he sends a square wave I see it on my VI, if he sends a trianglar wave I'm also able to see it on my VI. The only thing is trying to see where the sginal bounce form the boat or trying to time the singal he sends in order to find the time differnce of the singal he sent from his sonar to the hydrophone. Both the Hydrophone and the Sonar / speaker are connected to the NI-USB 4431. His sonar is chacnnel 1  the Hydrophone is channel two. Again the Hydrophone is a Dolphin Air brand Hydrophone. Will have more infor conrerning it tommorwow.

Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

The Brand of the Hydrophone is named Dolphpin Air. My partner has the specs of the Hydrophone. Do you have any other mode of communication than this? If not I will get in touch with you tommorow has well.

Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

 Also my partner plays the tone contiouly through his windows aplication into the speaker he has inclosed in the PVC pipe. I use the Play back wavefrom to intercept the singal which I'm able to do allsomost perfectly.. And I'm also able to intercept the pusle he send form his aplication. iof he sends a square wave I see it on my VI, if he sends a trianglar wave I'm also able to see it on my VI. The only thing is trying to see where the sginal bounce form the boat or trying to time the singal he sends in order to find the time differnce of the singal he sent from his sonar to the hydrophone. Both the Hydrophone and the Sonar / speaker are connected to the NI-USB 4431. His sonar is chacnnel 1  the Hydrophone is channel two. Again the Hydrophone is a Dolphin Air brand Hydrophone. Will have more infor conrerning it tommorwow.

Member
WillPwr
Posts: 135
0 Kudos

Re: Using NI-4431 to find the distance of an object

Hello, Tunmac!

 

Thank you for the information. The easisest way to synch will be for you to feed your output (the wav file) to both the speaker and to another AI channel (using a BNC splitter). You can then compare this AI channel to the AI information from your hydrophone to calculate the delay (using the example I sent as a starting point).

 

For aligning the output time of your file, you can convert it to a waveform data type using the "Sound File Simple Read" (seen below). 

 

Sound File Read Simple.png

 

The easiset way to use this is if your sound file consists of your sonar "ping" followed by silence, with a total length of .08s (if that's the interval at which you want to ping). This file can then be repeated continuously in your code, and then compared with the other input signal. Please let me know what questions you have on this! I am also testing some code myself, and should have some more pointers for you soon.

Will Hilzinger | Switch Product Support Engineer | National Instruments
Member
WillPwr
Posts: 135
0 Kudos

Re: Using NI-4431 to find the distance of an object

Hello, Tunmac!

 

I just wanted to see if you'd been making any more progress since my last post, or if you had any questions.

 

As mentioned, you can start from the example I sent (or the attached if you're not using an external trigger). You'll need to add another AI task and also synchronize it with the AO task. More information about synchronizing can be found here:

 

Dynamic Signal Acquisition Basics

 

I've been working myself, and I wanted to point out another key function:

 

Waveform Peak Detection.png

 

You can use this to locate the first peak seen from the microphone measurements (through your second AI channel) and your generated waveform (through the first AI channel), and compare the time at which they're observed. This can be done by extracting the "dt" component of your measured waveform with the "Get Waveform Components" vi. Dt is the time difference between samples.

 

Please let us know what questions you have on this!

 

 



Will Hilzinger | Switch Product Support Engineer | National Instruments
Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

I'm solrry it has been so long , since I have contacted you last. I have been making small progesses. I started to work with singal express trying to compare the octaves of the sound wave sent from the ping to a distance. Someone mentioned to me to use a phase lock loop but it didnt work. I have another question , In the Functions Paleate, Under Measurement I/O, Under DAQ there are VI that are realated to The DAQ. Do I use those to perform The experiment you just showed me. Is there any information that I can obtain in order to use those vi's in my work .

Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

What is a  AI task and  AO task?

Member
WillPwr
Posts: 135
0 Kudos

Re: Using NI-4431 to find the distance of an object

Hello, Tunmac!

 

To answer your first question - yes, you can use a number of the functions in Measurement I/O>>DAQmx to obtain data from your DAQ device (the 4431). 

 

These include AI and AO task. "AI" stands for "Analog Input" and "AO" likewise stands for "Analog Output." 

 

To give a bit of background on the topic, there are two main kinds of signals that you can generate and analyze - Digital and Analog. In short, a digital signal only contains two types of values - "high" and "low." Take, for example, a light switch, which can only be turned on or off. An analog signal, however is more akin to a dimmer switch - it can be high (on), low (off), or anywhere inbetween. The values of the signal can be anything, and aren't resticted to only two types. For more about the differences between Analog and Digital, you can check out this web page.

 

Your sound signal (generated from your waveform) will be considered an anlog signal - as it is sending a waveform consisting of your sounds. To play the sound through LabVIEW, your wav file will be an "Analog Output" or "AO." To receive this analog singal through your microphone, you'll need an "Analog Input" ("AI") task, which will measure and analyze the Analog Signal as it it input to the microphone.

 

"Tasks" are LabVIEW's notation for a given set of actions. This could be generating a signal (and AO Task), reading in a signal from a microphone or other sensor (AI Task), and many more. Check out the below link for some basics about starting with DAQ:

 

Getting Started with NI Products

 

However, the basic setup you'll need can be found in the example I posted. You will have to do some modifications, and I'd still recommend taking a look at the above link - but starting from scratch won't be necessary.

Will Hilzinger | Switch Product Support Engineer | National Instruments
Member
Tunmac
Posts: 15
0 Kudos

Re: Using NI-4431 to find the distance of an object

 I know it has been a long time since i have contacted you  I have been on break but I'm confused. You sent me AI-AO ext trgger . What parts do I take for my program and what parts do I leave . I know that I need something dealling with analog but again what does Data max box stand for . How do I connect the inputs and out puts of the data max boexs?