Signal Convolution.

Hi guys!

I've two electret condenser microphones attached to arduino Analog pins 0 and 1. I want to do convolution of both signals. Is there any library or can someone help me with the algorithm.

Thanks

Please tell us what you really want to do.
Read this

lg, couka

I am trying to make a digital stethoscope. For that purpose i have attached 2 mic to a stehtoscope as shown in attached figure (1.jpg). Inner mic has noise as well as heart beats but outer mic has only noise data assuming heart beats are of very low freq and can't be captured directly by mic.

Idea is to pre-amp both mic signals, pass both signals through Sallen key filter with cut off freq of around 3KHz and apply them to analog pins of arduino (Arduino DUE).
In arduino i want to convolute both signals and then subtract the outer mic signal from the convolution result. and then use power amplifier to amplify the final signal so that user can hear. Input of the power amplifier circuit will be from DAC0 pin of arduino.

so far i have completed the hardware structure including pre-amp, sallen key filter and power amp and now i am just stuck at convolution.

1.jpg

What makes you think that you need 2 mics?
What is wrong with the amplified signal of 1 mic only?
As far as I understand, you are trying to implement noise cancellation, which is more complicated than just (Signal+Noise)-(Noise)=(Signal).

lg, couka

now i am just stuck at convolution.

You are, apparently, the only one that knows just what this means, or how you want to use the two very infrequently, read digital values from each microphone.

The Arduino is not a DSP, so it may not be the right choice.

@couka i made this with one mic successfully but there was some noise in fact a lot. so now YES i am trying to do noise cancellation.

Chances are, that it is a hardware problem. A stethoscope is not a Hi-Fi-device, I doubt that you need noise cancellation for that.

lg, couka

You are, apparently, the only one that knows just what this means

Convolution is a mathematical operation. The convolution of two signals a(t) and b(t) is ∫ a(t-x) b(t+x) dx ... or something like that, anyway. Normally you'd convolve a signal with a brief impulse signal - not sure what convolving two infinite signals means, unless we are talking treating it as periodic.

It seems that ((A * B) - A) is a thing in signal processing. Goes beyond what I know about it all.

In any case - I don't know that there's a library for arduino for this. OP may have to find some C++ sample code and hack it up.