<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>J. PLOS ONE 9 1 (2014). doi:10.1371/journal.pone.0084656</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1007/s13280-020-01333-9</article-id>
      <title-group>
        <article-title>Smart Control of Temperature and Audio Monitoring Inside Beehive: IoT ESP8266 NodeMCU and Android Mobile Platforms</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrey Kupin</string-name>
          <email>kupin@knu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmytro Zubov</string-name>
          <email>dzubov@ieee.org</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Aiza Zhenishbekova</string-name>
          <email>aiza.zhenishbekova_2023@ucentralasia.org</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kryvyi Rih National University</institution>
          ,
          <addr-line>11 Vitaly Matusevich, Kryvyi Rih, 50027</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Central Asia</institution>
          ,
          <addr-line>125/1 Toktogul Street, Bishkek, 720001</addr-line>
          ,
          <country country="KG">Kyrgyzstan</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <volume>641</volume>
      <fpage>827</fpage>
      <lpage>837</lpage>
      <abstract>
        <p>In this study, a prototype of a smart control system for temperature management in cold weather and audio monitoring inside a beehive was developed at an affordable price of USD 14 using IoT ESP8266 NodeMCU, temperature sensor DS18B20, sound sensor KS0035, and two 8 W portable waterproof heaters. The IoT device does not require any special installation and works in autonomous and network modes displaying information on the beekeeper's Android smartphone. A Java Android application was developed using Google's WebView system component. The beekeeper is notified if a bee fanning noise, such as honeybee queenlessness, is detected. This occurs when at least four measurements exceed a digital value of 200 in a sequence of 100 elements. This rule was observed in the experiment at the apiary in the AtBashi region of Kyrgyzstan. The automatic management of the temperature inside a beehive was implemented by employing a two-position control algorithm. The results of the experiment conducted at the campus of the University of Central Asia (city of Naryn, Kyrgyzstan) showed the operability of the developed prototype at negative outdoor temperatures.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Beehive</kwd>
        <kwd>ESP8266 NodeMCU</kwd>
        <kwd>DS18B20</kwd>
        <kwd>temperature control</kwd>
        <kwd>audio monitoring</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Honeybees are crucial pollinators for natural ecosystems and contributors to sustainable
development targets such as the quantity and quality of food, nutrition, medicine, inclusive
communities, forest conservation and regrowth, healthy and diverse ecosystems, innovation and
inspiration, biofuels, and economic opportunities [
        <xref ref-type="bibr" rid="ref1">1, 2</xref>
        ]. Some apiaries experience high mortality due
to factors such as natural disasters and internal beehive issues. These can include floods, fires, droughts,
extremely cold temperatures, honeybee starvation, and honeybee queenlessness. For instance,
approximately 38 % of beekeepers’ colonies in the United States died between October 1, 2018, and
April 1, 2019 [3]. However, very few control systems (e.g., [4-8]) have been developed to notify
beekeepers and minimize the impact of negative external and internal factors on the beehive.
Approximately 35 % of bee colonies support 75 % of crops worldwide [7], and hence even a small
success rate in the survival of honeybees implies a large global benefit.
      </p>
      <p>Existing devices, such as those referenced in [4-6, 8-10], employ various sensors (e.g., temperature,
humidity, sound, piezoelectric transducer, motion, and flame) to monitor parameters inside and outside
a beehive. Inside the beehive, climate control (temperature mainly, but humidity as well) and audio
monitoring (mostly amplitude and frequency) are emphasized. However, some commercial products
are quite expensive. For instance, the Beewise Beehome costs USD 400 per month for 24 bee colonies
as of May 2023 [8]. In addition, some devices are relatively large (e.g., a Bee Board module is approx.
30205 cm [10]) and require special external installation.</p>
      <p>This study presents a prototype of an Internet of Things (IoT) device for temperature control and
