You are on page 1of 21

sensors

Article
Honey Bee Colonies Remote Monitoring System
Sergio Gil-Lebrero 1 , Francisco Javier Quiles-Latorre 2 , Manuel Ortiz-López 2, *,
Víctor Sánchez-Ruiz 2 , Victoria Gámiz-López 1 and Juan Jesús Luna-Rodríguez 2
1 Department of Zoology, University of Córdoba, Córdoba 14071, Spain; ilenro89@gmail.com (S.G.-L.);
victoriagamizlopez@gmail.com (V.G.-L.)
2 Department of Computer Architecture, Electronics and Electronic Technology, University of Córdoba,
Córdoba 14071, Spain; el1qulaf@uco.es (F.J.Q.-L.); v644452553@gmail.com (V.S.-R.); el1luroj@uco.es (J.J.L.-R.)
* Correspondence: el1orlom@uco.es; Tel.: +34-957-218-376; Fax: +34-957-218-327

Academic Editor: Gonzalo Pajares Martinsanz


Received: 26 November 2016; Accepted: 26 December 2016; Published: 29 December 2016
Abstract: Bees are very important for terrestrial ecosystems and, above all, for the subsistence of many
crops, due to their ability to pollinate flowers. Currently, the honey bee populations are decreasing
due to colony collapse disorder (CCD). The reasons for CCD are not fully known, and as a result, it is
essential to obtain all possible information on the environmental conditions surrounding the beehives.
On the other hand, it is important to carry out such information gathering as non-intrusively as
possible to avoid modifying the bees’ work conditions and to obtain more reliable data. We designed
a wireless-sensor networks meet these requirements. We designed a remote monitoring system
(called WBee) based on a hierarchical three-level model formed by the wireless node, a local data
server, and a cloud data server. WBee is a low-cost, fully scalable, easily deployable system with
regard to the number and types of sensors and the number of hives and their geographical distribution.
WBee saves the data in each of the levels if there are failures in communication. In addition, the nodes
include a backup battery, which allows for further data acquisition and storage in the event of
a power outage. Unlike other systems that monitor a single point of a hive, the system we present
monitors and stores the temperature and relative humidity of the beehive in three different spots.
Additionally, the hive is continuously weighed on a weighing scale. Real-time weight measurement
is an innovation in wireless beehive—monitoring systems. We designed an adaptation board to
facilitate the connection of the sensors to the node. Through the Internet, researchers and beekeepers
can access the cloud data server to find out the condition of their hives in real time.

Keywords: precision beekeeping; precision apiculture; bee colony monitoring; wireless sensor
network; internet of things

1. Introduction
Insect pollinators are essential for terrestrial ecosystems and for many agricultural and farming
businesses. They ensure the maintenance of certain environmental processes, such as plant
reproduction. Bees are the most specialized insect pollinators due to their ability to transport and store
pollen efficiently [1]. Thus, honeybees are not only important for their honey production but also for
environmental balance, because they are essential to the pollination of the flowers of many crops [2].
In recent years, honeybee populations have experienced significant losses due to colony collapse
disorder (CCD). The reasons for the CCD are still being debated. As a result, it is essential to obtain
information to look for solutions to this syndrome [2,3]. Thus, bee colony monitoring—registering
the largest possible amount of data but preventing the effects of handling on beehives—is important.
In this way, it will be possible to obtain highly reliable information. Remote monitoring systems meet
the necessary requirements to turn into a significant tool for the monitoring of bee colonies.

Sensors 2017, 17, 55; doi:10.3390/s17010055 www.mdpi.com/journal/sensors


Sensors 2017, 17, 55 2 of 21

The use of precision apiculture allows us to monitor the beehives for many possible reasons,
such as research, information about the daily management of bees by beekeepers, and learning how to
reduce the resources and time assigned to tasks without reducing production.
Beehive monitoring allows us to monitor different parameters, such as the temperature and
humidity levels inside the beehives, as well as the weight, sounds, and gases produced, which can
generate important information. For example, these data can inform us on whether the beehives are
swarming based on the temperature, whether any action is required from the beekeeper, whether the
bees are affected by any disease, or even whether the hives are moving. This last application is very
useful in areas where beehives can be stolen [4–8].
Different technologies can be applied to monitor the hives [9]. Reducing the cost and size of the
sensors allows the possibility of deploying them in the countryside to extract information and collect
data more easily. Initially, remote electronic monitoring of beehives had a mainly scientific application,
allowing the monitoring of factors inside the hives, such as the temperature and the humidity,
with minimally invasive methods. Nowadays, these innovations have begun to be adapted by
beekeepers through practical applications that can provide remote information for the decision-making
processes without having to inspect the beehives.
However, the monitoring of biological processes is not a trivial task, due to the fact that
the behavior of the biological system and its reaction to human interaction is not predictable.
The acquisition of data in industrial processes is a very common issue, and there are many commercial
systems for such tasks. However, in the scope of biological processes, data acquisition becomes
a complex task, especially in the case of honeybee hives, where any foreign object can turn into a threat
to be neutralized by the bees.
In recent years, monitoring systems have greatly progressed due to the use of wireless-sensor
networks (WSNs). A WSN is made up of embedded devices that can acquire data from different
sensors, process them, and communicate with a computer with a cloud database. These devices
are known as nodes or motes and are the main core of the Internet of Things (IoT). Humans have
used WSNs in many daily life activities, such as agriculture [10]. They have been also used in health
care, intelligent home monitoring, archeological monitoring system, and military and industrial
applications [11–13].
WSNs are also beginning to be used to monitor honeybee colonies. The nodes of a WSN can
be used to obtain data from the sensors monitoring the environmental conditions of a beehive
(temperature, humidity, CO2 , etc.) and even its weight [14]. The nodes connect and communicate
through a gateway that can send the data from the motes to a base for storage and processing. This has
increased the features of the monitoring systems, leading to what is currently known as precision
apiculture. WSNs are a well-known alternative for distributed and remote sensing. These kinds
of networks offer strong potential for beekeepers, due to the fact that they meet several significant
requirements: (i) they are a minimally invasive method due to the small size of the nodes and
sensors; (ii) they can be operational in remote areas for a long period of time due to their low energy
consumption; and (iii) they allow real-time monitoring.
This work presents a wireless monitoring system for honeybee hives. The system architecture
allows easy deployment in the field and ensures easy scalability. We used commercial nodes but
adapted them to obtain measurements from the hives. We also developed an adaptor board.
The paper is organized as follows: Section 2 provides a short review of honeybee monitoring.
Section 3 presents an overview on the architecture of the system. Section 4 describes the hardware and
software implementation of the wireless node. Section 5 discusses power consumption and autonomy
of the node. Section 6 describes the installation of the system in the apiary. Finally, Section 7 provides
our conclusions.
Sensors 2017, 17, 55 3 of 21

2. Related Works
The interest regarding continuous honeybee colonies monitoring began during the first years
of the XX-th century. In 1914, Gates published data on the temperature of a beehive manually
collected every hour for several days in 1907 [15]. In 1926, Dunham measured the temperature
inside a beehive by means of thermocouples [16]. The technological development of the sensors and
electronic data-acquisition systems has allowed the improvement of measurement processes. In this
way, different types of monitoring methods have been used, from simple observation of the data in the
hive [17] to systems that are able to analyze those data [18]. Meikle and Holst summarized some of the
continuous monitoring methods in [9], stating for each method the author, the measured parameters
(temperature, O2 , CO2 , relative humidity, weight, vibration, etc.), and each method’s length.
One of the first electronic systems to monitor bees was Apidictor [19]. This system consisted of
a low-pass filter for frequencies to detect the changes of sound that took place inside the hive up to
two to three weeks before swarming.
In [20], Ferrari et al. analyzed sound recorded with a sound card in a computer and monitored
the temperature and relative humidity by means of a datalogger. The sound was recorded through
three omnidirectional microphones. In [21], Chen et al. described an imaging system located at the
entrance to the hive to find out the number of times a bee entered and exited the hive. They used
a tag attached to the bee’s body to identify the bee under study. In [22], Zacepins and Stalidzans
monitored the wintering process of bees, measuring the temperature of the beehive. The data were
sent to a computer for processing and to determine the status of the hive by means of the application
of an algorithm. In [23], Heidinger et al. used a radio-frequency identification (RFID) system to find
out the frequency and length of the nuptial flights of honeybee queens.
Meikle et al. used electronics balances connected to a 12-bit resolution datalogger to assess the
evolution of the weight of a beehive. The system was powered by a solar panel. They recorded the
weight of two hives hourly [24].
The improvement of the performance and size of the microcontrollers has allowed the
development of low-cost beehive-monitoring systems based on Arduino® , Make® , Sparkfun® ,
and Adafruit® [25]. An example of an Arduino-based monitoring system is that proposed by
Sánchez et al. [26]. The system stored the temperature and relative humidity data in a microSD
memory card by means of an Excel database. The beekeeper needed to go to the beehive colony and
download the content of the SD memory card for each hive to his/her laptop to be able to process
those data later on.
In recent years, honeybee hive monitoring systems based on WSNs have been used. These systems
have the advantage of being able to carry out a non-intrusive remote monitoring of the hive’s
environmental conditions. In [27], Kviesis et al. developed a system with a main unit that
communicated wirelessly with each node located in the hive, concurrently acting as an Internet
gateway. The system monitored the temperature and relative humidity using an integrated SHT15
sensor. The collected data were sent by the main unit to a remote database server. In [28], Zacepins et al.
described a temperature-monitoring system based on Raspberry Pi acting as an Internet gateway.
The temperature sensors located in the hives connected to the Raspberry Pi via a one-wire network.
The authors highlighted the low cost of the solution if just one Raspberry Pi were used for all beehives.
In [29], Murphy et al. used a WSN to monitor a hive colony and collect the most important
information on the activity/environment within a beehive, as well as its surrounding area.
Each beehive was monitored by means of two nodes, and each of the nodes was implemented
through a Waspmote® by Libelium (Zaragoza, Spain). To monitor the honeybees in the hive, several
heterogeneous sensors were used (temperature, CO2 , pollutants, NO2 , etc.). Due to the high number
of sensors, two commercial expansion boards were used, one for each Waspmote. Each sensor was
read at a frequency of six samples/day. The collected samples were stored on an SD card for backup
and were broadcasted over a Zigbee network once every 24 h to the base station. The base station
acted as a bridge, sending the data to the remote server over a 3G/GSM connection. This monitoring
Sensors 2017, 17, 55 4 of 21
Sensors 2017, 17, 55 4 of 21
acted as a bridge, sending the data to the remote server over a 3G/GSM connection. This monitoring
system was used by Murphy et al. to propose several algorithms to automatically detect changes in
system was
the hive andused
warn bythe
Murphy
beekeeper et al.ofto proposecolony
potential several algorithms
threats to automatically
[30]. Based detectofchanges
on the CO2 levels the hive,in
the hive and warn the beekeeper of potential
an algorithm was proposed to predict weather conditions. colony threats [30]. Based on the CO 2 levels of the hive,
an algorithm
Kridi et was proposed to
al. developed predictbased
a system weatheron conditions.
the Arduino platform to measure the temperature of
the beehive by means of the LM35 sensor [31].the
Kridi et al. developed a system based on TheArduino
data were platform to measure
sent wirelessly the temperature
through an XBee-Proof
the beehive by means of the LM35 sensor [31]. The data were sent wirelessly
module to a base station desktop PC connected to the Internet. The collected data were processed through an XBee-Proto
module
find patterns that determined the thermal stress in the hive to detect potential abscondingto
to a base station desktop PC connected to the Internet. The collected data were processed
find patterns that determined the thermal stress in the hive to detect potential absconding conditions.
conditions.
Joe-Air
Joe-Airetetal.
al.developed
developed aa system
system to to monitor
monitor thethe frequency
frequency of of bee
bee activity
activityto
torelate
relatethe
theactivity
activitytoto
environmental factors [32]. It was a wireless system that monitored the frequency
environmental factors [32]. It was a wireless system that monitored the frequency of bee entrances of bee entrances
and exits from the hive together with the temperature and humidity
and exits from the hive together with the temperature and humidity inside and outside the inside and outside thehive.
hive.
According
Accordingto tothe
theauthors,
authors,the the accuracy
accuracy obtained
obtained from the frequency
frequency depended
dependedon onthe
theactivity
activityofofthe
the
hive, with an average error of 10% and
hive, with an average error of 10% and a maximum a maximum value of 20%.

