APWlink+ microphone USB demonstration boards based on the

AN4041
Application note
APWLink+ microphone USB demonstration boards based on the
MP34DT01, MP45DT02, or MP34DB01
Introduction
The purpose of this application note is to give a brief description of the APWLink+
microphone USB demonstration boards from STMicroelectronics. These boards host the
microcontroller STM32F107RC and either the MP45DT02, MP34DT01 (top-port digital
microphones) or the MP34DB01 (bottom-port digital microphone). Figure 1 shows the
capability of the board to host these microphones.
These microphones are analog-to-digital transducers, in other words, they are able to sense
sound pressure and convert this signal to a digital signal using the pulse-density modulation
(PDM) technique. The STM32 microcontroller decodes the PDM signal coming from the
microphones and streams the audio via the USB.
This document will provide a brief description of the software that decodes the PDM signal
and also information about the hardware as well as simple steps to use the boards. Ordering
information for these boards can be found in Appendix C on page 12.
Figure 1.
APWLink+ demonstration board
'VMMCPBSEWJFX
5PQ WJFX
#PUUPNWJFX
.JDSPQIPOFTFDUJPO[PPNWJFX
.1%5
. 1%#
.1%5
5PQWJFX
September 2012
Doc ID 022706 Rev 2
#PUUPNWJFX
1/14
www.st.com
Contents
AN4041
Contents
1
Software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2
Hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3
Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Appendix A Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Appendix B Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Appendix C Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4
2/14
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Doc ID 022706 Rev 2
AN4041
List of tables
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Microphone supply voltage range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
L/R channel selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Ordering information for demonstration boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Doc ID 022706 Rev 2
3/14
List of figures
AN4041
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Figure 8.
Figure 9.
4/14
APWlink+ demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Microphone USB demonstration board (block diagram) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Windows message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Computer management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Recording properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Board layout - top view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Board layout - bottom view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Doc ID 022706 Rev 2
AN4041
1
Software description
Software description
The digital signal processing (DSP) consists of the simple flow depicted in the figure below.
Figure 2.
DSP
The PDM signal from the microphone is filtered and decimated in order to obtain a sound
signal at the required frequency and resolution. The loaded firmware implements a filter
pipeline that has been designed as two filtering-decimation stages.
Assuming an input frequency of 3.072 MHz and a desired output frequency of 48 kHz, the
filter stages are configured to implement a decimation factor of 64. The final gain of the
pipeline is therefore G1 = 7.8125. As a result, the output of the filter pipeline is a 16-bit pulsecode modulated (PCM) signal.
For further information, please refer to application note AN3998, “PDM audio software
decoding on STM32 microcontrollers” available on www.st.com.
Doc ID 022706 Rev 2
5/14
Hardware description
2
AN4041
Hardware description
The board is a sound card automatically recognized by the PC as an audio device. The
connection is done through the USB cable which also supplies the board and then streams
the audio collected from the microphones to the PC.
Figure 3.
Microphone USB demonstration board (block diagram)
APWlink
connector
APWlink+
L/R
J1
Mic_Vdd
SDO56
SDO34
BICK
SDO12
MIC_DATA12
Clk
LRCK
Vdd
SDA
SCL
Mic_Vdd
Vdd
Out
Clk
Out
gnd
I2C
I2S
L/R
gnd
µC_Vdd
STM32F107RC
SEL
SPI
12.288 MHz
SPI_CK
Mic_Vdd
SEL
J5
Mic_Vdd
Timer
MIC_CK
MIC_CK
J4
USB I/F
8 MHz
OSC
SEL
µC_Vdd
Mic_Vdd
2.5V
Regulator
2.5V
3.3V
Regulator
3.3V
5V
USB
Connector
D1
D2
D3
D4
D5
Supply section
The supply section of the board is made up of two voltage regulators that step down the 5 V
of the USB connection to 3.3 V and 2.5 V. The solder jumper J4 gives the user the possibility
to choose the desired supply voltage.The digital microphone voltage ranges are given in the
following table.
Table 1.
Microphone supply voltage range
Part number
Min.
Typ.
Max.
Unit
MP45DT02
1.64
1.8
3.6
V
MP34DB01
1.64
1.8
3.6
V
MP34DT01
1.64
1.8
3.6
V
We recommend using 2.5 V to avoid supplying the microphone with a voltage that is too
high. For instance, the MP34DT01 cannot support a supply voltage of 3.3 V.
Microphone section
Regarding the microphone section, the MEMS outputs are a PDM signal, which is a highfrequency stream (1 to 3.25 MHz) of 1-bit digital samples. According to the application hints
given in the datasheets (available on www.st.com), the microphone can be used in singlechannel configuration or stereo configuration by setting the LR pin. This pin sets the validity
6/14
Doc ID 022706 Rev 2
AN4041
Hardware description
of the output data on the high level of the clock or on the low level, refer to the following
table.
Table 2.
L/R channel selection
L/R
Clock low
Clock high
GND
Data valid
High impedance
VDD
High impedance
Data valid
On this board the microphones are used in stereo configuration, so the two digital outputs
are shorted (Mic_DATA12, refer to the schematic) and the two MEMS LR pins must be set
one to GND and the other one to VDD. On the board, the resistors R1 and R13 have already
set the LR pin of the microphones. In order to change the MEMS polarity, the user must
unsolder these resistors and manually set the LR pin using the solder jumper J1 and J5.
Note that the PCB section mounting the MEMS microphones is detachable. This option has
been implemented in order to let the user put the microphones in the desired position (i.e.
for display applications in which the microphones are placed at the edges of the display).
Microcontroller
The STM32F107RC microcontroller simultaneously works as a PDM interface and also
supports the USB audio streaming. The board hosts two external clocks, the 12.288 MHz
and 8 MHz. The first one serves to clock an internal timer for generating both MIC_CK and
SPI_CK. The 8 MHz is the microcontroller’s external clock connected to the OSC_IN
OSC_OUT pins.
The STM32 samples the microphone’s output data by using the synchronous serial port
(SPI1). The microphone signal MIC_DATA12 is a stereophonic signal and the SPI must be
able to sample both channels. Since MIC_DATA12 is synchronous with its clock, SPI_CK
must be doubled. Summarizing, the timer generates:
-MIC_CK = 3.072 MHz
-SPI_CK = 6.144 MHz
Finally, the USB interface allows streaming the audio on the USB peripheral making this
demonstration board compatible with any laptop or desktop. This streaming capability allows
using any acoustic tool for the sound acquisition done by STMicroelectronics’ MEMS
microphones. The demonstration board also has the possibility to manage the
microcontroller registers using the I2C bus. Another important STM32 peripheral that is used
is the I2S which allows exporting the audio in the most commonly used digital format. This
allows the user to test the signal using audio testing equipment such as Audio Precision. All
these signals can be monitored on the APWLink connector.
LEDs D1-D5
The status of the board is indicated by the following LEDs:
●
D1 on: USB enumeration successful
●
D2 on: Firmware correctly downloaded
●
D3 off: Firmware correctly downloaded
●
D4: not soldered
●
D5 on: Board supplied
Doc ID 022706 Rev 2
7/14
Getting started
3
AN4041
Getting started
The demonstration board is very user-friendly and is ready to use. After connecting the
micro USB cable to the laptop or desktop, the message shown in Figure 4 below appears.
This is possible since the firmware loaded into the STM microcontroller allows the operating
system to recognize the peripheral as an audio device. The version (in this case v1.0)
indicates the firmware loaded. The version v1.0 refers to a software decimator of 48 kHz as
the sampling frequency and 64 as the decimator index.
Figure 4.
Windows message
The user can also check if the USB demonstration board is recognized as an audio device
by accessing the computer management and then clicking on the device manager. The
demonstration board appears as a USB audio device in the list below.
Figure 5.
8/14
Computer management
Doc ID 022706 Rev 2
AN4041
Getting started
Since the firmware is able to let the operating system recognize the peripheral as an audio
device, it is possible to set the "ST 2uPhones EVB_v1.0" evaluation board as the recording
device. In this configuration, the demonstration board can be used to record the input of
general-purpose acoustic tools.
Figure 6.
Recording properties
Doc ID 022706 Rev 2
9/14
Figure 7.
Schematic
AN4041
Appendix A
Schematic
<Power Supply>
UC_VDD
VCC_USB
<JTAG>
UC_VDD
2.5V
1
1
D1
LED-1
1
D5
LED-1
1
C40
2
+
33uF
USBDP
C5
100nF
<Mangusta option>
3
STM32_I2S_BICK
2
12.288_CK
UC_VDD
CLK
MP34DB01
3
J4
4
MIC_DATA12
CLK
DATA
L/R
VDD
MIC1LR
2
C24
10uF
R13
0R0
J1
2
2
LR
3
GND
VDD
6
DOUT
5
CLK
4
MIC_DATA12
MIC1CK
1
MP34DT01
GND
3
1
MIC_VDD
C23
100nF
U2
1
MP45DT01
MIC1LR
2
1
R28
100
C26
15pF
MIC_CK
C25
15pF
MIC_VDD
C16
4.7uF
1
2
3
4
I2S_BICK
JP1
JP
2
SCL
1
R20100
5
6
7
8
46
JTMS
9
10
45
USBDP
11
12
44
USBDM
13
14
43
USB_DISC
15
16
MUTE
1
VSS_CAP
2
MCLK
0R0 R21
1
42
TP4
37
STM32_I2S_MCLK
36
STM32_I2S_DATA12
1
SDA
FAIL
RESET
2
DOUT
5
CLK
4
2
C20
15pF
R29
C19 100
15pF
MIC_DATA12
MIC2CK
MIC2LR
MP45DT01
1
MIC_CK
U11
STM32_I2S_MCLK
MIC2CK
U9
J10
CON4
3
VDD
4
DATA
5
3
MIC_VDD
4
MIC_VDD
J8
CON4
1
MIC_CK
L/R
2
CLK
1
MIC_DATA12
MP34DB01
3
4
CLK
DATA
L/R
VDD
2
1
MIC2LR
MIC_VDD
MP34DT01
MIC_DATA12
1
4
3
MIC_DATA12
R14
0R0
GND
C8
10pF
MIC_CK
2
LR
3
R1
0R0
12.288_CK
1
2
STM32_I2S_LRCK
2
3
1
33
2
VDD
6
3
1
MIC_VDD
STM32_I2S_BICK
GND
STBY
35
34
1
GND
TP3
38
2
C21
100nF
U1
J5
5
TP2
39
R19 100
J15
C7
10pF
C6
NS
MCO
40
C22
10uF
I2S_DAT_34
I2S_LRCK
GND
41
J6
CON4
UC_VDD
JP4
JP
2
I2S_DAT_12
I2S_DAT_56
2
47
STM32_LQFP64
UC_VDD
MIC_VDD
<Connectors>
1
51
50
VSS_1
PB11
VDD_1
48
32
31
30
17
PB10
PB12
PB2
PA2
J9
CON4
12.288_CK
1
C14
4.7uF
C13
100nF
VSS_CAP
TP1
SPI1_Clock
I2S_DAT_12
I2S_DAT_34
2
1
R36
0R0
I2S_BICK
I2S_LRCK
2
2
0R0 R9
0R0 R7
1
1
2
0R0 R11
1
2
0R0 R10
1
STM32_I2S_DATA12
STM32_I2S_DATA34
STM32_I2S_BICK
STM32_I2S_LRCK
10/14
Schematic
MIC_DATA12
C12
4.7uF
MIC_VDD
MIC_VDD
3.3V
C15
100nF
LED3
C11
100nF
DATA
1
U10
MIC1CK
C31
18pF
C27
100nF
XT_ACTIVE
49
PA14
PA15
PC10
54
53
52
PC11
PC12
56
58
57
59
60
55
PB3
PD2
PB4
PB5
PB6
PB7
BOOT0
63
62
61
PB8
PB9
PB13
2
L5
BEAD
VSS_3
PB14
PA1
29
16
PA0-WKUP
28
LED2
PB15
PB1
15
VDDA
PB0
C9
100nF
14
PC6
27
C10
10uF
1
LED1
MIC_CK
PC7
VSSA
26
13
PC8
PC3
PC5
2
L2
820nH
PC9
PC2
PA3
1
PC1
25
12
PA8
U5
PC4
11
PC0
24
10
FAIL
PA9
NRST
PA7
MUTE
PA10
PD1_OSC_OUT
PA6
9
PA5
8
STBY
23
7
RESET
PA11
22
1
A_VDD
C4
100nF
PD0_OSC_IN
21
BUT1
TACT2
2
NRST
PA12
PA4
6
PA13
PC15-OSC32_OUT
20
UC_OSC_OUT
VDD_3
64
5
VSS_2
PC14-OSC32_IN
VDD_4
UC_OSC_IN
VDD_2
PC13-TAMPER-RTC
VSS_4
4
19
LED2
LED3
3
18
2
1
R5
10K
4
JTCK
VBAT
2
Y1
8.000MHz
STM32_I2S_LRCK
MCO
1
1
MIC_DATA12
2
SCL
UC_VDD
C1
100nF
3
L/R
SDA
2
UC_VDD
VDD
5
2
R33
10K
C18
4.7uF
STM32_I2S_DATA34
4
2
2
C17
100nF
1
JRST
2
UC_OSC_OUT
U3
1
R34
1k
C2
18pF
UC_OSC_IN
R37
10k
J3
D4
LED-1
1
1
1
2
D3
LED-1
2
D2
LED-1
1
R35
1k
JUMPER_3P
BYPASS
C29
2.2uF
2
2
<Microphones>
3
4
JUMPER_3P
2
1
2
2
9
J2
2
MIC_VDD
UC_VDD
R32
100
BEAD
UC_VDD
1
R31
100
7
1
R15
10K
2
<Clock Generators>
UC_VDD UC_VDD
1
5
8
JRST
2
6
1K
1
R30
100
1
C49
1uF
3
10
1
JP3
JP
1
R39
0R0 NC
C28
2.2uF
1
L4
INDUCTOR2
R44
1
2
4
U7
2
VSS_CAP
UC_VDD
LED1
Doc ID 022706 Rev 2
<uController STM32>
2
1.6K
STM32_I2S_LRCK
NRST
MIC_VDD
5
LM317LM
R47
1
USBLC6-2
STM32_I2S_BICK
2
BEAD
6
ADJ
C39
100nF
1
7
JUMPER_3P
2
I/O2 4
C41
10nF
USBDM
OUT3
JUMPER_3P
R12 22
1
OUT4
OUT2
5X2_HEADER
2
1
JTMS
JTCK
4
3 I/O2
Mini TypeB
R6 22
2
OUT1
3
VBUS 5
4
2
I/O1 6
2 GND
3
UC_VDD
2
2
4
1 I/O1
8
IN
2
1
R38
27
1
D+ 3
ID 4
GND 5
1
BEAD
1
U8
R4
10K
R3
10K
2
L1
INDUCTOR2
3
VBUS 1
D- 2
U6
2
1
R8
1.5K
2
J7
GND
L3
INDUCTOR2
1
1
1
R2
10K
A_VDD
UC_VDD
3.3V
GND
180
1
3
330nF
VCC_USB
2
2
C30
4.7uF
C3
5
R26
1
2
E
VINH
GND
R22
36k
VCC_USB
1
2
Q2
B
2
1K
2
1
USB_DISC
3
2
E
2
1
C
5
OUT
LDS3985XX
R27
0R0 NC
Q1
B
2
R24
VIN
1
C
2
2
R25
47k
4
R23
10k
1
UC_VDD
U4
AN4041
Layout
Appendix B
Layout
Figure 8.
Board layout - top view
Figure 9.
Board layout - bottom view
Doc ID 022706 Rev 2
11/14
Ordering information
Appendix C
AN4041
Ordering information
The APWLink+ demonstration boards mentioned in this document are available on
www.st.com referenced by the ordering codes listed below.
Table 3.
Ordering information for demonstration boards
Order code
Board description
STEVAL-MKI116V1
MEMS microphone demonstration board based on the MP34DB01 and STM32F107RC
STEVAL-MKI117V1
MEMS microphone demonstration board based on the MP34DT01 and STM32F107RC
STEVAL-MKI117V2
MEMS microphone demonstration board based on the MP45DT02 and STM32F107RC
12/14
Doc ID 022706 Rev 2
AN4041
4
Revision history
Revision history
Table 4.
Document revision history
Date
Revision
Changes
30-Jan-2012
1
Initial release
06-Sep-2012
2
Updated maximum supply voltage for MP34DT01 in Table 1
Added Appendix C: Ordering information
Doc ID 022706 Rev 2
13/14
AN4041
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
© 2012 STMicroelectronics - All rights reserved
STMicroelectronics group of companies
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com
14/14
Doc ID 022706 Rev 2