03-14-2011 12:38 PM
I am working on a project for school, and wee have to filter out a guitarr signal so that each different note triggers a light. So far we have set up filters for several notes and have fed the filtered output into a DAQ assistant. The guitar signal is being fed in through the sound card, then into the circuit using the Acquire Sound function. We are using a NI USB-6008 to interface to a breadboard containing LED's.
Basically, we can filter the signal, but cant seem to get any output from the USB-6008 to trigger the lights. Any help would be greatly appreciated.
03-14-2011 02:21 PM
There is a bunch of analysis code in my Xylophone tuner that may be useful to you (although the mass of code may put you off a bit). Essentially, you need to use the tone extraction VIs to determine the guitar string's fundamental frequency, then use that frequency to either calculate a note or directly turn on or off the lights. You don't need to filter the signal - just look at the frequency from the tone extraction and compare it to values you have chosen to turn the lights on and off.
You also need a WHILE loop so it will run continuously.
03-15-2011 10:40 AM
Thank you. Have you any advice on getting output from the USB-6008? This is the main problem that we have been having.
03-15-2011 02:53 PM
Here are a few good resources for that device.
http://www.ni.com/pdf/manuals/374147j_02.pdf
http://www.ni.com/pdf/manuals/371303l.pdf
Make sure you can get the device working in MAX first, then move on to writing LV programs!
Hope this helps!
03-16-2011 08:09 AM
Using the DAQ Assistant, you should be able to get the USB-6008 up and running quickly. The biggest issue you may have is the interface to the LEDs. You will need a resistor in series with the LED to limit the current and voltage to the LED (8.5mA for the digital outputs, 5mA for analog outputs). Check your LED specifications, then calculate the resistor value based on the maximum current and the voltage drop from the output of the 6008 and the voltage rating of the LED. See page 21 of your manual for a connection diagram.
Let us know if you have more problems.
03-16-2011 09:38 AM
We've had the lights work with the 6008 before using a simplae program that used a switch and an array to give a digital output, but for some reason we cant get it to work with our own program. Basically, when we get an output from the comparator, we want that to trigger the digital output and activate a light. We Have our output from the comparator in the circuit but nothing is happening! The USB-6008 has been tested, it just seems that we're missing something in our program
03-16-2011 10:37 AM - edited 03-16-2011 10:44 AM
There's no way for us to help based on a picture of a bunch of Express VIs since they hide all the details. Post your code.
EDIT: Actually, IMHO you should be using real LabVIEW and not the Assistants and Express VIs anyway. While you're in school you might as well take the time to learn the language the right way. Relying on a bunch of wizards that hide all the actual code isn't it.