How to use the multiple microphone inputs of Spresense with the Arduino IDE
To connect microphones to the Spresense board, the Spresense extension board is needed to make the connection pins available. More information about how to connect microphones can be found here.
According to the schematic of microphone channel placement in the link above there are 4 different analog ports named A to D. To record in stereo mode it is enough to simply connect two microphones to input A and B, and then select stereo mode (AS_CHANNEL_STEREO) when initializing the recorder. The captured data will have all input from Input A in the left audio channel and that from Input B in the right one. Similarly, if all four inputs A to D are connected, use mode AS_CHANNEL_4CH when initializing the recorder and the resulting audio data will contain four channels.
For this quick demonstration of how to record from two microphones simultaneously we will need the following equipment:
- 1 Spresense main board
- 1 Spresense extension board
- 2 Analog electret microphones
- 2 resistors at 2.2 kΩ