3.3.System
SystemArchitecture
Architecture
Beehive-monitoring
Beehive-monitoring systems systems must must meet
meet several
severalsignificant
significantrequirements:
requirements:(i) (i) they
they must
must useusea
aminimally
minimallyinvasive
invasive method; (ii) they must be operational in remote areas for long periods of time,of
method; (ii) they must be operational in remote areas for long periods
time,
and and
(iii) (iii)
theythey must must
allowallow real-time
real-time monitoring.
monitoring. In In [33],
[33], Kviesis
Kviesis andZacepins
and Zacepinsdescribed
describeddifferent
different
automatic
automaticmonitoring–system
monitoring–system architectures
architectures for for real-time beehive monitoring,
real-time beehive monitoring, distinguishing
distinguishingtheir
their
advantages and disadvantages. In our case, we have chosen a three-level
advantages and disadvantages. In our case, we have chosen a three-level hierarchical model based hierarchical model based on
wireless
on wirelesscommunication.
communication. It isItan
is easily
an easilyadaptable
adaptable model
modelforfor
anyanygeographic
geographic distribution
distributionofofhives,
hives,is
scalable at any
is scalable at any of the three
of the levels,
three and
levels, andmeets
meetsthethe
requirements
requirements indicated
indicated above.
above.
Figure
Figure11shows showsthe thegeneral
general structure
structure of of the beehive-monitoring
beehive-monitoring system,system, WBee,
WBee,described
describedininthis
this
work.
work.At Atthethelowest
lowestlevel,
level, we
we cancan find
find the
the wireless nodes that monitor
monitor thethe hives
hivesandandsend
sendthe
thedata
datainin
wirelessly
wirelesslyusing
usingIEEE IEEE802.15.4.
802.15.4. At At the
the intermediate level, managing
managing the thewireless
wirelessnetworks
networksofofaagroup
group
ofofbeehives,
beehives,we wecancanfindfindanan industrial
industrial computer
computer with 802.15.4 communicationthat
802.15.4 communication thatalso
alsoacts
actsasasthe
the
network’scoordinator.
network’s coordinator.This Thiscomputer
computercontains
containsanan application
application that
that collects
collects thethe information
information sent
sent by bythe
the nodes
nodes of each ofbeehive
each beehive
and stores andthemstores
in athem
local in a local The
database. database. The communication
communication with the
with the global-server
global-server
database database
is executed is executed
through anotherthrough another communication
communication network that allows network that allows
for greater for greater
distances, such as
distances, WIFI,
3G/GPRS, such as 3G/GPRS,Lastly,
or WIMAX. WIFI,theor upper
WIMAX. levelLastly, thethe
contains upper level contains
cloud-server the which
database, cloud-server
groups
database,
several whichand
beehives groups several
contains beehives
a copy of theand contains
local a copy
database of the
of each localofdatabase
group hives. of each group of
hives.

Figure 1.
Figure 1. Architecture
Architecture of
of the
the WBee
WBee system.
system.
Sensors 2017, 17, 55 5 of 21

Sensors 2017, 17, 55 5 of 21


The local computer for each apiary can work in isolation, since it can work as a database server.
The local computer
This characteristic ensures foreasy
eachdeployment
apiary can work in isolation,
and scalability since
of the it can work
system. Thus,as a database
new apiaries server.
can be
This characteristic ensures easy deployment and scalability of the system. Thus,
debugged before being integrated into the system. This local computer at the intermediate level new apiaries can beis
debugged
an importantbefore being integrated
difference from otherinto the system.
wireless This local
monitoring computer
systems in whichat the intermediate
a sink mote doeslevel is an
not store
important difference
information and is only from
usedother wireless between
as a gateway monitoring systems
the WSN andinglobal
which a sink mote
database server.does nota more
Later, store
information and is only used as a gateway
detailed description of each part will be provided. between the WSN and global database server. Later, a
moreThe
detailed description
802.15.4 standard of is each
framed part will be
within theprovided.
area of the wireless personal area networks (WPANs),
with low consumption and cost. As a result, it the
The 802.15.4 standard is framed within area of the gained
has increasingly wirelessrelevance
personalinarea networks
the industrial
(WPANs), with low consumption and cost. As a result, it has increasingly gained
domain. Standard 802.15.4 only defines the physical and media-access control layers. Our applications relevance in the
industrial
directly domain. Standard
communicate with the 802.15.4 only defines
MAC layer, as shown theinphysical
Figure 2.and media-access control layers. Our
applications directly communicate with the MAC layer, as shown in Figure 2.

Figure 2.
Figure 2. Layer model.
Layer model.

Standard 802.15.4 defines two types of topologies: peer-to-peer and star networks. The
Standard 802.15.4 defines two types of topologies: peer-to-peer and star networks.
peer-to-peer topology allows each node of the network to communicate with any other node,
The peer-to-peer topology allows each node of the network to communicate with any other
provided that the node is within its range. The star topology allows the establishment of
node, provided that the node is within its range. The star topology allows the establishment of
communication among the devices and a sole central node that acts as the network coordinator. The
communication among the devices and a sole central node that acts as the network coordinator.
network coordinator is responsible for starting and finishing the connections.
The network coordinator is responsible for starting and finishing the connections.
For this apiary monitoring system, we chose a star topology. Thus, the local computer acts as
For this apiary monitoring system, we chose a star topology. Thus, the local computer acts as the
the coordinator. All nodes installed in the beehives must be accessible for the coordinator. This
coordinator. All nodes installed in the beehives must be accessible for the coordinator. This restriction
restriction does not imply a problem, since the beehives are on field and as a result, there are no
does not imply a problem, since the beehives are on field and as a result, there are no significant
significant obstacles usually. The use of this topology simplifies the communications, as we do not
obstacles usually. The use of this topology simplifies the communications, as we do not need nodes
need nodes acting as routers or a network layer for frame routing.
acting as routers or a network layer for frame routing.
Each node has two unique identifiers—the radio module’s MAC address and a node identifier
Each node has two unique identifiers—the radio module’s MAC address and a node identifier
(nodeID)—that allow it to be located by the application, similar to a hive address. In this way, when
(nodeID)—that allow it to be located by the application, similar to a hive address. In this way,
a radio module is replaced, only the same nodeID needs to be selected in the node. The nodeID has a
when a radio module is replaced, only the same nodeID needs to be selected in the node. The nodeID
length of 16 bits and can select up to 65,536 beehives. The application in the local computer collecting
has a length of 16 bits and can select up to 65,536 beehives. The application in the local computer
the data sent by each hive only needs to know the nodeID. This application maintains a table with
collecting the data sent by each hive only needs to know the nodeID. This application maintains a table
the MAC addresses and the nodeID. These tables are dynamically created when the network is
with the MAC addresses and the nodeID. These tables are dynamically created when the network is
initialized, when a node is connected, and so on.
initialized, when a node is connected, and so on.

3.1. Wireless
3.1. Node
Wireless Node
The wireless
The wireless node,
node, which
which will
will be
be described
described inin detail
detail in
in Section
Section 4,4, is
is based
based on
on the
the Waspmote
Waspmote by by
Libelium [34],
Libelium [34], but
but with
with an
an additional
additional adapting
adapting board
board especially
especially designed
designed forfor the
the connection
connection ofof three
three
humidity and
humidity and temperature
temperature sensors
sensors and
and the
the interconnection
interconnection ofof aa scale.
scale.
The system is designed so that each beehive has its own wireless
The system is designed so that each beehive has its own wireless nodenode
and scale. FigureFigure
and scale. 3 shows 3
a photograph
shows of the system
a photograph attached
of the system to the to
attached beehive. The system
the beehive. is protected
The system with with
is protected an IP65 box. box.
an IP65 The
weighing
The scalescale
weighing display has has
display been keptkept
been so that thethe
so that beekeeper
beekeepercancancheck thethe
check weight
weightof of
thethe
hive onsite.
hive onsite.
Sensors 2017, 17, 55 6 of 21
Sensors 2017, 17, 55 6 of 21

Sensors 2017, 17, 55 6 of 21

Figure 3. Photograph of one of the nodes installed in the beehive.


Figure 3. Photograph of one of the nodes installed in the beehive.

3.2. Local Data Server,Figure 3. Photograph of one of the nodes installed in the beehive.
and Supervisory Control and Data Acquisition System
3.2. Local Data Server, and Supervisory Control and Data Acquisition System
Two Data
3.2. Local applications
Server, andareSupervisory
executed Control
on the and
localData
computer located
Acquisition System in each apiary: a supervisory
Two applications are executed on the local computer located in each apiary: a supervisory control
control and data acquisition system (SCADA), which synchronizes, requests, and processes the data
Two acquisition
and data applications are executed
system (SCADA), onwhich
the local computer requests,
synchronizes, located inand each apiary: the
processes a supervisory
data of the
of the node in each beehive, and MySQL, the world’s most popular open source database [35].
control
node in and
eachdata acquisition
beehive, system the
and MySQL, (SCADA),
world’swhich synchronizes,
most popular open requests, and processes
source database the data
[35]. MySQL is
MySQL is also executed in the cloud data server, and a replica of the local database of each hive is
of the
also node inineach
executed beehive,
the cloud dataand MySQL,
server, and a the world’s
replica of themost
localpopular
databaseopen source
of each hivedatabase
is carried[35].
out.
carried out. This server guarantees an extra level of security in the event of a communications
MySQL
This is also
server executedan
guarantees inextra
the cloud
level data server, in
of security and
thea event
replicaofofa the local databasefailure,
communications of eachsince
hive is
it
failure, since it stores and sends the data acquired in each beehive to the cloud. The local computer is
carriedand
stores out. Thisthe
sends server
data guarantees
acquired in aneachextra leveltoof
beehive thesecurity in the
cloud. The event
local of a communications
computer is an embedded
an embedded industrial computer, which shows a higher protection against environmental
failure, since
industrial it storeswhich
computer, and sends
shows the data acquired
a higher in each
protection beehive
against to the cloud.
environmental The localas
conditions, computer
it must beis
conditions, as it must be placed beside the beehives. The computer communicates directly with the
an embedded
placed beside the industrial
beehives.computer,
The computer which shows a higher
communicates directlyprotection against environmental
with the coordinator node of the
coordinator node of the wireless network using a USB interface, as shown in Figure 4. We used
conditions,
wireless as it must
network usingbea placed beside the
USB interface, beehives.
as shown The computer
in Figure 4. We used communicates directly
Libelium’s “XBee with the
USB-Serial
Libelium’s “XBee USB-Serial gateway” module as the coordinator of the network and gateway [36].
coordinator
gateway” node as
module of the
the coordinator
wireless network using a and
of the network USBgateway
interface, as shown in Figure 4. We used
[36].
Libelium’s “XBee USB-Serial gateway” module as the coordinator of the network and gateway [36].

Figure 4. Local database server.

Figure 4.
4. Local database server.
The software used for the executionFigure ofLocal database was
the SCADA server.
developed under Laboratory Virtual
Instrumentation Engineering Workbench (LabVIEW), an environment developed by National
The software used for the execution of the SCADA was developed under Laboratory Virtual
Instruments (Austin,
The software usedTX, USA)
for the that uses
execution of thea SCADA
graphic was programming
developed underlanguage. The SCADA
Laboratory Virtual
Instrumentation Engineering Workbench (LabVIEW), an environment developed by National
communicates with
Instrumentation MySQL Workbench
Engineering using the LabVIEW
(LabVIEW), SQL/ODBC library developed
an environment to store the collected
by National
Instruments (Austin, TX, USA) that uses a graphic programming language. The SCADA
information (Austin,
Instruments [37]. TheTX,
application
USA) thathas
usesone simpleprogramming
a graphic user interfacelanguage.
in which The
it is SCADA
possiblecommunicates
to control the
communicates with MySQL using the LabVIEW SQL/ODBC library to store the collected
data acquisition
with MySQL usinginterval
the for the data SQL/ODBC
LabVIEW in the nodes (Figure
library 5),
to and
storea user-friendly
the collectedpart is responsible
information [37].
information [37]. The application has one simple user interface in which it is possible to control the
for the
The communication
application has onewith eachuser
simple of the nodes, in
interface thewhich
data processing,
it is possibleand
to their
controlstorage.
the data acquisition
data acquisition interval for the data in the nodes (Figure 5), and a user-friendly part is responsible
interval for the data in the nodes (Figure 5), and a user-friendly part is responsible for the
for the communication with each of the nodes, the data processing, and their storage.
communication with each of the nodes, the data processing, and their storage.
The operation of the SCADA application is shown in Figure 6. Firstly, certain parameters are set
in the application, such as the initialization of the coordinator node. Then, the application waits for the
measurement interval programmed by the user. Once the wait is over, the broadcast for the beginning
of the data acquisition is sent to the nodes so that all acquired samples are correlated, and afterward,
the samples are requested from each node. If no data have been received from a specific node, they are
requested again up to three times.

