Subject: Interfacing Speaker with nRF5340


Dear DevZone Community

I hope this message finds you well.

I'm currently working on a project that involves interfacing a speaker with the nRF5340 SoC. I would like to use the nRF5340's capabilities to generate audio output through the speaker. However, I'm facing some challenges in understanding the best approach for this.

Could someone provide guidance on how to interface a speaker with the nRF5340? Specifically, I'm interested in:

  1. Connecting the speaker to the nRF5340.
  2. Configuring the nRF5340 to generate audio output.
  3. Any software considerations or example code that could help me get started.

Any insights, references, or example projects related to this topic would be greatly appreciated.

Thank you in advance for your help!

Best regards, upasna

Parents
  • Hello upasna,

    Just to be sure, are you working with a nRF5340 DK, a nRF5340 LE Audio DK, or a custom board with a nRF5340?
    Is your intention to use LE Audio for this project, and to set up a connection between your nRF5340 to send data to an existing speaker that supports LE Audio for it to play? Or are you intending to send audio to your nRF5340 and for it to output it to a speaker that can then play this audio?
    In either case, if you intend to use LE Audio it would be best to start out with the nRF5340 LE Audio reference application and then modify this(if needed) to suit your application.

    Best regards,
    Karl

  • No i am not gonna use nRF5340 LE Audio DK, i want to use nrf5340 board to interface mic and speaker

  • Hello,

    Thank you for clarifying on which hardware you will be using - the nRF5340 DK can indeed be used for LE Audio, but it is less convenient to work with since it does not have an onboard DAC/DSP to output and sample analogue audio.

    In this case you can still work with the nRF5340 LE Audio reference application I have linked in my previous answer, but you will need to modify the hardware configuration to match the one you will be using. For instance, which microphone will you be getting the data from? Is this for instance a breakout board that you have connected to the nRF5340 DK?
    And the same question goes for the other side of the link, do you have a speaker already connected to your nRF5340 DK?

    It just occured to me that you might not be intending to use wireless communication here at all - is this correct?
    Essentially that you would like to connect a speaker to a microphone directly through the nRF5340, without any wireless connectivity in between?

    Please elaborate as much as possible so that I may better undertand you project, and thus better advise you on how to proceed.

    Best regards,
    Karl

  • Hello,

    yes, you are right nRF5340 have not on board DAC/DSP. I want to interface it externaly with dk and also I want to use amplifire and speaker.

     I would like to connect a speaker and a microphone directly through the nRF5340. Like ,first microphone will record the voice and store the date in flash memory/SD Card and through the codec madule which I will interface externaly with the nRF5340 and connect a amplifier through the amplifier I will connect a speaker.

  • Hello,

    Thank you for clarifying, I now think I understand your request better.

    In this case you can use the audio section of the LE Audio reference application as a reference to your project on how to use the I2S to receive and output audio from your external codec.
    By default the project uses the onboard DAC/DSP of the nRF5340 Audio development kit, but it can be easily bypassed using the following instructions:

    Which is helpful to know when using the LE Audio reference application as a reference for your project.

    Best regards,
    Karl

Reply Children
No Data
Related