Skip to main content

RAK12022 Quick Start Guide

Prerequisite

What Do You Need?

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

Hardware

Software

  • Download and install ArduinoIDE.
  • 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

RAK12022 is a PT100 IO module that uses MAX31865, an easy-to-use resistance-to-digital converter optimized for platinum resistance temperature detectors (RTDs).

For more information about RAK12022, refer to the Datasheet.

RAK12022 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 2609: RAK12022 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 2610: RAK12022 connection to WisBlock Base

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

Figure 2611: 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 2612: 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 2613: 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 2614: 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. RAK12022 uses SPI communication lines, and it can cause possible conflicts, especially on other WisBlock Modules connected to Slots 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 RAK12022 design is based on MAX31865 from Analog Devices. The RAK12022 is a PT100 IO module, an easy-to-use resistance-to-digital converter optimized for platinum resistance temperature detectors (RTDs). An external resistor sets the sensitivity for the RTD being used, and a precision delta-sigma ADC converts the ratio of the RTD resistance to the reference resistance into digital form. For this example, you will be using the RAK4631 as your WisBlock Core.

Initial Test of the RAK12022 WisBlock Module

  1. Before you do the initial test of the RAK12022 module, you need to assemble the PT100 sensor into the module. Different wiring configurations for the 4-wire PT100 sensor are shown in Figures 7, 8, and 9.

    2-Wire

Figure 2615: 2-Wire Assembly

3-Wire

Figure 2616: 3-Wire Assembly

4-Wire

Figure 2617: 4-Wire Assembly
  1. Once done with the configuration, 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 2618: Arduino IDE
Figure 2619: WisBlock Cores inside the Arduino IDE
  1. Then install the library of RAK12022 into your Arduino IDE.
Figure 2620: Managing libraries in Arduino IDE
Figure 2621: RAK12022 Library
  1. Then open the sample code for RAK12022.
Figure 2622: Selecting the sample code for RAK12022
Figure 2623: Sample code for RAK12022
  1. Then select the RAK4631 board and its serial port, as shown in Figure 16 and Figure 17.
Figure 2624: Selecting RAK4631 board as the WisBlock Core
Figure 2625: Selecting the serial port of RAK4631 WisBlock Core
NOTE

If you are using the RAK11200 as your WisBlock Core, the RAK11200 requires the Boot0 pin to be configured properly first before uploading. If not done properly, uploading the source code to RAK11200 will fail. Check the full details on the RAK11200 Quick Start Guide.

  1. Then upload the code as shown in Figure 18 and Figure 19.
Figure 2626: Uploading the RAK12022 sample code
Figure 2627: Uploading the RAK12022 sample code
NOTE

If you experience any error in compiling the example sketch, check the updated code for the RAK12022 WisBlock PT100 module that can be found on the RAK12022 WisBlock Example Code Repository.

  1. When you successfully uploaded the sample code, open the Serial Monitor of the Arduino IDE to monitor the PT100 sensor's reading logs.
Figure 2628: Sample code successfully uploaded to RAK4631
Figure 2629: Readings from the Serial Monitor