Figure 5. SCADA user interface.

Figure 5. SCADA user interface.


The software used for the execution of the SCADA was developed under Laboratory Virtual
Instrumentation Engineering Workbench (LabVIEW), an environment developed by National
Instruments (Austin, TX, USA) that uses a graphic programming language. The SCADA
communicates with MySQL using the LabVIEW SQL/ODBC library to store the collected
information [37]. The application has one simple user interface in which it is possible to control
Sensors 2017, 17, 55
the
7 of 21
data acquisition interval for the data in the nodes (Figure 5), and a user-friendly part is responsible
for the communication with each of the nodes, the data processing, and their storage.

Sensors 2017, 17, 55 7 of 21

The operation of the SCADA application is shown in Figure 6. Firstly, certain parameters are set
in the application, such as the initialization of the coordinator node. Then, the application waits for
the measurement interval programmed by the user. Once the wait is over, the broadcast for the
beginning of the data acquisition is sent to the nodes so that all acquired samples are correlated, and
afterward, the samples are requested Figureeach
from 5. SCADA
node. user
nointerface.
Figure 5. SCADA userIfinterface.
data have been received from a specific
node, they are requested again up to three times.

Figure 6. SCADA
Figure 6. SCADA flowchart.
flowchart.

3.3.
3.3. Cloud
Cloud Database
Database Server
Server
A
A replica
replica ofofthe
thelocal
localdatabase
databaseofof
each
each beehive is carried
beehive out out
is carried in the
in cloud database
the cloud server.
database This
server.
This server ensures an extra level of security, providing both a backup and access the informationthe
server ensures an extra level of security, providing both a backup and access the information of of
beehives and sending the collected data to the cloud. As a result, through this server, the
the beehives and sending the collected data to the cloud. As a result, through this server, the beekeeper beekeeper
can accessall
can access alldata
dataabout
about thethe beehives
beehives fromfrom anywhere
anywhere through
through the Internet
the Internet and
and can can
also also receive
receive alarms
alarms or other actions required by the beehives with an automated analysis of these
or other actions required by the beehives with an automated analysis of these data. Figure 7 shows the data. Figure 7
shows the temperature and humidity data of a beehive stored in the cloud database
temperature and humidity data of a beehive stored in the cloud database server. The battery level and server. The
battery level regarding
information and information
whether regarding
there arewhether
errors inthere are errors
the data in thefrom
acquisition datanode
acquisition
are alsofrom node
stored in
are also stored
this database. in this database.
Sensors 2017, 17, 55 8 of 21
Sensors 2017, 17, 55 8 of 21

Figure 7. View of a query to the cloud database server.


Figure 7. View of a query to the cloud database server.

4. Implementation of the Wireless Node


4. Implementation of the Wireless Node
The wireless node replaces the data acquisition and processing designed to monitor the
The wireless node replaces the data acquisition and processing designed to monitor the
thermoregulatory capacity of the honeybee colonies in hives with open-screened bottom boards [26].
thermoregulatory capacity of the honeybee colonies in hives with open-screened bottom boards [26].
A new node and a different system architecture have been designed. In the previous system, three
A new node and a different system architecture have been designed. In the previous system, three LM35
LM35 temperature sensors were installed in different areas of each beehive together with two SHT15
temperature sensors were installed in different areas of each beehive together with two SHT15 sensors,
sensors, which can measure the hive’s temperature and humidity. An SHT15 was placed on the
which can measure the hive’s temperature and humidity. An SHT15 was placed on the upper side of
upper side of the beehive by the hole leading to the air chamber located under the lid. The other
the beehive by the hole leading to the air chamber located under the lid. The other SHT15 sensor was
SHT15 sensor was placed under the hive to measure the outer temperature and humidity, allowing
placed under the hive to measure the outer temperature and humidity, allowing it to compare these
it to compare these data with the temperature and humidity inside the beehive. This system was
data with the temperature and humidity inside the beehive. This system was installed in 10 hives.
installed in 10 hives. Five of the hives had conventional closed bottom boards and the other five had
Five of the hives had conventional closed bottom boards and the other five had open-screened bottom
open-screened bottom boards. The electronic system was based on the Arduino platform and stored
boards. The electronic system was based on the Arduino platform and stored the data in a microSD
the data in a microSD memory. The beekeeper had to manually copy the content of the microSD card
memory. The beekeeper had to manually copy the content of the microSD card into his/her laptop
into his/her laptop for it to be processed later on. Thus, a new system based on a wireless sensor
for it to be processed later on. Thus, a new system based on a wireless sensor network was designed
network was designed so that the measurement data obtained by each node were transmitted to a
so that the measurement data obtained by each node were transmitted to a local server and from
local server and from there, to the cloud database server. In this way, the beekeeper can see and
there, to the cloud database server. In this way, the beekeeper can see and download the measurement
download the measurement data for temperature, relative humidity, and weight from the Internet
data for temperature, relative humidity, and weight from the Internet and more importantly, do so
and more importantly, do so non-intrusively, not interfering with the work conditions of the
non-intrusively, not interfering with the work conditions of the beehive.
beehive.
The wireless node is based on the Waspmote mote by Libelium [34]. We selected this mote because
The wireless node is based on the Waspmote mote by Libelium [34]. We selected this mote
it has the necessary characteristics to implement the most suitable wireless node to monitor a beehive.
because it has the necessary characteristics to implement the most suitable wireless node to monitor
Among these characteristics, the following are worth mentioning: ultra-low power (7 µA hibernation
a beehive. Among these characteristics, the following are worth mentioning: ultra-low power (7 µA
mode), allowing the connection of any sensor using any wireless technology to any cloud platform;
hibernation mode), allowing the connection of any sensor using any wireless technology to any
the ability to program it on the air (OTA); encryption libraries (AES, RSA); and several peripherals that
cloud platform; the ability to program it on the air (OTA); encryption libraries (AES, RSA); and
will be mentioned below. Another advantage is that it allows the connection of several radio modules,
several peripherals that will be mentioned below. Another advantage is that it allows the connection
depending on the transmission distance. In this way, by connecting the most appropriate radio module,
of several radio modules, depending on the transmission distance. In this way, by connecting the
it is possible to use long-range technologies (3G/GPRS/LoRaWAN/LoRa/Sigfox/868/900MHz), and
most appropriate radio module, it is possible to use long-range technologies
in the case of isolated beehives, medium-range technologies (ZigBee/802.15.4/Wi-Fi) and short-range
(3G/GPRS/LoRaWAN/LoRa/Sigfox/868/900MHz), and in the case of isolated beehives,
technologies (RFID/NFC/Bluetooth 4.0). On the other hand, the Waspmote platform includes the
medium-range technologies (ZigBee/802.15.4/Wi-Fi) and short-range technologies
Waspmote-IDE (integrated development environment) used to program Waspmote [38]. This IDE
(RFID/NFC/Bluetooth 4.0). On the other hand, the Waspmote platform includes the Waspmote-IDE
(integrated development environment) used to program Waspmote [38]. This IDE offers a series of
Sensors 2017, 17, 55 9 of 21

Sensors 2017, 17, 55 9 of 21


offers a series of function libraries to easily control the different peripherals, such as the microSD card,
RTC, UART,
function and thetodigital
libraries easily I/O.
control the different peripherals, such as the microSD card, RTC, UART,
andMurphy
the digital et al. [29] also used the Waspmote for the implementation of a heterogeneous WSN, which
I/O.
monitors the internal
Murphy et al. [29]conditions
also usedofthe a beehive
Waspmote colony though
for the a diverse setofofa sensors.
implementation Murphy
heterogeneous et al.
WSN,
which
used monitors
theSensors
Plug2017, the
& Sense!
17, 55
internal
version conditions
of Waspmote of a beehive
and the colony
sensors though
offered a diverse
by set
Libelium of
forsensors.
that Murphy
version
9 of 21
with
theetappropriate
al. used theconnectors.
Plug & Sense! Thisversion
versionofofWaspmote
Waspmoteand hasthe sensors offered
a drawback: If many by sensors
Libelium of for
the that
same
version
type and awith
function the
weighing appropriate
libraries to easily
scale need connectors.
control
to bethe This version
different
connected of Waspmote
peripherals,
through has
such asinterface
a serial the a drawback:
microSD asIfin
card, RTC,
RS-232, many
our sensors
UART, case, it is
of theand
necessary same theuse
to digital
type two I/O.
and a weighing per
Waspmotes scale needas
node, todone
be connected
by Murphy through
et al.ainserial
her interface RS-232, asThus,
implementation. in
our case, Murphy
it is et al. [29] also
necessary to usedtwo
use the Waspmote
Waspmotes for the
per implementation
node, as done of aby
heterogeneous
Murphy et WSN,
al. in her
we have decided to use the standard version of Waspmote and develop an adapter board in order
which monitors the internal conditions of a beehive colony though a diverse set of sensors. Murphy
toimplementation.
connect
et al.all sensors
used
Thus,
the Plug
we have
through
& Sense!thedecided
version
to use
digitalofI/O the standard
ports.
Waspmote This
and theboardversion of Waspmote
alsooffered
sensors includes and develop
the adaptation
by Libelium
an
for that circuit
adapter
for levels board
RS-232 in order to connect all sensors through the digital I/O ports. This board also includes
version withtothe 3.3V CMOS connectors.
appropriate to connectThis the version
weighing scale to the
of Waspmote has aWaspmote
drawback: IfUART. The resulting
many sensors
the adaptation
wireless ofnode
the same circuit
will be and
type for alevels
called RS-232
UcoBee.
weighing toneed
We
scale 3.3V
willtoCMOS
describeto connect
be connected both thethe
through aweighing
hardware scalethe
and
serial interface to the Waspmote
software
RS-232, as in of the
UART.
UcoBeeour The resulting
case, itnode
wireless below. to use two Waspmotes per node, as done by Murphy et al. in her and
wireless
is necessary node will be called UcoBee. We will describe both the hardware
the software of the UcoBee
implementation. Thus, we wireless node below.
have decided to use the standard version of Waspmote and develop an
adapterDescription
4.1. Hardware board in order Nodeto connect all sensors through the digital I/O ports. This board also includes
4.1. Hardware
the adaptationDescription Node
circuit for levels RS-232 to 3.3V CMOS to connect the weighing scale to the Waspmote
This
UART.sectionThe will include
resulting a description
wireless node will beof the UcoBee.
called hardware We of the
will UcoBee
describe bothwireless node,and
the hardware Version 1,
This section
shown in Figure 8.
the software will
of the include
UcoBee a description
wireless node of
below.the hardware of the UcoBee wireless node, Version 1,
shown in Figure 8.
4.1. Hardware Description Node
This section will include a description of the hardware of the UcoBee wireless node, Version 1,
shown in Figure 8.

Figure 8. UcoBee
Figure8. wireless node.
UcoBee Version 1 wireless node.

Figure 8. UcoBee Version 1 wireless node.


Theblock
The blockdiagram
diagramofofthe
thewireless
wireless node
node is
is shown
shown in in Figure
Figure 9.
9. The
Thefollowing
followingblocks
blockscan
canbebe
distinguished: Waspmote
The Waspmote
block diagram module, XBEEnode
of the XBEE
wireless PROis module, in adapter
shownadapter
Figure 9. board, microSD
ThemicroSD
following memory
blocks can card,
be battery,
distinguished: module, PRO module, board, memory card,
battery, and external
distinguished: power supply.
Waspmote module, XBEE PRO module, adapter board, microSD memory card,
and external power supply.
battery, and external power supply.

Figure9.9.UcoBee
Figure UcoBee block
blockdiagram.
diagram.
Figure 9. UcoBee block diagram.
Sensors 2017, 17, 55 10 of 21

4.1.1. Power Supply and Battery Block