audio monitoring inside a beehive. The main hardware components are the ESP8266 NodeMCU (Node
MicroController Unit) board [11] (approx. USD 2), temperature sensor DS18B20 (approx. USD 1),
BESTEP 3.3 V trigger relay (approx. USD 2), Keyestudio microphone sound sensor KS0035 (approx.
USD 3), two 8 W portable waterproof heaters (approx. USD 4 for two pieces), enclosure (approx.
USD 1), breadboard and wires (approx. USD 1). The size of the box is approx. 858544 mm, and it
does not require any special installation. The external power supply, for example, solar panels with
batteries or power grid lines, depends on the apiary location; hence, its price is not initially considered.
A WiFi router is an optional device that connects ESP8266 NodeMCU boards and the beekeeper’s
Android smartphone. Thus, the basic price of the kit is approx. USD 14, which is an affordable
competitive level.</p>
      <p>This study addresses two problems in the development of an IoT device for temperature control and
audio monitoring inside a beehive.</p>
      <p>1. A new portable soft-/hardware complex of the affordable price of USD 14 was developed
employing automatic configuration (autonomous / network) at the system start.
2. A web-based mobile user interface [12] was designed to support the beekeeper’s
decisionmaking using information about the state of heaters (ON/OFF), the temperature, the maximum audio
signal in a first-in, first-out (FIFO) queue of 100 elements inside specific beehive (the mobile app
activity shows a list of beehives at the beginning), and a bee fanning noise if it is detected.</p>
      <p>The paper is organized as follows: Section 2 presents the related work; Section 3 discusses the
system soft-/hardware design; Section 4 describes the data acquisition and two-position automatic
control of the temperature inside a beehive; and Section 5 summarizes the achieved outcomes.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related work</title>
      <p>In this study, two categories of related work are analyzed: remote data acquisition and automatic
control of parameters inside a beehive.</p>
      <p>Focusing on data acquisition from beehives, some contributions can be found in [4-10, 13-15].
Different sensors (e.g., temperature, humidity, weight, air quality, camera, microphone) are employed
to monitor parameters inside and outside a beehive via cable and/or wireless connection.</p>
      <p>In [10, 14], the acquisition of the hive weight (Sparkfun load sensor with HX711 load cell amplifier),
sounds emitted by the bees (Analog Devices ADMP401), temperature and humidity (DHT22 sensor),
and CO2 (Telaire TL6615 sensor) inside a beehive, and weather conditions (ambient temperature,
humidity, atmospheric pressure, UV-light, visible light, infrared light, rain, wind intensity and
direction) is externally implemented using the Raspberry Pi 3 B microcomputer with cable connection
to the Ethernet switch that communicates wirelessly to a remote server. The price was not pointed out
in [10, 14], but the current market shows that it is above USD 100 because of the Raspberry Pi 3 B
board and sensors. The size of the Bee Board module is approx. 30205 cm. In addition, it requires
special external installation.</p>
      <p>References [9, 13] discuss audio monitoring inside and outside a beehive:
1. Detect bees, swarming, queen bee absence, mite attack, environmental effects, arrival, and
departure of bees.
2. Predict hive strength.
3. Identify bee species.
4. Pollination efficacy measurement.</p>
      <p>Complicated AI (Artificial Intelligence) algorithms, such as LR, KNN, RF, HMM, PCA, CNN,
SVM, and LDA, are employed for audio-based beehive monitoring [9]. This approach requires
highquality and omnidirectional microphones, such as Analog Devices ADMP401, and high-performance
microcomputers, such as Raspberry Pi 3 B / 4 B, which makes the device expensive and relatively
large.</p>
      <p>In [15], an infrared camera tracked social interactions among honeybees in a flat laboratory arena.
This approach requires high-performance computing for image recognition, and the infrared camera
needs additional power to supply infrared lighting if it is necessary to increase camera visibility in the
dark.</p>
      <p>Focusing on the automatic control of parameters inside a beehive, some contributions can be found
in [4-8]. Different actuators, such as heaters and ventilators, are employed to control parameters inside
the beehive (mostly temperature and humidity).</p>
      <p>In [6], the implementation of a heating system with central and lateral heaters showed that the feed
