ST STEVAL-BLUEMIC-1 User manual

Introduction
The evaluation board comes with a complete SW development kit that includes the Bluetooth low energy stack, all the needed
drivers for audio and inertial data acquisition, and button and LED management. A ready-to-use BlueVoice library is included as
middleware and a sample application is provided to get you started with voice streaming over BLE to an Android or iOS device,
running the ST BlueMS apps.
The evaluation board mounts a transmitter module FCC (ID: S9NSPBTLE1S) certified and IC (IC: 8976C-SPBTLE1S) certified.
This BLE wireless battery powered solution also embeds digital MEMS microphone MP34DT05-A (or MP34DT04-C1 in the first
generation board) and 3D accelerometer + 3D gyroscope, which render this evaluation board suitable for a wide range of
advanced smart application.
The STEVAL-BLUEMIC-1 evaluation board mounts the SPBTLE-1S Bluetooth® SMART application processor compliant with
BT specification v4.2. It supports multiple simultaneous roles and can act as a Bluetooth Smart master and slave device at the
same time.
Figure 1. STEVAL-BLUEMIC-1 evaluation board
Getting started with the STEVAL-BLUEMIC-1 evaluation board, ultralow power
wireless microphone based on SPBTLE-1S module
UM2257
User manual
UM2257 - Rev 2 - February 2018
For further information contact your local STMicroelectronics sales office.
www.st.com/

1 Getting started
1.1 Hardware description
1.1.1 Features
• Bluetooth® SMART small form factor board based on the SPBTLE-1S module, Bluetooth v4.2 compliant
• On-board SPBTLE-1S module, based on BlueNRG-1, Bluetooth low energy application processor system on
chip embedding an high performance:
– ultra-low power ARM® Cortex®-M0 32-bit core architecture
– Programmable embedded 160 KB Flash
– 24 KB embedded RAM with data retention
• On-board MP34DT05-A (or MP34DT04-C1 in the first generation board) digital MEMS microphone
• On-board LSM6DSL: MEMS 3D accelerometer (±2 / ±4 / ±8 / ±16 g) + 3D gyroscope ±125 / ±245 / ±500 /
±1000 / ±2000 dps)
• Voltage supply: 1V8 or 3V3
• Battery or USB powered
• On-board STBC08 linear Li-Ion battery charger
• SWD connector
• Included in the development kit package:
–STEVAL-BLUEMIC-1
– Plastic box for housing STEVAL-BLUEMIC-1
– 100 mAh Li-Ion battery
– SWD programming cable
• SW development kit for audio and inertial MEMS data streaming over BLE
• ST BlueMS: Android and iOS demo App available in the respective stores
1.1.2 Evaluation kit
The STEVAL-BLUEMIC-1 evaluation kit helps you to start prototyping a very low power solution to stream audio
and inertial data over BLE, exploiting the single-mode system-on-chip BlueNRG-1.
Figure 2. STEVAL-BLUEMIC-1 evaluation kit
The evaluation kit contains:
• an STEVAL-BLUEMIC-1 evaluation board
UM2257
Getting started
UM2257 - Rev 2 page 2/35

Figure 3. STEVAL-BLUEMIC-1 evaluation board: top and bottom
• a 100 mAh LiPO battery to be connected to the evaluation board as power supply
Figure 4. Battery
• a plastic case to house the evaluation board connected to the battery
Figure 5. Plastic case
• an ST-LINK SWD programming cable to program the evaluation board connected to ST-LINK
Figure 6. SWD cable
1.1.3 Evaluation board
The STEVAL-BLUEMIC-1 evaluation board is a highly integrated reference design that enables a fast prototyping
of very low power solutions for audio and inertial streaming.
UM2257
Hardware description
UM2257 - Rev 2 page 3/35

Figure 7. STEVAL-BLUEMIC-1 evaluation board hardware architecture
Figure 8. STEVAL-BLUEMIC-1 evaluation board main components
Table 1. STEVAL-BLUEMIC-1 evaluation board main component details
Reference Device Description
ASPBTLE-1S Bluetooth Low Energy application processor compliant with BT specification v4.2, based on
BlueNRG-1 system-on-chip
BLSM6DSL iNEMO inertial module: low-power 3D accelerometer and 3D gyroscope
CMP34DT05-A MEMS audio sensor digital microphone (MP34DT04-C1 in the first generation board)
D Button User button
E LED A blue LED and a green LED for visual feedback
F USB Micro USB connector for power supply and battery charging
G Battery connector Connector to plug the LiPO battery contained in the kit
H Switch ON-OFF switch to power the board
I SWD connector 5-pin SWD connector for programming and debugging
UM2257
Hardware description
UM2257 - Rev 2 page 4/35

