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

PSoC™ 5, 3 & 1 Forum Discussions

Anonymous
Not applicable

Hi there,

   

Im looking to boost the input gain of a PDM mic on the PSoC 4 Pioneer Kit Community Project#102 – USB Audio using the PSoC 5LP.

   

Can anyone guide me on how to do this either by multiplying the PCM signal via the code or enabling the USB input volume control so I can control the microphone gain via the host computer?

   

Im banging my head against the wall on this!

   

Id really appreciate any help.

   

 

   

Charlie

0 Likes
8 Replies
ETRO_SSN583
Level 9
Level 9
100 sign-ins 5 likes given 1000 replies posted

Do you want to keep the signal in the PDM domain ? Or convert it back to

   

analog domain amplified. If latter a LPF recovers the analog audio followed

   

by standard amplification. OpAmp with some G setting resistors.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Hi Dana,

   

Boosting it in the PDM domain would probably improve my signal to noise ratio but I wouldn't know if this is even possible or way too complicated!

   

I never have to deal with the signal in the analog domain as my signal chain is:

   

[PDM](mic) -> [PDM CIC (LPF) -> Droop filter -> PCM](PSoC 5LP) -> [USB audio -> flash storage](host computer)

   

Im not sure where in the code provided for the project I would do this amplification. I cant see where I can manipulate the PCM data to apply any kind of filtering.

   

Thanks for your help!

   

Charlie

0 Likes
Anonymous
Not applicable

On further investigation, it seems that I need to vary the shift count of the PDM_CIC component as described here on page 17: http://www.element14.com/community/servlet/JiveServlet/download/95654-122697/PioneerKit_P5LP_USB_Aud...

   

This version of the project doesn’t have the volume update code for the IN path. The user can easily handle the
IN volume change request by writing their custom code in VolumeControl.c by updating the shift count of the
PDM_CIC component whenever there is a request. 

   

The example code for the PDM mic input aspects doesn't include the parts that handle the input volume adjustment. Any help on how to handle the mic input gain adjust signals from the host computer via USB and then how to do that PDM_CIC shift would be hugely appreciated!

   

Many thanks,

   

Charlie

0 Likes
ETRO_SSN583
Level 9
Level 9
100 sign-ins 5 likes given 1000 replies posted

I think you are going to have to file a CASE to get help on this -

   

 

   

To create a technical or issue case at Cypress -

   

 

   

www.cypress.com

   

“Design Support”

   

“Create a Support Case”

   

 

   

You have to be registered on Cypress web site first.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thank-you sir, Ill do just that.

   

If I get a solution, Ill post back here.

   

Charlie

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Charlie,

   

I believe that once microphone signal is digitized by the PDM circuitry, there is no way to improve its S/N any further. Consider another (better) mic or try one with analog output. Almost any cheap electret mic with analog output beats PDM mic sensitivity by 10db at least

   

odissey1 

0 Likes
ETRO_SSN583
Level 9
Level 9
100 sign-ins 5 likes given 1000 replies posted

The consideration here would be losing S/N if a conversion back to analog was done

   

to change G. Seems to me that forward transform must allow for manipulation to change

   

G in the PDM domain, I just cannot find a solution. Note its pretty common to change the

   

PDM to a PCM signal, also leads me to believe there must be a way.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thanks for both of your input on this.

   

From what I can make out, the example code provided by for this project by Cypress at this link performs the PDM to PCM conversion by LPF'ing the PDM signal using a CIC filter to extract the16 bit PCM audio samples. The resultant audio signal that I get is very low in level so when I boost it using an audio editor, I also bring up the noise floor with the wanted signal.

   

Maybe increasing the clock frequency provided to the MEMS mic would allow me to extract 24 bit PCM samples, which I could apply gain to by multiplying the PCM samples by a fixed amount after the CIC LPF stage and then decimate this higher gain signal back down to 16 bit with hopefully less noise. I know the MEMS mic has a fixed noise floor but maybe extracting 24 bit samples at this early stage would give me more dynamic range to play with. 

   

Affecting the PDM signal to apply gain sounds tough and I wouldn't know where to start!

   

With the code set linked above, I cant even see where I can access the PCM samples to apply this gain.

   

Thanks again for putting your heads to this!

   

Charlie

0 Likes