Monitor WisBlock Sensors in real-time with ESP32 WiFi Module & MQTT protocol

Qubitro
3 min readAug 12, 2021

Monitor WisBlock Sensors in real-time with ESP32 WiFi Module & MQTT protocol

We took a look at the LoRaWAN core for the WisBlock system from RAKwireless a little while ago, but what if we want to deploy the same sensors but over a Wi-Fi connection? RAK has dropped a new ESP32 core which features both Wi-Fi and Bluetooth and fits on the existing baseboard and sensor system.

Wi-Fi has advantages and disadvantages when compared to LoRa, its much higher power so harder to keep power from a small battery, requires a lot more computational resources, and lacks the range of LoRa, however, Wi-Fi can provide more bandwidth for a device, is standard everywhere, and most networks will allow connection to anywhere on the internet using the standard IP stack. Using Wi-Fi we can directly connect from the device to Qubitro using the MQTT protocol, no service providers like The Things Network are required.

You may from a previous post remember the white sensor box built to show the WisBlock system, for us to transition this sensor to use the ESP32 was super easy and really shows off the modularity of the RAK WisBlock system.

First, we removed the old LoRa core, screwed on the new ESP32 core module, soldered on a pin header for a boot jumper (On the BOOT0 and GND pins), and swap any sensors we’d like to change.

Now the sensor acts like any other ESP32 device, and we can write some firmware for it, we came up with a similar basic example for the LoRaWAN core which you can find in our WisBlock Sensor Examples GitHub repo which simply connects to Qubitro and pushes data from any WisBlock sensor.

Go ahead and follow our guide for more details and how to set up the IDE. Modifying the main.h file allows for the sensors on the baseboard to be selected at compile time for your custom sensor.

The example we provide lets you easily enable/disable the sensor by commenting out the definitions.

#define SHTC3_TEMP_HUM_SENSOR
#define LPS22_PRESSURE_SENSOR
//#define OPT3001_LIGHT_SENSOR
//#define LIS3DH_ACCEL_SENSOR
//#define BEM680_ENV_SENSOR
//#define UBLOX_GPS

After following the simple guide, power the device with the new firmware, you should see the new device in Qubitro as connected and data flowing in.

Helpful links

--

--

Qubitro
Qubitro

Written by Qubitro

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

No responses yet