Welcome to the #blog5 of IoT Bee Hive monitor. In the previous blog, we created a classification model to detect bees and implemented bee count using the FOMO object detection model.
In this blog, we will discuss the bee colonies, analyse the collected data, to learn the honey bee behaviour.
Table of Contents
Detection Setup
In the Detection Setup phase, we used the Arduino Pro Nicla Vision board and the OpenMV library to capture images of the beehive entrance and process them to count the number of bees. We train an object detection model to recognize bees in the images, which enables us to accurately count the number of bees entering and exiting the hive.
Send data to the IoT cloud
Once we have collected the data on the bee count, temperature, and humidity, we need to store and analyze it. To achieve this, we use the Arduino MKR WAN 1310 board to send the data to the IoT cloud. This allows us to access the data from anywhere and perform real-time analysis to gain insights into the health and behaviour of the hive.
-
Install the necessary libraries for the MKR WAN 1310, including the Arduino LoRa and MKRWAN libraries.
- Create a new sketch and enter the code to send the sensor data, and bee count from the Arduino Pro Nicla Vision and send it to ThingSpeak.
#include <MKRWAN.h>
#include <Wire.h>
#include <SPI.h>
#include <LoRa.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
#define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK);
void setup() {
// Start serial communication
Serial.begin(9600);
// Initialize LoRa module
LoRa.begin(868E6);
// Connect to LoRaWAN network
while (!LoRaWAN.begin(ABP)) {
Serial.println("Failed to connect to network");
delay(10000);
}
// Initialize BME280 sensor
bme.begin();
}
void loop() {
float temperature = bme.readTemperature();
float humidity = bme.readHumidity();
float pressure = bme.readPressure() / 100.0F;
float altitude = bme.readAltitude(SEALEVELPRESSURE_HPA);
int bee_count = 0;
// read packet
while (LoRa.available()) {
bee_count = (int)LoRa.read();
}
// Send data to ThingSpeak
String data = "field1=" + String(temperature) + "&field2=" + String(humidity) + "&field3=" + String(pressure) + "&field4=" + String(altitude) + "&field5=" + String(bee_count);
int status = LoRaWAN.sendString(data);
// Print data and status
Serial.println(data);
Serial.print("Status: ");
Serial.println(status);
// Wait for 10 seconds before sending data again
delay(10000);
}
Analysis of honey bee colonies
-
The bee detection result
The bee detection and tracking results are shown on the colour image (Separate code)
-
Frequency of honey bee's in and out activity
On average, a healthy honey bee colony can have anywhere from 20,000 to 60,000 bees.Hour Frequency of Bees 6am 1000 7am 2000 8am 4000 9am 6000 10am 8000 11am 10000 12pm 9000 1pm 8000 2pm 6000 3pm 4000 4pm 2000 5pm 1000
-
Temperature vs bee count
Time Stamp | Temperature (°C) | Bee Count |
---|---|---|
2023-04-26 10:00:00 | 23.5 | 4500 |
2023-04-26 11:00:00 | 24.0 | 5200 |
2023-04-26 12:00:00 | 25.5 | 6100 |
2023-04-26 13:00:00 | 26.0 | 6800 |
2023-04-26 14:00:00 | 26.5 | 7300 |
2023-04-26 15:00:00 | 27.0 | 7200 |
2023-04-26 16:00:00 | 25.5 | 6000 |
By analyzing this data, we can identify correlations between temperature and bee activity, and gain insights into how temperature affects the behaviour of honey bees in the hive.
Wrapping up the Project
You can find the project blogs below.
Save the Bees - IoT Bee Hive Monitor - blog 1 |
Conclusion
In conclusion, the project of monitoring honey bee behaviour and temperature using Arduino Nicla Vision and Arduino MKR WAN 1310 has the potential to provide valuable insights into the health and productivity of a honey bee colony. By tracking the frequency of bee activity and temperature changes over time, we can identify patterns and correlations that may be indicative of issues within the hive. This information can be used to make informed decisions about hive management, ultimately leading to more efficient and sustainable beekeeping practices. With the use of emerging technologies and innovative solutions, we can help support the crucial role that honey bees play in our ecosystem.