Implementing software DSP to filter out noise data from audio samples

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
shsh_4753781
Employee
Employee
10 sign-ins 5 sign-ins First reply posted

Hi,

I am developing an audio application using microphones as input data and trying to capture a small 3 seconds knock/tap on table sound.

However, the audio data has noise sample values which I need to eliminate using software DSP, may be using CMSIS based filters would work. So my knock value is generally between 1000-2000 but when I don't create a knock sound, the noise values are still there which are around 200-400. How can I implement a filter, low pass, band pass etc in software so that I can extract my sound without noise from sample values.

I don't need the on board hardware functionality of PSoC6 but something that can be done in software. 

Thankyou.

0 Likes
1 Solution

shsh,

Thank you for informing the forum.  I'm not familiar enough with the PsoC6 HW or SW resources to perform a high-pass filter at about 500 to 1000 Hz.

If you were using a PSoC5LP, it has a DSP block available to implement a high-pass filter.

Based on your first post, you are assuming the 200-400 Hz noise is internally generated.   Since the mics on the kit have a DPM output, it is a standard conversion from PDM to PCM.  However, I doubt if the noise your are hearing is from the PDM-to-PCM conversion.

Is it possible that you actually have a 'real' acoustic noise source causing the 200-500 Hz?

Let me pass a little story to you:

Years ago I was asked to professional record a voice recital in a very nice church.  It was comprised of two voices and an accompanist playing either the organ or the piano.  The recording went very well ... except ... when editing the raw source material, I noticed a low-amplitude but significant source of 100 to 500 Hz noise source.  It wasn't noticeable when the music content was present but when there it was very quiet or breaks in the music, it was noticeable.

What was the source of the noise?  A large box fan running over by the accompanist.  The recording took place in August in a church without air conditioning.  It was a bit warm indoors so the accompanist insisted on the fan to prevent heat exhaustion.

The fan was running on the 60 Hz AC with mechanical harmonics at 2x, 3x, 4x and some at 5x the fundamental.

My solution:  Tight cuts on the source material to eliminate quiet section between songs.  I also relied on a "hum" filter (high-pass with a frequency setting) to significantly minimize the 'hum' that could not be cut out.

Back to you:

Is it possible that you have the  CY8Cproto 062-4343 kit near your computer and the computer fan is on?

Maybe you have an overhead fan on?   Maybe when you are noticing this noise when your AC is on?

Proposed test:

Place a acoustic insulator over the mics and recheck the noise levels.  The acoustic insulator can be something as simple as a folded towel.   If the noise is significantly reduced, the noise is acoustic (mechanical) and not internal generated by HW or SW.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
3 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

shsh,

Which PSoC IC are you planning on using?

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
shsh_4753781
Employee
Employee
10 sign-ins 5 sign-ins First reply posted

Hi Len,

I am using Psco6 CY8Cproto 062-4343 kit. And using Microphones from Infineon to sample 16 bit raw audio samples.

 

0 Likes

shsh,

Thank you for informing the forum.  I'm not familiar enough with the PsoC6 HW or SW resources to perform a high-pass filter at about 500 to 1000 Hz.

If you were using a PSoC5LP, it has a DSP block available to implement a high-pass filter.

Based on your first post, you are assuming the 200-400 Hz noise is internally generated.   Since the mics on the kit have a DPM output, it is a standard conversion from PDM to PCM.  However, I doubt if the noise your are hearing is from the PDM-to-PCM conversion.

Is it possible that you actually have a 'real' acoustic noise source causing the 200-500 Hz?

Let me pass a little story to you:

Years ago I was asked to professional record a voice recital in a very nice church.  It was comprised of two voices and an accompanist playing either the organ or the piano.  The recording went very well ... except ... when editing the raw source material, I noticed a low-amplitude but significant source of 100 to 500 Hz noise source.  It wasn't noticeable when the music content was present but when there it was very quiet or breaks in the music, it was noticeable.

What was the source of the noise?  A large box fan running over by the accompanist.  The recording took place in August in a church without air conditioning.  It was a bit warm indoors so the accompanist insisted on the fan to prevent heat exhaustion.

The fan was running on the 60 Hz AC with mechanical harmonics at 2x, 3x, 4x and some at 5x the fundamental.

My solution:  Tight cuts on the source material to eliminate quiet section between songs.  I also relied on a "hum" filter (high-pass with a frequency setting) to significantly minimize the 'hum' that could not be cut out.

Back to you:

Is it possible that you have the  CY8Cproto 062-4343 kit near your computer and the computer fan is on?

Maybe you have an overhead fan on?   Maybe when you are noticing this noise when your AC is on?

Proposed test:

Place a acoustic insulator over the mics and recheck the noise levels.  The acoustic insulator can be something as simple as a folded towel.   If the noise is significantly reduced, the noise is acoustic (mechanical) and not internal generated by HW or SW.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes