Monitoring System for Remote Bee Colony State Detection

. Honeybees are the main pollinators for agricultural and horticultural plants. They help at least 30% of the worlds crops and 90% of the worlds wild plants to thrive via cross-pollination. To minimise the effect of on-site colony inspections application of Precision Beekeeping solutions are becoming increasingly frequent. Real time, remote monitoring of the colonies using ICT can help the beekeepers to detect abnormalities and identify states of the colony. For successful implementation of the Precision Beekeeping system development of the bee colony monitoring hardware solution and computer software for data collection and further analysis is needed. This paper describes authors developed bee colony monitoring system for the remote bee colony state detection. Bee colony weight together with temperature are the key metrics for state and behaviour analysis. Hardware of the developed monitoring system is based on the popular ESP8266 low-cost Wi-Fi microchip. Weight is measured using single point load cell with possibility to measure weight up to 200kg, which is enough for the bee colony measurements. Data transfer from the remote apiary is provided by the external 3G router. For data storage and analysis cloud-based data warehouse was developed. Collected data is accessible in the web system in real time. In addition, web tool for system power consumption and battery life evaluation was developed to assess monitoring system sustainability. Described monitoring system is developed within the Horizon 2020 project SAMS, which is funded by the European Union within the H2020-ICT-39-2016-2017


