UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor wiktorjunior
Visitor
4,260 Views
Registered: ‎07-22-2017

Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

Hello, everyone.

I am trying to deal with it for four days and still can't find the reason. 

I am using Pmod Mic3 to achieve data, then I am planning to do some DSP, and sending data by Pmod I2S.

But I found that no matter if I use Pmod I2S or on-the-board DAC as output, there's always repetitively noise in the signal.

Distortion is bigger when I increase the gain of the microphone.

Crazy thing is that peak getting lower when the output signal is assigned to diodes. It is a digital signal, so how it makes any sense? (it's in the first attachment, code: assign L[7:0] = (switch_3) ? (data_send[11:4]) : 8'd0; switch_3 do not drive anything else.)

I am also attaching a picture of the signal before and after notch filter, you see that the only deformed part is not filtrated. But why is it deformed...

 

I changed the interface of both few times, there's always the same effect. I have done perfect timing, as they want in pmod mic3 ADC datasheet. (it looks perfect on the simulation) 

 

Can it be some "normal" ADC noise? But dithering doesn't make sense after quantization... 

Any idea how to deal with that?

diode_efect.PNG
deformed_signal.PNG
1 Solution

Accepted Solutions
Scholar hbucher
Scholar
6,966 Views
Registered: ‎03-22-2016

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@wiktorjunior  

Well that is what I told you - different common grounds do produce a terrible noise. 

This is shack 101 for ham radio operators - tie every piece of equipment to the same ground. 

I have a set of nine copper rods driven 6 feet deep in the ground to eliminate RF noise and it never does 100%. 

http://www.laarrl.org/pdfs/upthecoax6.pdf

In your case it might be easier since it is just audio noise but professional equipment wiring can be really sophisticated.

http://audiosystemsgroup.com/SurgeXPowerGround.pdf

Check out "Some Useful Troubleshooting Tools" on page 33.

At least try to feed every piece of equipment through a single power supply if you can. You might be lucky to nullify it with a single shot. 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
9 Replies
Visitor wiktorjunior
Visitor
4,256 Views
Registered: ‎07-22-2017

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution
I have to add: the peak repeats every 18ms, regardless of sampling frequency.
Scholar hbucher
Scholar
4,195 Views
Registered: ‎03-22-2016

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@wiktorjunior  Whats the period between these peaks?

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Visitor wiktorjunior
Visitor
4,192 Views
Registered: ‎07-22-2017

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@hbucher:

As I wrote, 18 milliseconds. On the screenshot should be only ambient noise.

0 Kudos
Scholar hbucher
Scholar
4,166 Views
Registered: ‎03-22-2016

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@wiktorjunior  That looks dangerously close to 60 Hz

https://en.wikipedia.org/wiki/Mains_hum

You should throw a 100 Hz LPF filter either circuit or analog

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Visitor wiktorjunior
Visitor
4,141 Views
Registered: ‎07-22-2017

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@hbucher: Thanks for your reply. I didn't know that it can affect on fpga signal processing.

Did you mean 100Hz highpass filter?

I am sure that it is exactly 18ms, so it's closer to 55Hz. (In my country we have 50Hz current)

 

I unplugged all power supplies nearby, and checked it on my laptop. I discovered new thing, see(on the screenshot) what happens when I plug in or plug out the USB cable - it is changing randomly not depends if I plug in or out. Do you have idea why?

 

For this moment I set Pmod Mic3 gain on minimum level. Then I am shifting data from 12 to 16 bit to amplify the signal and use median filter. It's working quite good but for sure it will be better to cut off the noise with normal microphone gain.

I will try to use highpass filter and see what happens.

cablepullout.png
Scholar hbucher
Scholar
4,122 Views
Registered: ‎03-22-2016

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@wiktorjunior 

You mentioned that it changes when you plug in your USB. 

I am a ham radio operator and this happens a lot. 

Hum can be created when there is a difference of voltage between the common ground of two connected appliances. I have even fried a few capture cards on industrial setswith triphasic power - it got up to 30 V. That's the reason we bring everything to a common ground.

Audio hum also propagates through the air - in this case something might be acting as an antenna exactly at this frequency.

A third reason I have seen is those wall dimmers - they generate a lot of unwanted interference. 

You might try to go around finding the sources of interference but as soon as you move your devices to a new setting, you will have to do it all again. 

The best course of action in your case is just record it as is and then treat the output digitally with a high pass filter later on. 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Visitor wiktorjunior
Visitor
3,936 Views
Registered: ‎07-22-2017

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@hbucher

I found how to fully avoid this noise! 

Filtering gives me some results, but with higher gain, there was still something. 

When I plug in ethernet cable to fpga port and computer port, I get a perfectly clean signal. 

Is it kind of grounding? When I touched ethernet port with my finger, the noise disappeared for a moment and returning back.

Is there any other way to do grounding? 

So the whole board should be all the time pinned to computer? 

 

0 Kudos
Scholar hbucher
Scholar
6,967 Views
Registered: ‎03-22-2016

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

@wiktorjunior  

Well that is what I told you - different common grounds do produce a terrible noise. 

This is shack 101 for ham radio operators - tie every piece of equipment to the same ground. 

I have a set of nine copper rods driven 6 feet deep in the ground to eliminate RF noise and it never does 100%. 

http://www.laarrl.org/pdfs/upthecoax6.pdf

In your case it might be easier since it is just audio noise but professional equipment wiring can be really sophisticated.

http://audiosystemsgroup.com/SurgeXPowerGround.pdf

Check out "Some Useful Troubleshooting Tools" on page 33.

At least try to feed every piece of equipment through a single power supply if you can. You might be lucky to nullify it with a single shot. 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Visitor wiktorjunior
Visitor
3,927 Views
Registered: ‎07-22-2017

Re: Distortion in sound processing - Pmod mic3 and I2S, Spartan 3E 1600

Jump to solution

Ok, so it's better to stay with connection by ethernet cable, cause there's no other way to do any grounding in my case. 

@hbucher 

It's really interesting topic. Thanks for the advice, articles and your time.