consumption was reduced by 1.8 kg compared to a beehive without heating during the five cold months.
In winter, hives with electric heating had 10-30 dead bees per family while hives without heating had
100-200 dead bees per family. It was pointed out that the surface temperature of the heater should not
exceed 47°C (not to injure bees). During the five cold months, the electricity consumption was 9 kWh
which was quite high.</p>
      <p>In [5], a 36 W intra-frame heater was installed inside a beehive employing a microcontroller
PIC18F452 and temperature/humidity sensor SHT11. The heater is composed of nine-row wire
resistance, and the warm air spreads through holes smaller than 2.5 mm (bees should not touch the
resistance). This device required special installation.</p>
      <p>In [7, 8], a Beewise Beehome robotized system was employed to manage 24 beehives and automate
pollination, honey production and reproduction. Solar panels provide 100 % power for automated
robotic brood box management, a computer vision-based monitoring system, AI decision-making,
automated honey harvesting, automated pest control, feeding, and thermoregulation. The price was
USD 400 per month as of May 2023.</p>
      <p>In [4], a self-powered smart beehive monitoring and control system (SBMaCS) used different
sensors to measure parameters inside and outside a beehive, such as temperature and humidity sensor,
piezoelectric transducer, and flame sensor, to secure bee colonies and increase honey productivity. The
device employs energy harvesting for self-power supply using radio frequency energy and vibrations
from adult bees through a piezoelectric transducer. A mobile phone application was developed for
supervisory control and data acquisition. However, the Arduino Uno microcontroller with a separate
Digi XBee S1 wireless module and sensors complicates the system and makes it larger than the available
space inside the beehive. The total price is assumed to be around USD 100 since only Arduino Uno and
Digi XBee S1 boards cost over USD 40.</p>
      <p>A review of the above-mentioned studies [4-10, 13-15] on remote data acquisition and automatic
control of parameters inside a beehive shows that commercial products should be affordable and meet
the following criteria:
1. Remotely monitor essential parameters such as temperature and sound, for example, via a
mobile application.
2. Control the temperature in cold weather inside a beehive remotely and/or automatically even
without a cable or WiFi connection.
3. Provide beekeepers with information about necessary actions such as checking the beehive if a
bee fanning noise is detected.
4. The device should not require any special installation.</p>
      <p>In this study, the ESP8266 NodeMCU microcomputer monitors the temperature and sound inside a
beehive via sensors DS18B20 and KS0035 and controls the internal temperature based on the BESTEP
3.3 V trigger relay and two 8 W portable waterproof heaters. A diagram of the proposed approach is
shown in Figure 1. The power supply method is not discussed in this project because of the existing
standard solutions such as low-voltage distribution power lines and solar panels with solar controllers/
batteries that are selected according to the customer’s preferences when the product is sold.</p>
    </sec>
    <sec id="sec-3">
      <title>3. System soft-/hardware design</title>
      <p>The soft-/hardware complex is composed of two parts – Java Android application (smartphone
Doogee S96 Pro with Android 10 operating system (OS) and IP68 dust/water resistance is employed in
this prototype) and ESP8266 node microcontroller unit with temperature sensor DS18B20, BESTEP
3.3 V trigger relay (Keyestudio 5 V relay KS0011 also showed the operability in experiments),
Keyestudio microphone sound sensor KS0035, and two 8 W portable waterproof heaters. The
smartphone and microcontroller are connected via a WiFi router (ZTE ZXHN F663N in this prototype;
see Figure 2).</p>
      <p>s
e
v
i
h
e
e
B
• • •
WiFi
WiFi</p>
      <p>Temperature
Audio monitoring
Temperature
Audio monitoring
Temperature
Audio monitoring</p>
      <p>WiFi
WiFi
WiFi</p>
      <p>WiFi router</p>
      <p>WiFi</p>
      <p>Android