Introduction
Pollination of agricultural and horticultural plants is crucially necessary for human food supply. Insects are the main pollinators, and honey bees are the most widespread and active insects worldwide (Bradbear, 2009;Breeze et al., 2011).
Beekeeping is one of the traditional branches of the agriculture and recently Precision Beekeeping (Precision Apiculture) has been defined, as apiary management strategy based on individual bee colony monitoring . One of the main objectives of the Precision Beekeeping is to assist the beekeepers with on time detection of bee colony states. To detect different states of the bee colonies different sensors can be used and data should be centrally collected and analysed. Behaviour and state of bee colonies can be monitored by the use of temperature, humidity, acoustics, video, weight and other sensors (Meikle and Holst, 2015). Continuous and real-time monitoring of colony parameters is becoming feasible also for smaller beekeepers as the cost of the end systems are decreasing while their precision and valuable outcome are increasing. It is evaluated that implementation of Precision Beekeeping system can lead to economic benefit for the beekeepers . Another benefit of the remote bee colony monitoring is the reduction of the number of manual on-site inspections thus decreasing the effect of bee disturbance. Frequent, physical inspections of bee colonies interferes with bees normal living and can cause additional stress, that negatively affects the whole colony productivity (Komasilovs et al., 2019;Zabasta et al., 2019). As well the distributed locations of apiaries are frequently present, and thus, indicate the need to ease the monitoring of animals in a 24/7 mode, which can benefit from advanced intelligent ambiance technologies (Zgank, 2019).
There are many studies about bee colony parameter monitoring and it is concluded that weight and temperature are the main ones as costs compared to outcome information is adequate. Bee colony weight monitoring provides one of the most important kinds of data beekeeper can have about the colonies (Fitzgerald et al., 2015). Automated weight systems can supply the beekeeper with important information on several important events from the honey bee colonies (Buchmann and Thoenes, 1990;Meikle et al., 2006;Meikle et al., 2008). Weight is related to such important activities of the bee colony like starting of nectar collection, resource consumption by the colony indicating the need of additional feeding. Some developed solutions are described in scientific publications (Fitzgerald et al., 2015;Ochoa et al., 2019;Terenzi et al., 2019;Zabasta et al., 2019;Zacepins et al., 2017). Second important parameter of the bee colony is temperature, as bees can regulate temperature inside the hive (Southwick, 1992). Temperature measurements of bee colonies have the longest history and nowadays, bee colony temperature measurements seem to be the simplest and cheapest way to monitor bee colonies (Zacepins and Karasha, 2013). Basically, temperature sensor usually is added to every bee colony monitoring device. The monitoring of honeybee colonies over long periods of time can result in long-term data for better analysis and understanding of the colony behaviour Lecocq et al., 2015;Odoux et al., 2014;Simon-Delso et al., 2014).
Aim of this paper is to describe the developed monitoring system for honey bee colony state detection using single point load cell and ESP8266 low-cost Wi-Fi microchip.
Within this research authors used several modern computing methods, including but not limited to hardware prototyping and 3D designing, automatic data collection about hardware power consumption patterns, actual web system development and data flow control methods etc.
Development of the bee colony digital monitoring system is done within the Horizon 2020 project SAMS. A combined biological, sociological and technical approach is made within the SAMS -Smart Apiculture Management Services -project (https://samsproject.eu/). The SAMS project is funded by the European Union within the H2020-ICT-39-2016-2017 call. It enhances international cooperation of ICT and sustainable agriculture between EU and developing countries in pursuit of the EU commitment to the UN Sustainable Development Goal "End hunger, achieve food security and improved nutrition and promote sustainable agriculture".

Developed digital system for bee colony monitoring
As discussed in the introduction the main parameters of the bee colonies are weight and temperature. Thus, digital system for those parameter monitoring is developed within this research. The high costs and inapplicability for outdoor conditions of continuously loaded general purpose electronic scales limits their application in Precision Beekeeping.
Authors of this research developed prototype of honeybee colony digital monitoring system based on single point load cell (BOSCHE Wagetechnik Single point load cell H30A, https://www.bosche.eu/en/scale-components/load-cells/single-point-load-cell/ single-point-load-cell-h30a) with max load of 200kg and ESP8266 low-cost Wi-Fi microchip. ESP8266 has a full TCP-IP stack and microcontroller capability. ESP8266 CPU frequency and built in memory is enough to perform intended task of collecting bee colony data and transferring it to the remote storage for further processing. In addition to weight sensor, two other sensors are added to the system for bee colony temperature and environmental humidity and temperature monitoring. Environmental parameter monitoring is essential component too, because sometimes to correctly interpret bee colony state it is necessary to know the outside conditions .
Chosen load cell is an analogue one and for usage in digital monitoring system it is needed to convert analogue signal to digital. For getting the weight data analogue/digital converter HX711 is used. Measurement node itself is battery powered (by 4x1.2V NiMH rechargeable batteries). For testing purposes, the Wi-Fi router (HUAWEI E5330) was powered from power grid (220V AC) via 5V micro USB adapter that can be substituted also by a suitable 5V battery (or solar powered solution). As well for data sending to the remote server Wi-Fi network (provided by the 3G router) is used, but it can be easily substituted by mobile network adding additional module to the ESP microchip or even data transfer using LoRaWAN (Zacepins et al., 2018) can be implemented. At this moment system is assembled on the printed circuit board without any casing, but after tests end market prototype will be developed. Developed system's architecture is based on proposed approach by (Kviesis and Zacepins, 2015) where an individual bee colony measurement node sends sensor data to the remote server via wireless or mobile network communication.
Mounting of the single-point load cell is performed based on instructions provided by the manufacturer. Load cell is mounted between two metal plates (10cm x 15cm), and afterwards metal plates are screwed to the plywood plates (50cm x 50cm). Beehive can be placed directly on the platform or some additional wooden planks can be used. Mounting of the load cell is shown in Figure 1.
Usually beekeepers are not ready to invest much in the digital solutions, thus economic aspect of the system is very crucial and system costs should be as minimal as possible. This proposed solution evolved from authors previous researches and solution based on four small load cells (Zacepins et al., 2017) and weighting system based on a Raspberry Pi single board computer (Komasilovs et al., 2019).
Usage of cheaper microchip allowed to decrease the overall costs of the system. In authors case costs for system components and additional materials are summarised in Table 1.  The calculated costs for one developed system are 192.00 EUR. System installation, maintenance, data storage, SIM card with appropriate data plan and usage of the web system, usage of alternative power supply is not considered in those calculations. It should be mentioned that some components are optional, like 3G router can be dismissed if there are constant Wi-Fi connection at the apiary site.
System can take measurements based on measurement intervals, that can be configured individually based on required information that should be gained from the system and depending on bee colony states, that could be detected. In authors case, as system is powered from central power supply for testing purpose, measurements can be taken more frequently than it is needed. In authors case measurements are performed each 60 seconds.
In the future it is planned to use battery power also for the networking part for the real system deployment. It was evaluated that individual measurement node's current draw (at 3.3V) during different operational modes are as follows:  Measurement mode (device is making measurements and getting values from connected sensors): 25mA for 1.2s  WiFi power-up mode (device is switching on the Wi-Fi module): 47mA for 1.4s  Connection mode (device is connecting to the Wi-Fi network and getting network configuration parameters): 69mA for 2.3s  Data sending mode (device sends measurement data): 79 mA for 1.8s  Going into sleep mode (switching off the modules): 36 mA for 1.4s  Sleep mode (there is no activity of the device, it is in deep sleep state): 0,028 mA for 60s Current consumption was logged using the UNI-T UT181A True RMS Datalogging Multimeter. Current draw by different operational states is represented below:

Fig. 2. Current draw during one measurement iteration (at 3.3V)
The battery life is depending on the measurement intervals. If the system will perform measurements each two minutes and will use four 1900mAh batteries, then theoretically system can operate for 18 days. Authors also developed Web based calculator for estimation of battery life, see https://sams.science.itf.llu.lv/battery-life (Fig. 3).
Measurement intervals are directly connected with events beekeeper would like to detect and bee colony states that should be identified. Some bee colony states require constant and frequent (each 1 min) measurements, but for some states several measurements per day is enough. Table 2 summarises possible bee colony states and needed measurement and intervals (recommended and minimally required), which can be detected based on weight and / or temperature measurements.  As well it should be mentioned that for precise weight measurements single point load cell should be calibrated before placing the beehive on it.
Developed PCB prototype of the authors' system is shown below: Fig. 4. 3D PCB prototype of the developed monitoring system's measurement node

Developed digital system for bee colony monitoring
Next important aspect of the whole system after the hardware development, is implementation of the data transfer procedures and methods. For the data storage and reporting specific SAMS data warehouse (DW) is developed. DW is available online at https://sams.science.itf.llu.lv/. SAMS DW is a universal system, which is able to operate with different data inputs and have flexible data processing algorithms. SAMS DW solution uses authentication and authorization services provided by Auth0 universal platform (https://auth0.com/). There are several steps, that have to be performed on device to send data to the remote data warehouse: 1. Acquire access token. Access token is used by DW to authenticate and authorize the request. In order to acquire the token, the device should send POST request to https://sams.science.itf.llu.lv/api/token with its Client ID and secret (requested individually). Each device has its unique credentials. 2. Post the data to DW. There is a single endpoint for posting data to DWhttps://sams.science.itf.llu.lv/api/data. Access token should be provided in the Authorization header and request body can contain multiple data packages. 3. Reports about posted measurements are immediately available in UI under the Reports section. Additional debugging information is available in Dashboard and Devices (last events and errors). Full instruction on how to connect general bee colony monitoring hardware to the SAMS data warehouse is available online: https://sams-project.eu/wp-content/uploads/2020/02/DW-data-sending-guide.pdf

Conclusions
Continuous, remote and real time monitoring of the bee colony weight and temperature becomes a must have procedure in the beekeeping practice and acts as a first stage in implementation of the Precision Beekeeping approach. Weight monitoring of at least one reference colony at the apiary can help to identify start and end of the nectar flow and evaluate the colony foraging activity.
Developed monitoring system focuses on minimisation of manual bee colony inspections, which should lead to the minimisation of stress to the bee colony and increase of welfare.
Proposed honey bee monitoring system uses one single point load cell for weight measurements, one temperature sensor for internal colony temperature and ESP8266 for data collection from the sensors and transferring it to the remote data warehouse. In a future system can be set up also in a remote area, when alternative power supply and mobile network capabilities will be integrated.
Developed web tool for monitoring system power consumption and battery life estimation can help to evaluate developed system sustainability and applicability and provide useful information for potential solar powered solution.
There are many possible bee colony states therefore it is crucial to choose the right measurement intervals for correct state detection.
Application of ICT solutions and remote monitoring systems facilitates the beekeepers' knowledge gathering about behaviour of individual bee colonies and improve the efficiency of beekeeping management.