Introduction: Informationalized Beehives

Honey is a sweet, viscous food substance made by bees and some related insects. Today, most of the honey is collected from domesticated beehives, and for beekeepers, assessing the health of bees is therefore indirectly analyzing the quality of the hives.

Here we will introduce how to build an informationalized beehive with a Sigfox communication module.

The informationalized beehive is a tool for real-time monitoring of bee colonies. The data recorded by these equipped hives can generate alerts when an abnormal change occurs, for example, if the temperature of the hive drops significantly or if the hive loses weight. The project, therefore, consists of equipping a beehive with the addition of sensors to allow it to obtain different information such as interior temperature, humidity, and weight.

This equipment is nothing hinder the beekeeper in his work and the bees, and it can be self-sufficient in energy for a long time.

Step 1: Design Your Structure

Before we started this project, the first thing is to seriously think about how to design our system.

So, after having determined our design, we created a schema of this system.

Step 2: Choose Your Electronic Components

In the second step, you need to choose your components.

In this project, you need a microcontroller, a force sensor, a sound sensor, a temperature sensor, a humidity sensor, a probe, and a voltage amplifier.

Here are all electronic components which we used:

STM32 Nucleo-L432KC: Microcontroller

CZL635-50: Force sensor 50 kg

HX711: Voltage amplifier

Grove 101020063: Sound sensor

DHT22: Temperature and humidity sensor

DS18B20: Probe

Step 3: Read Datasheets

When we determined our components, we read carefully the Datasheets and found their key information.

DHT22: Temperature and humidity sensor

-Voltage :+3.3V

-Operating Current: 1.5mA

-Operating Temperature: -20℃-80℃

-Precision of temperature measurement: ±0.5℃

-Range of humidity measurement: 0-100%RH

-Humidity deviation: ±2%RH

-Resolution: 0.1%RH

DS18B20: Probe

-Voltage: +5V

-Operating Current: 1.5mA

-Operating Temperature: -55°C to +125°C

-Precision of temperature measurement: ±0.5°C Accuracy from -10°C to +85°C

CZL635-50: Force sensor 50 kg

-Voltage: 5 Vcc

-Rang of masse measurement: 0 à 50 kg

-Precision of masse measurement: ±0,05 %

HX711: Voltage amplifier

-Voltage: 2,7 to 5 Vcc

-Consumption: 1uA to 1.5mA

-Precision: 24 bits ADC

Grove 101020063: Sound sensor

-Voltage: 3.5~10 VDC

-Working Frequency: 50~2000 Hz

-Sensitivity: -48~66 dB

-Signal-to-noise Ratio: >58 dB

-Output Signal range: Analog Signal (0-1023)

Step 4: Ubidots IoT Platform

In this project, we chose UBIDOTS as our IoT Platform.

From UBIDOT, we could find all the variables which we have declared.

Following these steps to create your page:

1 - Creating a new account

2 - Creating a new Dashboard

3 - Creating the Sigfox Device

4 - Creation of variables in Ubidots

5 - Creating Humidity and Temperature Widgets

To configure your Ubidots platform you can use this tutorial :

Step 5: Write a Programe for Nucleo STM32 Board

Now, we need to write a program for our Nucleo STM32 board.

In this project, you don't need to download any compiler, just like us, we use Mbed online compiler to create this C++ program.

You can find a C++ program, this is for the temperature and humidity sensor DHT22, it can read the sensor's information.

Attachments

Step 6: Explication of Nucleo STM32 Board Program

First, you need to import the necessary libraries. Then, we must define ports for our sensors and our transmission modules (SigFox & USB).

Second, we declare the variables we will use in the function main. Then we calibrate the balance by taking a first weight value.

You must implement the code below to operate the probe.

We code all the measures in a “while (1)” loop. We test the sensor (Temperature & Humidity) if we read a value then it works and we can retrieve the desired value thanks to the functions "ReadTemperature ()" and "ReadHumidity ()".

We recover the value of the balance which we convert to grams (weight = ((double) value- (double) valueTare) / 11500; Then it’s displayed.

The temperature is also measured via the probe. To have the temperature inside the hive.

And then, we have to recover the value of the microphone. We recover its value and multiply it by 1023. Then we convert this data into dB.

Finally, all that remains is to send the data via SigFox. For this, we will use the AT $ SF command. It is important to pay attention to the number of bytes sent because you can send 12 bytes per message and 140 messages per day.

Step 7: Use of the Sigfox Module to Send Data

Each module has a unique identifier (ID) and a PAC code which is used to activate the module. These numbers are specified in the module packaging. To connect to the backend of Sigfox, you need to log in to your account.

We connect the RX and TX of the module on a microcontroller like the Nucleo, we will send AT commands from the Nucleo via the serial connection: we must use the serial port Serial1 RX and TX. (D1 and D0). We send the DHT11 data to Sigfox, we send 2 bytes for humidity and then 2 bytes for temperature. We receive the expected values on the Sigfox network. We configure a callback on the backend of Sigfox in order to visualize this data on a platform that allows displaying the data in graphical form like Ubidots. To configure the callback, go to device type then callback. Finally, we must inform the variables as well as their format (int, float…). Finally, we enter the Ubidots token on the pattern URL, this token can be found on Ubidots in API Credential.

Step 8: Final Result and Observation

From platform UBIDOTS, we can monitor the process of our informationalized beehive.

In the magic page, it shows the actual values of all sensors, then when there is something unusual, it will send us an alert.

We can also find some line charts which shows the evaluation of the data during a certain period, like 1 day, 1 week, 1 month, etc.

Then in another page, we can find how long the battery can support the whole system, and it can send us an alert when the battery is almost dead.

Step 9: Conclusion

This system is just a solution to make beekeepers’ work much easier, it collects data every hour and shows it on a website. This is a real-time system that can find abnormal inside the hive in time and send alerts. The information collection offers a possibility to quickly know the state of colony health and anticipating any anomaly.