1.1.4 Schematic diagrams
Figure 9. Power and SPBTLE-1S module
Battery Charger
BlueNRG-1 Module Footprint
USB, SWD, Battery monitor
Max 200mA
Vout=3V3
R1=147K R2=47K
Vout=1V8
R1=150K R2=120K
Battery monitor
(4.2V -> 1.8V)
VPROG = 1V
IBAT=(VPROG/RPROG)x1000
RPROG=1000*VPROG/IBAT
V_USB
VBlue
VBat
VBlue VBlue
VBlue
V_USB
V_USB
VBat
VBat
VBat VBat
V_USB VBat
I2C_SDA
I2C_SCL
INT1_AG
INT2_AG
PDM_CLK
PDM_DATA
LED1
LED2
BUTTON1
BATT1
Battery Connector
1
2
3
C2
4.7uF
VBAT
VBAT
1
C1
4.7uF
R13
20K
R2
47K
R16
0R
R15
NC
GND
GND
1
USB
USB-MICRO
1
2
3
4
SH1
SH2
5C7
4.7µF
R14
2K
SW1
PWR
R5
4K7
R11
140K
CHRG
2 1
SWD
1
2
3
4
5
U2 LDK120M-R
EN
3
GND
2
IN
1
ADJ 4
OUT 5
R12
105K
U1 STBC08PMR
PROG 5
CHRG
3
PAD 7
BAT 1
Vcc
6
GND 4
PWR_ON
2
C9
4.7µF
C8
100nF
R1
147K
U3 SPBTLE-1S
DIO14/ANATEST0 6
VBLUE
5DIO5/I2C_SDA
4DIO4/I2C_CLK
3ADC IN1
2ADC IN2
1
DIO6/UART_RTS 9
DIO7/BOOT/UART_CTS 7
DIO8/UART_TXD 10
DIO11/UART_RXD 11
DIO9/TCK/SWTCK 12
DIO10/TMS/SWTDI 13
ANATEST1 14
DIO0/SPI_CLK 15
DIO2/SPI_MOSI 16
DIO1/SPI_CS 18
BT_RESET 19
DIOA12 20
DIO3/SPI_MISO 17
GND 8
R8
0R
SWDIO
RESET
SWDCLK
SWDCLK
RESET
SWDIO
ADC_IN2
ADC_IN2
CHRG
CHRG
UM2257
Hardware description
UM2257 - Rev 2 page 5/35

Figure 10. MEMS, button and LEDs
VBlue
VBlue
VBlue
VBlue
VBlue
VBlue
VBlue
PDM_CLK
I2C_SCL
I2C_SDA
INT1_AG
INT2_AG
PDM_DATA
I2C_SCL
I2C_SDA
BUTTON1
LED1
LED2
R7
100K
R3
4K7
M1 MP34DT05-A
DOUT 4
LR 2
GND 5A
VDD
1
CLK
3
GND 5B
GND 5D
GND 5C
R10
100
R9 1K
R4 1K
C6
10nF
C4
100nF
R6
4K7
C3
100nF
Button1
12
3
4
5
6
U4
LSM6DSL
GND1 6
VDDIO 5
INT1
4SCx
3SDx
2SDO/SA0
1
VDD 8
INT2 9
OCS_Aux 10
SDO_Aux 11
CS
12
SCL
13 GND2 7
SDA
14
C5
100nF
LED2
LED Blue
2 1
LED1
LED Green
2 1
UM2257
Hardware description
UM2257 - Rev 2 page 6/35

