04-23-2013 09:52 AM
I am trying to make a clapper circuit using labview to turn on a fan for a school project. I have the mic hooked up using the NI Elvis breadboard, but I am not getting any sensible signal. How do I amplify it properly so the signal is clear and can be used to switch the circuit on and then off again?
04-23-2013 10:10 AM
Most microphones generate very small signals - on the order of a millivolt. So you will need a preamplifier. The details depend on the characteristics of the mic and how much gain you will need.
Lynn
04-23-2013 10:21 AM
You could try using the soundcard
04-23-2013 10:45 AM
so I need to amplifiy it with the circuit, i just cant have an amplification factor in my VI? this is what i am working with. the simulate signal is just for testing, the input would be used in when im in my lab
04-23-2013 10:57 AM
You really need to amplify the signal in hardware so that you can get a better reading from the Analog to Digital Converter (ADC) in the DAQ. If you can't read anything good, then there's nothing you can do in software to get a good signal out.
04-23-2013 11:15 AM
ok, so after i amplify it in my circuit, should i filter it or take an fft to identify the pulse from the microphone? if so how can i do that. I dont know how to show an fft in my VI
04-23-2013 12:58 PM
Well, whether to filter it or not depends on how you intend it to work. If it is to be responsive to an loud impulse signal then you are more interested in the amplitude and duration of the impulse. If you are interested in specific frequencies you may believe are present in whatever trigger sound you want to use, then possibly filtering is needed. Remember, an FFT is converting from the time domain to the frequency domain, and it is pretty tough to do really quickly. It is a good math tool when you want to know what frequency components, and their respective energy contributions are, but not so useful to tell you that there is a specific burst of noise, of a specific amplitude, for a specific period. A "Clapper" is going to respond to an abrupt, relatively "loud", short duration burst of sound. I can guarantee that the "Clappers" sold in the cheesy TV ads didn't do a lot of signal processing!
04-23-2013 02:35 PM
ok. so i have a circuit that will amplify the pulse from the mic. I am rather new to labview however, and I am having trouble with the loop for the circuit to turn on when it hears a clap, and then off when it hears another. should I use a case structure, or some sort of for loop?? not sure where to go with this
04-23-2013 04:46 PM
Yes, you will likely want a loop. Inside the loop, you should be taking samples from the DAQ and then processing it somehow to detect the clap. I would recommend keeping the output status (a Boolean) in a shift register. When you detect the clap, you just have to invert the boolean.
Since you keep saying you are new to this, maybe you should check out some of the online tutorials.