Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X...

16
Part 2 Microphones

Transcript of Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X...

Page 1: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

Part 2

Microphones

Page 2: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

Index

• Digital MEMS microphone: short description

• PDM format

• Microphone and MCU connection: platforms introduction

• X-NUCLEO-CCA02M1

• BlueCoin

• Steps required to acquire and use microphone signals

• USB streaming application analysis

• Recording using Audacity

2

Page 3: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

Tools 3

• Audacity

• Freeware multi track audio software

Page 4: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

MEMS Microphone: inside view• MEMS: Micro Electro-Mechanical System

• Integration on the same silicon surface of both microelectronics and micro-mechanics elements

• Low power, low cost, small dimensions

• Merge in the same device several functions:

• Sensing functions

• Logic functions

• The digital MEMS microphone

• Vibrating membrane that creates a variable capacitor in conjunction with a fixed frame

• ASIC performing amplification and A/D conversion to PDM domain

4

Page 5: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

PDM data format

• Pulse Density Modulation

• The relative density of the pulses corresponds to the analog signal's

amplitude

• A run consisting of all 1s would correspond to the maximum (positive) amplitude

value, all 0s would correspond to the minimum (negative) amplitude value, and

alternating 1s and 0s would correspond to a zero amplitude value

5

Page 6: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

X-NUCLEO-CCA02M1 6

• MEMS microphone evaluation board

• STM32Nucleo Expansion, compatible with STM32

ODE

• 2X MP34DT01–M microphones

• 1x miniUSB FS connector:

• USB audio data streaming

• Up to 4 microphone synchronized acquisition and streaming

• 6X ST MEMS Microphone coupons housing:

MP34DT01-M

USB Connector

Microphone coupons housing

Morpho connector

Arduino UNO R3 connector

STEVAL-MKI129V1

STEVAL-MKI129V2

STEVAL-MKI129V3

Page 7: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

STEVAL-BCNCS01V1 - BlueCoin 7

4x MP34DT04-C1

MEMS Microphone

BlueNRG-MS

Bluetooth Low Energy

BALF-NRG-01D3

Balun FilterSMD Antenna

LPS22HB

Barometer

LSM303AGR

eCompass

LSM6DSM

6-axis inertial module

STM32F446

MCU

STBC03J

Power management

Expansion connectors

2x buttons

8 LEDs

25 mm

Page 8: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

STEVAL-BCNKT01V1 - BlueCoin Starter Kit 8

Programming cable

Programming development kit

CoinStation Plastic Box

LiPo Battery

Standalone mode bundle

BlueCoin Cradle

Standalone mode bundle

Programming development kit

Page 9: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

X-NUCLEO-MEMSMIC1 9

Single entry point

for user’s Audio

Signal Processing

code

User may just focus on audio

processing development

• SDK to build applications using digital MEMS microphones

• Microphones acquisition source code

• Audio input class USB driver

• Standard USB microphone

• Includes simple example of Acoustic BF and AcousticSL libraries

Page 10: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

Main steps for microphones applications 10

Microphones

acquisition

(PDM)

PDM to PCM

conversionProcessing

Streaming /

actuate

Page 11: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

X-NUCLEO-CCA02M1 USB streaming

• High level Code Analysis to identify the main blocks

11

Page 12: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

X-NUCLEO-CCA02M1 USB streaming

• Connect the X-NUCLEO-CCA02M1 expansion board on top of the Nucleo

board

• Load the “Microphone streaming” example

• Atollic project

• .\Projects\Multi\Applications\Microphones_Streaming\Atollic\STM32F401RE-

Nucleo\STM32F4xx-MEMSMIC1

• Configure the acquisition for 2 channels at 48 KHz (audio_application.h define directives)

• Build and debug

OR

• Load the pre-compiled binary for 2 channels USB streaming using drag&drop or ST-Link

utility

• .\Projects\Multi\Applications\Microphones_Streaming\Binary\STM32F401RE-

Nucleo\MicrophonesStreaming_2Channels_48KHz.bin

12

Page 13: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

X-NUCLEO-CCA02M1 USB streaming

• Connect an additional USB cable to the X-NUCLEO-CCA02M1 (Blue) board

in order to use it as a standard USB microphone

• Note on USB connections

13

Page 14: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

Windows 7 setup• The device is recognized as a standard, xx channels microphone

• Check the mic configuration: right click on the loudspeaker icon on the bottom right of the windows

screen and choose “Recording devices”

14

Choose the right configuration

Depending on sampling frequency

and channel number

Page 15: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

Recording• To check: sampling rate, microphone input

15

STM32 audio Streaming…

48000

Page 16: Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X MP34DT01–M microphones • 1x miniUSB FS connector: •USB audio data streaming

References

• X-NUCLEO-CCA02M1 board

• X-CUBE-MEMSMIC1 software package

• Includes USB streaming example, 2 microphones beamforming application, 4 microphones

source localization

• BlueCoin board

• FP-AUD-SMARTMIC1

• MEMS microphone acquisition, advanced audio processing and audio output

16