Skip to main content

RAK18033 WisBlock Audio Stereo Microphone Header Module Quick Start Guide

Prerequisite

What Do You Need?

Before going through each and every step on using the RAK18033 WisBlock module, make sure to prepare the necessary items listed below:

Hardware

Software

  • Download and install the Arduino IDE.
  • To add the RAKwireless Core boards on your Arduino board, install the RAKwireless Arduino BSP. Follow the steps in the GitHub repo.

Product Configuration

Hardware Setup

RAK18033 is a WisBlock Audio Stereo Microphone Header module that allows you to connect two PDM Microphone modules to create a stereo sound input.

For more information about RAK18033, refer to the Datasheet.

RAK18033 module can be connected to the IO slot of the WisBlock Base to communicate with the WisBlock Core. Always secure the connection of the WisBlock module by using compatible screws.

Figure 4110: RAK18033 connection to WisBlock Base

Assembling and Disassembling of WisBlock Modules

Assembling

As shown in Figure 2, the location for the IO slot is properly marked by silkscreen. Follow carefully the procedure defined in WisBlock Base board assembly/disassembly instructions to attach a WisBlock module. Once attached, carefully fix the module with one or more pieces of M1.2 x 3 mm screws depending on the module.

Figure 4111: RAK18033 connection to WisBlock Base

When using the RAK4631 board, connect the LoRa and BLE antennas to avoid damage to the board.

Figure 4112: LoRa and BLE antennas of RAK4631
Disassembling

The procedure in disassembling any type of WisBlock module is the same.

  1. First, remove the screws.
Figure 4113: Removing screws from the WisBlock module
  1. Once the screws are removed, check the silkscreen of the module to find the correct location where force can be applied.
Figure 4114: Detaching silkscreen on the WisBlock module
  1. Apply force to the module at the position of the connector, as shown in Figure 6, to detach the module from the baseboard.
Figure 4115: Applying even forces on the proper location of a WisBlock module
NOTE

If you will connect other modules to the remaining WisBlock Base slots, check on the WisBlock Pin Mapper tool for possible conflicts. RAK18033 uses I2C communication lines, and it can cause possible conflict, especially on other WisBlock Modules connected to Slot A to F of the WisBlock Base.

After all this setup, you can now connect the battery (optional) and USB cable to start programming your WisBlock Core.

warning
  • Batteries can cause harm if not handled properly.
  • Only 3.7-4.2 V rechargeable LiPo batteries are supported. It is highly recommended not to use other types of batteries with the system unless you know what you are doing.
  • If a non-rechargeable battery is used, it has to be unplugged first before connecting the USB cable to the USB port of the board to configure the device. Not doing so might damage the battery or cause a fire.
  • Only 5 V solar panels are supported. Do not use 12 V solar panels. It will destroy the charging unit and eventually other electronic parts.
  • Make sure the battery wires match the polarity on the WisBlock Base board. Not all batteries have the same wiring.

Software Configuration and Example

The RAK18033 Stereo Microphone Header module can connect two identical PDM Microphone modules at the same time. It is compatible with PDM microphones RAK18030, RAK18031, and RAK18032, which are used to convert analog audio into a Pulse Density Modulation (PDM) output. They can be used for audio monitoring, recording, and even voice control functions. As an example, you will be using the RAK4631 as your WisBlock Core.

Initial Test of the RAK18033 WisBlock Module using PDM Microphone Modules

  1. To test the RAK18033 module, you need to connect first the PDM Microphone modules as shown in the figures below.

    Using RAK18030 module

Figure 4116: RAK18030 Stereo Microphones

Using RAK18031 module

Figure 4117: RAK18031 Stereo Microphones

Using RAK18032 module

Figure 4118: RAK18032 Stereo Microphones
  1. Then install the RAKwireless Arduino BSP for WisBlock by using the package_rakwireless_index.json board installation package. The WisBlock Core should now be available on the Arduino IDE.
Figure 4119: Arduino IDE
  1. Install the latest RAKwireless Audio Library using the Library Manager of Arduino IDE.
Figure 4120: RAKwireless Audio Library
Figure 4121: RAKwireless Audio Library
  1. Then open the sample code for the PDM Microphones.
Figure 4122: Selecting the sample code for PDM Microphones
Figure 4123: Sample code for PDM Microphones
NOTE

The example codes of RAKwireless Audio Library are compatible with specific WisBlock Core. You have to select the correct WisBlock Core based on what core you used in your application.

  1. Select the RAK4631 board and its serial port, as shown in Figure 15 and Figure 16.
Figure 4124: Selecting RAK4631 board as the WisBlock Core
Figure 4125: Selecting the serial port of RAK4631 WisBlock Core
  1. Upload the code, as shown in Figure 17 and Figure 18.
Figure 4126: Uploading the PDM Microphone code
Figure 4127: Uploading the PDM Microphone code
NOTE

If you experience any error in compiling the example sketch, check the updated example code for your WisBlock Core Module that can be found on the RAKwireless Audio Library.

  1. When you successfully uploaded the sample code, open the Serial Plotter of the Arduino IDE to see the sensor's reading logs. To test the sound detection, you can download a sound-generating app on your smartphone and sweep frequencies starting from 1000 Hz to 10000 Hz. If you see the logs, then your RAK18033 is properly communicating to the WisBlock core.
Figure 4128: Sample code successfully uploaded to RAK4631
Figure 4129: Opening the Serial Plotter
Figure 4130: FFT Plot of 10kHz sample signal
NOTE

If there is no serial plot graph shown in Arduino 2.0.x, you can try the serial plotter of the legacy Arduino 1.8.x IDE.