RAK1920 WisBlock Sensor Adapter Module Quick Start Guide
Prerequisite
What Do You Need?
Before going through each and every step on using the RAK1920 WisBlock module, make sure to prepare the necessary items listed below:
Hardware
- RAK1920 WisBlock Interface Module
- Your choice of WisBlock Base
- Your choice of WisBlock Core
- USB Cable
- Li-Ion/LiPo battery (optional)
- Solar charger (optional)
- Grove PIR Motion Sensor (AS312)
Software
- Download and install 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
RAK1920 is a WisBlock Interface module, which extends the WisBlock system with an adapter board to connect Click Boards (MikroElektronika), QWICC (Sparkfun) based, and Grove (Seeed) based sensors to WisBlock.
For more information about the RAK1920, refer to the Datasheet.
RAK1920 module is part of the WisBlock Interface category, which connects to the base board through the IO slot. Also, always secure the connection of the WisBlock module by using the compatible screws.
Assembling and Disassembling of WisBlock Modules
Assembling
As shown in Figure 2, the location for IO slot is properly marked by silkscreen. Follow carefully the procedure defined in RAK5005-O module 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.
Disassembling
The procedure in disassembling any type of WisBlock modules is the same.
- Remove the screws.
- Once the screws are removed, check the silkscreen of the module to find the correct location where force can be applied.
- Apply force to the module at the position of the connector, as shown in Figure 5, to detach the module from the baseboard.
If you will connect other modules to remaining WisBlock Base slots, check on the WisBlock Pin Mapper tool for possible conflicts. RAK1920 uses UART and 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 (optional) and USB cable to start programming your WisBlock Core.
- 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 are matching the polarity on the WisBlock Base board. Not all batteries have the same wiring.
Software Configuration and Example
The RAK1920 module is a sensor extension module, it supports several defacto-standard interfaces in the IoT market and allows customers to integrate sensors manufactured by Mikroe, SparkFun, SeeedStudio, and others. For example, the RAK1920 supports the Click Boards™ series of modules provided by Mikroe, Qwiic Connect™ sensor interface designed by SparkFun, and it supports all kinds of I2C module digital I/O, UART and ADC sensors with a Grove™ interface.
Initial Test of the RAK1920 WisBlock Module
If you already installed the RAKwireless Arduino BSP, the WisBlock Core and example code should now be available on the Arduino IDE.
- You need to select first the WisBlock Core you have, as shown in Figure 7, Figure 8 and Figure 9.
Using RAK4631 WisBlock Core
Using RAK11200 WisBlock Core
Using RAK11300 WisBlock Core
- The Basic Sample Code for RAK1920 in Github will work on all WisBlock Core. You can open the the example codes depending on your WisBlock Core, as shown in Figure 10, Figure 11 and Figure 12. For this guide we will be using Grove PIR AS312
Sample code for RAK4631
Sample code for RAK11200
Sample code for RAK11300
- Once the example code is open, you can now select the right serial port and upload the code, as shown in Figure 13 and Figure 14.
- When you successfully uploaded the example sketch, open the Serial Monitor of the Arduino IDE to see the sensor's reading logs. If you see the logs, as shown in Figure 15, then your RAK1920 is properly communicating to the WisBlock core.
Sample code for other sensors