Due to the closeness of the main 230 VAC power supply to the beehive apiary, two power supply
Sensors 2017, 17, 55 10 of 21
units, which will be mentioned below, were used. If this were not available, the node could receive its
power supply
4.1.1. Power through
Supply aand
system based
Battery Blockon a solar panel.
For the operation of the system installed in each beehive, two power voltages were needed:
Due to the closeness of the main 230 VAC power supply to the beehive apiary, two power
on the one hand, a power supply of 5 VDC/1 A with a miniUSB connector to supply the power
supply units, which will be mentioned below, were used. If this were not available, the node could
to the Waspmote and another one of 12 VDC/0.5 A for the weighing scale with a female jack
receive its power supply through a system based on a solar panel.
connector.ForThe weighingof scale
the operation includes
the system a rechargeable
installed in each beehive,lithium-ion
two power 6voltages
V andwere2500needed:
mAh on battery,
and athe 3.7one
V/2300
hand, a power supply of 5 VDC/1A with a miniUSB connector to supply the power to the the
mAh rechargeable lithium-ion battery was connected to the Waspmote. Both
Waspmote
Waspmote and and
the another
weighing
onescale
of 12 included
VDC/0.5A afor control circuitscale
the weighing for loading the battery
with a female with the
jack connector. Thepower
supply. In thisscale
weighing way,includes
the wireless node could
a rechargeable continue
lithium-ion operating
6 V and 2500 mAh even if there
battery, andwere a power
a 3.7 V/2300 mAhoutage.
If thisrechargeable
happened, lithium-ion battery was
the measurement dataconnected
would betostoredthe Waspmote. Both thecard
on the microSD Waspmote andon,
and later thewhen
weighing scale included a control circuit for loading the battery with the power
the power returned, they would be transferred to the local computer. The addition of the batteries, supply. In this way,
the wireless node could continue operating even if there were a power outage. If this happened, the
together with the power supply through a solar panel, allow the set of the wireless node and the
measurement data would be stored on the microSD card and later on, when the power returned,
weighing scale to be used in areas where there is no available electricity network near the apiary.
they would be transferred to the local computer. The addition of the batteries, together with the
4.1.2.power supply through a solar panel, allow the set of the wireless node and the weighing scale to be
Humidity and Temperature Sensors
used in areas where there is no available electricity network near the apiary.
In order to measure the humidity inside the beehives, three SHT15 sensors by Sensirion were
used 4.1.2.
[39].Humidity
They were and chosen
Temperaturedue Sensors
to their excellent reliability and stability and their low power
consumption. These sensors allow
In order to measure the humidity the measurement of temperature
inside the beehives, by means
three SHT15 of aby
sensors band-gap
Sensirionsensor
were and
of theused
relative
[39].humidity
They were through
chosenadue capacitive
to theirsensor. The
excellent SHT15 sensor
reliability includes
and stability anda 14-bit analog/digital
their low power
consumption.
converter (ADC) and These sensors
a serial allow the
interface measurement
circuit. The ADC of temperature
converts theby means
signal of a band-gap
generated sensor
by both sensors
into aand of the
digital relative
signal andhumidity
transfersthrough a capacitive
the results sensor. Thethrough
of the conversion SHT15 sensor includes
the serial a 14-bit
interface. In this
analog/digital converter (ADC) and a serial interface circuit. The ADC converts
way, a better-quality signal, quick response, and better immunity to external disturbances (EMC) are the signal generated
by both sensors into a digital signal and transfers the results of the conversion through the serial
obtained. Within the SHT1x family, the SHT15 is the sensor with a higher accuracy, providing an error
interface. In this way, a better-quality signal, quick response, and better immunity to external
of ±0.3 ◦ C for temperature and ±2% for relative humidity.
disturbances (EMC) are obtained. Within the SHT1x family, the SHT15 is the sensor with a higher
With the providing
accuracy, Plug & Sense!an errorVersion of for
of ±0.3 °C Waspmote
temperatureby Libelium,
and ±2% forwe would
relative have needed to use the
humidity.
808H5V5 With humidity sensor and the MCP9700A temperature sensor.
the Plug & Sense! Version of Waspmote by Libelium, we would have needed These sensors are analog,
to use theso they
would have needed
808H5V5 humidityto be connected
sensor and the to the analog
MCP9700A channels sensor.
temperature of the ATmega1281.
These sensors are In analog,
order tosoobtain
they the
highest possible
would resolution
have needed to beinconnected
the ADC to of the
theanalog
microcontroller,
channels ofWaspmote Plug &InSense!
the ATmega1281. must
order to include
obtain
the amplification
a signal highest possibleboard.
resolution in the ADC
Regardless, dueoftothethemicrocontroller,
fact that the ADC Waspmote Plug & Sense! is
of the ATmega1281 must
a 10-bit
converter, a worse resolution would be obtained; since SHT15 sensors include an internal 14-bitisADC
include a signal amplification board. Regardless, due to the fact that the ADC of the ATmega1281
a 10-bit converter,
and because a worsethe
they are beside resolution would be
measurement obtained;
sensor, sincesignal-noise
a better SHT15 sensors include
ratio an internal
is obtained. On the
14-bit ADC and because they are beside the measurement sensor, a better signal-noise ratio is
other hand, the cost of the node is reduced, as Waspmote Plug & Sense! is more expensive.
obtained. On the other hand, the cost of the node is reduced, as Waspmote Plug & Sense! is more
The reading of and request for data is executed through a serial interface based on I2 C known
expensive.
as Sensibus,Theas shown
reading of in
andFigure
request10.forThis
data interface
is executeduses two asignals:
through SCK and
serial interface DATA.
based on I²CSCK
knownis used
as to
synchronize
Sensibus,theas communication
shown in Figure 10. between the microcontroller
This interface uses two signals: andSCKthe and
SHT15 DATA.sensor.
SCKThe DATA
is used to pin
is used to transfer
synchronize thedata to or from between
communication the sensor. The SHT15 generates
the microcontroller the measurement
and the SHT15 sensor. The DATAdata with
pin the
falling edgeto
is used oftransfer
SCK. Thus,
data tothe
or microcontroller
from the sensor. The needs to read
SHT15 the data
generates bits in the rising
the measurement data edge of SCK.
with the
falling edge of SCK. Thus, the microcontroller needs to read the data
The implementation of the communication protocol has been implemented through software using bits in the rising edge of SCK.
The pins
two I/O implementation of the communication protocol has been implemented through software using
of the microcontroller.
two I/O pins of the microcontroller.

Figure Communication
10.10.
Figure Communicationinterface betweenWaspmote
interface between Waspmote and
and SHT15.
SHT15.
Sensors 2017, 17, 55 11 of 21

The output digital signal is internally calibrated by means of calibration coefficients programmed
in an internal OTP
Sensors memory
2017, 17, 55 in the chip. This increases the stability of the signal to the internal 11 of 21 variations

due to the changes in temperature.


The output digital signal is internally calibrated by means of calibration coefficients
To Sensors
reduce
programmed
2017,cost
17, 55and
in anobtain
internal aOTP
reliable
memory and easy
in the connection
chip. This increasesforthethe sensor,
stability wesignal
of the designed
to the a PCB in
11 of 21
which theinternal
SHT15 has been
variations duemounted
to the changes and a male connector with a block device to connect it to the
in temperature.
expansion boardThe output
To reduce
has been digital
cost and signala reliable
obtain
included, isasinternally
canandbeeasycalibrated
seenconnection by
in Figure for means
the
11a. of we
sensor,
Due calibration
todesigned acoefficients
PCB in of bees to
the tendency
which the SHT15
programmed has beenOTP
in an internal mounted
memory and ainmale connector
the chip. with a block
This increases thedevice to connect
stability it to the
of the signal to the
cover any foreign object inside their hive with propolis (resinous material collected by bees from bugs
expansion
internal board due
variations has been
to theincluded,
changes as in can be seen in Figure 11a. Due to the tendency of bees to
temperature.
from treescover
and used
any
To reduce
as
foreign a cement
objectobtain
cost and
toarepair
inside their and
hive
reliable
maintain
with
and propolis
easy
the hive),
(resinous
connection
the sensors
for material collected
the sensor,
have been
by bees
we designed afrom
protected by
PCB in
enclosing them
bugs in
from perforated
trees and queen
used as a expedition
cement to cages
repair andNicot ® , asthe
maintain shown
hive), in
theFigure
sensors 11b.
have been
which the SHT15 has been mounted and a male connector with a block device to connect it to the
protectedboard
expansion by enclosing them
has been in perforated
included, queen
as can expedition
be seen cages11a.
in Figure Nicot , astoshown
Due in Figureof
the tendency
® 11b.
bees to
cover any foreign object inside their hive with propolis (resinous material collected by bees from
bugs from trees and used as a cement to repair and maintain the hive), the sensors have been
protected by enclosing them in perforated queen expedition cages Nicot®, as shown in Figure 11b.

(a) (b)
Figure 11. (a) SHT15 sensor mounted in PCB; (b) Cage for the protection of SHT15 sensors.
Figure 11. (a) SHT15 sensor mounted in PCB; (b) Cage for the protection of SHT15 sensors.
4.1.3. Weighing Scale
(a) (b)
4.1.3. Weighing
TheScale
weighing scale consists of a metallic 50 cm × 40 cm frame with a 150 kg load cell associated.
Figureis11.
This weight (a) SHT15
more sensor mounted
than enough, in PCB;of
as the weight (b)a Cage for the
beehive canprotection
be up to of
80SHT15 sensors.
kg. The load cell is
The weighing
connected toscale
a BR80 consists
display by ofBaxtran
a metallic 50 cm
[40]. The × 40
display hascm framescreen,
a six-digit with aso150 it can kgdisplay
load up celltoassociated.
4.1.3.
This weight Weighing
is more Scale
100,000 different values. The resolution can be set up from 1 kg to 5 g. In our case, we have selected aload cell is
than enough, as the weight of a beehive can be up to 80 kg. The
connectedresolution
toThe
a BR80of 100
weighing g,
display as we
scale by considered
Baxtran
consists it to beThe
[40].
of a metallic sufficient × for
display
50 cm later
40 cmhas analysis ofathe
a six-digit
frame with 150 measurements,
screen,
kg load socell
it canso that
display up to
associated.
it is possible to determine, for example, whether the blooming period (and as a result, the bees’
100,000 This
different
weightvalues.
is moreThe thanresolution
enough, as can be set of
the weight upa from
beehive 1 kg cantobe5 upg. In ourkg.case,
to 80 The we loadhave
cell isselected
honey production) is over.
connected
a resolution ofThe to a
100BR80 BR80 display
g, asdisplay
we considered by Baxtran [40]. The display
it to be sufficient has a
for latersix-digit screen,
analysis so
of the it can display
measurements, up to so that
has a DB9 connector that periodically sends the weight values through a
100,000 different values. The resolution can be set up from 1 kg to 5 g. In our case, we have selected a
it is possible toRS-232
series determine, foraccording
interface, example, whether
to Figure theframe
12. The blooming
consistsperiod
of seven(andbytes.asThea result, the bees’ honey
first character
resolution of 100 g, as we considered it to be sufficient for later analysis of the measurements, so that
sentisisover.
“=”, which is used to synchronize with the receiver (Waspmote) and to note that the six digits
production)
it is possiblethe
regarding tovalue
determine, for example,
of the weight will be thenwhetherThe thefirst
blooming period (and as a result, the bees’
Thehoney
BR80 display
production) has a DB9 connector
is over. thatsent.
periodically digit is most
sends the significant,
weight and values as specified
through a series
by standard RS-232, all of the characters are codified in ASCII code. The transmission speed can be
RS-232 interface,
configured according
The BR80 from 1200 to
display Figure
has9600
to a DB9 12. Thelowest
connector
bauds. The frame consists
thatspeed
periodically
has beenof sends
seven bytes.
the
selected ourThe
inweight case first
values character
the a sent is
through
to allow
“=”, whichseries RS-232 interface, according to Figure 12. The frame consists of seven bytes.
Waspmote to receive the measurements from the three SHT15 sensors without overflow occurring in regarding
is used to synchronize with the receiver (Waspmote) and to note that The
the first
six character
digits
sent
the value of theis “=”,
the which
reception
weight is used
buffer
will ofbeitsto synchronize
UART.
then sent. The with thedigit
first receiver (Waspmote)
is most and to
significant, noteasthat
and the six digits
specified by standard
regarding the value of the weight will be then sent. The first digit is most significant, and as specified
RS-232, all of the characters are codified in ASCII code. The transmission speed can be configured
by standard RS-232, all of the characters are codified in ASCII code. The transmission speed can be
from 1200 to 9600 bauds. The lowest speed has been selected in our case to allow the Waspmote to
configured from 1200 to 9600 bauds. The lowest speed has been selected in our case to allow the
Figure 12. Frame format sent by the weighing scale.
receive Waspmote
the measurements
to receive the from the three SHT15
measurements from thesensors
three SHT15withoutsensors overflow occurring
without overflow in the reception
occurring in
buffer oftheits UART.
reception buffer
4.1.4. Waspmote Module of its UART.

