Sensors 23 01407 v2
Sensors 23 01407 v2
Article
A Low-Cost, Low-Power, Multisensory Device and
Multivariable Time Series Prediction for Beehive
Health Monitoring
Iraklis Rigakis 1,2 , Ilyas Potamitis 3, * , Nicolas-Alexander Tatlas 2 , Giota Psirofonia 4 , Efsevia Tzagaraki 4
and Eleftherios Alissandrakis 4
Abstract: We present a custom platform that integrates data from several sensors measuring syn-
chronously different variables of the beehive and wirelessly transmits all measurements to a cloud
server. There is a rich literature on beehive monitoring. The choice of our work is not to use ready
platforms such as Arduino and Raspberry Pi and to present a low cost and power solution for
long term monitoring. We integrate sensors that are not limited to the typical toolbox of beehive
monitoring such as gas, vibrations and bee counters. The synchronous sampling of all sensors every
5 min allows us to form a multivariable time series that serves in two ways: (a) it provides immediate
alerting in case a measurement exceeds predefined boundaries that are known to characterize a
healthy beehive, and (b) based on historical data predict future levels that are correlated with hive’s
health. Finally, we demonstrate the benefit of using additional regressors in the prediction of the
variables of interest. The database, the code and a video of the vibrational activity of two months are
made open to the interested readers.
Keywords: apis mellifera; beehive monitoring; remote sensing; time series prediction
Citation: Rigakis, I.; Potamitis, I.;
Tatlas, N.-A.; Psirofonia, G.;
Tzagaraki, E.; Alissandrakis, E. A
Low-Cost, Low-Power, Multisensory
1. Introduction
Device and Multivariable Time Series
Prediction for Beehive Health Beekeepers in Europe, America and Asia have been reporting weakening bee numbers
Monitoring. Sensors 2023, 23, 1407. and colony losses. There are repeated reports that bee colonies are declining every year [1].
https://doi.org/10.3390/s23031407 Only regarding the case of honeybees (Apis mellifera), the number of beekeepers in the
EU is estimated to be approximately 700,000, keeping more than 15 million hives, and
Academic Editor: Eduard Llobet
honey production is estimated to be close to 280,000 tons/year [2]. Apis mellifera is the
Received: 19 December 2022 only managed honeybee species in Europe providing food, which has been domesticated
Revised: 18 January 2023 by beekeepers to produce beekeeping products (i.e. honey, pollen, venom, wax, etc.).
Accepted: 21 January 2023 However, the most important role of honeybees is not honey production but the pollination
Published: 27 January 2023 of many agricultural crops. In numbers, the direct value of honey produced in the EU
is estimated about EUR 140 million, while the value of insect pollination for European
agriculture has been estimated to be around EUR 20 billion per year, and EUR 153 billion
worldwide [3]. When wild bees do not visit or are not enough to pollinate agricultural fields,
Copyright: © 2023 by the authors.
managed honeybee hives are often the only solution for farmers to ensure crop pollination.
Licensee MDPI, Basel, Switzerland.
Pollinators decline results in loss of pollination services which have negative ecological
This article is an open access article
and economic impacts significantly affecting the maintenance of wild plant diversity, wider
distributed under the terms and
conditions of the Creative Commons
ecosystem stability with direct effects on crop production, food security and human welfare.
Attribution (CC BY) license (https://
There is clear evidence of recent declines of managed bee colonies, correlated with parallel
creativecommons.org/licenses/by/ declines in the plants that rely upon them [4,5]. In [6,7], it is estimated that out of 100 crop
4.0/). species which provide 90% of food worldwide, 71 are bee pollinated. In Europe, 84% of the
264 crop species are bee-pollinated and 4.000 vegetable varieties exist thanks to pollination
by bees [7]. The production value of pollinator-dependent crops is five times higher than
those categories that do not depend on insects [2,7,8].
Due to their importance, beehives are maintained and monitored by beekeepers
that inspect in-person their hives on a prescheduled, repeated basis. This procedure is
laborious and time consuming and the recurring trips to remote beehive clusters have
a cost and leave a carbon dioxide imprint. Technology gradually penetrates all human
activities and beehive sensing technologies are no exception and some of them have
started, some years ago, to be commercially available. The sensing modalities are most
commonly a weight scale for automatic weighting of the beehive to schedule optimal honey
harvesting, global positioning system (GPS) tagging for theft prevention, and temperature
and humidity sensors that are remotely collected and wirelessly transmitted to a remote
server. These technological advances are facilitated with dropping communication fees
due to competition, the availability of global SIM cards, the fact that the GPS is typically
embedded to affordable communication modems and finally, the availability of free on-line
services that can streamline and visualize sensors’ recordings.
The next level beyond basic information is an active research trend but not commer-
cially established yet and relates to the health status of the beehive, mortality prevention
and foraging efficacy. Questions of special interest are: is the beehive preparing to swarm?
is an apiary being attacked by wasps? Is the beehive suffering from a serious pest infesta-
tion such as due to Varroa destructor or Nozemosis? Is the beehive queenless? How can we
quantify foraging behavior? Bees’ decline is not currently attributed to a single cause, and
it involves the changing climate, invasive pests and diseases spreading fast to new location
assisted by the climate change, air pollution, widespread insecticide use and mismanage-
ment of the beehives. Ongoing research in automatic beehive management is flourishing
with hundreds of publications that move forward trying to answer more complex questions
than optimal honey harvesting and prevention of vandalism. It would be an immense
review task to mention all of them and we only mention the most recent ones related
to our work. For comprehensive surveys on sensors as applied to beekeeping see [9,10]
and the references therein. All these questions above and many more are not currently
faced by standard, commercial solutions and different research directions involving gas
sensors [11–13], audio or vibrations [14–18], new communication protocols [19–22], doppler
radar in the hive entrance [23], bee counters [24–26] and energy harvesting techniques [27]
try to offer new useful services but have to persuade the beehive manager that the extra
cost is justified.
Our contribution focuses on health and threat status of the beehive while overcoming
labor costs of manual inspections (see Figure 1) for our installations. The novelties of our
research are as follows:
(A) We present an open solution that is based on custom electronics, and we do not make
use of ready platforms as in many published results. Platforms such as Arduino and
Raspberry Pi facilitate experimentation and are widely used in literature on beehive-
related technology, but ready platforms are generic and thus not optimal in terms of
power consumption and cost. We need solutions that are power sufficient because
we need to avoid the manual visits to remote locations and to be affordable so that
automated monitoring of health status shifts from research to commercial applications.
All details are available so that it can be reproduced and its cost is assessed.
(B) We test sensor capabilities that are not the norm in commercial beehive supervision
technology. Specifically, we test CO2 concentration and volatile compounds (TVOC)
gas sensors, vibration sensors as well as a bee counter appended to typical measure-
ments (specifically: weight, temperature, humidity, GPS coordinates, and timestamps
of recording events). We design our board to sample all sensors simultaneously and
create a multivariable time series that is transmitted to a cloud server.
(C) We investigate and quantify how the prediction of a single variable, e.g., CO2 con-
centration, is affected by the inclusion of additional regressors (e.g., temperature,
Our aim is to offer technological services that will allow beekeepers and researchers
to actively participate in colony surveillance programs accurately and responsively, hav-
ing less cost than the labor costs for inspecting the hive. As a result, colonies with a ro-
bustness problem or an external risk will be identified remotely earlier with greater accu-
Sensors 2023, 23, 1407 racy while mitigating potential losses. The presentation of this work is organized3 as fol-
of 27
lows: in Section 2, Materials and Methods, we present the hardware, programming details
and the prediction models. In Section 3, we present the multivariable nature of the signals
that the hardware
humidity). Theregisters, their cross-correlation
multivariable time series is usedand an forecasting
to run assessmentmodels
of the prediction
and risk
efficiency of machine
assessments learning
[28–31], issuealgorithms that alert
warnings and predict future
signals outcomes
and based onanalysis
make historical past val-
ues ofwith
the multivariable time intervals.
applied confidence series.
(a) (b)
Figure
Figure 1.1. (a)
(a) beehives monitoredin
beehives monitored inthe
thecourse
courseofofthis
thiswork
workwith
witha anumber
numberofof sensors.
sensors. The
The e-beehive
e-beehive
in the field. (b) an observation beehive allows us to spot the queen and observe the patterns of ac-
in the field. (b) an observation beehive allows us to spot the queen and observe the patterns of activity
tivity inside
inside it. it.
2. Materials
Our aimand
is toMethods
offer technological services that will allow beekeepers and researchers to
In this section we
actively participate give asurveillance
in colony summary ofprograms
the system’s designand
accurately andresponsively,
fabrication details.
having A
detailed list of elements for the multisensory recorder (see Figure 2) is in the Appendix.
less cost than the labor costs for inspecting the hive. As a result, colonies with a robustness
problem or an external risk will be identified remotely earlier with greater accuracy while
mitigating potential losses. The presentation of this work is organized as follows: in
Section 2, Materials and Methods, we present the hardware, programming details and the
prediction models. In Section 3, we present the multivariable nature of the signals that the
hardware registers, their cross-correlation and an assessment of the prediction efficiency
of machine learning algorithms that predict future outcomes based on past values of the
multivariable time series.
Figure 2. Block diagram of the e-beehive’s multichannel recorder. The system is controlled by
an STM32L476RG ARM CPU of ST that simultaneously picks up the vibrations, the bee traffic in
the entrance, the gas sensors (CO2 , TVOC), the environmental variables, the vibrations and the
measurements of a weight scale. All recordings, are stored in the SD card and transmitted through the
LTE module. The device is powered by a 20 W solar panel that charges a battery pack of 12,000 mAh.
CO2 Concentration
As regards the concentration of CO2 in the atmosphere, this year, the barrier of
410 parts per million (ppm), a unit of measurement used to assess air pollution, has been
exceeded. Before the industrial revolution, the level of CO2 was permanently around
280
1 ppm. CO2 , also a byproduct of breathing, is toxic at high concentrations, so regulating
CO2 inside the beehive is an important function of the colony [32]. Aspects of controlling
the concentration of CO2 in the hive may reveal information about the health of the colony.
Sensors 2023, 23, 1407 5 of 27
In this study, we measured CO2 concentrations of the hive at intervals of 5 min, while the
ventilation characteristics of the hive changed every few days and we visualized the data.
A concentration below 417 ppm would be an indication of a sensor’s malfunction and
would create an alert message. A large concentration of >17,000 ppm would also lead to an
alert as it would indicate a problem with ventilation and this is where we set a boundary.
TVOC Concentration
Total volatile organic compounds (TVOCs) are responsible for the odor of perfumes
as well as pollutants. TVOCs play an important role in communication between animals
and plants, e.g. odors to attract pollinators, avoid predation and even interactions between
plants. Some TVOCs are dangerous to human health or cause harm to the environment. A
bee colony is an effective environmental sampling device for volatile organic compounds
(VOCs) in a complex ecosystem. They are also associated with a wide range of compounds
that are environmental pollutants. Flower fragrances are usually mixtures of volatile sub-
stances of various chemical groups. On the other hand, fossil fuel components, industrial
solvents, pesticides also fall into this category. TVOC values in beehives can serve as
biomarkers. Our sensor records measurements in ppb (parts per billion). It does not have
the ability to single out the source of VOCs. It has been supported that there is a link
between VOCs and Varoa destructor [33]. However, TVOC measurements cannot realis-
tically be expected to give a direct indication of the present Varroa population, and the
observed correlation or dependence can be attested as an indirect indication of changes in
the behavior of the beehive due to the imposed stress of the growing mite population in
the bee colony. We include TVOC measurements in our system more as an indication of
stress and deviation from normality and we use it as an extra covariate with the rest of the
measurements.
2.1.2. Vibrations
We chose to record vibrations, over audio through a microphone as bees communicate
primarily through vibrational and chemical signals and less through audio. Vibrations
pass through the wooden substrate; piezoelectric transducers are more durable than micro-
phones in the presence of humidity and propolis deposition does not stop vibrations from
being propagated. A metal waveguide is attached to a piezoelectric transducer (BeStar
FT-35T-2.6A1), that is based on a piezo-ceramic disk. We chose this sensor mainly for its
frequency response (i.e., 1–10 kHz) and high sensitivity. The output of accelerometer is
amplified and filtered. The analog filter output is converted to digital words in 12-bit
resolution at 8 kHz sampling rate using the internal ADC of the microcontroller. The
sampling frequency, record duration and other initialization parameters are read once from
the SD card during powering-on and are configurable through the server.
Bees communicate with vibrations as well and vibrational activity is an indicator
of an active queen. A change in audio and vibrations has often been reported as a sign
prior to swarming [15]. Therefore, the vibrations sensor is a useful add-on for the e-
beehive, as a modality that contributes to the assessment of beehive’s health. The collective
vibrations can naturally be converted to an audio signal. The spectrogram is a time vs.
frequency representation of sound showing the spectral content of the audio as it evolves
in time. Once we have the frequency content, one can search in the frequencies for specific
communication signals such as the ‘whooping signal’ [18], ‘tooting’, ‘quacking’, ‘piping’,
‘waggle’, ‘tremble’ [34–40]. Note that the sensor picks up the collective vibrational pattern
of, possibly, thousands of bees and, therefore, it is not a straightforward task to pinpoint
a specific behavioral audio-signal. In [41], the author states that a rise in acoustic signal
magnitude at 255 +/− 35 Hz was indicative of swarming or that the queen was failing,
whereas a hiss at 3000+ Hz in response to banging on the hive could determine that the
colony was healthy. In Table 1, we collect from the literature the most important vibrational
patterns and their alleged role. There is some controversy in the literature over the role
Sensors 2023, 23, 1407 6 of 27
of the vibrational pulses of main interest to our present study and, sometimes, over the
frequency range.
Temperature
The effect of temperature variations on bees well-being is significant: hives without
bees record a lower average temperature and a wider temperature range than hives contain-
ing live bees. Hives without bees reach the maximum temperature earlier than hives with
bees, regardless of the strength of the colony. Data from sensors come from the brood that
was found to be more closely connected to the health of the colony and this is where we
place the sensor. Temperature is a critical factor for colony health and is actively regulated
by A. mellifera using heating and cooling behaviors to maintain a constant temperature
within the range of 34–36 ◦ C. The maintenance of "hive homeostasis" is a good indicator of
the health of the colony, its condition and even its activity. In many experimental published
papers, temperature detection showed correlations between the health of the colony and its
strength. The boundaries for alert in our system were set to 8 ◦ C as a lower bound and to
37 ◦ C as the high one, beyond which there is significant danger for the beehive.
Humidity
Bees have developed adaptive mechanisms to cope with environmental fluctuations,
including those of humidity in the brood. In addition to the humidity of the environment,
bees create moisture through processes such as the introduction of water, liquid nectar
and even through their breathing. While it is important to maintain a certain level of
humidity, it is important that moist air does not condense on the inner walls of the hive or
on the frames. The balance in the hive is maintained when the humidity fluctuates between
53–70% with variations in external humidity of 42–100% [47]. In temperate climates during
the summer, the humidity in the hive does not seem to be a problem due to the fact that the
outside air is warmer and drier, so passive air circulation is more efficient and is helped
Sensors 2023, 23, 1407 7 of 27
by larger inlets. On the opposite side, during the winter and spring months in temperate
climates, the humidity of the environment tends to be high due to rainfall and lower air
temperatures. Interestingly, the majority of the moisture that is in the hive during the
winter is the direct result of bee metabolism. Relative humidity at high levels implies that
there is a risk of condensation or that the beehive is not strong enough to regulate humidity
(health hazard), and this creates a useful alert for beekeepers to increase the ventilation of
the hives. The boundary for alert is set to 90% RH.
(a) (b)
Figure 3. (a): the central monitoring unit in the center of the picture with some of the sensing
modalities attached. All sensors are sampled simultaneously, and their readings are collected from
the main CPU. (b): a closer look at the electronics board prototype. One can discern the CPU in the
center, the GPU and communications modem on top, the SD card on top right, the battery on the
bottom that connects to the solar panel.
The device sends measurements to the webserver using a POST request. At this
point, the trap inserts its data as parameters for the page that it wants to access. Once
the HTTP request reaches the web server, the latter receives the data from the request
of the trap (via the appropriate code, written in PHP) and logs the information in the
database. The measurements on the server are sent with a JSON format and a timestamp.
The communication of the module with the main microcontroller of the system is through
UART with AT commands. The code has been optimized for minimal power consumption
and several parts of the hardware are activated only when they are needed to function and
hibernate straight after performing their task.
Sensors 2023, 23, 1407 9 of 27
3. Results
3.1. The Signals
In this section, we describe the nature of the signals we record and what tools can be
used to process them to primarily extract alert signals for the beehive manager. Here is the
full list:
(1) Time stamp of events. Measurements taken every 5 min on a 24/7 basis, for all sensors
simultaneously.
(2) GPS coordinates that are used to localize the beehive on a map, on the server’s part
and as a theft prevention measure.
(3) CO2 concentration inside the hive (parts per million—ppm).
(4) Total volatile organic compounds concentration TVOC inside the hive (parts per
billion—ppb).
(5) Temperature inside the beehive (◦ C).
(6) Relative humidity in the interior of the beehive (% RH).
(7) Weight (Kgr) of the beehive (including honey, bees and pollen).
(8) Incoming bee counts.
(9) Outgoing bee counts.
(10) Five sec vibrations recording from which features are extracted (e.g., energy in specific
frequencies that are deemed important e.g., piping, tooting, tremble, whooping signals).
(11) Quality of signal communication (used for telemetry at the server part).
(12) Battery charge level (used for telemetry at the server part).
Sensors 2023, 23, 1407 10 of 27
The sensory data are streamlined in Figure 4. The dashed, superimposed horizontal
lines denote the signal boundaries that are derived from the apiculture literature. If any
signal surpasses these boundaries, a corresponding alert message is issued from the server
to the user. Another observation is that humidity and temperature fluctuations are not
large, and this implies that bees self-regulate these parameters inside the hive. Weight
change is slow, and one can see the days of feeding treatment where the weight spikes
and the slow reduction of the weight during winter. Finally, we see how the numbers of
incoming and outgoing bees are almost the same. During the first week of operation, there
have been some shading problems with the bee-counter that have been corrected by proper
action (see Figure 4-bottom until 10/15/22 in the x-axis). The contour analysis of the CO2
concentration data found evidence of significant CO2 cycle periods both within and outside
a 24 h period. Bee colonies maintained strong daily CO2 concentration cycles, with average
Sensors 2023, 23, maximum
x FOR PEER concentrations
REVIEW >4000 ppm, even in conditions of increased ventilation, indicating
that the management of the CO2 concentration is important to be monitored. Daily changes
are not correlated with changes in weight (because this remains approximately constant in
the week) and temperature of the beehive and the maximum and minimum are different
every day.
Figure 4. A part of the multivariable time series. Forming sensory data this way allows better
forecasts due to complementarity of informational queues.
Figure 4. A part of the multivariable time series. Forming sensory data this way allows bet
In Figure 5 we
castsderive
due tothe cross-correlation
complementarity matrix between
of informational queues.all sensory signals. Cross-
correlation is used to compare the variables of multivariable time series and objectively
determine how well In Figure
they 5 weup
match derive
withtheeachcross-correlation
other and howmatrix between
important oneallissensory
in the signals.
co-interpretationcorrelation is used to compare the variables of multivariable time series
of the targeted data. We immediately derive from the heatmap of the and obje
determine how well they
correlation matrix that TVOC and CO 2 match up with each other and how important
are highly correlated whereas humidity and tem-one is in
interpretation
perature are anti-correlated of the
which targeted data.
is expected, We the
as when immediately
temperature derive from
rises, the heatmap
humidity is of t
reduced. Incomingrelation matrix that
and outgoing beeTVOCcountsandareCO 2 are highly correlated whereas humidity and t
highly correlated as they should be.
ature
We claim that ourare anti-correlated
configuration which
is power is expected,
sufficient and aas20when
W solarthepanel
temperature
chargingrises,a hum
rechargeable pack of 4 × 3000 mAh batteries is sufficient for unobtrusive operation
reduced. Incoming and outgoing bee counts are highly correlated as they should b even
in winter time. We cannot
We claimderive
thatanour explicit closed-form
configuration solution
is power for power
sufficient and a sufficiency
20 W solar panel ch
because it depends on weather conditions that affect the solar energy harvesting
a rechargeable pack of 4 × 3000 mAh batteries is sufficient for unobtrusive of the operatio
panel. However,inthe device has a configurable, through the server, data transmission,
winter time. We cannot derive an explicit closed-form solution for power suff
hourly pattern, that can change
because it dependsif needed to a sparser
on weather report
conditions plan
that to save
affect power
the solar if there
energy harvesting
is no sunlight for
panel. However, the device has a configurable, through the server,for
a long period. In Figure 6, we have a chart of the power balance a transm
data
hourly pattern, that can change if needed to a sparser report plan to save power if
no sunlight for a long period. In Figure 6, we have a chart of the power balanc
constant operation of almost two months during winter. During night, the e-hive
minimum charge that most of the time does not fall under 85% of full capacity and
Sensors 2023, 23, 1407 11 of 27
constant operation of almost two months during winter. During night, the e-hive has the
Sensors 2023, 23, x FOR PEER REVIEW
Sensors 2023, 23, x FOR PEER REVIEWminimum 12peaks
charge that most of the time does not fall under 85% of full capacity and of 30
sharply to 100% during the day while falling linearly during the day in every emission.
Since, for a period of two months during winter, the energy sufficiency did not drop below
65% while emitting 24 times per day, and the monitoring would be still adequate with one
transmission per day, we suggest that the beehive is power sufficient.
Figure 5. Cross correlation heatmap of all sensory inputs. TVOC and CO2 show high correlation and
Figure 5. Cross correlation heatmap of all sensory inputs. TVOC and CO2 show high correlation and
humidity and temperature strong anti-correlation. In and out counts are highly correlated.
humidity and temperature strong anti-correlation. In and out counts are highly correlated.
Figure 5. Cross correlation heatmap of all sensory inputs. TVOC and CO2 show high co
humidity and temperature strong anti-correlation. In and out counts are highly correla
Figure 6. Daily balance of power consumption using a 20W solar panel. Note, the sufficiency of the
Figure 6. Dailyscheme,
power-supply balanceeven
of power consumption
in winter time, for using
hourlya emissions
20 W solarofpanel.
data. Note, the sufficiency of the
power-supply scheme, even in winter time, for hourly emissions of data.
3.2. Figure 6. Daily balance of power consumption using a 20W solar panel. Note, the suffi
3.2. The
TheCOCO22Concentration
Concentration
power-supply scheme, even in winter time, for hourly emissions of data.
In
In Figure
Figure 7a7a we
we see
see the
the boxplot
boxplot of
of the CO22 sensor.
the CO sensor. AAboxplot
boxplotisis aa tool
tool in
in descriptive
descriptive
statistics that captures the summary of the data efficiently, for graphically demonstrating
3.2. The CO2 Concentration
statistics that captures the summary of the data efficiently, for graphically demonstrating
the
the median,
median, spread
spread and
and skewness
skewness groups
groups of of numerical
numerical data.
data. The
The boxplot
boxplot summarizes
summarizes
sample data using In
25th,Figure
50th 7a
andwe see
75th the boxplot
percentiles. We of
use
sample data using 25th, 50th and 75th percentiles. We use it to easily the
it CO
to 2 sensor.
easily A
locate boxplot
outliers,
locate is a tool in
i.e.,
outliers,
values of the statistics
sensor that that
are captures
significantlythe summary
higher or of
lower the
than data
the efficiently,
median
i.e., values of the sensor that are significantly higher or lower than the median value. Invalue. for
Ingraphically
Figure dem
7, we the
immediately median,
spot a spread
large and
value over skewness
8000 ppm groups
which ofis, numerical
however,
Figure 7, we immediately spot a large value over 8000 ppm which is, however, not repeated. data.
not The
repeated.boxplot s
Concentrations
Concentrations around
sample
arounddata4000 ppm
4000using are also
25th,
ppm are also evident
50th but,
and but,
evident again,
75thagain, are
percentiles. not persistent.
We use it to easily locate o
are not persistent.
values of the sensor that are significantly higher or lower than the median valu
7, we immediately spot a large value over 8000 ppm which is, however, no
Concentrations around 4000 ppm are also evident but, again, are not persisten
Sensors 2023, 23, x FOR PEER REVIEW 13 o
Sensors
Sensors
2023, 23, 23,
2023, 1407x FOR PEER REVIEW 13 of1230of 27
(a) (b)
(a) (b)
Figure 7. (a): boxplots pinpoint outliers in the recordings of CO2 concentration. They also show m
Figure 7. (a): boxplots pinpoint outliers in the recordings of CO2 concentration. They also show most
Figure probable
7. (a): boxplots value outliers
pinpoint of concentration and the spread
in the recordings of CO2ofconcentration.
values. (b): descriptive
They alsostatistics:
show most the mean va
probable value of concentration and the spread of values. (b): descriptive statistics: the mean value,
probable value ofthe spread denoted
concentration andby
thestd (standard
spread deviation),
of values. the min and
(b): descriptive max values
statistics: are ofvalue,
the mean special import
the spread denoted by std (standard deviation), the min and max values are of special importance
the to the
byofinterpretation of the data. the min and max values are of special importance to
to spread denoted
the interpretation std
the(standard
data. deviation),
the interpretation of the data.
3.3. The TVOC Concentration
3.3. The TVOC Concentration
3.3. The TVOC ConcentrationIn Figure 8, we use the boxplot as a tool for spotting outliers in the data. In Figur
In Figure 8, we use the boxplot as a tool for spotting outliers in the data. In Figure 8b
In Figure we see descriptive
8, westatistics:
use the boxplot statistics:
asvalue, thefor
a tool mean value,
spotting the spread
outliers thedenoted
data. Inby std (standard de
we see descriptive the mean the spread denoted byinstd (standard Figure
devia- 8b
we see descriptivetion), the minthe and maxvalue,
values arespreadof special importance to the interpretation of the d
tion), the min andstatistics:
max values are meanof specialthe importancedenoted by std (standard
to the interpretation deviation),
of the data
the min and maxas for TVOC
values arethey
of show
special us small
importance spreadto and
the pinpoint
interpretation
as for TVOC they show us small spread and pinpoint the outliers. Note that during oper- the outliers.
of the Note
data asthat
for during o
TVOC they showationus in the
small field,
spread the server
and received
pinpoint the very low
outliers.
ation in the field, the server received very low values of CO2 and TVOC concentrationsvalues
Note of
that CO 2 andoperation
during TVOC concentrati
inwhich
the field, thewhich
indicated server indicated
received avery
a malfunction. malfunction.
The lowin
visit theThe
values ofvisit in theTVOC
CO2revealed
beehive and beehive revealed
thatconcentrations
bees that which
had deposit bees
a had depos
large quantity of propolis on the sieve of the gas chamber and blocked the air circulation air circula
indicated a large
malfunction. quantityThe of propolis
visit in the on the
beehive sieve of the
revealed gasthat chamber
bees hadand blocked
deposit a the
large
around the
quantity around
sensor
of propolis onthe
(see thesensor
Figure (see
9a).of
sieve WetheFigure
knew 9a).was
that
gas chamber We aand
knew that was
possibility,
blocked buta it
the possibility,
airwas also abut
circulation it was also a cha
chance
around
to detect
Figure malfunctions.
9a). We knew The
that problem
was a was solved
possibility, but by
to detect malfunctions. The problem was solved by placing the sensors inside a more ver-
the sensor (see it wasplacing
also athe sensors
chance to inside a more
detect
satile box covered
malfunctions. satile
The withbox
problem covered
a sieve
wasthatwith a sieve
was placed
solved that was
in thethe
by placing placed
beehive
sensors in the
in ainsidebeehive
way that in
it was
a more a way that
not easybox
versatile it was not e
to blockwith
covered to block
all itsa sides
sieve(see all its
thatFigure sides (see Figure 9b).
9b). in the beehive in a way that it was not easy to block
was placed
all its sides (see Figure 9b).
Figure 8. (a) boxplots pinpoint the outlier value of >8000 in the recordings of the TVOC. (b) TVOCs
have a smaller spread and lower values compared to CO2 .
Sensors 2023,23,
Sensors2023, 23,x xFOR
FORPEER
PEERREVIEW
REVIEW 1414ofof3030
(a)
(a) (b)
(b)
Figure
Figure9.9.
Figure 9.(a) the
(a)
(a) thebees
the bees
beescovering
covering
covering the gas
the
thegassensor
gassensor
sensorwith
withpropolis
withpropolisonon
propolis the
ontheleft.
the We
left. We
left. left
We only
left partial
only
left coverage
partial
only partialcoverage
coverage
asasititwas
wastotally
totally covered.
covered.(b) new,
(b) new, gas-penetrated
gas-penetrated box
boxhouses
housesthe
thegas
gassensor
sensor and
and placed
placedininthe bee-
the bee-
as it was totally covered. (b) new, gas-penetrated box houses the gas sensor and placed in the beehive
hive
hiveininsuch
sucha away waythat
thatnot
notallallsides
sidescan
canbebecovered
coveredbybypropolis.
propolis.
in such a way that not all sides can be covered by propolis.
3.4.
3.4.The
3.4. TheWeight
The Weight
Weight
On
OnFigure
Figure4,4,
On Figure 4,fifth row,
fifth
fifth row,we
row, wenotice
we notice
noticethat
that
thatthe
theweight
theweight
weightwithin
withinOctober–November
withinOctober–November
October–November has
hasnot
not
has not
changed
changed significantly.
significantly. Alert
Alertsignals are
signals areplaced
placed ononthe
thedifference
differenceofofthe
thevalues
values
changed significantly. Alert signals are placed on the difference of the values to catch to
tocatch
catchan
anan
abrupt
abruptchange
abrupt changeand
change andonly
and onlyon
only the
on
on the
theweight
weight
weight slightly
slightlyover
slightly overthe
overtheweight
theweight ofofof
weight an
an empty
anemptyhive.
empty hive.
hive.
3.5.
3.5.The
3.5. TheTemperature
The Temperature
Temperature
The
Thebehavior
The behaviorofof
behavior ofthethetemperature
the temperature
temperature variable
variable
variable isisis
immediately
immediately
immediately evident
evident
evidentininthe
inthe boxplot
the boxplot ofofof
boxplot
Figure 10a and the descriptive statistics of Figure 10b. The mean
Figure 10a and the descriptive statistics of Figure 10b. The mean temperature is around
Figure 10a and the descriptive statistics of Figure 10b. The mean temperature
temperature is around
is around
23°C
23°C with
23 ◦ C with
with a asmall
asmall
smallspread
spread
spread around
around
around ±3°C.
±3 ◦The
±3°C. C.The lowest
The lowest
lowest ambient
ambient
ambient temperature
temperature
temperature range
range
range recorded
recorded
recorded
ononany
on anygiven
any givenday
given daywas
day was
was15°C
15 where
15°C ◦ Cwhere
wherethe
the bees
the bees come
beescome close
come close together
close together
together totoincrease
increase
to the
increase the temperature
the temperature
temperature
ofof
ofthe
thehive
the hive
hive and
and
andthe
thehighest
the highest
highest 43°C43◦(aC
43°C (asingle
single
(a outlier)
singleoutlier) where
outlier)where the
where thebees ventilate
beesbees
the ventilate vigorously
ventilate vigorously toto
vigorously
decrease
decrease
to decreasetemperature.
temperature.
temperature.Daily
Daily temperature
temperature
Daily temperature ranges
ranges inside
inside
ranges thethebeehive
inside beehive but
the beehivebutthe the standard
but standard de-
de-
the standard
viation
viation isissmall,
deviation small, asasdepicted
is small, depicted
as depicted ininFigure
Figure 10.
in Figure10.The10.boxplot
The boxplot
The ininFigure
boxplot Figure 1010and
in Figure and
10itsitsassociated
and associated de-
de-
its associated
scriptive
scriptive statistics
descriptive statisticsare
areused
statistics used
are totoderive
used derive the
to derive thespread
spread
the (see
spread(see std)
std)
(see and
and
std) the
andtheoutliers
outliers
the inintemperature.
outliers temperature.
in temperature.
(a)
(a) (b)
(b)
Figure 10. (a) boxplots pinpoint outliers in the recordings of temperature (◦ C) that are deemed
dangerous for the health of the beehive if they are prolonged. This is not the case here. (b) mean,
std, min and max values are valuable to look out for normal values for temperature fluctuations
and outliers.
Sensors 2023, 23, x FOR PEER REVIEW 15
Figure 10. (a) boxplots pinpoint outliers in the recordings of temperature (°C) that are deemed
gerous for the health of the beehive if they are prolonged. This is not the case here. (b) mean
Sensors 2023, 23, 1407 min and max values are valuable to look out for normal values for temperature fluctuation
14 of 27
outliers.
(a) (b)
3.7. The
3.7. The Vibrations Vibrations Sensor
Sensor
The frequency The frequency
content content of recording
of a vibrations a vibrations recordinganalyzed
is typically is typically analyzed
by using the by using
short time
short time discrete Fourierdiscrete Fourier
transform transform
(DFT). Since (DFT).
we are Since
mainly weinterested
are mainly in interested
specific in spe
frequency
frequency bands bands
associated associated
with with the aforementioned
the aforementioned sounds as summarized
sounds as summarized in Section 2, in Secti
Materials and Methods, the Goertzel algorithm can also
Materials and Methods, the Goertzel algorithm can also be used. The Goertzel algorithm be used. The Goertzelis algor
a technique inisdigital
a technique in digital signal
signal processing processing
for efficient for efficient
evaluation evaluationterms
of the individual of theofindividual
the t
DFT. However, of in
thethis
DFT. However,
work in this directly
we extracted work wefrom extracted directly from
the spectrogram the spectrogram
(short-time DFT), (short-
the energy of DFT), the energy
the specific spectralofbands
the specific
that in spectral
literaturebands thatreported
they are in literature
to be they are reported
associated
associated
with bee sounds, and wewithappendbee these
sounds, and we append
band-energies these to
as features band-energies
the main time asseries
features
in to the m
time series in extracted
Figure 4. We subsequently Fig 4. We4 subsequently
bands as feature extracted 4 bands
descriptors as feature activity:
of vibrational descriptors of v
tionalHz,
0–100 Hz, 200–350 activity:
300–4500–100Hz, 200–350
Hz, 400–600 HzHz,(see300–450
Figure 12).Hz,See400–600 Hz (see
also Figure 13 Figure
for the 12). See
spectrogram ofFigure 13 for the spectrogram
two characteristic recordings. of two characteristic recordings.
We have the
We have also recorded alsovibrations
recordedfromthe vibrations from inside
inside a beehive every 5a min
beehive every
for two 5 minutes for
months
and appendedmonths and appended
the corresponding the corresponding
spectrogram into a video spectrogram in a videoMaterials).
file (see Supplementary file (see Appendix
where y(t) is the prediction, g(t) the trend, s(t) the seasonality, r(t) the regressor and ε a
white noise term.
Sensors 2023, 23, x FOR PEER REVIEW 16 of 30
Sensors 2023, 23, x FOR PEER REVIEW 16 of 30
Sensors 2023, 23, 1407 15 of 27
(a) (b)
Figure 13. Vibrational signals taken from a piezoelectric transducer from within a hive with several
(a) 13. Vibrational signals taken from a piezoelectric transducer
Figure (b) from within a hive with several
thousand bees. (a) a morning recording. (b) an evening recording.
thousand bees. (a) a morning recording. (b) an evening recording.
Figure 13. Vibrational signals taken from a piezoelectric transducer from within a hive with several
3.8. Error
thousand Measurements
Thebees. (a) a morning
multivariate of recording.
time Prediction
series Models
(b)
allows anto
us evening recording.
peak any variable of interest as the targeted
3.8.1. Prophet:
variable Additive
to predict. Regression
Moreover, ProphetModel
also gives the option to add extra regressors to the
3.8. Errorwhich,
model Measurements
in our of Prediction
case, are the restModels
of the variables excluding
The additive regression model is stated in Equation 1. the targeted variable.
3.8.1. Prophet: Additive Regression Model
𝑦𝑦(𝑡𝑡) = 𝑔𝑔(𝑡𝑡) × �1 + 𝑠𝑠(𝑡𝑡)� + 𝑟𝑟(𝑡𝑡) + 𝜀𝜀 (1)
The additive regression model is stated in Equation 1.
𝑦𝑦(𝑡𝑡) = 𝑔𝑔(𝑡𝑡) × �1 + 𝑠𝑠(𝑡𝑡)� + 𝑟𝑟(𝑡𝑡) + 𝜀𝜀 (1)
The train set is the whole dataset excluding the last two weeks that are retain
the test set. We use the mean absolute percentage error (MAPE) to measure the fina
of the model over the test period for the variable humidity (see Figure 14). We u
additional regressors all the other variables except humidity. MAPE metric gives a
urement of the relative error, as a percentage with respect to the real data, so its int
Sensors 2023, 23, 1407 tation, which is what interests us now, is more intuitive than that of the 16 ofmean
27 squa
tance between the prediction and the actual data (MSE). We accept a MAPE below 1
good. We also measure how well our model fits the variability of the data with the m
The train setRis
2. Table 2 summarizes the results. Note that if we do not use additional regressor
the whole dataset excluding the last two weeks that are retained for the
base
test set. We use the our absolute
mean prediction on just the
percentage humidity
error (MAPE)variable thenthe
to measure thefinal
MAPEerrorinoftraining
the and
around
model over the test 6 and
period for R 2 in the test set is 19.66.
the variable humidity (see Figure 14). We used as additional
regressors all the other variables except humidity. MAPE metric gives a measurement of
the relative error,Table
as a 2. Error metrics
percentage forrespect
with the humidity
to thevariable.
real data, so its interpretation, which
is what interests us now, is more intuitive than that of theTRAIN mean square distance betweenTEST
the prediction and the actual data (MSE). We accept a MAPE below 10% as good. We also
MAPE 5.99 5.01
measure how well our model2 fits the variability of the data with the metric R2 . Table 2
R 72.84 45.62
summarizes the results. Note that if we do not use additional regressors and base our
prediction on just the humidity variable then the MAPE in training and test is around 6
and R2 in the test set is 19.66.
Figure 14. MAPE over a horizon of 1 day (5 min × 12 × 24 data points to be predicted) in the
humidity variable.Figure 14. MAPE over a horizon of 1 day (5min × 12 × 24 data points to be predicted) in the hu
variable.
Figure
Figure15.
Figure Prediction
15.15.Prediction of of
of
Prediction humidity
humidity
humidity inside
inside the
the
inside hive
hive
the hiveonon
on the
the whole
whole
the wholedataset.
dataset. Prediction
Prediction
dataset. starts
starts
Prediction after
after
starts '04–
'04–
after
December–2022'.
December–2022'.
’04–December–2022’.In red,
In red, the actual
the actual
In red, values
values
the actual and
andand
values in blue
in blue the prediction
thethe
in blue prediction and
predictionand the
andthe uncertainty
theuncertainty intervals.
intervals.
uncertainty intervals.
Figure
Figure 16.
16.
Figure Prophet:
16.Prophet: prediction
Prophet:prediction of
predictionof humidity
ofhumidity inside
humidity inside thehive.
inside the
the hive.Zooming
hive. Zoomingin
Zooming inthe
in thetest
the test
test period.
period.
period.
Prophet
Prophetallows decomposition
allowsdecomposition
decompositionof ofofthe
the series
theseries sosothat
seriesso that one
thatone can
onecan
can see
seesee the
the
the trend
trend
trend and
andandthe
thethecy-
cy-
cyclicity of factors (see Figure
clicity of factors (see Figure 17). 17).
17). The The
The trend trend
trend in in
in 17-a Figure
17-a shows 17a
shows that shows
that the that
the humidity the humidity
humidityisisincreasing is
increasing
increasing
which which is normal
is normal for the
winter. Thewinter.
weekly Theseasonality
weekly seasonality as depicted
as depicted
depicted 17-bin
in17-b Figure 17b as
for the winter. The weekly seasonality as in isisvery
verylow
low as
is very low as expected (as the bees do not discern days) whereas the daily cyclicity in
expected (as the bees do not discern
discern days)
days) whereas
whereas the the daily
daily cyclicity
cyclicityin in17-c
17-cshows
showsthatthat
Figure 17c shows that humidity is increasing in the evening and is lowering in the morning.
humidity is increasing in the evening
evening and and is
is lowering
lowering in in the
the morning.
morning. The latter latter isalso
also
The latter is also reasonable as it relates to environmental humidity andThe the exit ofisthe
reasonable as it relates to environmental
environmental humidity
humidity
worker bees in the morning and their return in the afternoon.
and
and the
the exit
exit of
of the
the worker
worker bees
bees in
in the
the
morning and their return in the the afternoon.
afternoon.
3.8.2. The Xgboost Regression Results
XGboost is based on features and feature engineering [50]. In our case, the features are
the sensor’s readings appended to several variables that have to do with the hour and date.
In Figure 18, we see the heatmap of the correlation matrix ranging from 0–1 (i.e., 0–100%).
The same correlations as in Figure 5 are derived but augmented with some other interesting
correlations related to time (i.e., the hour variable, day, day of the week, day of the month)
and how time is correlated with variables such as traffic in the entrance, TVOC and CO2
levels. The day of the year is also well correlated with weight.
Sensors 2023, 23, 1407 18 of 27
Sensors 2023, 23, x FOR PEER REVIEW 19 of 30
(a)
(b)
(c)
(d)
Figure 17. Decomposing the time series in trend (a) and cyclicity factors (b,c). Practically, no weekly
trend is detected in (b), and a daily strong cyclicity of humidity detected between day and night
hours in (c). In (d) the role of extra regressors is quantified.
are the sensor’s readings appended to several variables that have to do with the hour and
date. In Figure 18, we see the heatmap of the correlation matrix ranging from 0–1 (i.e., 0–
100%). The same correlations as in Figure 5 are derived but augmented with some other
interesting correlations related to time (i.e., the hour variable, day, day of the week, day
Sensors 2023, 23, 1407 of the month) and how time is correlated with variables such as traffic in the entrance,
19 of 27
TVOC and CO2 levels. The day of the year is also well correlated with weight.
Figure 18. Correlation of features. The hour feature affects CO2 , TVOC, TEMP and strongly the
Figure 18. Correlation of features. The hour feature affects CO2, TVOC, TEMP and strongly the bee
bee traffic in the entrance. The day_of_the_year variable affects weight. CO2 and TVOC are highly
traffic in the entrance. The day_of_the_year variable affects weight. CO2 and TVOC are highly cor-
correlated and in and out bee counts as well.
related and in and out bee counts as well.
XGBoost allows us to validate feature importance and, interestingly, it reports that
COXGBoost allows us to validate feature importance and, interestingly, it reports that
2 , traffic in the entrance and temperature have high effect on the prediction of the
CO 2, traffic in the entrance and temperature have high effect on the prediction of the hu-
humidity variable (see Figure 19). Finally, we derive the same error metrics in Table 3 and
midity
Sensors 2023, 23, x FOR PEER REVIEW variable
the forecast (see Figure
of humidity 19). Finally,
on XGBoost we derive
in Figure 20. Wethe same that
observe errorProphet
metricswas
in better
Table 3ofand
21 in 30
all
the forecast
metrics of humidity
as the XGBoost, on XGBoost
generally, in Figure
overfits 20. We observe that Prophet was better in
this dataset.
all metrics as the XGBoost, generally, overfits this dataset.
TRAIN TEST
MAPE 1.67 8.36
R2 97.59 -17.49
Figure
Figure 19.
19. Feature
Feature importance
importance on
on the
the regression
regression task
task of
of forecasting
forecasting the
the humidity
humidity level
level inside
inside the
the
beehive
beehive using
using gradient
gradient boosting
boosting trees (XGBoost).
trees (XGBoost).
TRAIN TEST
MAPE 1.67 8.36
R2 97.59 −17.49
Sensors 2023, 23, 1407 20 of 27
Figure 19. Feature importance on the regression task of forecasting the humidity level inside the
beehive using gradient boosting trees (XGBoost).
Figure20.
Figure 20.Prediction
Prediction of
of humidity
humidity inside
inside the
the hive
hiveusing
usinggradient
gradientboosted
boosteddecision
decisiontrees. Zooming
trees. in in
Zooming
thetest
the testperiod.
period.
4.4.Concluding
ConcludingRemarks
Remarks and Further
Further Steps
Steps
Thiswork
This workisisabout
aboutmonitoring
monitoring bioecological
bioecological time
time series
series data
data originating
originating from frominside
inside a
a beehive
beehive withwith a view
a view to identify
to identify health
health hazards
hazards to theto colony.
the colony. A custom,
A custom, low and
low cost cost power
and
power sufficient multisensory recorder gathers data from
sufficient multisensory recorder gathers data from CO 2 CO2 concentration (ppm), con-
concentration (ppm), concentration
ofcentration of volatile compounds
volatile compounds (ppb), temperature
(ppb), temperature and humidity andashumidity as wellofas
well as counts counts
bees of
entering
beesexiting
and entering
theand exiting
hive. The the hive. The
platform alsoplatform
transmits also transmits
exact samplingexacttime,
samplingGPS time, GPS
coordinates
coordinates
and weight. andThese weight. These data aconstitute
data constitute a multidimensional
multidimensional time series timethatseries
can that can be
be analyzed
byanalyzed
machine bylearning
machine techniques
learning techniques to identify
to identify current current
trends in trends in sensors’
sensors’ values,values,predict
predict
future future outcomes
outcomes and regionsand of
regions of confidence
confidence aroundaroundthem but, them but,ofmost
most of all, identify
all, identify atypical
atypical
values values
that may that may
relate relate to hazardous
to hazardous situationssituations
for the health for the ofhealth of the beehive.
the beehive. In
In this work,
wethispresent
work, we ourpresent
open, our open, optimized
optimized in termsinofterms of electronic
electronic components
components and power,
and power, smart
smart beehive,
beehive, we commentwe comment on the multidimensional
on the multidimensional time series timeproduced
series produced
and weand we dis-
discuss ways
cuss ways machine learning techniques can be integrated
machine learning techniques can be integrated to a decision support system that to a decision support system
issues
that messages.
alert issues alert messages.
Thefollowing
The following step,
step, besides
besides transmitting
transmittingmultidimensional
multidimensionaldata datatoto bebeinterpreted
interpreted at at
the server, is to transmit direct estimation in the beehive of the health
the server, is to transmit direct estimation in the beehive of the health status (i.e., edge status (i.e., edge
computing) that
computing) that will
will allow
allow beekeepers,
beekeepers, researchers,
researchers,and andpublic
publicauthorities
authorities totobebeactive
active
participantsin
participants incolony
colony surveillance
surveillance programs
programswithwithincreased
increasedaccuracy
accuracy andand responsiveness.
responsiveness.
Ourwork,
Our work,among
amongmany manyother,
other, equally
equally competitive
competitive approaches,
approaches, [51–52]
[51,52] havehave a common
a common goal:
Unhealthy or threatened colonies to be remotely monitored for their health status, with
greater precision, saving the cost of potential economic losses and preventing the loss of
pollination services. Currently (as per 18/01/2023), the cost of the whole setup is EUR 200.
In the near future, we intend to inflict stressful events to the beehive’s health and report
how well the sensors have been able to pinpoint the event in the sensors’ readings. We
will simulate health threats by intentionally stressing the beehive with various procedures
(e.g., increase humidity, remove the queen, increase internally the levels of CO2 ) and we
will observe the sensors’ readings to study to what extent the events can be detected, or
their cumulative effect predicted.
Supplementary Materials: The full database is included in the associated csv file and the Python
codes to re-produce all results of this work are parts of the publication. A video of the spectrogram of
each 5 min recording is uploaded at https://zenodo.org/record/7455055#.Y59znXZBy3A.
Author Contributions: I.R. developed the electronic boards. I.P. analyzed the database and wrote
the manuscript. N.-A.T. had the supervision of electronics’ development and tested the hardware.
G.P. designed the study and helped to analyze the data. E.A. proofread and revised the manuscript
and supervised technical analysis. E.T. and G.P. carried out numerous field visits and experiments.
All authors have read and agreed to the published version of the manuscript.
Sensors 2023, 23, 1407 21 of 27
Funding: This research has received funding by the European Regional Development Fund of
the European Union and Greek national funds through the Operational Program Competitiveness,
Entrepreneurship and Innovation, under the call Research–Create–Innovate, BeeSense Project (project
code: T2EDK-03157).
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: We share the research data and code to reproduce figures and experiments
in this paper.
Conflicts of Interest: The authors declare that they have no other conflict of interest.
Sensors 2023, 23, x FOR PEER REVIEW 23 of 30
Appendix A
Appendix A.1. Bee Counter
Appendix A.1 Bee Counter
Figure A1. The bee counter stage processor. It is based on Texas Instruments' MSP430F5438A mi-
Figure A1. The bee counter stage
crocontroller. processor.
The LED_A It is based
output activates on located
the LEDs Texas onInstruments’
the outside of MSP430F5438A
the counter and the
microcontroller. The LED_B
LED_Aactivates
outputthe activates
LEDs locatedtheon the inner
LEDs side on
located of the
thecounter.
outsidePHof0the
– PH11 signals
counter andarethe
the
LED_B activates theoutputs
LEDs of phototransistors and through them, in combination with active LEDs, the processor rec-
located on the inner side of the counter. PH 0–PH11 signals are the outputs
ognizes there is a bee in the tunnel and whether it enters or exits.
of phototransistors and through them, in combination with active LEDs, the processor recognizes
there is a bee in the tunnel and whether it enters or exits.
Sensors 2023, 23,2023,
Sensors x FOR PEER REVIEW
23, 1407 22 of 2724 of 30
Figure A2.A2.
Schematic diagram ofof theLEDs
LEDs mounted in tunnels.
the tunnels. When Q1 is activated, then the
Figure
Figure A2. Schematic diagram ofthe
Schematic diagram the LEDsmounted
mounted in in
thethe tunnels. When
When Q1activated,
Q1 is is activated,
then then the
the in-
input LEDs emit while when Q2 is activated the output LEDs emit. By sampling at 1KHz, each set
input LEDs
put LEDs emit
emit while
while when
when Q2activated
Q2 is is activated the output
the output LEDsLEDs emit.
emit. By By sampling
sampling at 1KHz,at each
1KHz,seteach
emitsset
emits
emitsforuSec
for 40 for40 each
40uSec
uSec each
mSec.each mSec.
mSec.
The total The totalforemission
The time
emission total emission time
time
each sampling forfor
cycle each
is each
40 sampling
sampling
uSec+40 = 80cycle
uSeccycle is 40is 40
uSec.
uSec+40uSec=80uSec.
uSec+40uSec=80uSec. The duty cycle is
The duty cycle is 8%. The duty cycle is 8%.8%.
Figure A3. Schematic diagram of phototransistors that detect whether the infrared optical beam of
Figure A3. Schematic diagram of phototransistors that detect whether the infrared optical beam
the LEDs
Figure A3.LEDshas been interrupted.
Schematic diagram ofInphototransistors
combination with that
active LEDs,whether
detect the processor recognizes
the infrared the pres-
optical
of the has been interrupted. In combination with active LEDs, the processor recognizes thebeam of
ence
the LEDs or not
has of
been a bee and its
interrupted. direction.
In The Q4
combinationcontrols
with the power
active supply
LEDs, the to the circuit
processor and is inactive
recognizes the pres-
presence or not of a bee and its direction. The Q4 controls the power supply to the circuit and is
for as long as it is not needed. At 1 kHz sampling, it is active 80 uSec every 1mSec. The duty cycle is
enceinactive
or not for
of aasbee
long as it is not needed. At 1 kHz sampling, it is active 80 uSec every 1 mSec. The dutyinactive
and its direction. The Q4 controls the power supply to the circuit and is
8%.
for as long
cycle as it is not needed. At 1 kHz sampling, it is active 80 uSec every 1mSec. The duty cycle is
is 8%.
8%.
Appendix B. Main Board
Figure A4. The schematic diagram of the main board of the system. It is based on the STM32L476RG
Figure A4. The schematic diagramofofthe
microcontroller the
ST.main boardisof
The system the system.
powered It is and
by a battery based on the stabilization
the voltage STM32L476RG at 3.3V
is done with the regulator TPS78033022 of Texas Instruments. Communication
microcontroller of the ST. The system is powered by a battery and the voltage stabilization with the CO2/Tem- at
perature/Humidity sensor board is via the CON3 connector and the data is transferred via I2C Bus.
3.3 V is done with the regulator TPS78033022 of Texas Instruments. Communication with the
It also has an SD card with power control to minimize consumption when not in use. Communica-
CO2 /Temperature/Humidity
tion with thesensor board
bee counter isserial
is via via the CON3 connector
communication (UART) viaand the data
connector is transferred
SV3. The weight sensor
amplifier
via I2C Bus. It also has an SDiscard
connected
withtopower
connector SV2, theto
control analog output of
minimize which drives channel
consumption when16not of the
in ADC.
use.
The recording of micro-vibrations is done through analog input (signal VIB, CH15 of ADC) in a file
Communication with.mp3. the bee counter is via serial communication (UART) via connector SV3. The
weight sensor amplifier is connected to connector SV2, the analog output of which drives channel 16
Appendix
of the ADC. The recording C. Gas Sensors, Temperature
of micro-vibrations and Humidity.
is done through analog input (signal VIB, CH15 of
ADC) in a file.mp3.
Sensors 2023, 23, x FOR PEER REVIEW 26 of 30
Figure A5. Electronic circuit of the air quality sensors (CCS811 of BioSense company) and tempera-
Figure A5. Electronic circuit of the air quality sensors (CCS811 of BioSense company) and
ture-humidity (SHT31 of Sensirion company). Communication with the main processor occurs via
temperature-humidity
I2C Bus. (SHT31 of Sensirion company). Communication with the main processor
occurs via I2C Bus.
Appendix D. Weight Scale
Sensors 2023, 23, 1407 24 of 27
Figure A5. Electronic circuit of the air quality sensors (CCS811 of BioSense company) and tempera-
ture-humidity (SHT31 of Sensirion company). Communication with the main processor occurs via
I2C Bus.
Figure A6. Electronic amplifier circuit of the weight sensor. It accepts input from the weight sensor
Figure A6. Electronic amplifier circuit of the weight sensor. It accepts input from the weight sensor
and gives a voltage that is proportional to the weight. Voltage to weight conversion is performed
Sensors 2023, 23, x FOR PEER REVIEW
and gives a voltage
on the system that is proportional to the weight. Voltage to weight conversion is performed
processor. 27 of 30 on
the system processor.
Appendix A.5.E.Communications
Appendix Communications
Figure A7. The schematic diagram of the communication circuit. It is based on simcom's SIM7070G
Figure A7. The schematic diagram of the communication circuit. It is based on simcom’s SIM7070G
Cat-M/NB LTE GSM module. It connects via a UART port to the main processor and sends the data
Cat-M/NB LTEwith
to the server GSM module.
a POST It connects via a UART port to the main processor and sends the data
request.
to the server with a POST request.
Sensors
Sensors 2023, 23, 1407
2023, 23, x FOR PEER REVIEW 2825of
of 30
27
Appendix F. Vibrations
Appendix A.6. Sensor
Vibrations Sensor
Appendix F. Vibrations Sensor
Figure A8. The schematic of the piezoelectric sensor amplifier. Amplifies the sensor's output voltage
Figure A8. The schematic
microvariations of the piezoelectric sensor
withamplifier. Amplifies thewhose
sensor’s output voltage
Figure A8. The (BeStar FT-35T-2.6A1),
schematic filtered
of the piezoelectric sensor aamplifier.
4KHz low pass filter
Amplifies output
the sensor's leads
output the
voltage
analog input to
microvariations the processor.
(BeStar FT-35T-2.6A1), filtered with a 4KHz low pass filter whose output leads
microvariations (BeStar FT-35T-2.6A1), filtered with a 4KHz low pass filter whose output leads the
the
analog input to the processor.
analog input to the processor.
Appendix G. Power Regulation
Appendix
Appendix G.Power
A.7. PowerRegulation
Regulation
Figure A9. The schematic diagram of the charging circuit. It is based on Texas Instruments' BQ24075
integrated
A9.circuit.
FigureA9. It accepts
Theschematic
schematic input from
diagram thethe photovoltaic via
ItisisDC/DC converter so that it does not
Figure The diagram ofofthe charging
charging circuit.It
circuit. basedon
based on TexasInstruments’
Texas Instruments' BQ24075
BQ24075
exceed 5V. Itcircuit.
integrated has a connection input from
It accepts input for thethe
battery, and thevia
photovoltaic output
DC/DC(VBATT) provides
converter power
so that to the
it does not
integrated
system circuit. Itis accepts
a chargeinput from the photovoltaic via DC/DC converter so that it does not
exceedwhen
5V. Itthere
has a connection on the
input battery and/or when
for the battery, and thethere is sunshine.
output (VBATT) provides power to the
exceed 5 V. It has a connection input for the battery, and the output (VBATT) provides power to the
system when there is a charge on the battery and/or when there is sunshine.
References system when there is a charge on the battery and/or when there is sunshine.
References
1. Watson, K.; Stallins, A. Honey Bees and Colony Collapse Disorder: A Pluralistic Reframing. Geogr. Compass 2016, 10, 222–236.
References
2.
1.1. Available
Watson,K.;
Watson, online:
K.; https://ec.europa.eu/commission/presscorner/detail/en/IP_19_6777
Stallins,
Stallins, A.Honey
A. HoneyBeesBeesand andColony
ColonyCollapse
Collapse Disorder:
Disorder: A A Pluralistic (accessedGeogr.
Pluralistic Reframing.
Reframing. on 10 Compass
Geogr. January 2016,
Compass 2023).
2016, 10,
10, 222–236.
222–236.
3.2. Gallai, N.; Salles, J.-M.; Settele, J.; Vaissière, B.E. Economic valuation of the vulnerability
Available online: https://ec.europa.eu/commission/presscorner/detail/en/IP_19_6777 (accessed on 10 January 2023).
[CrossRef] of world agriculture confronted with
2.3. pollinator
Gallai, N.;
Available decline.
online: Ecol.
J.-M.;Econ. 2009, 68, 810–821.
J.; Vaissière, https://doi.org/10.1016/j.ecolecon.2008.06.014.
Salles,https://ec.europa.eu/commission/presscorner/detail/en/IP_19_6777
Settele, B.E. Economic valuation of the vulnerability(accessedof worldon agriculture
10 Januaryconfronted
2023). with
4.
3. Klein, A.-M.; Vaissière, B.E.; Cane, J.H.; Steffan-Dewenter, I.; Cunningham, S.A.;
pollinator decline. Ecol. Econ. 2009, 68, 810–821. https://doi.org/10.1016/j.ecolecon.2008.06.014.
Gallai, N.; Salles, J.-M.; Settele, J.; Vaissière, B.E. Economic valuation of the Kremen,
vulnerability C.;
of Tscharntke,
world T.
agricultureImportance
confronted of with
pol-
4. linators
pollinator in
Klein, A.-M.; changing
Vaissière,
decline. landscapes
B.E.;
Ecol. Econ. Cane,
2009, 68, J.H.; for world
Steffan-Dewenter,
810–821. [CrossRef] Proc. R. Soc.
crops.I.; Cunningham, S.A.; BKremen,
2006, C.;274, 303–313.
Tscharntke, https://doi.org/.
T. Importance of pol-
4. https://doi.org/10.1098/rspb.2006.3721.
linators
Klein, A.-M.;in Vaissière,
changingB.E.; landscapes
Cane, J.H.; for Proc. R. Soc.
world crops.I.; Cunningham,
Steffan-Dewenter, S.A.;BKremen,
2006, C.;274, 303–313. T. https://doi.org/.
Tscharntke, Importance of
5. Potts, S.G.; in
Biesmeijer,
changingJ.C.; Kremen,for
https://doi.org/10.1098/rspb.2006.3721.
pollinators landscapes C.;world
Neumann,
crops. P.; Schweiger,
Proc. R. Soc. B O.; Kunin,
2006, W.E. Global
274, 303–313. Pollinator Declines: Trends, Impacts
[CrossRef]
5.5. and
Potts,Drivers.
Potts,S.G.; Trends
S.G.;Biesmeijer, Ecol.
Biesmeijer, Evol.
J.C.;
J.C.; 2010,
Kremen,
Kremen, 30, 1–9.
C.;C.; Neumann,
Neumann, P.; P.; Schweiger,
Schweiger, O.; Kunin,
O.; Kunin, W.E.W.E.
GlobalGlobal Pollinator
Pollinator Declines:
Declines: Trends,
Trends, ImpactsImpacts
and
6. Deandla Drivers.
Drivers.Ruá, P.; Trends
Trends Jaffé,
Ecol.R.; Dall,
Ecol.
Evol. O.;2010,
Evol.
2010, Munoz,
30, 1–9. I.; Serrano,[PubMed]
30,[CrossRef]
1–9. J. Biodiversity, conservation and current threats to European Honey bees.
6. Apidologie
De la Ruá, 2009, 40, 263–284.
P.; Jaffé, R.; Dall, O.; Munoz, I.; Serrano, J. Biodiversity, conservation and current threats to European Honey bees.
Apidologie 2009, 40, 263–284.
Sensors 2023, 23, 1407 26 of 27
6. De la Ruá, P.; Jaffé, R.; Dall, O.; Munoz, I.; Serrano, J. Biodiversity, conservation and current threats to European Honey bees.
Apidologie 2009, 40, 263–284. [CrossRef]
7. Williams, I.H. Aspects of bee diversity and crop pollination in the European Union. In The Conservation of Bees; Metheson, A., Ed.;
Academic Press: Cambridge, MA, USA, 1996; pp. 63–80.
8. Hallmann, C.A.; Sorg, M.; Jongejans, E.; Siepel, H.; Hofland, N.; Schwan, H.; Stenmans, W.; Muller, A.; Sumser, H.; Horren, T.; et al.
More than 75 percent decline over 27 years in total flying insect biomass in protected areas. PLoS ONE 2017, 12, e0185809.
[CrossRef]
9. Abdollahi, M.; Giovenazzo, P.; Falk, T.H. Automated Beehive Acoustics Monitoring: A Comprehensive Review of the Literature
and Recommendations for Future Work. Appl. Sci. 2022, 12, 3920. [CrossRef]
10. Hadjur, H.; Ammar, D.; Lefèvre, L. Toward an intelligent and efficient beehive: A survey of precision beekeeping systems and
services. Comput. Electron. Agric. 2022, 192, 106604. [CrossRef]
11. Cecchi, S.; Spinsante, S.; Terenzi, A.; Orcioni, S. A Smart Sensor-Based Measurement System for Advanced Beehive Monitoring.
Sensors 2020, 20, 2726. [CrossRef]
12. Szczurek, A.; Maciejewska, M.; Bak, B.; Wilde, J.; Siuda, M. Semiconductor gas sensor as a detector of Varroa destructor infestation
of honey bee colonies—Statistical evaluation. Comput. Electron. Agric. 2019, 162, 405–411. [CrossRef]
13. Szczurek, A.; Maciejewska, M. Beehive Air Sampling and Sensing Device Operation in Apicultural Applications—Methodological
and Technical Aspects. Sensors 2021, 21, 4019. [CrossRef] [PubMed]
14. Terenzi, A.; Cecchi, S.; Spinsante, S. On the Importance of the Sound Emitted by Honey Bee Hives. Veter. Sci. 2020, 7, 168.
[CrossRef] [PubMed]
15. Ramsey, M.-T.; Bencsik, M.; Newton, M.I.; Reyes, M.; Pioz, M.; Crauser, D.; Delso, N.S.; Le Conte, Y. The prediction of swarming
in honeybee colonies using vibrational spectra. Sci. Rep. 2020, 10, 9798. [CrossRef]
16. Zgank, A. Bee swarm activity acoustic classification for an IoT-based farm service sensors. Sensors 2020, 20, 21. [CrossRef]
[PubMed]
17. Zgank, A. IoT-Based Bee Swarm Activity Acoustic Classification Using Deep Neural Networks. Sensors 2021, 21, 676. [CrossRef]
18. Ramsey, M.; Bencsik, M.; Newton, M. Long-term trends in the honeybee ‘whooping signal’ revealed by automated detection.
PLoS ONE 2017, 12, e0171162.
19. Marchal, P.; Buatois, A.; Kraus, S.; Klein, S.; Gomez-Moracho, T.; Lihoreau, M. Automated monitoring of bee behaviour using
connected hives: Towards a computational apidology. Apidologie 2020, 51, 356–368. [CrossRef]
20. Gil-Lebrero, S.; Quiles-Latorre, F.J.; Ortiz-López, M.; Sánchez-Ruiz, V.; Gámiz-López, V.; Luna-Rodríguez, J.J. Honey Bee Colonies
Remote Monitoring System. Sensors 2017, 17, 55. [CrossRef]
21. Henry, E.; Adamchuk, V.; Stanhope, T.; Buddle, C.; Rindlaub, N. Precision apiculture: Development of a wireless sensor network
for honeybee hives. Comput. Electron. Agric. 2018, 156, 138–144. [CrossRef]
22. Hong, W.; Xu, B.; Chi, X.; Cui, X.; Yan, Y.; Li, T. Long-Term and Extensive Monitoring for Bee Colonies Based on Internet of
Things. IEEE Internet Things J. 2020, 7, 7148–7155. [CrossRef]
23. Souza Cunha, A.E.; Rose, J.; Prior, J.; Aumann, H.M.; Emanetoglu, N.W.; Drummond, F.A. A novel non-invasive radar to monitor
honeybee colony health. Comput. Electron. Agric. 2020, 170, 105241. [CrossRef]
24. Andrijević, N.; Urošević, V.; Arsić, B.; Herceg, D.; Savić, B. IoT Monitoring and Prediction Modeling of Honeybee Activity with
Alarm. Electronics 2022, 11, 783. [CrossRef]
25. Odemer, R. Approaches, challenges and recent advances in automated bee counting devices: A review. Ann. Appl. Biol. 2021,
180, 73–89. [CrossRef]
26. Borlinghaus, P.; Odemer, R.; Tausch, F.; Schmidt, K.; Grothe, O. Honeybee counter evaluation—Introducing a novel protocol for
measuring daily loss accuracy. Comput. Electron. Agric. 2022, 197, 106957. [CrossRef]
27. Ntawuzumunsi, E.; Kumaran, S.; Sibomana, L. Self-Powered Smart Beehive Monitoring and Control System (SBMaCS). Sensors
2021, 21, 3522. [CrossRef] [PubMed]
28. Alsharef, A.; Aggarwal, K.; Sonia; Kumar, M.; Mishra, A. Review of ML and AutoML Solutions to Forecast Time-Series Data.
Arch. Comput. Methods Eng. 2022, 29, 5297–5311. [CrossRef] [PubMed]
29. Hewamalage, H.; Bergmeir, C.; Bandara, K. Recurrent Neural Networks for Time Series Forecasting: Current status and future
directions. Int. J. Forecast. 2021, 37, 388–427. [CrossRef]
30. Ngo, T.-N.; Rustia, D.; Yang, E.-C.; Lin, T.-T. Honeybee Colony Population Daily Loss Rate Forecasting and an Early Warning
Method Using Temporal Convolutional Networks. Sensors 2021, 21, 3900. [CrossRef]
31. Hennessy, G.; Harris, C.; Eaton, C.; Wright, P.; Jackson, E.; Goulson, D.; Ratnieks, F.F. Gone with the wind: Effects of wind on
honeybee visit rate and foraging behavior. Anim. Behav. 2020, 161, 23–31. [CrossRef]
32. Meikle, W.G.; Barg, A.; Weiss, M. Honey bee colonies maintain CO2 and temperature regimes in spite of change in hive ventilation
characteristics. Apidologie 2022, 53, 51. [CrossRef]
33. König, A. An in-hive soft sensor based on phase space features for Varroa infestation level estimation and treatment need
detection. J. Sens. Sens. Syst. 2022, 11, 29–40. [CrossRef]
34. Schlegel, T.; Visscher, P.K.; Seeley, T.D. Beeping and piping: Characterization of two mechano-acoustic signals used by honeybees
in swarming. Naturwissenschaften 2012, 99, 1067–1071. [CrossRef] [PubMed]
Sensors 2023, 23, 1407 27 of 27
35. Schneider, S.S.; Gary, N.E. ‘Quacking’: A Sound Produced by Worker Honeybees after Exposure to Carbon Dioxide. J. Apic. Res.
1984, 23, 25–30. [CrossRef]
36. Seeley, T.D.; Tautz, J. Worker piping in honeybee swarms and its role in preparing for liftoff. J. Comp. Physiol. A 2001, 187, 667–676.
[CrossRef]
37. Simpson, J.; Cherry, S.M. Queen confinement, queen piping and swarming in Apis mellifera colonies. Anim. Behav. 1969,
17, 271–278. [CrossRef]
38. Spangler, H.G. Effects of Recorded Queen Pipings and of Continuous Vibration on the Emergence of Queen Honey Bees. Ann.
Entomol. Soc. Am. 1971, 64, 50–51. [CrossRef]
39. Thom, C.; Gilley, D.C. Worker piping in honey bees (Apis mellifera): The behavior of piping nectar foragers. Behav. Ecol. Sociobiol.
2003, 53, 199–205. [CrossRef]
40. Wenner, A.M. Sound production during the waggle dance of the honeybee. Anim. Behav. 1962, 10, 79–95. [CrossRef]
41. Woods, E.F. Electronic Prediction of Swarming in Bees. Nature 1959, 184, 842–844. [CrossRef]
42. Catalano, C.; Paiano, L.; Calabrese, F.; Cataldo, M.; Mancarella, L.; Tommasi, F. Anomaly detection in smart agriculture systems.
Comput. Ind. 2022, 143, 103750. [CrossRef]
43. Kirchner, W.H. Vibrational signals in the tremble dance of the honeybee, Apis mellifera. Behav. Ecol. Sociobiol. 1993, 33, 169–172.
[CrossRef]
44. Tsujiuchi, S.; Sivan-Loukianova, E.; Eberl, D.F.; Kitagawa, Y.; Kadowaki, T. Dynamic Range Compression in the Honey Bee
Auditory System toward Waggle Dance Sounds. PLoS ONE 2007, 2, e234. [CrossRef] [PubMed]
45. Pratt, S.; Kühnholz, S.; Seeley, T.D.; Weidenmüller, A. Worker piping associated with foraging in undisturbed queenright colonies
of honey bees. Apidologie 1996, 27, 13–20. [CrossRef]
46. Hrncir, M.; Maia-Silva, C.; Farina, W.M. Honey bee workers generate low-frequency vibrations that are reliable indicators of their
activity level. J. Comp. Physiol. A Neuroethol. Sens Neural. Behav. Physiol. 2019, 205, 79–86. [CrossRef] [PubMed]
47. Kraus, H.; Velthius, H.H.W. High Humidity in the Honey Bee (Apis mellifera L.) Brood Nest Limits Reproduction of the Parasitic
Mite Varroa jacobsoni Oud. Naturwissenschaften 1997, 84, 217–218. [CrossRef]
48. Guidance on the risk assessment of plant protection products on bees (Apis mellifera, Bombus spp. and solitary bees). EFSA J. 2013,
11, 3295. [CrossRef]
49. Ippolito, A.; del Aguila, M.; Aiassa, E.; Guajardo, I.M.; Neri, F.M.; Alvarez, F.; Mosbach-Schulz, O.; Szentes, C. Review of the
evidence on bee background mortality. EFSA Support. Publ. 2020, 17, 1880E. [CrossRef]
50. Januschowski, T.; Wang, Y.; Torkkola, K.; Erkkilä, T.; Hasson, H.; Gasthaus, J. Forecasting with trees. Int. J. Forecast. 2022,
38, 1473–1481. [CrossRef]
51. Tashakkori, R.; Hamza, A.S.; Crawford, M.B. Beemon: An IoT-based beehive monitoring system. Comput. Electron. Agric. 2021,
190, 106427. [CrossRef]
52. Edwards-Murphy, F.; Magno, M.; Whelan, P.M.; O’Halloran, J.; Popovici, E.M. b+WSN: Smart beehive with preliminary decision
tree analysis for agriculture and honeybee health monitoring. Comput. Electron. Agric. 2016, 124, 211–219. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.