Skip to main content
mohit rai
Associate III
September 2, 2017
Question

Issue to hear recorded sound with stm32f4 discovery board

  • September 2, 2017
  • 2 replies
  • 1729 views
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.
    This topic has been closed for replies.

    2 replies

    Vangelis Fortounas
    Associate II
    September 2, 2017
    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.
    mohit rai
    mohit raiAuthor
    Associate III
    September 3, 2017
    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?

    Vangelis Fortounas
    Associate II
    September 3, 2017
    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

    Tesla DeLorean
    Guru
    September 2, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..