03-27-2015 12:34 AM - edited 03-27-2015 12:38 AM
I am working on a fire-fighting robot that runs using myRio. I have a small mic plugged into the 'AudioIn' port of the myRIO and the robot has to detect a certain frequency(2.8 or 3.5 KHz) to start navigation. The AnalogIn express VI gives me raw voltage amplitudes of type 'Double' but the 'Tone Measurment' vi I wanted to use takes in a 'Signal' data type. I tried converting the raw data to dynamic data and feeding it in but did not work. One problem is that I cannot control the sample rate of the AnalogIn express VI (LabView 2013), I appreciate any suggestions on how to go about doing it.
Solved! Go to Solution.
03-27-2015 01:46 PM
Please....its very urgent.
03-27-2015 03:44 PM
When is the homework due?
Have you tried not using the Express VI? There are excellent tutorials on DAQmx on NI's Web Site, one of which shows you how to do most of the "useful" functionality in DAQmx with only 8-10 functions. I'm sure you'll be able to specify your sampling frequency that way.
BS
03-27-2015 04:16 PM - edited 03-27-2015 04:28 PM
If you install the myRIO 2014 High Throughput Add-on you can use the Audio Input Express VI to sample between 1 kHz and 30 kHz.
You will have to follow the instructions in the LabVIEW 2014 myRIO Toolkit Readme in the section titled Switching between Default and High-Throughput FPGA Personalities.
There is also a thread on the LabVIEW MakerHub where the High Throughput toolkit was used to generate sound so it might be a good resource for getting part of the way there.
If you are using NI-DAQ hardware you can get access to the DAQmx driver but the myRIO cannot use the DAQmx driver to sample data.
Edit: You may also get more myRIO specific help by moving the post to the Academic Hardware Products (ELVIS, myDAQ, myRIO) discussion forum.
03-28-2015 01:48 AM
Thank you all for your feedback.
@Bob_Schor the robot competition is tomorrow. Thanks for the suggestions but the High Throughput Add-on turned out to be what I was looking for.
@MilanR thank you so much. I installed LabView 2014 and the myRIO 2014 High Throughput Add-on and I now have access to low level VIs that will let me control sampling frequency and number of samples.
I am now using 'Tone measurments' to measure the frequency of the sound. But the frequency measured is not accurate, but it is atleast consistent. I am sampling at 7 KHz and taking 5000 samples at once. The two frequencies I want to detect are 2.8 KHz and 3.5 KHz. However, the mesaured frequecies I get from Tone Measurment VI are 0.400 Hz and 0.499 Hz, which are always consistent. Picture is attached below.
03-30-2015 10:03 AM
Hi bayoim123,
Thanks for making a new thread for the new question. For others browsing the forum, this question (about 2.8 kHz signals showing up as 0.400 Hz) can be found in bayoim123's thread here.
Friar Tuck