Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X...
Transcript of Part 2 - unimi.it · 2018. 6. 12. · •STM32Nucleo Expansion, compatible with STM32 ODE • 2X...
Part 2
Microphones
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
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
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
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
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
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
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
Main steps for microphones applications 10
Microphones
acquisition
(PDM)
PDM to PCM
conversionProcessing
Streaming /
actuate
X-NUCLEO-CCA02M1 USB streaming
• High level Code Analysis to identify the main blocks
11
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
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
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
Recording• To check: sampling rate, microphone input
15
STM32 audio Streaming…
48000
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