03-06-2014 01:48 PM
Im demonstrating how noise cancelling headphones work.
Using the NI Elvis II and Labview.
Im using a mic to pick up the noise and use an mp3 player.
I will combine the two sounds and use the adpative filter kit to remove the noise(mic) and the output is played to headphones.
Iv started building the circuit on Labview but have some problems.
I would appretiate any help as my work is due in 2 weeks.
Thank you.
03-06-2014 01:54 PM
PS. You don't "build circuits in LabVIEW". LabVIEW isn't an electrical program. Do you mean you created a block diagram of your program?
You say you have some problems. Tell us what the problems are so we can help you. No one wants to guess.
Have you searched the forums for noise cancellation? It is the kind of project that has certainly been attempted several times before. Maybe there are other threads that you can read and give you tips.
03-06-2014 02:15 PM
Sorry.. Block diagram*
Im new to Labview.
I have looked at noise cancellation projects, they all seem to use simulated noise, where im using the DAQ assist which uses an analog data signal.
I first realised that I have to convert the signal- using the dynamic to array function. So that function recieves the correct data type.
But Im still unsure if using the correct adpative filter signal function- should i be using the AFT Filter Signal and Update Coefficients or the AFT Filter Signal?
Also If im connecting the blocks to the correct inputs.
Thanks
03-06-2014 05:18 PM
http://www.ni.com/example/31218/en/
There's help and examples available. Read your AFT documentation and search NI for tutorials on that toolkit. You'll also need to dump the DAQ Assistants and learn to write real DAQmx code since you need sample aligned waveforms for decent results. Also keep in mind that you will not be able to mimic real noise cancelling headphones very well. Without super fast ADCs and a real-time OS there will be too much phase difference to work for high frequency signals. There may be expensive DSP-Based products out there but most NC headphones are analog due to the phase issue.
It's a neat project idea though and you should be able to create a cool example of how the technology works. I can't help much since I don't know the AFT or NI-Elvis but keep us posted on your progress and we'll help where we can (Short of doing your homework for you of course ).
You should do a search here for more info on noise cancelling too, I'm sure I remember similar requests in the past.
03-07-2014 05:25 AM
I currently get this error:
Error -50103
Possible reason(s):
NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.
Task Name: _unnamedTask<8>
How could I solve it? I assume it is because im using two DAQ assists.
03-07-2014 06:41 AM
I managed to solve my DAQ problem. Now I have new problem
Error -42009 occurred at NI_AdaptiveFilter.lvlib:AFT Filter Signal and Update Coefficients (Real, Array).vi:4620001
Possible reason(s):
Adaptive Filter Toolkit: The length of the input signal x(n) does not equal that of the input signal d(n)
03-19-2014 06:32 AM
Can any one help me with the buffer error problem?
Error -200279 occurred at NCH2Mics.vi:Instance:1:490001
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem
Thank you
03-19-2014 06:37 AM
Hi J-ANT,
simply do what the error description says: read your samples more often…
Your data analysis took too long and so the DAQmx task has to overwrite samples in its buffer! A producer-consumer scheme is most often an appropriate programming scheme in such tasks…
03-19-2014 07:28 AM
I found the soultion! Cheers for your input.
http://www.ni.com/white-paper/5370/en/
03-19-2014 10:44 AM
Im no getting a problem with sampling. I have adjusted the sampling rates and number of sample. I get this silent gap if I want better quality( more samples) any way i can solve this?