1
\$\begingroup\$

enter image description here

I need to give a square wave input to my filter circuit using Ni-DAQ-USB-6001 and LabView. Could someone help me with how can I do that?

I also need to read the filtered wave and peak to peak voltage coming out from the filtered circuit using Ni-DAQ-USB-6001 and LabView. I need help with this too.

I have never used NI-DAQ-USB-6001 or LabView. I also looked up their examples and a lot of documents and videos on YouTube but could not figure it out. Could someone please help me with that?

\$\endgroup\$
9
  • 2
    \$\begingroup\$ so, show what you've got so far! We can't know where you're stuck. Can you open labview? Can you send anything? It's super unclear where you're stuck \$\endgroup\$ Jun 23, 2021 at 17:41
  • 1
    \$\begingroup\$ @Devashs: Scratch YouTube off of your list of places to learn things. Start with the tutorials from National Instruments. Work your way through them, then look at your task in light of what you have learned. \$\endgroup\$
    – JRE
    Jun 23, 2021 at 17:48
  • \$\begingroup\$ @MarcusMüller To be honest, I had tried a few things looking up on youtube but I could not figure it out. So even if you could help me with some links I can refer to particularly for NI-DAQ-USB-6001 and LabView that would be great. \$\endgroup\$
    – DevanshS
    Jun 23, 2021 at 17:48
  • \$\begingroup\$ It sounds to me like you are trying to see how a filter responds to an input. Describe what your goal is. There might be a better way to reach it than what you have thought up. \$\endgroup\$
    – JRE
    Jun 23, 2021 at 17:49
  • \$\begingroup\$ @JRE, Yes that is exactly what I am trying to do. So I have a set of 5 narrow bandpass filters (100 Hz, 500 Hz, 1k Hz,3k Hz,5k Hz) that I have created and I will be passing a square wave frequency through them trying to emulate a superimposed wave and getting the filtered frequencies out with the voltage. And then I would want to read the peak to peak voltage or the filtered frequency using NI-DAQ-USB-6001. \$\endgroup\$
    – DevanshS
    Jun 23, 2021 at 17:54

1 Answer 1

1
\$\begingroup\$

Since what you really want to do is test the frequency response of some filters, a square wave is not really the way to go.

It has been about twenty years since I last used LabView so I can't give you explicit instructions on how to do this.

Page 25 tells you where to find the examples of how to get samples to and from the USB6001. It will come down to a VI or two that you connect your other program parts to. The examples are in the Help files of LabView.

  • Use the white noise VI to generate noise. Connect its output to the VI for thr USB6001.

  • Connect the USB6001 VI to the power spectrum VI. The output of that goes to a chart display.

  • Connect the physical analog output of the USB6001 to the input of one of your filters.

  • Connect one of the physical inputs of the USB6001 to the filter output. That should be the same input as the VI channel you used in LabView.

The power spectrum will show the frequency response of the filter.


That will get you a basic, working system. It won't be good, but it will do something. You'll need to do much more to make it really useful - you'll need to learn a good bit about LabView to do it.


Alternatively, you could use GNU Radio and the line in and line out connections on your computer's sound card. Send the signal out through line out, read the response back through line in.

Typical sound cards have a resolution of 16 bits and higher than 44kHz sampling rate in comparison to the 14 bits and 5kHz of the USB6001.

It would even be easier to do it with GNU Radio than with LabView.

I slapped such an analyser together a few weeks ago for one of my own projects.

You can get the GNU Radio flowchart for the analyser here. It isn't anything special - it is nothing more than a few standard modules clicked together. It is rude and crude - but functional.

This is an example of its output:

enter image description here

The red line is the signal as it comes from the sound card output. The blue line is the signal after passing through a high pass filter.

You'll need to install GNU Radio to use the flowchart.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.