Trial of measurement of temperature, humidity, air pressure, and accelerations with Sigfox Una Shield V2S
Introduction
This article is the continuation of The use of Sigfox with Una Shield V2S.
Sigfox development board Una Shield V2S is equipped with Bosch’s BME 280 sensor of temperature, humidity, and barometric, and NXP’s MMA8451 sensor of acceleration, but the Una Shield’s sample program is to send only BME280’s temperature and humidity data to the Sigfox network. In this article, a method of sending sensing data of BME280 and MMA8451 to Sigfox network , send the data to webhook, and accumulate data is shown.
You can automatically measure temperature, humidity, pressure, board tilt (acceleration sensor) and send them to the cloud simply by connecting Una Shield, Arduino Uno (or its compatible board) and USB power supply. The number of information that can be gathered per day on the Sigfox network is limited to 140 times, but still it is fun to collect these information every 15 minutes.
We can send data of 12 bytes to the Sigfox network at a time. Temperature, humidity, and atmospheric pressure are expressed as 2-byte integers, and the three-dimensional acceleration representing the slope is multiplied by 10 respectively to make it 2-byte integers, making it a total of 12 bytes.
Introduction of BME 280 library and MMA 3451 library to Arduino IDE
Open pages of Adafruit Unified Sensor Driver, [Adafruit BME 280 Library] (https://github.com/adafruit/Adafruit_BME280_Library), and Adafruit MMA 8451 Accelerometer Driver, and press the “Clone or download” and “Download ZIP” to download the libraries.
Next, the following program is compiled and transfer to the Arduino Uno board.
Configuration of webhook on Sigfox Backend Cloud
Log in to Sigfox Backend Cloud, and click “DEVICE TYPE”, “Unabiz”、“CALLBACKS” on left side, “New” on right side, and write in “Custom payload” as
temp::int:16:little-endian humid::int:16:little-endian press::int:16:little-endian x::int:16:little-endian y::int:16:little-endian z::int:16:little-endian
Then, type Body as
{
"device": "{device}",
"time":"{time}",
"station":"{station}",
"rssi":"{rssi}",
"snr":"{snr}",
"data":"{data}",
"seq": "{seqNumber}",
"temp":"{customData#temp}",
"humid":"{customData#humid}",
"press":"{customData#press}",
"x":"{customData#x}",
"y":"{customData#y}",
"z":"{customData#z}"
}
Other settings are the same as described in The use of Sigfox with Una Shield V2S.
Arduino Uno, Una Shield, Information on the board to which the USB power supply is connected should be collected as follows.
device: xxxxxx
time: xxxxxxxxxx
station: 50E3
rssi: -123.00
snr: 9.48
data: 11003600f003f4fff1ff5f00
seq: 2791
temp: 17
humid: 54
press: 1008
x: -12
y: -15
z: 95
This indicates that the temperature is 17 degrees Celsius, the relative humidity is 54%, and the atmospheric pressure is 1008 hPa. Also, since the gravitational acceleration is 9.8 m/s^2, you can see that the board is slightly tilted.
As seen in Sigfox Backend Cloud, “The feature send duplicate and the following information: snr, station, avgSnr, lat, lng, rssi, will not be available anymore for customers in the DATA callback feature from the first of June 2019.”
The signal-to-noise power ratio (snr) and the signal strength (rssi) will not be displayed from the beginning of June next year. When “Send duplicate” is turned on, different data of snr, rssi and station are also displayed, and you can see that three different transmissions are received by three different base stations. I’m expecting a location service with use of Sigfox network.