cancel
Showing results for 
Search instead for 
Did you mean: 

Issue to hear recorded sound with stm32f4 discovery board

mohit rai
Associate II
Posted on September 02, 2017 at 08:12

Hello, I am trying to store sound wave using analog mic using stm32f4 discovery board. external mic--> adc-->dac-->codec--->headphone.

When I am trying to play recorded sound using codec, I am not able to hear recorded sound . can any one help me?

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on September 02, 2017 at 09:22

Hello!

you wrote >>

external mic--> adc-->dac-->codec--->headphone

I undertsand  here that you want to hear the mic's captured sound  (not a stored sound)

Supposing that 'dac' means the MCU's internal DAC.

To hear the sound , headphone must connected to DAC output and the sequence is mic--> adc-->dac-->headphone

In case 'dac' means the CS43L22 DAC, the sequence could be be mic--> adc-->PCM coder -> I2s -> dac-->headphone(black socket)

In this case needs also I2C interface to control the DAC.

There are examples how to use CS43L22 DAC at

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries-expansions/stsw-stm32068.html

page related to your board.
Posted on September 02, 2017 at 18:17

Try generating tones by using a sine-table, and confirm if you issues with playback or recording.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 03, 2017 at 07:33

thank you for your response.Now it's working but noise is also coming. so how can I remove this noise?

Posted on September 03, 2017 at 10:37

Hello!

>>> 'noise is also coming'

Noise can be produced from

Analog cirquitry from your microphone.

Interference from digital cirquitry

Mic adaptation to ADC. Means differend mic's output voltage range than ADC's input range, leading to poor quality samples.(biased  low bit  depth samples)

Collecting and processing the data .(low sample rate, low bit depth, DSP integer mathematics, etc)

Noise can removed  by first locating the source. A spectrum analyser could help you a lot.

regards.

vf

Posted on September 03, 2017 at 11:50

Thank you 

Posted on September 05, 2017 at 14:14

hello ,

Due to codec, some noise is coming.  When I am not connecting the external mic. what can be the reason and how can I remove this noise?

thanks

regards,

Mohit rai

Posted on September 06, 2017 at 09:36

hello.

>>>Due to codec, some noise is coming.

Its normal to have some noise from codecs especialy voice codecs.

Posted on September 07, 2017 at 09:45

hello,

When external mic is not connected to stm32f4 board,I am getting 5.4khz,4.5khz and 2.5khz frequency component from my codec. how I can remove this noise? (This noise is due to analog pass-through).

external mic --> onboard ADC -->LPF-->DAC--> codec(analog pass through )-->headphone

Posted on September 07, 2017 at 14:59

Hello! 

What you mean , not connected?  just removed  or the ADC input is connected to ground?

In first case , is enough to ground the ADC input (or your amplifier input).

In second case,  means that although ADC samples taken are zeroes , the LPF produces noise.

I dont know what kind of LPF you use.

What is your desired  cutting frequency?  Consider that Fcut can't be more than about SamplingRate/2