The most important component of the wireless node is the Waspmote mote by Libelium. This
mote is based on the ATmega1281 microcontroller by Atmel (San Jose, CA, USA). The ATmega1281
includes a 128 kB FLASHFigure EPROM for theformat
12. Frame memory
sent of
by the program,scale.
the weighing 8 kB SRAM to store data, a
module to mount a microSDFigure 12. Frame
card, and aformat sentClock
Real Time by the weighing
(RTC). scale.
The size of the Flash memory is
more
4.1.4. than enough
Waspmote to store the application that controls the node, just as happens with the SRAM to
Module
temporarily
4.1.4. Waspmote store the data obtained by the sensors. In case more storage capacity is necessary, the
Module
The most
microSD cardimportant component of the wireless node is the Waspmote mote by Libelium. This
can be used.
mote is
The mostThe based on
important
Waspmotethe ATmega1281
component microcontroller
has a built-inofRTC.
the The
wireless
RTC we bychose
node Atmel (San
is was
the Jose,
Waspmote
the CA, USA).
DS3231SN mote TheLibelium.
by
by Maxim ATmega1281
(San Jose, This mote
includes
CA, USA)a 128 kB operates
which FLASH at EPROM
a for the
frequency of memory
32.768 Hz. of
Thisthe program,
RTC can be 8 kB SRAMtotogenerate
programmed store data,
an aincludes
is based on the ATmega1281 microcontroller by Atmel (San Jose, CA, USA). The ATmega1281
module
alarm toto collect
mountthe a microSD card,
values of the and aand
sensors Real Timeother
execute Clockactions,
(RTC).such
Theassize of the
sending theFlash memory
values of the is
a 128 kBmore
FLASHthan EPROM
enough tofor thethe
store memory of the
application thatprogram, 8 kB
controls the SRAM
node, just astohappens
store data,
with athe
module
SRAM to to mount
a microSD card, and
temporarily a Real
store Time
the data Clockby
obtained (RTC). The size
the sensors. of the
In case Flash
more memory
storage is ismore
capacity than enough
necessary, the to
store themicroSD
application
card canthat controls the node, just as happens with the SRAM to temporarily store the
be used.
data obtained Theby
Waspmote has aIn
the sensors. built-in RTC. The
case more RTC capacity
storage we chose iswas the DS3231SN
necessary, by Maximcard
the microSD (San can
Jose,be used.
The Waspmote has a built-in RTC. The RTC we chose was the DS3231SN by Maxim an
CA, USA) which operates at a frequency of 32.768 Hz. This RTC can be programmed to generate (San Jose,
alarm to collect the values of the sensors and execute other actions, such as sending the values of the
CA, USA) which operates at a frequency of 32.768 Hz. This RTC can be programmed to generate
an alarm to collect the values of the sensors and execute other actions, such as sending the values of
Sensors 2017, 17, 55 12 of 21

the measurement data to the local server. Also, it allows Waspmote to use energy-saving modes and
allows it to wake up at the required moment.
Another advantage of the Waspmote is that it has several expansion connectors. The adapter
board, which will be described in a later section, will be connected to these expansion connectors.
The Waspmote allows three power supply options: battery (3.3–4.2 V), USB connector (5 V), and solar
panel (6–12 V @ 280 mA). When in operation, its consumption is 17 mA, whereas in the sleep mode,
it is 33 µA, although due to the closeness of the mains to the colony, the power consumption does not
represent a problem. Otherwise, the battery and the solar panel to charge the battery could be used,
as was mentioned above.
An XBee-802.15.4-Pro module [41] was installed on the radio socket, with a maximum power
consumption during transmission of 100 mW and a transmission frequency of 2.4 GHz. If a 5 dBi
antenna is connected, its range reaches 7 km, allowing for perfect communication with the local server,
as this is usually at a distance of no more than 20 m. If the bee colony had to be placed in a rural
area far from the local server, a long-range radio module, such as GSM/GPRS, LoRaWAN, or LoRa,
could be used.
Waspmote has a built-in LIS3331LDHS acceleration sensor by STMicroelectronics (Geneva,
Switzerland), which informs the mote of acceleration variations experienced on each one of the
three axes (X, Y, Z). As a result, it is possible to know whether anyone has moved the beehive or even
worse, if anyone has tried to steal it. On the other hand, it is possible to connect an optional module
with a GPS receiver to a Waspmote, which allows the beekeeper to know the exact outer location of the
mote at any time. These two options were not used in the current application, but we are planning to
include them in a later version to find out whether the beehive has been stolen and to know its exact
location when searching for it. The accelerometer and the GPS module also affected the final choice of
the Waspmote for the implementation of the wireless node.

4.1.5. Adapter Board


This board has been designed to be able to connect the three SHT15 temperature and humidity
sensors and the RS-232 transmission serial signal generated by the weighing scale. Four connectors
4-way of 2 mm pitch for PCB assembly in right angle are used. These ensure a safe connection of the
cable to the board, as they have a locking mechanism. The cable used for the connection is a twisted
pair cable with sheet jacket by Alpha Wires (Elizabeth, NJ, USA), and the conductors are stranded wire
tinned copper 24 AWG cables.
As mentioned, another function carried out by the adapter board is to adapt the RS-232 levels
of the weighing scale’s transmission signal to the UART of the Waspmote, which is 3.3 V CMOS.
The weighing scale does not include a RS-232 compatible driver, but it generates the signal with
an operational amplifier supplied with a unipolar supply voltage of 10 V. Thus, if the transmission
signal is idle or represents a data bit with value 1, it has a value of 0 V, but if it begins to transmit the
start bit, or if it represents a data bit with value 0, it has a value of 8 V. As a result, the transmission
signal meets the RS-232 standard for value 0, which corresponds to a voltage higher than +3 V. The fact
that value 1 is represented by means of a voltage of 0 V does not imply any problem in our design,
even though it does not meet standard RS-232, which states that the voltage must be lower than −3 V.
On the contrary, as will be explained below, it will allow us to simplify the adapter circuit.
As Waspmote uses a supply voltage of 3.3 V, the reception input voltage range of the UART varies
from 0 V to 3.3V. Therefore, the transmission signal of the weighing scale (8 V) cannot be directly
connected to the UART (3.3 V max.). To adapt the voltage levels, the circuit shown in Figure 13
was designed. It has two bipolar transistors which, besides reducing the voltage from 8 V to 3.3 V
approximately, inverts the logic value to meet the RS-232 standard.
To simplify the analysis, let us suppose that the Q2 transistor is saturated. Then, its function will
be exposed and its operation will be analyzed. If the TXD_SCALE signal is at 0 V (idle or data bit with
value 0), it does not drive transistor Q1. Thus, RXD_UART will be at a high logic level (3.3 V) through
Sensors 2017, 17, 55 13 of 21

resistance R1. If, to the contrary, TXD_SCALE is at 8 V (start bit or data bit with value 1), the transistor
gets saturated, and RXD_UART will be at a low logic level.
As the weighing scale periodically transmits the value of the weight every second and our
applicationSensors
takes weight
2017, 17, 55 into consideration every 5 min, another transistor in a totem-pole 13 of 21mode was

connected with the previous one. The base is controlled through a digital output of the Waspmote,
As the weighing scale periodically transmits the value of the weight every second and our
which actsapplication
as reception takes enable. If ENA_RXD
weight into consideration is at a5 low
every min, logic
another level, the Q2
transistor in a transistor will be cut off.
totem-pole mode
Then, independently
was connectedfrom the previous
with the state ofone.
the The
Q1 base
transistor, RXD_UART
is controlled through a will
digitalbeoutput
at a high
of thelogic level
through R1 Waspmote,
resistance. which actsthe
If on as reception enable.ENA_RXD
other hand, If ENA_RXDisis active
at a lowatlogic level,logic
a high the Q2level,
transistor
the will
Q2 transistor
be cut off. Then, independently from the state of the Q1 transistor, RXD_UART will be at a high logic
gets saturated and the value of RXD_UART will depend on TXD_SCALE, as
level through R1 resistance. If on the other hand, ENA_RXD is active at a high logic level, the Q2
previously mentioned.
In this way, the power consumption is reduced, and since Q2 is cut off
transistor gets saturated and the value of RXD_UART will depend on TXD_SCALE, as previouslywhen the Waspmote is not
reading the weight In
mentioned. data,this there willpower
way, the be a consumption
high resistance between
is reduced, GNDQ2and
and since theoffpositive
is cut when the pole of the
Waspmote
supply voltage, is notthe
despite reading the weight
saturation data, there will be a high resistance between GND and the
of Q1.
positive pole of the supply voltage, despite the saturation of Q1.
+3.3V

R1

R2 RXD_UART
Q1
TXD_SCALE

R3

R4
Q2
ENA_RXD

R5

GND

13. Adaptation
FigureFigure circuit
13. Adaptation circuitof levelsRS-232
of levels RS-232 to 3.3
to 3.3V V CMOS.
CMOS.

As previously mentioned, the Waspmote includes a microSD card. This is used to store the data
As previously
regarding the mentioned,
measurements theofWaspmote includes
the sensors and a microSD
the weighing scale if card. This is used
communication to local
with the store the data
regarding server is lost. In the expansion
the measurements of the board,
sensors a switch,
and the connected
weighingto a digital
scale input of the Waspmote,with
if communication has the local
been included to enable the writing operation and to inhibit it, in order to remove it safely.
server is lost. In the expansion board, a switch, connected to a digital input of the Waspmote, has been
Additionally, a connector of the same type as those used to connect the sensors and the
included to enablescale
weighing the has
writing operation
been added to the and to inhibit
adaptor it, in
board. This order is
connector toconnected
remove to it the
safely.
Waspmote
Additionally, a connector of the same type as those used to connect
microcontroller’s two analog channels. In this way, it will be possible to connect two analog the sensors
output and the
sensors (e.g., the CO
weighing scale has been added to the adaptor board. This connector is connected topower
2 sensors or a microphone to record sound). This connector can be the Waspmote
supplied if a signal amplification of the sensors should be necessary.
microcontroller’s two analog channels. In this way, it will be possible to connect two analog output
sensors (e.g.,
4.2. the CO2Node
Software sensors or a microphone to record sound). This connector can be power supplied
if a signal amplification of the sensors should be necessary.
The application executed in the wireless node was developed using the IDE-Waspmote open
source-based environment. C language is used and several libraries are provided by the
4.2. Software Node
manufacturer. As in all Arduino environments, the application has a SETUP and a loop, which is
indefinitely executed.
The application executed in the wireless node was developed using the IDE-Waspmote open
Once the node has been initialized and associated with the wireless network, the application is
source-based environment.
in standby, waiting forC the
language
receptionisofused andorders.
wireless several libraries
If no are provided
communication by the
is received, thenode
manufacturer.
As in all Arduino environments,
collects samples using eitherthe
theapplication has period
last programmed a SETUPor a and a loop,
default which
one and storesisthe
indefinitely
samples on executed.
OncethethemicroSD
node hascard.been
If there are no communication
initialized problems,
and associated withthe node will wait for
the wireless the order the
network, to collect
application is
samples. In this way, we managed to get all network nodes to collect the samples at the same time.
in standby, waiting for the reception of wireless orders. If no communication is received, the node
Then, the node waited for its samples to be requested. The node always works in this way as a slave
collects samples using either
of the computer the last programmed
in a master/slave model. The node period
has anorRTC,a default
which isone and stores
synchronized withthe samples on
each
the microSD card. If therepacket.
reception-request are no In communication
each packet sent by problems,
the node with thethenode willdata,
collected wait thefor the order
timestamp of to collect
samples. Inits acquisition
this way, iswe included.
managed to get all network nodes to collect the samples at the same time.
The RTC is necessary for the node to continue the data acquisition—even though there is no
Then, the node waited for its samples to be requested. The node always works in this way as a slave
communication, as mentioned above—as together with the data, the time when the samples are
of the computer
acquiredin a master/slave
is also model.
saved in the microSD The node has an RTC, which is synchronized with each
card.
reception-request packet. In each packet sent by the node with the collected data, the timestamp of its
acquisition is included.
The RTC is necessary for the node to continue the data acquisition—even though there is no
communication, as mentioned above—as together with the data, the time when the samples are
acquired is also saved in the microSD card.
Sensors 2017, 17, 55 14 of 21

