LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using claps for actvation

Hello, I have a problem with using claps.

I am trying to use clap as a switch that a system turns off and on using a clap but unfortunately, I cannot have the system running as the microphones are constantly recording audio so I am unable to find the minimum and maximum amplitudes to determine if it is a clap or not as they are constantly changing.

would you please explain to me in simple terms as I am new to the LabVIEW.

thank you.

0 Kudos
Message 1 of 16
(3,796 Views)

Hello I had the same problem here 

I am trying to use clap as a switch that a system turns off and on using a clap but unfortunately, I cannot have the system running as the microphones are constantly recording audio so I am unable to find the minimum and maximum amplitudes to determine if it is a clap or not as they are constantly changing.

would you please explain to me in simple terms as I am new to the LabVIEW.

thank you.

 

0 Kudos
Message 2 of 16
(3,766 Views)

Hi sina,

 


@sinaaa wrote:

Hello, I have a problem with using claps.


Don't they clap as intended? 🙂

 


@sinaaa wrote:

I cannot have the system running as the microphones are constantly recording audio


Isn't this expected behaviour? You surely want to record audio data constantly to be able to recognize the clap sound!?

 


@sinaaa wrote:

so I am unable to find the minimum and maximum amplitudes to determine if it is a clap or not as they are constantly changing.


I don't think a simple min/max comparison will fulfill the requirement. Maybe some FFT to detect typical clap sounds?

 


@sinaaa wrote:

would you please explain to me in simple terms as I am new to the LabVIEW.


When you are new to LabVIEW you should note the Training resources offered for free in the header of the LabVIEW board!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 16
(3,754 Views)

Hello Gerdw

So let me put it this way.

I want to create a switch by detecting claps but i was unable to use it as a switch. I have some ideas to use shift register but i dont know how to implement it 

Would you please help me?

0 Kudos
Message 4 of 16
(3,748 Views)

Hi sina,

 


@sinaaa wrote:

I want to create a switch by detecting claps but i was unable to use it as a switch. I have some ideas to use shift register but i dont know how to implement it 

Would you please help me?


Sure!

Why don't you attach your VI and tell us why you cannot implement your ideas using shift registers?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(3,746 Views)

Sure 

Screenshot_20200409-032438_Gallery.jpg

Here is my VI although it is not working 

Would you please tell me how should i proceed?

Thank you

0 Kudos
Message 6 of 16
(3,730 Views)

Hi Sina,

 


@sinaaa wrote:

Sure Here is my VI although it is not working 

Would you please tell me how should i proceed?


Ok, all we get is a blurry photograph, even taken with wrong orientation of the camera.

What would you say when you ask for some C sourcecode and all you get is a blurry image instead of a text file?

Proceed with attaching the real VI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 16
(3,726 Views)

sorry, here you go.

 

0 Kudos
Message 8 of 16
(3,723 Views)

Hi Sina,

 

you already use the shift register correctly, I just rearranged some parts of your VI:

 

So what is the real problem with your VI? (Apart from the problem of a buggy (IMHO) calculation of pump speed.)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 16
(3,721 Views)

Since you only check the max value, any loud sound would trigger the function. It might be good enough, but the aforementioned FFT would be a better solution, and e.g. check the power of some key frequencies, like 5 kHz (i don't know if that's a big one of a clap, but such a short, sharp sound should have some fairly high frequency components, measure and compare)

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 16
(3,716 Views)