04-21-2010 10:06 PM
Hello,
I'm new to Labview and I'm required to create a program that can acquire a voltage.. sounds simple.. the difficult part is that it needs to be able to create event markers on the data to indicate that a sound has occurred.
If I could somehow route the audio input to the trigger channel of my NI DAQcard6024E and set the threshold level it would work, but I can't find a way to do this.
To put it in a real-life scenario... what is happening is that I'm acquiring EEG (brainwave) voltages whilst presenting a series of auditory 'clicks'. We want to examine the changes in EEG that occur in response to these clicks. So I need to have some way of establishing exactly when the sounds were presented on the EEG data.
Hope somebody can help 🙂 At the moment my VI can acquire voltage data continuously and write the files to excel, but I can't work out how to create event markers for when the stimulus occurred.
Thanks
Shane
04-22-2010 04:44 AM
So you have a 6024 to sample the output of an EEG amplifier. If you have another free analog input at this card you can use it for a mic.
A crude way: EEG signals are low frequent. So if you sample high enough (10kHz) you can add a small burst of a 3kHz tone as an indicator and cut it out later with a filter.
If your tone signal is always higher than 500Hz and all EEG signal of interest below 50Hz you can simply add the NF to the EEG and seperate in LabVIEW with a filter.
The simplest way of adding the NF are two resistors , one from NF one from the EEG that meet at the 6024 input.
04-22-2010 05:01 AM
04-22-2010 08:30 PM
Thanks for responding.
Yes i understand that it's not ideal to use the soundcard rather than a spare channel in the DAQ card, but unfortunately the amplifier is connecting to the DAQ card with a D connector that doesn't allow me to use any other inputs or trigger inputs etc. The only way around it would be to pull apart the D connector and I really don't think my lab head would like me to do this.
There ARE pauses between clicks.. the paradigm uses two clicks, 500ms apart. There is a random intertrial interval (between 10 and 20 seconds). So I need marks for every click.. and because we're looking for a response 40ms after the stimulus, precise synchronisation is required. Lagtimes of 10ms or more will cause problems. The sample rate is arbitrary but needs to be quite high. I'm going at 1000Hz at the moment.
I like the idea of using 3kHz tone and then filtering it out, however the clicks we use are sort of standard protocol and are bursts of white noise.. I can't really just switch to 3kHz test tones.
At the moment I have got it working but it's far from ideal (VI attached). The 'acquire sound' input goes through a gate and trigger to indicate when the onset of a sound has occurred and this is displayed on the same graph and written to the same measurement file as the EEG voltages. They can therefore be plotted on the same graph. Annoying issues at the moment are that the write file does not line up the sound onset with the voltage with reference to time (ie. they both show up with different x (time) values, but could be manually plotted).. I also don't have any way to measure that the sound input is being acquired at the same time as the voltages.. Any suggestions? I might need to put in a constant delay somewhere to account for acquisition delays from one of the pathways, but I've got no idea how to measure the required delay.
Thanks for your help,
Shane
04-23-2010 02:57 AM - edited 04-23-2010 02:59 AM
There is no magic in a using a female and male Sub D to build a short extention cable 😉
If you use a soundcard to create the click, use a spare channel to output the wave burst (or the click itself maybe with a highpass filter).
A hardware solution might be to use a 556 dual timer, one for the burst lengh and the other for 430Hz (@1000S/s) .
04-23-2010
04:50 AM
- last edited on
05-13-2025
05:18 PM
by
Content Cleaner
I am quite sure your Lab setup do have unit named SCB-68. https://www.ni.com/en-us/support/model.scb-68.html It should be easy to connect your sound signal to this unit as it is connector box. Talk to the person responsible for the lab and tell him/her that it is important for your project that you cam make use of a free AD channel. Make some good arguments, and I am sure your problem will be saved. You can also take your request via your teacher professor. The trick is to make good arguments. Like this is imperative for my project because this....
04-23-2010 09:22 AM - edited 04-23-2010 09:27 AM
EEG Channels are like PC memory: There is only one thing better than a lot of electrodes: MORE electrodes!
(OK, here we are in the analog world, so a better SNR also count 😉 )
So I asume the EEG amplifier already eats up all analog channels ...
Dig into the spec of your EEG amp and the 6024 : If there is a spare analog channel, use it! (Shure you did it 😉 )
Next: If you have a spare digital input check if you can configure the DAQ mx to read analog and digital simultanious. I don't know your 6024 but it is most likely that it is possible.
However you need to get a physical connection to your daq card. The 68-pin female VHDCI connector isn't very common (compared to a DB9 😉 ) look at digikey.com or ask NI.
If you don't care about one EEG channel you can try a transformer coupling: Get a small current sense transformer and use it the as a induktion coil , driven by the (attentuated) speaker output . One or two turns of a electrode cable trough the transformer, grounded with a 50k will give you a lot of sync signal..... I don't know how good or bad the crosstalking will be, but you won't loose galvanic isolation! AT OWN RISK !! If the input of the EEG amp has a bad design you might overload and kill it. EEG signals a very small 😉
04-23-2010 11:16 AM
04-26-2010 11:20 PM
Henrik, that is a great idea to create a breakout adaptor... I'm not actually using all the input channels with the EEG, there are lots of channels spare. My issue is not having an interface box to easily patch in to the spare channels. However, your breakout adaptor cable suggestion could allow that. I'm not THAT comfortable with soldering but I think I could sort it out.
Coq Roq.. We don't have one of those units.. the National Instruments DAQ card is actually a part of a third party product (ie. Sandiego Instruments create scientific equipment using National Instruments DAQcards.) Therefore their system works but does not allow for much flexibility with regard to the DAQ.. it just does what the San Diego Instrument device requires (no breakouts).
S.E. Johnson, great minds think alike! hehe.. I am currently recording EEG voltages and audio from the sound card into one data file and onto the one graph. My concern with this approach (using soundcard rather than the same DAQ card as EEG signals) is that I don't really trust that they are synched correctly. In my resulting .lvm data files I get two columns for EEG (x-time, y-voltage) as well as two columns for sound acquisition. However, the x-time values in these files do not match up and I'm suspicious that they are not completely synched but can't think of a way to test for that. I think I will try Henrik's idea of creating a breakout adaptor without having to touch any of the expensive San Diego Instruments gear. That way, the sound will go straight into the same DAQcard with the same clock as the EEG voltages.
Thanks heaps for all your help guys, I'd been getting depressed and hitting walls left-right and centre with this problem but I'm making some ground now 😄
Cheers,
Shane
04-27-2010 02:30 AM
I still think it should be possible to make a breakout cable. But I guess the person responsible for the Lab is not a technical person. Or he/she is more concerned about the equipment than the student projects. That is quite common among such personal.
I am also reading you are using a sound card for acquiring EEG. That is a very big NO-NO. This because sound cards are AC coupled. And this will limit the lower bandwidth to about 10Hz. So signals below about 10Hz is filtered out. EEG require a bandwidth from about 0.5Hz to 100Hz.