LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect an output speaker using an NI 9269 module and CompactRio 9022?

Hello, 

 

I am trying to build an active noise cancellation system using FPGA programming in Labview. So far I have:

- CompactRio 9022 chassis

-NI 9269 module (output)

-NI 9234 module (input)

- loud speaker (to connect to the 9269).

 

I have collected a sample of the noise that I would like to cancel. So far I have been trying to simply output some kind of noise from the speaker. Not sure what I am doing incorrectly. 

Below is the block diagram. I am running a sine wave through the simulator hoping to get some kind of noise to the speaker.

 

I feel like I have not connected the speaker correctly. Or maybe, the code is completely wrong or I am overlooking something. 

 

Any help would be great. Please let me know if any information is needed. THANK YOU!!!soundsimulatorcode

0 Kudos
Message 1 of 9
(4,304 Views)

Hello sergiorod14,

 

What are the values that you are using in this VI? How are you wiring the speaker to the 9269? Do you know particular specifications in which this speaker works (voltage, current, …)?

 

 

0 Kudos
Message 2 of 9
(4,272 Views)

Hello Segio and others!

with the preface that i'm a beginner, i can show you something that partially solves your problem but, on the other hand, presents another issue that hopefully some experienced user can solve.

Here the white noise signal is first filtred, then converted by NI9269, and eventually sent to the amplifier.   

So, basically your problem of noise generation is solved.... but not mine unfortunately!! :)) The problem now is that i'm not able to control the volume!

I'd like to have a white noise generator where i can control each parameter, i.e. sample rate, bits per sample, and the volume of the amplifier connected to the NI9269.   

Anyone can help us?

Thank u guys!

 

 

0 Kudos
Message 3 of 9
(4,263 Views)

You probably need an amplifier between the NI 9269 and the speaker. The current drive of each channel of the 9269 is 10 mA typical. If the speaker is 8 ohms, then at any voltage above 80 mV, the current will be limited.  The power delivered to the speaker at the current limit is less than 1 mW, which is probably inaudible.

 

Lynn

Message 4 of 9
(4,251 Views)

Hi Lynn,

thank you so much for your reply!

Actually i know that the amplifier is needed and i already used it. What i was not able to do was applying a loudness controller. Basically because i tried stubbornly to use the "Volume controller" tool, which is usually ok when you use the audio output of the pc. Well, i've solved the problem in a very simple way, i.e., just by using a normal controller providing the  amplitude of the signal (white noise) which is sent to the NI 9269. So, the problem is solved, but now all the world knows that i am sooo novice!!! :)))

 

Fabio

0 Kudos
Message 5 of 9
(4,222 Views)

Fabio,

 

I do not know of anyone who started out not a novice.  As long as you are learning, there is no embarassment to being new.

 

Lynn

Message 6 of 9
(4,204 Views)

Hello guys!

I resume this topic because i've been struggling too long and i need desperately a help!

Basically after having equipped my lab with a number of microphones and loudpeakers, and i've made a "huge" LabView program, but something goes wrong. In order to esemplify, let's say that my goal is:

- To generate a white noise or a pure tone in the frequency range [60, 4000 Hz],

- To send the generated signal to an amplifier (which drives the loudspeaker) through a certain channel of the NI 9269 (I hate the that card!!!).

- To acquire the signal from one microphone by using the NI 9234

- To use the signal that the NI 9269 sends to the amplifier as a reference signal

That's it! But you can't immagine how much i've been struggling with the DAQ settings and signal settings (sample rate and similar), since the signal i want to generate and the signal measured by the microphones have a frequency mismatch. I explain better: if i generate a pure tone signal at 4000 Hz, then i see from the acquired microphone signal (but also from the generated signal sent to the amplifier), that the tone is at around 3750 Hz... which screw up all the test!

I hope i've been clear, otherwise i can try to explain better. Anyways, i've attached a simple case where the above mismatch can be easily noticed.

Looking forward good tips from the masters!

Fabio

 

 

0 Kudos
Message 7 of 9
(4,136 Views)

Hi FabioAir, 

 

It looks like you are using the DAQ Assistant nodes, which require the DAQmx driver.  This tells me you are using a cDAQ chassis and not a cRIO chassis.  Since the original post is regarding use of a cRIO-9022 controller, you may want to make a new post with your question.  Be sure to include any information about the hardware you are using, as it will be important for those who want to help out!  

 

I'm thinking you may want to increase your sample rate to accurately reproduce the 4000 Hz signal.

 

NOTE: cRIO and cDAQ require completely different driver software and the architectures are very different, so the programming practices on cRIO will not apply to cDAQ.  

0 Kudos
Message 8 of 9
(4,110 Views)

Thank you, Wish!

I do it soon and apologize for the inconvenience 🙂

 

Fabio

0 Kudos
Message 9 of 9
(4,095 Views)