1.2 Software description
1.2.1 Overview
The STSW-BLUEMIC-1 is an evaluation software package that allows development of smart and innovative
solution using the SPBTLE-1S module.
The software package includes the entire Bluetooth® low energy stack and protocols, complaint with the STSW-
BLUENRG1-DK. It also contains a Board Support Package that offers a complete set of APIs for digital MEMS
microphone, 3-axis accelerometer and gyroscope, button and LED management.
The latter is based on BlueNRG-1, a very low power Bluetooth low energy single mode system-on-chip
embedding a high performance, ultra-low power 32-bit ARM® Cortex®-M0, with 160 kB of Flash memory and 24
kB of RAM.
The BlueVoiceADPCM_BNRG1 binary library (available as middleware) provides a vendor specific profile for
voice streaming over Bluetooth® low energy; it includes all APIs needed for audio compression using the ITU-T
G.726 ADPCM standard, packetization and streaming.
The STSW-BLUEMIC-1 allows an STEVAL-BLUEMIC-1 evaluation board to act as a peripheral in a point-to-point
connection with a mobile device running the ST BlueMS app, available for Android™ and iOS™. In this
configuration, the evaluation board streams the audio acquired from the on-board digital MEMS microphone
(MP34DT05-A or MP34DT04-C1) or motion data acquired from the 3-axis accelerometer and gyroscope
(LSM6DSL).
1.2.2 Architecture
The STSW-BLUEMIC-1 software is organized in different layers.
Figure 11. STSW-BLUEMIC-1 software architecture
The application layer manages the complete software chain from the audio and inertial data acquisition to the
streaming.
A complete set of drivers is available to interact with the on-board sensors and to manage the BlueNRG-1
peripheral.
A middleware layer, between the application and the hardware abstraction layer, includes:
• the Bluetooth® Low Energy stack library that allows communication between the central and the peripheral
device;
• the BlueVoiceADPCM_BNRG1 library that provides all the APIs needed to implement a voice-over-
Bluetooth® Low Energy profile.
UM2257
Software description
UM2257 - Rev 2 page 7/35

1.2.3 Folder structure
Figure 12. STSW-BLUEMIC-1 folder structure
The following folders are included in the software package:
•Binary: contains ready-to-use firmware binary to be flashed on the STEVAL-BLUEMIC-1 evaluation board
•Documentation: contains a compiled HTML file generated from the source code detailing the software
components and APIs
•Drivers: contains the board specific drivers including the on-board components
•Library: contains the Bluetooth low energy stack binary library, the CMSIS vendor-independent hardware
abstraction layer for the ARM®Cortex®-M processor series, and BlueNRG-1 peripheral drivers
•Middlewares: contains the BlueVoice over BlueNRG-1 library
•Projects: contains demo applications for voice transmission over Bluetooth Low Energy. The projects
support IAR Embedded Workbench for ARM, RealView Microcontroller Development Kit (MDK-ARM) and
Atollic-True Studio for ARM development environments
1.2.4 APIs
Fully detailed user-API function and parameter descriptions are compiled in an HTML file located in the software
Documentation folder.
1.2.5 BlueMic1 application
The BlueMic1 application has been designed and built on the Bluetooth low energy architecture.
1.2.5.1 BlueMic1 profile description
The BlueMic1 application deploys a connection-based communication paradigm by providing a permanent point-
to-point link between two devices, one acting as peripheral and one as central (Generic Access Profile or GAP).
The STEVAL-BLUEMIC-1 evaluation board acts as a peripheral device supporting a single connection and low
complexity. This device only requires a controller that supports the slave role.
The central module can be an Android™ and iOS™ device running the ST BlueMS app (v3.0.0 or higher) or a FP-
AUD-BVLINK1 receiver node.
The central and peripheral role assignment reflects the asymmetric design concept of Bluetooth Low Energy,
where the device with a lower energy source works less: a slave cannot initiate complex procedures, whereas a
master manages communication timing, adaptive frequency hopping, encryption setup, etc. A portable device
provided with a coin-size battery is usually suitable as slave device.
Data sent through a Bluetooth Low Energy connection is organized through an additional protocol layer, the
Generic Attribute Profile (GATT). It provides standard profiles to ensure interoperability between devices from
different vendors that implement features like Proximity Profile, Glucose Profile and Health Thermometer Profile.
The Bluetooth specification also lets you add custom profiles.
GATT defines client and server roles for interacting devices independent of the GAP master/central and slave/
peripheral roles:
•Client performs service discovery about the presence and nature of server attributes; it sends requests to a
server and accepts responses and server-initiated updates.
•Server accepts requests, commands and confirmations from a client and sends responses and server-
initiated updates; it arranges and stores data according to the attribute (ATT) protocol.
UM2257
Software description
UM2257 - Rev 2 page 8/35