smartphone
with Java
Android
application</p>
      <p>Beekeeper</p>
      <p>The ESP8266 NodeMCU board runs an Arduino sketch developed in the Arduino IDE (Integrated
Development Environment) using C programming language. It hosts an HTML (Hypertext Markup
Language) website on a web server and is wired to the temperature sensor DS18B20 (in-box solution
is presented without heaters in Figure 3), BESTEP 3.3 V trigger relay, and Keyestudio microphone
sound sensor KS0035 on a breadboard. The relay is connected to the digital pin D5 (internal designation
is GPIO14 – general purpose input/output pin 14), the Keyestudio microphone sound sensor KS0035
to the analog pin A0 (internal designation is ADC0), the temperature sensor DS18B20 to digital pin D2
(internal designation is GPIO4) of ESP8266 NodeMCU. Jumper wires are made of non-corrosive and
low-resistance copper. All hardware components operate in temperatures from -40 0C to +100 0C.</p>
      <p>During the prototyping, two types of enclosures were used: a plastic junction box with the internal
installation of temperature sensor DS18B20 and a 3D printed box (DS18B20 is outside; see Figure 4).
The waterproof sensor DS18B20 is suitable for both internal and external installations, which is its
advantage compared to the DHT22 sensor.</p>
      <sec id="sec-3-1">
        <title>ESP8266 NodeMCU</title>
      </sec>
      <sec id="sec-3-2">
        <title>BESTEP 3.3 V trigger relay</title>
      </sec>
      <sec id="sec-3-3">
        <title>Sound sensor KS0035</title>
        <p>The prototype was installed on the bottom board as presented in Figure 5: the left photo shows the
beehive externally and the right photo depicts the prototype enclosure inside a beehive with two 8 W
portable waterproof heaters and the temperature sensor DS18B20 attached to the honeycomb.</p>
      </sec>
      <sec id="sec-3-4">
        <title>Heaters</title>
      </sec>
      <sec id="sec-3-5">
        <title>Power cables</title>
        <p>B)
DS18B20</p>
      </sec>
      <sec id="sec-3-6">
        <title>Device enclosure</title>
        <p>A)</p>
        <p>The research question is what power of heaters is needed to keep the temperature around 0 0C inside
a beehive. It is assumed that the beehive is winterized (i.e., heat insulation is added internally and/or
externally) and has dimensions 0.60.50.4 m (i.e., the volume is 0.12 m3). In general, 1000 W is
suitable to heat the space of 25 m3, and hence 16 W, the power provided by two heaters, should be
enough for 0.4 m3 that is over three times larger than the discussed volume of the beehive (0.12 m3).
This result corresponds to the results presented in [6].</p>
        <p>The WiFi router ZTE ZXHN F663N connects all devices to the local area network. Ten beehives
are considered in the prototype (the number can be extended), and hence ten static IPv4 (Internet
Protocol version 4) addresses were bound to ten MAC (Media Access Control) addresses of ESP8266
NodeMCUs, as shown in Figure 6. The beekeeper acquires information by typing the IPv4 address of
specific beehive in the web browser on the network end device, such as smartphone, laptop, and desktop
computer, connected to the access point (see screenshot in Figure 2) or simply selecting a beehive on
the mobile application start activity.</p>
        <p>A web-based Java Android mobile application was developed in Android Studio 4.0 (see Figure 7)
for Android 10 OS and newer. Its main functionality is based on the Android WebView system
component from Google, which allows Android applications to display web content. On the start stage,
the Java Android mobile application shows the HTML file “index.html” stored in a folder “assets”,
which is the list of beehives (see Figure 8). The beekeeper selects specific beehive by clicking it on the
screen, and then the following information is displayed: the state of heaters (ON/OFF), the temperature,
the maximum audio signal in a FIFO queue of 100 elements inside specific beehive, and a bee fanning
noise if it is detected (see Figure 8). Abnormal values of audio signals show the extraordinary situations
happening in a beehive [13].</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Data acquisition and two-position automatic control of the temperature inside a beehive</title>
      <p>The temperature inside a beehive is the first parameter shown to the beekeeper in this prototype. It
