Skip to main content

RAK18061 WisBlock Audio Mono Amplifier Module Quick Start Guide

Prerequisite

What Do You Need?

Before going through each and every step on using the RAK18061 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

RAK18061 is a mono amplifier module, part of the WisBlock Audio Series.

For more information about RAK18061, refer to the Datasheet.

RAK18061 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 4138: RAK18061 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 4139: RAK18061 connection to WisBlock Base

You need to connect the LoRa and BLE antennas to the RAK4631 module to avoid damage to this module during operation.

Figure 4140: LoRa and BLE antennas connection to RAK4631 module

The RAK18061 module is powered via SB2 (battery) by default. If you wish to use other DC power source, refer to Figure 4.

Figure 4141: Power Select Diagram for RAK18061 with SB2 as default

3V3

If you want to use 3V3, desolder SB2 and solder SB1.

Figure 4142: Solder portion for SB1

VBUS

If you want to use VBUS, desolder SB2 and solder SB3.

Figure 4143: Solder portion for SB3

EX_POWER

If you want to use EX_POWER, desolder SB2 and solder SB4.

Figure 4144: Solder portion for SB4

Then you can now connect the speaker to the speaker output of the RAK18061 module.

Figure 4145: Speaker output of RAK18061 module
Disassembling

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

  1. First, remove the screws.
Figure 4146: 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 4147: Detaching silkscreen on the WisBlock module
  1. Apply force to the module at the position of the connector, as shown in Figure 11, to detach the module from the baseboard.
Figure 4148: 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. RAK18061 uses I2C communication lines, and it can cause possible conflict, especially on other WisBlock Modules connected to Slot A to D of the WisBlock Base.

After all this setup, you can now connect the battery 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

RAK18061 is a mono amplifier module, part of the WisBlock Audio Series. The RAK18061 is designed based on the TAS2560 from TI. The TAS2560 features an ultra low-noise audio DAC and Class-D audio amplifier which incorporates speaker voltage and current sensing feedback for use with speaker protection algorithms. The RAK18061 can drive the speaker to play audio through the input I2S signals. With other WisBlock modules, it can achieve rich applications, such as recording and voice control functions.

Sample Code Test of the RAK18061 WisBlock Module

  1. 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.

  2. Then install the latest RAKwireless Audio Library using the Library Manager of Arduino IDE.

Figure 4149: RAKwireless Audio Library
Figure 4150: RAKwireless Audio Library
  1. Plug in your integrated module (RAK4631 + RAK18061) into your PC through the USB cable.

  2. Then open your Arduino IDE and open the PlayBack48K sample code for RAK18061, as shown in Figures 14 to 16.

Figure 4151: Arduino IDE
Figure 4152: Selecting the PlayBack48K Sample Code
Figure 4153: PlayBack48K Sample Code
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 your WisBlock Core RAK4631, as shown in Figure 17.
Figure 4154: Selecting the RAK4631 WisBlock Core board
  1. Once done, select the corresponding port of your WisBlock Core RAK4631.
Figure 4155: Selecting the port of RAK4631
  1. Once done, it should look the same with Figure 19.
Figure 4156: Selected board and port of RAK4631
  1. Then tick the right arrow at the top leftmost part of the Arduino IDE to upload the sample code to your RAK4631 module.
Figure 4157: Uploading the PlayBack48K sample code to your RAK4631
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. Once done uploading, it should look like the same with Figure 21. At this moment, you will hear "Train 32 from Amsterdam is now arriving" from your speaker playing repetitively.
Figure 4158: Programmed RAK4631