Sensors 2017, 17, 55 14 of 21


Figure 14 shows the flowchart of the application executed in the node. In normal operation
mode, theFigure
node14 waits until
shows theitflowchart
receives ofa broadcast sent executed
the application by the local computer
in the node. Into collectoperation
normal the samples.
Then,mode,
the node remains
the node waitsinuntil
standby, waiting
it receives to receive
a broadcast sentaby
new
the packet requesting
local computer the collected
to collect samples
the samples.
and responds with remains
Then, the node the samples and the
in standby, timestamp.
waiting to receive a new packet requesting the collected samples
and responds with the samples and the timestamp.

Figure14.
Figure 14.Waspmote
Waspmote program
programflowchart.
flowchart.

5. Power Consumption and Autonomy of the Node


5. Power Consumption and Autonomy of the Node
Each wireless node has its own backup battery. In normal conditions, the node is powered from
Each wireless
another source node has (solar
of energy its own backup
panel battery.
or power In The
grip). normal conditions,
Waspmote theanode
includes controlis powered
circuit for from
another source
loading of energy
the battery with(solar panel
the power or power
supply. grip). The
This section Waspmote
describes includes
the autonomy a control
of the UcoBee circuit
node for
loading
whenthethe
battery with the
main power fails.power
A studysupply. This
of power section describes
consumption the will
of the node autonomy
be carried of out.
the UcoBee node
when theTable
main 1power
showsfails.
the consumption
A study of powerindicated by the manufacturers.
consumption of the node Since
will be thecarried
consumption
out. of
SHT15 sensors is indicated for a 5 VDC supply, the consumption for 3.3 VDC
Table 1 shows the consumption indicated by the manufacturers. Since the consumption is expected to be lower. of
The average consumption of the SHT15 indicated in the table is obtained
SHT15 sensors is indicated for a 5 VDC supply, the consumption for 3.3 VDC is expected by taking a measure perto be
second.
lower. The average consumption of the SHT15 indicated in the table is obtained by taking a measure
per second. Table 1. Power consumption according to manufacturer’s data.

Component Operation
Table 1. Power Modeaccording
consumption Supply to Current (Max) Voltage
manufacturer’s data.
SHT15 Sleep 1.5 µA 5 VDC
Component Measuring
Operation Mode Supply1Current
mA (Max) Voltage
SHT15 Average
Sleep 281.5
µAµA 5 VDC
Xbee Pro idle/receive
Measuring 551mAmA 3.3 VDC
Power down
Average <1028µAµA
Transmission 250 mA
Xbee Pro idle/receive 55 mA 3.3 VDC
Waspmote PowerOndown 17 mA
<10 µA 3.3 VDC
Deep sleep
Transmission 33
250µAmA
Hibernation 7 µA
Waspmote On 17 mA 3.3 VDC
Deep sleep 33 µA
The moment of acquisition and RTC of the nodes are synchronized with the local server, so the
node can be kept in sleep mode and Hibernation 7 µA
awakened before the acquisition request. This is possible using
the RTC included in the Waspmote Because physical magnitudes vary slowly over time, a 5-min
minimum
The momentperiod of sampling and
of acquisition has been
RTCconsidered, although
of the nodes the SCADA program
are synchronized with thethat runs
local on theso the
server,
local server can be configured between 5 and 15 min. In order to reduce the power consumption of
node can be kept in sleep mode and awakened before the acquisition request. This is possible using
the node, once the measures have been acquired and sent to the local server, it goes into sleep mode
the RTC included in the Waspmote. Because physical magnitudes vary slowly over time, a 5-min
for 4 min, so the node is in active mode for about a minute. Once the node is awakened, it performs
minimum period operations:
the following of sampling (1)has been
Wait for considered, although
the acquisition request, the SCADA
so the program
Xbee module that
is in runs on the
reception
local server can be configured between 5 and 15 min. In order to reduce the power consumption of the
node, once the measures have been acquired and sent to the local server, it goes into sleep mode for
Sensors 2017, 17, 55 15 of 21

4 min, so the node is in active mode for about a minute. Once the node is awakened, it performs the
following operations: (1) Wait for the acquisition request, so the Xbee module is in reception mode;
(2) Acquire the data from the SHT15 sensors; (3) Read the weight of the scale; and (4) Transmit the
data to the local server, so the Xbee module is in transmission mode, and finally, the node goes into
sleepSensors
mode. 2017, 17, 55 15 of 21

It is necessary to distinguish two cases for the power consumption in active mode since
mode; (2) Acquire the data from the SHT15 sensors; (3) Read the weight of the scale; and (4)
there is a small difference in power consumption depending on whether or not the node has lost
Transmit the data to the local server, so the Xbee module is in transmission mode, and finally, the
communication with the local server. The power consumption is higher when the Xbee Pro module is
node goes into sleep mode.
in transmission mode.toIfdistinguish
It is necessary the communication is the
two cases for lost, the data
power is storedinon
consumption the microSD
active mode sincecard
thereand
is the
Xbee amodule does not transmit. In this situation, consumption is slightly
small difference in power consumption depending on whether or not the node has lost lower.
Table 2 shows with
communication the experimental
the local server.power consumption
The power consumption ofisthe node.
higher whenThe the measurements
Xbee Pro modulewere
performed on the network
is in transmission mode. installed in the laboratory
If the communication thatdata
is lost, the was is used
storedtoontest
thethe system.
microSD cardThe
andnetwork
the
Xbeeof
consisted module does not
three nodes andtransmit.
a local In this situation,
database server.consumption is slightlywere
The measurements lower.
performed with the active
Table 2data
node acquiring shows the experimental
continuously powerthem
and sending consumption of the
to the local node.
server. InThe measurements
the first two cases,were
the node
performed on the network installed in the laboratory that was used
did not transmit the acquired data, with the Xbee module remaining in receive mode. to test the system. TheFor
network
the latter
consisted of three nodes and a local database server. The measurements were performed with the
case, the nodes transmitted the data acquired continuously. The measurements were made observing
active node acquiring data continuously and sending them to the local server. In the first two cases,
the current consumption of the three nodes and calculating the average value. As we discussed in this
the node did not transmit the acquired data, with the Xbee module remaining in receive mode. For
paperthethis is not
latter thethe
case, average consumption
nodes transmitted thein ouracquired
data application because The
continuously. the node is in sleep
measurements mode
were madeat least
80% of the time.the current consumption of the three nodes and calculating the average value. As we
observing
discussed in this paper this is not the average consumption in our application because the node is in
sleep mode at least 80% Table
of the 2. Measured power consumption of the node.
time.

Mode
Table 2. Measured power Operation
consumption of the Supply
node. Current
Sleep
Mode Sleep
Operation 45 Current
Supply µA
Active with communication
Sleep Measuring
SleepSHT15 70.5
45 µAmA
Active with communication Measuringscale
Reading SHT15 70.2 mA
70.5 mA
Transmitting
Reading scale 271.1mA
70.2 mA
Transmitting 271.1 mA
One ofOnetheofmost important
the most aspects
important of theofinstallation
aspects of theofsensors
the installation network
the sensors deployed
network deployedin beehives
in
is to beehives
know the is to know the battery autonomy when there is an outage in the power supply. To measure the
battery autonomy when there is an outage in the power supply. To measure
autonomy of the nodes
the autonomy of the the main
nodes the power to tentonodes
main power installed
ten nodes in the
installed apiary
in the apiarywas
wasremoved
removed for 75 75 hh and
and database
the local the local database
server wasserver was
shut shut down.
down. During During that time,
that time, the sequence
the sequence of operations
of operations is is similarto the
similar
to the one above,
one described described above,
except except
that the that
Xbeethe Xbee module
module does
does not not transmit
transmit datadata
andandthe the samples
samples areare
stored
stored on the microSD card. With a rechargeable lithium-ion battery of 3.7 V/2300
on the microSD card. With a rechargeable lithium-ion battery of 3.7 V/2300 mAh, the battery level of mAh, the battery
level of the ten nodes that were analyzed fell an average of 70%, as shown in Figure 15. This time of
the ten nodes that were analyzed fell an average of 70%, as shown in Figure 15. This time of autonomy
autonomy is enough to solve the problem since the global server of the Wbee system generates an
is enough to solve the problem since the global server of the Wbee system generates an alarm when
alarm when losing communication. Therefore it was not necessary to install a battery with higher
losingcapacity.
communication. Therefore it was not necessary to install a battery with higher capacity.

Figure 15. Battery


Figure15. level.
Battery level.
Sensors 2017, 17, 55 16 of 21