In a mono-directional audio streaming asymmetric system, the device with voice data is the one with a
microphone and is therefore considered the server. The client device sends requests to the server and accepts
server-initiated updates containing audio data.
Audio data transmission is based on periodic server-to-client notifications which do not require a request or
response from the receiving device. Server-initiated updates are sent as asynchronous notification packets which
include the handle of a characteristic along with its current value.
According to the Bluetooth specification, the peripheral enters advertising mode at start-up and sends
advertisement packets at relatively long intervals. The central unit enters discovery mode and sends a connection
request on reception of an advertisement packet from a slave device. After connection, notifications carrying
audio data are periodically sent from the server to the client.
1.2.5.2 BlueMic1 service
The Attribute Protocol (ATT) is used by GATT as a transport protocol for exchanging data between devices. The
smallest entities defined by ATT (named attributes) are addressable pieces of information that may contain user
data or meta-information on the attribute architecture, stored in the server and exchanged between client and
server.
GATT server attributes are organized as a sequence of services, each one starting with a service declaration
attribute marking its beginning. Each service groups one or more characteristics and each characteristic can
include zero or more descriptors.
Since audio streaming is not part of the predefined set of profiles, the STSW-BLUEMIC-1 application defines a
vendor-specific service named BlueMic1 Service based on an Audio characteristic to expose actual compressed
audio data and a Sync characteristic to expose collateral information to implement a synchronization mechanism
and an inertial characteristic to expose 3-axis accelerometer and gyroscope raw data.
Table 2. BlueMic1 UUID summary table
UUID name UUID
bluemic1_service_uuid 00000000-0001-11e1-9ab4-0002a5d5c51b
audio_adpcm_char_uuid 08000000-0001-11e1-ac36-0002a5d5c51b
audio_adpcm_sync_char_uuid 40000000-0001-11e1-ac36-0002a5d5c51b
acc_gyr_char_uuid 00E00000-0001-11e1-ac36-0002a5d5c51b
Given the service hierarchical architecture, further characteristics may be added to the BlueMic1 service, such as
configuration of parameters like volume, enabling/disabling of processing algorithms, etc.
1.2.6 Audio processing
The audio processing component of the STSW-BLUEMIC-1 application is designed to achieve an audio sampling
frequency of 8 or 16 kHz at the receiver side, with a trade-off between audio quality and bandwidth occupation for
voice signals. The audio signal transmitted is compressed via ADPCM (adaptive differential pulse code
modulation) to fit in the available data rate while minimizing radio transmission time and power consumption.
The figure below shows the speech processing chain in a complete communication system with Tx and Rx.
On the Tx side, the library receives an audio signal which is typically acquired by a digital MEMS microphone as a
1-bit PDM signal and converted by a PDM to PCM conversion filter, integrated in the ADC peripheral of the
BlueNRG-1 SoC, into 16-bit PCM samples at 8 or 16 kHz.
The library can be provided with 1, 2, 5 or 10 ms of audio data. When the compressed output buffer is ready, a
flag is set and audio data is streamed via Bluetooth Low Energy together with collateral ADPCM information. The
resulting communication bandwidth is 32 kbps (with 8 kHz audio sampling frequency) or 64 kbps (with 16 kHz
audio sampling frequency) of audio data plus 300 bps of collateral information.
UM2257
Software description
UM2257 - Rev 2 page 9/35

Figure 13. STSW-BLUEMIC-1 audio processing chain
1.2.7 ADPCM compression
The ITU-T G.726 adaptive differential pulse code modulation (ADPCM) standard is applied to save bandwidth.
This audio algorithm for lossy waveform coding predicts the current signal value from previous values, and
transmits the difference between the real and the predicted value, quantized with an adaptive quantization step.
The ADPCM algorithm used in this application compresses digital voice signals encoded as:
• Audio format: PCM
• Audio sample size: 16 bits
• Channels: 1 (mono)
• Audio sample rate: 8-16 kHz
Figure 14. ADPCM encode-decode schema
BlueVoiceADPCM implements a modified version of the compression algorithm with improved communication
robustness through an additional low data rate channel with collateral information added to the ADPCM quantized
values; slightly increasing the overall bit-rate to an average 64.3 Kbps.
The internal buffering required by ADPCM compression is shown in the figure below. 16-bit input PCM samples
are encoded in 8-bit temporary samples with 4-bit actual data (u8 ADPCM_app buffer) and then encapsulated in
8-bit samples containing information of two PCM samples (u8 ADPCM buffer).
UM2257
Software description
UM2257 - Rev 2 page 10/35
Other manuals for STEVAL-BLUEMIC-1
1
Table of contents
Other ST Motherboard manuals









































