Rapid Environmental Monitor Deployment with Qubitro, RAK’s WisBlocks, and The Things Network

Qubitro
5 min readAug 12, 2021

--

Build, Deploy, and Connect sensor nodes with Qubitro using the LoRaWAN networking technology and RAKwireless hardware.

Sometimes we want to monitor the environment around us and have a historical view. Maybe you want to measure the effectiveness of your AC or heat pump, or just see the changes in your local weather near the mailbox.

In this guide we are using LoRaWAN to communicate with the remote nodes which allows you to deploy many of these across a large area, maybe you even want to monitor hundreds of individual offices in a building.

LoRa, the radio technology under LoRaWAN, uses chirps and a low frequency to ensure distant communication and be readable over noisy airspace while using little power. It is common to find LoRa devices where devices with long battery lives are needed with long-range and a low bandwidth requirement.

Qubitro has partnered with RAKwireless to show you all their new WisBlock ecosystem of composable hardware. It allows anyone who wants to quickly dive right into a project or PoC without worrying about the hardware. Their ecosystem contains cores, bases, sensors, and IO modules that can click and screw together to make your hardware combination. The only current core module is an nRF52 ARM Cortex-M4 microcontroller paired with a LoRa radio which combined with the baseboard has the required circuits for a battery, solar/USB charging, LEDs, USB programming, flash storage, and the ability to power gate the sensor and IO modules.

For sensors, the starter kit comes with a temperature/humidity sensor, environmental (temperature/humidity/gas/pressure combo) sensor, light sensor, pressure sensor, accelerometer, and GPS. For IO modules, RAK provides a cellular modem, ADC, current sensor, Wi-Fi co-processor, IO expansion, and Click/Grove/QWICC breakout.

WisBlock with sensors and a GPS being attached

To assemble a LoRaWAN device with WisBlocks as shown above, just push the required components together, there are two locations on each side for sensors (Pictured above the GPS consumes the top two) and a single IO module connector on the top.

After screwing the modules down the hardware is complete unless you have additional external components you’re wiring in, for example, a PM2.5/10 particulate sensor. After connecting everything together, we thew the boards into cases for deployment with a lithium-ion battery.

Note that RAK carries cases specific for WisBlocks, including one with a neat solar panel.

Sensor selection and LoRaWAN info

Once the hardware is assembled, the RAK guide for setting up with PlatformIO or Arduino needs to be followed. We recommend PlatformIO if using any Qubitro examples, for this WisBlock starter kit post we have an example codebase to be used.

Directly after cloning and opening our example repo, select which sensors you’re using from RAK in the main.h by uncommenting the preprocessor definitions for the module. In that same file, you can find the definitions you need to populate to use The Things Stack. Once this is done, press the compile button, PlatformIO will automatically download everything needed and if everything is OK no errors will appear. This example is meant as a minimal example with a few different elements which could be copied or extended and is talked about more here.

We partnered with The Things Stack to be easily integrated with LoRaWAN devices. The advantage of using The Things Stack is if we have a gateway, the setup is very easy, but we can also use any nearby public networks using The Things Stack. So if someone nicks a sensor with a GPS, if they pass by other gateways we’ll get a location, and others can also use our gateway.

As previously mentioned, LoRaWAN while low power, also has a limited bandwidth, so an additional service of The Things Stack is device data can be formatted by a javascript script to formulate byte protocols into something Qubitro can understand.

After making a device, a screen like the one above is shown, where the values for each of the DevEUI, AppEUI, and AppKey as required by the main.h file in the project source or any other LoRaWAN application. The <> buttons in each field allow the values to be encoded in an easy copy and paste format for the code. While setting up the device, make sure to use the DevEUI printed on the front of the WisBlock core, with a random AppKey. Read more about this here.

After the hardware is put together, the software is configured, and the device is set up with the service provider, press the upload button and flash your application to the WisBlock device. Watching The Things Stack live console should show a join request shortly after reset if a configured gateway is nearby. To see your WisBlock data, integrating The Things Stack with Qubitro is as easy as going to Webhook integrations, selecting Qubitro, and filling out your Qubitro info. To view the data in Qubitro from our example, make sure to apply an uplink payload formatter. as shown here or make your own.

Now data should be flowing into Qubitro for you to view, dashboards and charts can be created to view the last or historical data from one or a collection of devices.
Opening the RAKwireless Starter Kit box to seeing this data in the Qubitro console can take as little as fifteen minutes assuming you have a The Things Stack account and PlatformIO is set up.

While the example isn’t optimized for low power, feel free to chuck it somewhere and watch the world pass your sensor behind from the comfort of your Qubitro dashboard.

Finished nodes next to a LoRaWAN gateway and the used wisblock

--

--

Qubitro

Infrastructure for the Internet of Things solutions. Build connected solutions faster than ever.