Sensors
Sensors 2017,2017, 17, 55
17, 55 1616ofof
2121
6. System Installation and Results
6. System
6. System Installation and Results
This Installation and
system is being Results
used in 20 Apis mellifera iberiensis bee colonies located in an experimental
apiary This system is being used in 20 Apis mellifera
This system is being used in 20 (Córdoba.
in the University of Córdoba Spain;
Apis mellifera 37◦ 550bee
iberiensis
iberiensis
bee 00 N, 4◦ 43
colonies
33.5colonies 0 26.100 W).
located
located
in anAexperimental
in an node has been
experimental
apiary
installed in the University
on University
each beehive. of Córdoba
The colonies(Córdoba. Spain;
were formed 37°55′33.5′′
during spring N, 4°43′26.1′′
2016. TheW).W). A
bees node has been
apiary in the of Córdoba (Córdoba. Spain; 37°55′33.5′′ N, 4°43′26.1′′ A were
node housed
has beenin
installed
Langstroth on each beehive. The colonies were formed during spring 2016. The bees 16.were housedinin
were housed
installed on beehives placed
each beehive. Theoncolonies
supportswere
50 cm over the
formed floor, spring
during as shown in Figure
2016. The bees
Langstroth beehives placed on supports 50 cm over the floor, as shown in Figure 16.
Langstroth beehives placed on supports 50 cm over the floor, as shown in Figure 16.

Figure 16.
Figure 16. Photograph
Photograph of
ofthe
theapiary.
apiary.
Figure 16. Photograph of the apiary.
Three SHT15 temperature and relative-humidity sensors were installed in each beehive in
Three SHT15 temperature and relative-humidity sensors were installed in each beehive in different
different
Three (i) locations:
SHT15 (i) middle ofand
temperature the brood area; (ii) area sensors
relative-humidity with honey/pollen
werereservesreserves
installed in the periphery
locations: middle of the brood area; (ii) area with honey/pollen in in
theeach beehive
periphery in
of the
of the same brood comb; and (iii) honeycombs separated from the brood combs. All of the sensors
different
same brood locations:
comb;(i)and middle of the brood area;
(iii) honeycombs (ii) area
separated fromwiththehoney/pollen
brood combs. reserves
All of in thethe periphery
sensors were
were located 12 cm below the top of the comb, as shown in Figure 17a,b. A node with just one
oflocated
the same 12 cmbrood belowcomb;
theandtop (iii) honeycombs
of the comb, as shown separated from the
in Figure brood
17a,b. combs.
A node Alljust
with of the
onesensors
SHT15,
SHT15, protected from environmental conditions, was installed to measure the temperature and
were located
protected from 12 environmental
cm below the top of the comb,
conditions, as shown
was installed in Figurethe
to measure 17a,b. A node with
temperature just one
and humidity
humidity outside the hives. Each beehive was installed on a scale connected to the wireless node to
SHT15,
outside protected from environmental conditions, was connected
installed toto measure the temperature and
weighthe it inhives. EachThe
real time. beehive
wirelesswasnode
installed
and the ondisplay
a scale of the weighing the wireless
device werenode to weigh
protected insideit in
humidity
real time. outside
The the hives.
wireless node Eachand beehive
the was installed
display of the on a scale
weighing connected
device were to the wireless
protected inside node
an to
IP65
an IP65 box by each beehive. Three sensors were installed because according to studies carried out
weigh
boxthey it in
by each real time.
showbeehive. The
Three
significant wireless node
sensors in
variations wereand the display
installed
relation to the of
because the
thermal weighing
according
regulation device
to studies
that thewere protected
carried out they
bees carry inside
out show
in
an IP65
significant box by each beehive. Three sensors were installed because according
different zones of the hive [26]. Thus, in the central brood area of the colony the temperatures zones
variations in relation to the thermal regulation that the bees carry to
outstudies
in carried
different out
are
they show
of stable
the hive significant
[26]. Thus,
between variations
34–35 in °C,the in
central
which relation
brood
is the to
area
ideal the thermal
of the colony
temperature regulation that
the development
for the the
temperaturesofare bees carry
stable
the out
between
bee larvae. in
different
34–35 ◦ zones
C, which of the
is the hive [26].
idealaway Thus,
temperature in the central brood area of the colony the temperatures are
However, as we move from theforbroodthe development of the bee
area, temperatures arelarvae.
becomingHowever, as weand
less stable move
stable
away between
from the
therefore it is 34–35
brood °C,
area,which
more similar is the
temperatures
to those ideal
outside arethetemperature
becoming
hive. lessfor the and
stable development
therefore itofisthemorebeesimilar
larvae.to
However,
those outside as we the move
hive. away from the brood area, temperatures are becoming less stable and
therefore it is more similar to those outside the hive.

(a) (b)
Figure 17. (a) Location of the SHT15 sensors in the hives; (b) Photograph of the hive.
(a) (b)
The local data server is correctly protected in a portable hut with an electric power supply. The
Figure
cloud data 17.
17.(a)
server
Figure (a)Location
was ofofthe
installed
Location inSHT15
the sensors
a building
SHT15 ofininthe
sensors the
thehives;
hives;(b)
(b)Photograph
University Campus ofof
Photograph ofthe hive.
Rabanales
the hive. at the
University of Cordoba.
TheAlthough
local datathe
server is correctly
system began protected
testing in a portable
in September hutchose
with to
anmonitor
electricthe
power supply.the
The
The local data server is correctly protected in a2015, we
portable hut with an electricresponse
powerofsupply.
cloud
beesdata
to aserver was bloom
sunflower installed in abeginning
at the buildingofofsummer
the University Campus
2016, between of Rabanales
1 June and 2 July.atThethe
The cloud data server was installed in a building of the University Campus of Rabanales at the
University of Cordoba.
temperature, humidity, and weight in the hives were registered every 5 min.
University of Cordoba.
Although the system began testing in September 2015, we chose to monitor the response of the
bees to a sunflower bloom at the beginning of summer 2016, between 1 June and 2 July. The
temperature, humidity, and weight in the hives were registered every 5 min.
Sensors 2017, 17, 55 17 of 21

Although the system began testing in September 2015, we chose to monitor the response of the bees
to a sunflower bloom at the beginning of summer 2016, between 1 June and 2 July. The temperature,
humidity,
Sensorsand
2017, weight
17, 55 in the hives were registered every 5 min. 17 of 21
WBee provided
Sensors 2017, 17, 55 a large amount of very useful experimental data for researchers and beekeepers.
17 of 21
WBee provided
As an example, three graphs a large
of theamount
averageof evolution
very useful experimental
of four beehivesdata
during for the
researchers
evaluationandof the
beekeepers. As an example, three graphs of the average evolution of four beehives during the
hives duringWBee theprovided
sunflower a bloom
large amount
are shownof very
below. useful experimental data for researchers and
evaluation of the hives during the sunflower bloom are shown below.
beekeepers.
Figure 18 showsAs anthe example,
averagethree graphs of
evolution the average
of the weight of evolution of four
four hives overbeehives
32 days.during
Fromthe Day 26
Figure 18 shows the average evolution of the weight of four hives over 32 days. From Day 26
evaluation
onward, it is it of the
possible hives during
to see that the
the sunflower bloom are shown below.
onward, is possible to see that theweight
weightof
of the
the beehives stabilizes,
beehives stabilizes, andand
thisthis is interpreted
is interpreted as the as the
Figure 18 shows the average evolution of the weight of four hives over 32 days. From Day 26
end ofend of the blooming period, implying that the beekeeper can now remove the honey harvest fromfrom
the blooming period, implying that the beekeeper can now remove the honey harvest
onward, it is possible to see that the weight of the beehives stabilizes, and this is interpreted as the
the hives.
the hives.
end of the blooming period, implying that the beekeeper can now remove the honey harvest from
the hives.

Figure Average
18. 18.
Figure evolution
Average evolutionofofthe
the weight (kg)ofoffour
weight (kg) fourbeehives
beehives over
over 32 days.
32 days.

Figure 18. Average evolution of the weight (kg) of four beehives over 32 days.
Figure 19 shows the temperature data registered during the experiment (32 days). The data
Figure 19 shows the temperature data registered during the experiment (32 days). The data show
show the ambient temperature outside the beehives (AT) and temperatures recorded in different
Figure
the ambient 19 shows outside
temperature the temperature data (AT)
the beehives registered during the experiment
and temperatures recorded (32 days). The
in different dataof the
areas
areas of the beehives: (T1) middle of brood area; (T2) area with honey/pollen reserves in the
show
beehives: the ambient temperature outside the beehives (AT) and temperatures recorded
(T1) middle of brood area; (T2) area with honey/pollen reserves in the periphery of the samein different
periphery of the same brood comb; and (T3) honeycombs separated from the brood combs. The data
broodareas
comb;of and
correspond
the (T3)
beehives:
to the daily
(T1) middle
honeycombs of brood
separated
average temperature fromarea; (T2)
thehives.
of four broodarea with honey/pollen
combs. The data
Environmental
reserves to
correspond
temperature
in the daily
affectedthe
the
periphery of the same brood comb; and (T3) honeycombs separated from the brood combs. The data
average temperature
temperatures of the
inside four hives. although
beehive, Environmental temperature
it has been affected
noted that the the
sensors temperatures
placed inside
in the middle of the
correspond to the daily average temperature of four hives. Environmental temperature affected the
beehive, although
the brood area it has been
recorded noted
higher andthat thestable
more sensors
meanplaced in the middle
temperatures of the
within the brood area recorded
hives.
temperatures inside the beehive, although it has been noted that the sensors placed in the middle of
higher and more stable mean temperatures within the hives.
the brood area recorded higher and more stable mean temperatures within the hives.

Figure 19. Average temperature per day of four hives over 32 days. Temperatures were registered at
ambient (AT) and three areas inside the beehives: brood area (T1), area with honey/pollen reserves of
Figure 19. Average
Figure temperature
19. Average temperatureper
perday
dayof
offour
four hives over3232days.
hives over days. Temperatures
Temperatures werewere registered
registered at at
in the periphery of the brood comb (T2), and in honeycombs (T3).
ambient
ambient (AT)(AT)
andand three
three areas
areas inside
inside thebeehives:
the beehives: brood
brood area
area(T1),
(T1),area with
area honey/pollen
with reserves
honey/pollen of
reserves of
in theinperiphery
the periphery of the
of the brood
brood comb
comb (T2),and
(T2), andinin honeycombs
honeycombs (T3).
(T3).
Figure 20 shows the ambient humidity outside the beehives (AH) and humidity recorded in
different areas of the beehives: (H1) middle of brood area; (H2) area with honey/pollen reserves in
Figure 20 shows the ambient humidity outside the beehives (AH) and humidity recorded in
the periphery
Figure of thethe
same brood comb; and (H3) honeycombs separated from thehumidity
brood combs. The in
different20 shows
areas ambient
of the beehives: humidity
(H1) middle ofoutside the beehives
brood area; (H2) area (AH) and
with honey/pollen recorded
reserves in
data
different correspond
areas of the to the daily
beehives: average
(H1)comb; humidity
middle of(H3) of
brood four hives. The humidity
area; (H2)separated
area withfrom inside
honey/pollenof the beehive
reserves
the periphery of the same brood and honeycombs the brood combs. Thein the
stays more
periphery of thestable
sametothan the comb;
brood outer humidity.
and (H3) honeycombs separated from theinside
brood
data correspond the daily average humidity of four hives. The humidity ofcombs. The data
the beehive
correspond to the
stays more daily
stable average
than humidity
the outer of four hives. The humidity inside of the beehive stays more
humidity.
stable than the outer humidity.
Sensors
Sensors 2017,
2017, 17,
17, 55
55 18
18of
of21
21

Figure 20.
Figure Average humidity
20. Average humidity per
per day
day of
of four
four hives
hives over
over 32
32days.
days.Humidity
Humiditywas
wasregistered
registeredat
atambient
ambient
(AH) and three areas inside the beehives: brood area (H1), area with honey/pollen reserves
(AH) and three areas inside the beehives: brood area (H1), area with honey/pollen reserves of inof in the
the
periphery of the brood comb (H2), and in honeycombs
periphery of the brood comb (H2), and in honeycombs (H3). (H3).

7. Conclusions
7. Conclusions
We have
We have designed
designed aalow-cost,
low-cost,reliable
reliablebeehive-monitoring
beehive-monitoring system
system based
basedonona WSN
a WSN to measure
to measure the
temperature, relative humidity, and weight of beehives in real time and
the temperature, relative humidity, and weight of beehives in real time and non-intrusively. Unlike non-intrusively. Unlike other
beehive-monitoring
other beehive-monitoring systems, WBee WBee
systems, performs the synchronized
performs acquisition
the synchronized of samples
acquisition from allfrom
of samples hivesall of
an apiary. This aspect is fundamental for future analysis of the data
hives of an apiary. This aspect is fundamental for future analysis of the data and their comparison and their comparison between
different different
between hives. It will alsoItallow
hives. researchers
will also to compare to
allow researchers physical
compare magnitudes
physical that change value
magnitudes quickly.
that change
Real-time
value weightReal-time
quickly. measurement of themeasurement
weight hive is an innovation of the inhivewireless
is beehive-monitoring
an innovation in systems. wireless
WBee saves the
beehive-monitoring systems. data in each part of the network if there are failures in communication. In addition,
the nodes include a backup battery for further acquisition and storage
WBee saves the data in each part of the network if there are failures in communication. of data in the event of a power In
outage that
addition, thecould
nodesbe sent once
include communication
a backup battery for is reestablished.
further acquisition The anduse of a local
storage database
of data in the server
event
is aa novelty
of power respect
outage to thatother
couldhoneybee
be sentwireless monitoring systems.
once communication Other systems
is reestablished. The use
usea ofsinka mote
local
from the node
database servermanufacturer,
is a novelty respectwhich only works
to other as gateway,
honeybee and thus
wireless it does not
monitoring maintain
systems. the database
Other systems
synchronized
use a sink mote withfromthe the
cloudnodedatabase server. WBee
manufacturer, which obtains
only more
worksinformation
as gateway, onand
the thus
conditions
it doesofnot the
hives than other systems because it monitors the temperature and relative
maintain the database synchronized with the cloud database server. WBee obtains more information humidity of the beehive in
three
on thedifferent
conditionsspots.of the hives than other systems because it monitors the temperature and relative
We managed
humidity of the beehive to useinjust onedifferent
three Waspmote node per hive, as we designed an adapter board for the
spots.
connection of the SHT15 sensors and
We managed to use just one Waspmote node perRS232 interface of hive,
the weighing scale. The
as we designed anadapter
adapterboardboardincludes
for the
a simple adaptation
connection of the SHT15 circuitsensors
of RS232and levels,
RS232 which reduces
interface ofthe
thepower
weighingconsumption
scale. The of adapter
the nodeboard when
the weight data is not desired.
includes a simple adaptation circuit of RS232 levels, which reduces the power consumption of the
node Using a rechargeable
when the weight data lithium-ion
is not desired. battery of 3.7 V/2300 mAh, a minimum autonomy of 75 h
is achieved. This is enough time
Using a rechargeable lithium-ion battery to solve the ofproblem
3.7 V/2300 sincemAh,
the global
a minimumserver autonomy
of the Wbee of system
75 h is
generates an alarm when losing communication. Greater autonomy
achieved. This is enough time to solve the problem since the global server of the Wbee system can be achieved by increasing the
acquisitionanperiod.
generates alarm when losing communication. Greater autonomy can be achieved by increasing
The system
the acquisition period. is scalable regarding the number of nodes and physical-measurement parameters.
The architecture
The system is used to implement
scalable regardingthe thesystem
number allows the data
of nodes andofphysical-measurement
all colonies to be accessible on the
parameters.
Internet
The through used
architecture one unique cloud database
to implement the system server. It is the
allows alsodata
possible
of alltocolonies
access the data
to be of a beehive
accessible on the on
the Internet by connecting to the local database server.
Internet through one unique cloud database server. It is also possible to access the data of a beehive
on theWe have been
Internet able to prove
by connecting thelocal
to the reliability
database of the WBee system without affecting the precision of
server.
the measurements, against the propolis-covering
We have been able to prove the reliability of the WBee action of the bees without
system and the environmental conditions
affecting the precision of
of the area where the experiment was developed, in low temperatures
the measurements, against the propolis-covering action of the bees and the environmental in winter (especially during the
night), and of
conditions in high temperatures
the area where the during the rest ofwas
experiment the year, above all,
developed, in inlowsummer.
temperatures in winter
The system was installed beginning in September
(especially during the night), and in high temperatures during the rest of the 2015, providing data to ayear,
vet team
above fromall, the
in
University of Córdoba of the AGR-218 Research Group (Improvement and Maintenance of Genetic
summer.
Sensors 2017, 17, 55 19 of 21

Resources of Domestic Animals, Apiculture Unit) for the study of the relationships between the
bee colonies and the environment and of their management by beekeepers. The analysis of the
data has allowed us to check the ability of honeybees to regulate temperature and humidity under
tested conditions, as well as how beekeepers handle the beehives affects those conditions and their
relationship with the health of the hives and their production.
The measurement of the weight of the hives has allowed us to understand the evolution of the bee
colonies during blooms, in particular, during a commercial sunflower bloom, as well as its practical
application in usual management by beekeepers. As an example, it allows us to register the evolution
of the production of honey in the hives or the end of the bloom and estimate the production of
honey or indicate the most appropriate moment for the collection of the honey in advance, preventing
unnecessary trips to the apiary by the beekeeper.

Acknowledgments: The authors would like to thank the European Union FEDER 2014-2020, the Instituto Nacional
de Investigación y Tecnología Agraria y Alimentaria (INIA) of Spain, and the Project “Evaluación holística de
factores de riesgo en abejas melíferas y polinizadores silvestres. Situación en España” for their financial support.
Author Contributions: Sergio Gil-Lebrero and Victoria Gámiz-López both dealt with biological aspects regarding
honeybees and system installation. Francisco Javier Quiles-Latorre and Manuel Ortiz-Lopez led the architecture of
the system, hardware and software node design, adapter board design, sensor SHT15 board design, and setting the
database servers. They also were in charge of the physical installation in the real test scenario. Víctor Sanchez-Ruiz
worked on the node software, SCADA, database, external connections, and programming and setting the
embedded PC. Juan Jesús Luna-Rodriguez collaborated with the rest of the team on the database and SCADA.
Francisco Javier Quiles-Latorre and Manuel Ortiz-López wrote the paper.
Conflicts of Interest: The authors declare no conflict of interest.

References
1. Patrício-Roberto, G.B.; Campos, M.J.O. Aspects of Landscape and Pollinators—What is Important to Bee
Conservation? Diversity 2014, 6, 158–175. [CrossRef]
2. Goulson, D.; Nicholls, E.; Botías, C.; Rotheray, E.L. Bee declines driven by combined stress from parasites,
pesticides, and lack of flowers. Science 2015, 347, 1255957. [CrossRef] [PubMed]
3. Neumann, P.; Carreck, N.L. Honey bee colony losses. J. Apic. Res. 2010, 49, 1–6. [CrossRef]
4. Woods, E.F. Electronic prediction of swarming in bees. Nature 1958, 842–844. [CrossRef]
5. Dietlein, D.G. A method for remote monitoring of activity of honeybee colonies by sound analysis.
J. Apic. Res. 1985, 24, 176–183. [CrossRef]
6. Atauri, D.; Llorente, J. Platform for bee-hives monitoring based on sound analysis. A perpetual warehouse
form swarm’s daily activity. Span. J. Agric. Res. 2009, 7, 824–828. [CrossRef]
7. Bencsik, M.; Bencsik, J.; Baxter, M.; Lucian, A.; Romieu, J.; Millet, M. Identification of the honey bee swarming
process by analysing the time course of hive vibrations. Comput. Electron. Agric. 2011, 76, 44–50. [CrossRef]
8. Eskov, E.K.; Toboev, V.A. Changes in the structure of sounds generated by bee colonies during sociotomy.
Entomol. Rev. 2011, 91, 347–353. [CrossRef]
9. Meikle, W.G.; Holst, N. Application of continuous monitoring of honeybee colonies. Apidologie 2015, 46,
10–22. [CrossRef]
10. Escolar, S.; Carretero, J.; Calderón, A.; Marinescu, M.; Gergua, B. A novel methodology for the monitoring of
the agricultural production process based on wireless sensor networks. Comput. Electron. Agric. 2011, 76,
252–265.
11. Lynch, J.; Loh, K. A summary review of wireless sensors and sensor networks for structural health
monitoring. Shock Vib. Dig. 2006, 38, 91–128. [CrossRef]
12. Lecccese, F.; Cagnetti, M.; Calogero, A.; Trinca, D.; Di Pasquale, S.; Giarnetti, S.; Cozzella, L. A New
Acquisition and Imaging System for Environmental Measurements: an Experience on the Italian Cultural
Heritage. Sensors 2014, 14, 9290–9312. [CrossRef] [PubMed]
13. Shiwei, Z.; Haitao, Z. A review of wireless sensor networks and its applications. In Proceedings of the
IEEE International Conference on Automation and Logistics (ICAL), Zhengzhou, China, 15–17 August 2012;
pp. 386–389.
Sensors 2017, 17, 55 20 of 21

14. Zacepins, A.; Brusbardis, V.; Meitalovs, J.; Stalidzans, E. Challenges in the development of precision
beekeeping. Biosyst. Eng. 2015, 130, 60–71. [CrossRef]
15. Gates, B.N. The Temperature of the Bee Colony; Bulletin of the U.S. Department of Agriculture; U.S. Department
of Agriculture: Washington, DC, USA, 1914.
16. Dunham, W. Hive temperatures for each hour of a day. Ohio J. Sci. 1931, 31, 181–188.
17. Odoux, J.F.; Aupinel, P.; Gateff, S.; Requier, F.; Henry, M.; Bretagnolle, V. Ecobee: A tool for long-term honey
bee colony monitoring at the landscape in West European intensive agroecosystems. J. Apic. Res. 2014, 53,
57–66. [CrossRef]
18. Kviesis, A.; Zacepins, A.; Riders, G. Honey bee colony monitoring with implemented decision support
system. In Proceedings of the 14th International Scientific Conference Engineering for Rural Development
(ERDev), Jelgava, Latvia, 20–22 May 2015; pp. 446–451.
19. Woods, E.F. Means for Detecting and Indicating the Activities of Bees and Conditions in Beehives. U.S. Patent
2,806,082, 10 September 1957.
20. Ferrari, S.; Silva, M.; Guarino, M.; Berckmans, D. Monitoring of swarming sounds in bee hives for early
detection of the swarming period. Comput. Electron. Agric. 2008, 64, 72–77. [CrossRef]
21. Chen, C.; Yang, E.; Jiang, J. Lin T: An imaging system for monitoring the in-and-out activity of honey bees.
Comput. Electron. Agric. 2012, 89, 100–109. [CrossRef]
22. Zacepins, A.; Stalidzans, E. Architecture of automatized control system for honey bee indoor wintering
process monitoring and control. In Proceedings of the 13th International Carpathian Control Conference
(ICCC 2012), Podbanske, Slovakia, 28–31 May 2012; pp. 772–775.
23. Heidinger, I.M.M.; Meixner, M.D.; Berg, S.; Büchler, R. Observation of the mating behavior of honey bee
(Apis mellifera L.) queens using radio-frequency identification (RFID): Factors influencing the duration and
frequency of nuptial flights. Insects 2014, 5, 513–527. [CrossRef] [PubMed]
24. Meikle, W.; Holst, N.; Mercadier, G.; Derouané, F.; James, R. Using balances linked to linked to dataloggers
to monitor honey bee colonies. J. Apic. Res. Bee World 2006, 45, 39–41. [CrossRef]
25. Bromenshenk, J.J.; Henderson, C.B.; Seccomb, R.A.; Welch, P.M.; Debnam, S.E.; Firth, D.R. Bees as biosensors:
Chemosensory ability, honey bee monitoring systems, and emergent sensor technologies derived from the
pollinator syndrome. Biosensors 2015, 5, 678–711. [CrossRef] [PubMed]
26. Sánchez, V.; Gil, S.; Flores, J.M.; Quiles, F.J.; Ortiz, M.A.; Luna, J. Implementation of an electronic system to
monitor the thermoregulatory capacity of honeybee colonies in hives with open-screened bottom boards.
Comput. Electron. Agric. 2015, 119, 209–216. [CrossRef]
27. Kviesis, A.; Zacepins, A.; Durgun, M.; Tekin, S. Application of wireless sensor networks in precision
apiculture. In Proceedings of the 14th International Scientific Conference Engineering for Rural Development
(ERDev), Jelgava, Latvia, 20–22 May 2015; pp. 440–445.
28. Zacepins, A.; Kviesis, A.; Ahrendt, P.; Richter, U.; Tekin, S.; Durgun, M. Beekeeping in the future—Smart
apiary management. In Proceedings of the 17th International Carpathian Control Conference (ICCC),
Tatranska Lomnica, Slovakia, 29 May–1 June 2016; pp. 808–812. [CrossRef]
29. Murphy, E.; Popovici, E.; Whelan, P.; Magno, M. Development of a heterogeneous wireless sensor network
for instrumentation and analysis of beehives. In Proceedings of the IEEE International Instrumentation and
Measurement Technology Conference, Pisa, Italy, 11–14 May 2015. [CrossRef]
30. Murphy, E.; Magno, M.; Whelan, P.; Popovici, E. B + WSN: Smart beehive for agriculture, environmental,
and honey bee health monitoring—Preliminary results and analysis. In Proceedings of the 10th IEEE Sensors
Applications Symposium (SAS), Zadar, Croatia, 13–15 April 2015; pp. 1–6.
31. Kridi, D.S.; Carvalho, C.G.N.; Gomes, D.G. Application of wireless sensor networks for beehive monitoring
and in-hive thermal patterns detection. Comput. Electron. Agric. 2016, 127, 221–235. [CrossRef]
32. Jiang, J.-A.; Wang, C.-H.; Liao, M.-S.; Su, Y.-L.; Chen, W.-S.; Huang, C.-P.; Chen, C.-H.; Yang, E.-C.;
Chuang, C.-L. A WSN-based automatic monitoring system for the foraging behaviorof honey bees and
environmental factors of beehives. Comput. Electron. Agric. 2016, 123, 304–318. [CrossRef]
33. Kviesis, A.; Zacepins, A. System architectures for real-time bee colony temperature monitoring.
Procedia Comput. Sci. 2015, 43, 86–94. [CrossRef]
34. Libelium Communications. Waspmote Catalogue. Available online: http://www.libelium.com/products/
waspmote (accessed on 10 October 2016).
Sensors 2017, 17, 55 21 of 21

35. Oracle Corporation and/or its affiliates. MySQL. Available online: http://www.mysql.com (accessed on
10 October 2016).
36. Libelium Communications. XBee USB-Serial gateway. Available online: http://www.libelium.com/
products/waspmote/interfaces/ (accessed on 10 October 2016).
37. SourceForge. Open Source community. Available online: http://sql-lv.sourceforge.net (accessed on
10 October 2016).
38. Libelium Communications, Waspmote Pro IDE—v04. Available online: http://www.libelium.com/
development/waspmote/sdk_applications (accessed on 10 October 2016).
39. Sensirion AG. Available online: https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/
Dokumente/Humidity_Sensors/Sensirion_Humidity_Sensors_SHT1x_Datasheet_V5.pdf (accessed on
18 October 2016).
40. Baxtran. Available online: https://www.comprabascula.com/documentos_ap/manuales/Manual%
20BAXTRAN%20BR80%20-%20BR90.pdf (accessed on 18 October 2016).
41. Digi International Inc. XBee® 802.15.4 Pro. Available online: https://www.digi.com/products/xbee-rf-
solutions/modules/xbee-802-15-4 (accessed on 10 October 2016).

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like