Analyse an audio signal

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

cross mob
brosef
Level 1
Level 1
First question asked Welcome!

Hello everyone,

I am using the cy8ckit-046 psoc 4 microcontroller (with an audio jack) and was wondering how to receive an audio signal from the earphone's microphone and analyse the frequency and/or the volume of this signal.

From the audio example, I deduced that I will probably need an InterIc Sound Bus (I2S) with only a receiving terminal, which needs to be connected to the DMA.  After reading through some of the posts, I noticed that there might also be another approach to implement this. By using opamp and an ADC_SAR_seq one might also receive an audio signal.

This is my first time working with a microcontroller, hence I might also be completely wrong about my assumptions.

Thank you in advance,
Brosef

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Brosef,

Could you please let me know if you are using an external microphone or connecting a microphone to the audio jack is already there in the CY8CKIT-046 ?

For the purpose of frequency / volume analysis, in case you have a external earphone and mic with analog output you can directly connect it to the ADC pins of the PSoC. Otherwise, if you are using the earphone with the audio jack in the kit then it is possible to tap the the analog signal and direct it to the ADC input pins.

You can refer to the various ADC code examples that are available in PSoC Creator. (Goto Find > Code example , filter by: ADC device family: 4200L) for the purpose of analyzing the volume of the signal.

Ekta_0-1612531830955.png

Note that in case of the CY8CKIT-046 the audio jack is connected to an audio codec which converts the analog signal to digital and provides it at input to PSoC 4.

While using the ADC it is recommended to keep the sampling frequency almost 10 times the frequency of the input signal. The maximum sampling frequency supported by the ADC is 1 Msps

Best Regards

Ekta

 

View solution in original post

0 Likes
1 Reply
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Brosef,

Could you please let me know if you are using an external microphone or connecting a microphone to the audio jack is already there in the CY8CKIT-046 ?

For the purpose of frequency / volume analysis, in case you have a external earphone and mic with analog output you can directly connect it to the ADC pins of the PSoC. Otherwise, if you are using the earphone with the audio jack in the kit then it is possible to tap the the analog signal and direct it to the ADC input pins.

You can refer to the various ADC code examples that are available in PSoC Creator. (Goto Find > Code example , filter by: ADC device family: 4200L) for the purpose of analyzing the volume of the signal.

Ekta_0-1612531830955.png

Note that in case of the CY8CKIT-046 the audio jack is connected to an audio codec which converts the analog signal to digital and provides it at input to PSoC 4.

While using the ADC it is recommended to keep the sampling frequency almost 10 times the frequency of the input signal. The maximum sampling frequency supported by the ADC is 1 Msps

Best Regards

Ekta

 

0 Likes