Skip to main content
Graduate II
May 4, 2025
Solved

Solution for receiving BT audio and playing stored audio samples

  • May 4, 2025
  • 1 reply
  • 819 views

I am looking for ST products that will:

  1. Receive bluetooth audio (i.e. from a smart phone)
  2. Play the bluetooth audio through a single minature speaker (mono)
  3. Play stored samples of a voice counting down numbers at intervals based on an external event (if bluetooth audio is being played when the voice sample is triggered, the bluetooth audio will need to be temporarily attenuated)
  4. Read Bosch BME280 pressure sensor (I2C or SPI)

Other requirements are:

  • Small form factor: As an example 56x41x11mm, although this is not fixed so there is room for some flexibility
  • Low power consumption
  • Powered by lithium battery with built in (wired) charging

I prototyped this project many years ago using:

  • Microchip dsPIC33EP256MU806
  • Bluetooth receiver WT32i-A-AI6
  • CODEC (I2S) TLV320AIC32IRHBT
  • Amplifier (for speaker) TPA6120A2DWP
  • Battery charger DS2745U
  • Flash (to store audio samples) S25FL032P0XMFI011
  • Pressure sensor Bosch BMP280

The original prototype was too large and drained the battery too quick (partly due to an assembly/design fault I think)

I am looking to reinstigate this project using the latest devices available, but make it smaller and more effecient.

What ST products are available that could meet these requirements ?

    This topic has been closed for replies.
    Best answer by STTwo-32

    If you are looking to use classic Bleutooth, our STM32 Wireless products does not support such communication.

    Best Regards.

    STTwo-32

    1 reply

    Technical Moderator
    May 4, 2025

    Hello @freeflyer @and welcome to the ST Community.

    I suggest you have a look at theSTM32WBA64/65 that is a product based on the Cortex-M33 with a flash up to 2MB and with the support of BLE (not classic Bluetooth) +audio capabilities. Also, it is known as a low power power product with different peripherals (SPI, I2C, ADC,…)to connect external devices (external memory, sensors,…).

    Best Regards.

    STTwo-32

    freeflyerAuthor
    Graduate II
    May 4, 2025

    Thank STTwo-32

    So the STM32WBA64/65 will receive blue tooth audio from a smartphone.  But what about the additional requirements ?

    In my old protoype

    1. The bluetooth receiver (WT32i) received audio from a smartphone and sent the audio to the dSPic via the I2S interface. 
    2. The dSpic then mixed the blue tooth audio with the audio samples (stored on external flash) in real time and the result was sent to the CODEC via the I2S interface. 
    3. The analouge output from the CODEC was then sent to an amplfiier for the speaker

    The STM32WBA64/65 does not have I2S interface, so how can the audio be output to an amplifier ?

    The stored audio samples are just spoken numbers (e.g. "one", "two").  Ideally I would like these audio samples saved as a compressed format such as mp3.  On my old prototype I have to save them as wav files which took up more memory because I did not know how to decode mp3.  Ideally these samples could be saved on the processor itself so not need external flash.

    If I can meet the requirements using less external compoenents than even better.  For example, I only used a CODEC, external flash, I2S interface etc because thats the only way I could get it to work.  If there is a better or alterntive solution I would be interested to know about it.

     

     

     

    Technical Moderator
    May 5, 2025

    @freeflyer

    The STM32WBA64/65 provide an SAI interface which includes I2S (see RM0515, section 4.3).

    Regarding the remaining parts of your target design:

    • Audio compression can be achieved in various ways. Although MP3 has not been patented any longer since 2017, it should share the scarce resources with the Bluetooth stack on the single-core of the STM32WBA. You can find the somewhat less demanding codec SpeeX in the software package X-CUBE-AUDIO-KIT, which may be sufficient for your application?
    • The amplifier could be replaced by e.g. a TDA7266 (AB amp) or a TDA7491LP (D amp)
    • The pressure sensor could be replaced by an LPS33K or an LPS25HB

    Regards
    /Peter