is automatically controlled by a well-known two-position control algorithm that abruptly switches
between two states. The trigger relay turns heaters on if the temperature inside a beehive is less than
0 0C, and off if the temperature is larger than 1 0C. The prototype was tested outdoors on the campus of
the University of Central Asia (city of Naryn, Kyrgyzstan) on March 7, 2023. The results are shown in
Figure 9, where the temperature inside a beehive was changed between 0 0C and 1 0C (red line) after
the warm-up stage, whereas the outdoor temperature was from -4 0C to -2 0C (blue line). The target
temperature range 0 0C – +1 0C was suggested by beekeepers from the At-Bashi region of Kyrgyzstan.</p>
      <p>0C
1.1
0.1
-0.9
-1.9
-2.9
-3.9
-4.9</p>
      <p>The information about the audio monitoring inside a beehive is a second parameter that is shown to
the beekeeper in this prototype. Two types of audio information are as follows:
1. Maximum audio signal in a FIFO queue of 100 elements.
2. A bee fanning noise if it is detected.</p>
      <p>In the first case, the maximum value is obtained in the sequence of 100 numbers. In the second case,
the beekeeper is notified if a bee fanning noise, such as honeybee queenlessness, is detected. This occurs
when at least four measurements exceed a digital value of 200 in a sequence of 100 elements. This rule
was observed in an actual experiment performed at an apiary in the At-Bashi region of Kyrgyzstan.
Aiza Zhenishbekova collected data using the portable handy recorder Zoom H6. Examples of audio
samples are presented in Figure 10 (red line – without honeybee queen; blue line – with honeybee
queen; the time interval between measurements is 0.5 s; available for download at
https://drive.google.com/drive/folders/14GNXlQzfjztMakAsI0tJEOhRtj5Qhp3W?usp=sharing). The
KS0035 sensor potentiometer was manually adjusted for the microphone’s maximum sensitivity; hence,
the device could be easily adapted to different types of bees and sound/noise levels. An example of the
device installed in the beehive at an apiary in the At-Bashi region of Kyrgyzstan is shown in Figure 11.
Experiments using audio samples showed 100 % accuracy for the proposed approach.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions</title>
      <p>In this study, a new prototype was developed to support bee colonies via temperature control in cold
weather and monitoring the audio inside a beehive. The affordable price of USD 14 is provided by the
low-cost reliable IoT equipment: ESP8266 NodeMCU, temperature sensor DS18B20, BESTEP 3.3 V
trigger relay, Keyestudio microphone sound sensor KS0035, and two 8 W portable waterproof heaters.
Two-position automatic control of the temperature inside a beehive with the possibility to display it on
the screen of the Android smartphone along with the information about the maximum audio signal in a
FIFO queue of 100 elements and a bee fanning noise makes this prototype different and competitive.
The developed device does not require special installation on the bottom of a beehive.</p>
      <sec id="sec-5-1">
        <title>No. of the measurement in a sequence</title>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Acronyms and abbreviations</title>
    </sec>
    <sec id="sec-7">
      <title>7. Data availability</title>
    </sec>
    <sec id="sec-8">
      <title>8. Conflicts of interest</title>
    </sec>
    <sec id="sec-9">
      <title>9. Acknowledgments</title>
      <p>Description</p>
      <p>The data supporting the conclusions of this work are available from the corresponding author
Dr. Dmytro Zubov upon request.</p>
      <sec id="sec-9-1">
        <title>The authors declare no conflicts of interest for publication. The authors sincerely appreciate the management and colleagues at the University of Central Asia and Kryvyi Rih National University for their patience and kind assistance in completing the present study.</title>
        <p>10.References</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Katumo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Liang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Ochola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lv</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.-F.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.-F. Yang</surname>
          </string-name>
          ,
          <article-title>Pollinator diversity benefits natural and agricultural ecosystems, environmental health, and human welfare</article-title>
          ,
          <source>J. Plant Diversity</source>
          ,
          <volume>44 5</volume>
          (
          <year>2022</year>
          )
          <fpage>429</fpage>
          -
          <lpage>435</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.pld.
          <year>2022</year>
          .
          <volume>01</volume>
          .005.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>