Next Article in Journal
Grafting and Shading—The Influence on Postharvest Tomato Quality
Previous Article in Journal
Advanced Data Analysis as a Tool for Net Blotch Density Estimation in Spring Barley
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on a Low-Cost, Open-Source, and Remote Monitoring Data Collector to Predict Livestock’s Habits Based on Location and Auditory Information: A Case Study from Vietnam

by
Ha Quang Thinh Ngo
1,2,
Thanh Phuong Nguyen
3,* and
Hung Nguyen
3
1
Department of Mechatronics Engineering, Ho Chi Minh City University of Technology (HCMUT), 268 Ly Thuong Kiet Street, District 10, Ho Chi Minh City 700000, Vietnam
2
Vietnam National University Ho Chi Minh City, Linh Trung Ward, Thu Duc District, Ho Chi Minh City 700000, Vietnam
3
HUTECH Institute of Engineering, Ho Chi Minh City University of Technology (HUTECH), Ho Chi Minh City 700000, Vietnam
*
Author to whom correspondence should be addressed.
Agriculture 2020, 10(5), 180; https://doi.org/10.3390/agriculture10050180
Submission received: 9 April 2020 / Revised: 11 May 2020 / Accepted: 13 May 2020 / Published: 19 May 2020
(This article belongs to the Section Agricultural Technology)

Abstract

:
The supervision and feeding of grazing livestock are always difficult missions. Since animals act based on habits, the real-time monitoring data logger has become an indispensable instrument to assist farmers in recognizing the status of livestock. Position-tracked and acoustic monitoring have become commonplace as two of the best methods to characterize feeding performance in ruminants. Previously, the existing methods were limited to desktop computers and lacked a sound-collecting function. These restrictions impacted the late interventions from feeders and required a large-sized data memory. In this work, an open-source framework for a data collector that autonomously captures the health information of farm animals is introduced. In this portable hardware, a Wireless Location Acoustic Sensing System (WiLASS) is integrated to infer the health status through the activities and abnormal phenomena of farming livestock via chew–bite sound identification. WiLASS involves the open modules of ESP32-WROOM, GPS NEO-6M, ADXL335 accelerometer, GY-MAX4466 amplifier, temperature sensors, and other signal processing circuits. By means of wireless communication, the ESP32-WROOM Thing micro-processor offers high speed transmission, standard protocol, and low power consumption. Data are transferred in a real-time manner from the attached sensing modules to a digital server for further analysis. The module of GPS NEO-6M Thing brings about fast tracking, high precision, and a strong signal, which is suitable for highland applications. Some computations are incorporated into the accelerometer to estimate directional movement and vibration. The GY-MAX4466 Thing plays the role of microphone, which is used to store environmental sound. To ensure the quality of auditory data, they are recorded at a minimum sampling frequency of 10 KHz and at a 12-bit resolution. Moreover, a mobile software in pocket devices is implemented to provide extended mobility and social convenience. Converging with a cloud-based server, the multi-Thing portable platform can provide access to simultaneously supervise. Message Queuing Telemetry Transport (MQTT) protocol with low bandwidth, high reliability, and bi-direction, and which is appropriate for most operating systemsOS, is embedded into the system to prevent data loss. From the experimental results, the feasibility, effectiveness, and correctness of our approach are verified. Under the changes of climate, the proposed framework not only supports the improvement of farming techniques, but also provides a high-quality alternative for poor rural areas because of its low cost and its ability to carry out a proper policy for each species.

1. Introduction

The Internet of Things (IoT) is one of the characteristics of the fourth industrial revolution. The agents (e.g., machines, devices, and so on) are associated with the Internet in order to share information for different applications. This technology allows the activation of data acquisition, fusion and processing, intelligent identification, and management. IoT broadly appears in smart cities [1], intelligent manufacturing [2], healthcare [3], transportation [4], logistics management [5], air pollution [6], robot path-planning [7], product traceability [8], and parking systems [9]. Thanks to these important achievements, human beings can enjoy high-quality and comfortable daily lives.
Recent advances in the techniques of sensing devices, measuring instruments, and transceivers have led to significant progress in both industry and agriculture. Most of the common issues revolve around the industrial fields, which output many solid wastes and destroy environmental conditions. However, there is a lack of research focusing on breeding or farming. In the past, farming primarily relied on human observations and natural habits; as such, data collection from farms might not have been done carefully, or else was done imprecisely by hand-writing. The growth of animals is conditional on climate change, food resources, farm facilities, and the intelligence of the farmers themselves—but there is no definitive understanding of animals’ growth cycles or breeding plans. However, in light of the introduction of online data gathering techniques, this situation can be altered by utilizing IoT-based systems. Indeed, in many ways, it is recognized that there is a great potential for transformation by applying IoT concepts to rustic districts in order to both gain a better acknowledgement of the native atmosphere and to intervene in such environments via artificial actions. Employing such technology poses new challenges, offers potential opportunities, and indicates a bright future ahead.
Even with the progress achieved in electronics, the use of wireless networks and integrated sensors in small-scale data acquisition still requires more attention from researchers. In particular, data on the surrounding parameters or living habits need to be gathered in order to anticipate future requirements in agriculture. Different datasets have been built and fused in conjunction with information from cameras, Light Detection And Ranging (LiDAR), Inertial Measurement Unit (IMU), Global Navigation Satellite System (GNSS), and radar to detect an object in the field [10], with double collector solar devices to improve agricultural products [11], with AgriLogger in areas lacking networks [12], and with the integration of farming data and statistical modeling to interpret field-scale productivity [13]. The popular characteristics of previous developments include keeping under surveillance the static target in a fixed location and involving a technical expert. The fusion of complex techniques is only well-qualified for academic research. Additionally, the absence of appropriate attention on breeding could harm the security of the food chain. Thankfully, there exists numerous investigations on farm animals to protect the breeding process. For instance, Long Range (LoRa) based IoT architecture with collision avoidance for continuous livestock monitoring has been implemented [14]. Owing to its resilient transmission, wide coverage, and long-lasting battery lifespan, the use of this architecture makes it possible to manage a large number of clients with a single gateway, as well as to reduce the number of necessary data retransmissions and the power consumption. Related not to animal but to location technology, tracking solutions are typical for precision livestock farming. A low-cost IoT-based system to identify the position of a whole herd has been enabled [15]. The collar/tag ratio that defines the cost per animal should be low for a whole sheep herd and high for beef cows, and the results are valuable for the initial finance to select the tracking method. Above all, data collection plays a principal role in real-time supervisory work. In huge grassland, signal transmission and analysis accommodate the gathering activities and status information of livestock. A momentum data collector to gain and transfer information regarding the ecological status and situations during grazing has been newly suggested [16]. However, using this collector, only one parameter—e.g., location—is transmitted for one target cow.
In some nations, the application of these technologies is usually limited, although some solutions are available on the market. Since their investments are high and they require frequent maintenance, small- and medium-sized farms do not have the necessary capabilities; in such contexts, open-source hardware could be an alternative selection. Such open-source software offers a novel platform in agronomy for open farms because of their small and marginal investments. The most common hardware include Raspberry Pi (RPi) and Arduino. While Arduino permits the user to program C/C++ language for interactive design, RPi promotes Python and Scratch as the main languages. RPi pays particular attention to basic computer science, education, home automation, or industrial automation, whilst it reserves restricted support in agriculture [17]. Reversely, Arduino has been utilized for great ranges of open applications, for instance, collecting environmental parameters [18], data mining [19], automated watering systems [20], IoT-based platforms [21,22], or information monitoring systems [23]. Therefore, the implementation of open hardware has become an inevitable trend and a crucial responsibility for the developing market.
The main aims of this paper are to (i) introduce a do-it-yourself hardware of supervisory system, (ii) guide farmers to design by open software, (iii) experiment on cattle under North Vietnam’s conditions, and (iv) provide a good look at data collection methods with some valuable discussions. The rest of this paper is structured as follows. Section 2 synthesizes previous works to address the key points in open-source farming systems. Section 3 introduces our ideas to overcome the existing drawbacks in both hardware and software design. From the proposed development, Section 4 describes the experimental results to validate the feasibility, effectiveness, and correctness of our design. In Section 5, discussions about practical experiences in open platforms, as well as acoustic feature extraction, are demonstrated. Finally, Section 6 presents some conclusions.

2. Literature Review

Precise agriculture or smart farming is one of the key terms in our era. This method provides higher productivity and better usage of natural resources compared to previous methods. Research groups and scientific institutions, as well as industry, race to deliver more and more IoT products to agricultural business stakeholders. Cloud Computing and Fog Computing afford sufficient resources and solutions to sustain, store, and examine the vast amount of data generated by IoT devices [24,25]. The management and synthesis of IoT data can be used to automate processes, to guess situations, and to improve many activities. Moreover, the concept of interoperability among various devices has inspired the creation of the right tools, which allow new applications and services to be developed, as well as give an added value to data flows. The agricultural field is likely to be highly affected by wireless sensor network (WSN) technologies, which are expected to be significantly benefited by IoT [26]. It was discovered that most of research [25] is still concentrated on monitoring applications (62%), while there is a growing interest in closing control loops (25%), and the rest is focused on logistics and supply chains (13%).

2.1. IoT Node-Based Scheme

In the milieu of smart cities, a novel typology of IoT-based sensor nodes, based on the usage of low-cost and low-power components, was illustrated in [27]. This node was supplied with a single-chip that is able to measure the filling level of trash bins. A minimal network architecture of LoRa low-power wide-area network (LPWAN) technology focused on energy-saving technologies and policies. Reversely, the adaptive protocols modified the sampling rate according to the variation rate of the filling level of the trash bin, as well as the transmission policies. The energy consumption of wearable sensor nodes has become a crucial issue for fall detection system [28]. Falls can cause serious trauma, such as brain injuries and bone fractures, especially among elderly people. The design of tiny, lightweight, flexible, and power-efficient devices has been denoted, together with a comprehensive investigation of energy saving, in different configurations. Associated with medical guidelines, this report did not indicate the medicinal constraints along with the tests of reliability. In livestock building, the environmental parameters also involve the product quality and the welfare of the animals [29]. A list of the parameters, i.e., temperature, humidity, light, carbon dioxide concentration, ammonia concentration, and hydrogen sulfide, is monitored to save labor costs and energy consumption. Nonetheless, to record in real-time, these six parameters need more Random Access Memory (RAM) memory and thus burden the computation to process.
Recently, advances in the IoT paradigm have promoted the use of wireless sensor networks for precision farming. Many technological developments suggest that the use of nanotechnology has immense potential to further improve farming productivity. In [30], the conceptualization of IoT was firstly discussed for use in applications of dairy farming. Four aspects, i.e., grass monitoring, animal health, field conditions, and reducing resistance to antibiotics, meet a lot of challenges. For instance, the troubles in the design of nano-devices, the communication inside nano-networks, and the interfaces with current internet protocols may collar our efforts. Not for whole networks, but rather for specific sensing units, an energy-saving method utilizing sensor nodes has been introduced [31]. Instead of frequent data transmission, an event-driven communication protocol for lessening the battery consumption issue has been demonstrated. At certain intervals, data collection is only completed to diminish traffic communication if an event happens. Otherwise, the sleep intervals should be variably attuned. This result was individually simulated in MATLAB, and has not yet undergone experimentation. In terms of a more academic approach, a vector-based spring network model to localize nodes has been described [32]. A sub-three accuracy meter for a three-dimensional positioning environment has been established to evaluate the behavior of tracked animals based on positioning information. With a large number of livestock animals, the difficulties in mass production of these instruments should be taken into account.

2.2. Livestock Monitoring

Farming is a vigorous part of the national economy, and it is likely to remain as such, since nutrition needs continue to rise dramatically with the growth of the world population. In order to expand profitability and efficiency, connected solutions for livestock monitoring are flooding the market. Nonetheless, some important challenges still remain to be addressed before widespread adoption can take place. According to the United Nations [33], the global population represents approximately 7.6 billion people and is projected to grow to 8.6 billion people in 2030, and 9.8 billion people in 2050. Not only do food needs keep growing, but so does the per capita consumption of dairy products. To accommodate future needs, securing the productivity and cost-effectiveness of existing farms is required. Currently, key differences in productivity occur between food producers around the globe. Therefore, it is a well-known solution to improve animals’ health and productivity, rather than to increase animal numbers. To help workers face these trials, connected solutions in their farms might play a vital role. Comparable in many other verticals, IoT has initially spread into the agriculture and dairy farming industry, and mainly aims to supervise the well-being of animals, thus enhancing the profitability of farms by increasing productivity. The huge majority of connected livestock solutions are investigated for cattle, especially cows, which is reasonable because of the valuable price of such animals. The connected progress of livestock, as well as that of humans, depends on the miniaturization of battery-consumed technology, network communication, and data analysis. In recent years, an open trend of electronics skeletons brings the many advantages of smaller, cheaper, and more precise devices [18]. These techniques do not require professional skills or experts to be deployed.
A platform of real-time data collection in [16,34] was developed for large grassland or mountainous areas. Although data of the ecological status and situations of livestock during grazing have been transferred, some limitations still exist in this system. Covering signals cannot be certified if the power of the solar panels is not enough or is empty. Especially, in the bad weather or at sunset, data might be lagged while cattle continue their regular activities. Furthermore, the platform of this system needs a specialized operator and has high maintenance costs. With the adoption of LoRa LPWAN technology, IoT hardware and software architecture can continuously track an animal’s position [14,35]. Hardware (HW) implementation without a listen-before-talk mechanism provides a custom Media Access Control (MAC) layer with Listen-Before-Talk (LBT)-based carrier-sense multiple access with collision avoidance. However, the closed-source architecture of this system may have trouble when it is applied to a large-scale area. The owners of farms must invest more whilst positioning data only are obtained. Using the same idea but different communication, an IoT-based system can be connected to a Sigfox network and the rest to Bluetooth tags [15,36]. Due to its expensive price, although a low collar/tag ratio enables the monitoring of animals, each animal cannot be fitted with a Global Positioning System (GPS) collar. However, if some cattle that are not attached tags have diseases, then a herd may be widely affected.
Investigations on the behavioral responses or living habits of cattle turn into deep phase in agricultural studies. With an animal-centered approach, if changes in usual activities or adaptations in life can be managed, then it is possible to obtain benefits for farmers in terms of finance, labor costs and productivity. In [37], animals’ reactions to pasture availability were the aim of academic study. The researchers wanted to determine the favorite grazing sites by utilizing Global Navigation Satellite System (GNSS) technology. The traveling distance and location in the paddock were fused to derive the Normalized Difference Vegetation Index (NDVI). When considering a decrease in NDVI and an increase in moving displacement, cattle presented a partial preference for areas of higher pasture biomass/NDVI. This finding can assist producers to better manage cattle, as well as to manipulate grassland intensity and paddock utilization.
For the technical details of monitoring loggers, there are numerous producers in the commercial market, such as Vectronic Aerospace GmbH, Lotek, or Holohil Systems Ltd. Vectronic Aerospace GmbH [38] is located in Berlin, Germany and provides electrical equipment for the industrial sector. This famous branch name produces GPS collars, sensors, and accessories; the collar is equipped with one dual-axis accelerator and horizontal and vertical sensors. Any motion in space generates an x-value and a y-value. Tracking data are continuously recorded and averaged between two successive action fixes, and the mean activity estimations are put on a linear scale from 0 to 255. Furthermore, Lotek [39], based in Seattle, U.S., is a designer and manufacturer of fish and wildlife monitoring systems. This business delivers radio, acoustic, archival, and satellite monitoring systems to permit users to follow animals, birds, and fish in dissimilar atmospheres and regions. For terrestrial data loggers, the drop-off mechanism for Lotek’s collar is designed to cut the cost associated with recapture, as well as the stress placed on livestock. From Ontario, Canada, Holohil [40] serves the wildlife research community with state-of-the-art Very high frequency (VHF) transmitters. In general terms, these collars allow insight into animal actions by unceasingly reporting x- and y-values on a scale from 0 to 255 [41]. In contrast, the sensing values that are measured by these collars provide information on the degree of activity only on a broader scale, whilst different active behaviors fail.

2.3. Network Communication

Industrial IoT, which entails the Internet connection of as many industrial devices as possible, has become a hot trend in Industry 4.0. In the real-time concept, its short latency is one of the most interesting things. The impact of the quality of the service parameters on the communication delay from the production line to the Cloud has been experimented on [42]. However, only the testing method of Open Platform Communications Unified Architecture (OPC UA) usage has been presented for IoT gateways. Some of the successful experiences that overcame unexpected problems were not mentioned when the topic of the performance of the service parameters was raised. Related to positioned technology via identification, Radio Frequency Identification (RFID)-based IoT systems for commercial applications was investigated [43], in which a novel methodology that eases the detection and mitigation of such flaws was represented. Its security tools were analyzed and a validation method was suggested. Under different scenarios, the effect of this method may fluctuate, such that the durability of the tag should be considered under climate changes. In the small distance between tags or in overlapped tags, the accuracy of this approach still needs to be confirmed. To understand IoT utilization and to provide reliable guidelines for potential IoT adopters, the value configuration of IoT technologies and the specific attributes of IoT in particular business contexts were researched [44]. Focusing on five representative value configurations of RFID and sensors, a holistic view for understanding IoT utilization in various business areas, as well as the value configuration framework approach, provides a more elaborate frame to acknowledge the diffusion trends of new technology. However, some boundaries in the data collection process and in advanced sensing devices, such as bio-acoustic or micro-electromechanical systems, have yet to be determined via further experimentation.

2.4. Bio-Acoustic Approach

At present, many advanced technologies are explored to supervise the status of cattle in-depth. For instance, a wireless acoustic system for ambient assistant was invented in [45]. To infer hazardous situations via environmental sound identification, it was found that satisfactory sensor solutions have not been considered in terms of both low cost and high performance. This examination divulges that the care of animals lacks the necessary information. Acoustic data alone are not enough to determine the current status of animals, because it is essential to discover the physical relationship between the location, the sound of the bite, and the movement of the jaw. To distinguish grazing activities, the authors in [46] tested a novel analysis system to detect and classify the ingestive events of grazing cattle. The core of this method is to measure the shape, amplitude, duration, and energy of sound signals. Performance and validation are determined by using two databases of grazing signals, which encompass dairy cows in natural pastures and in indoor controlled environments. In contrast, iterative detection and big data processing might become challenges if this system is applied in farming. In the same academic approach, the hidden Markov model was utilized to segment and classify acoustic signals [47]. The findings related to the spectral content of the acoustic signals, as well as a novel language model for their recognition, were presented. Obviously, the recorded sound needs to be decoded automatically for practical use, and the operator of this system must be a professional expert who works in a laboratory. After classifying the ingestive events, they did not link to any data (location, time, or behavior set) in order to conclude the health status of the animals.
In more detail, the sound-based algorithm was developed to sense coughing symptoms [48], as bovine respiratory disease is a major animal health challenge in calf rearing. Any outbreak would lead to severe economic losses if widespread. The sounds were stored in four adjacent compartments of one calf house over two time periods, and these data contained 664 different cough references, which were labeled by a human expert. The results indicated that the algorithm works well in some cases, but in others, its precision was less; therefore, this method highlights the difficulties in reality. An offline approach could support data processing because of the burden the calculation. Late detection results in the infection of numerous calves, and treatment becomes more problematic. In [49], most of the sensors that were reviewed in research were primarily designed to monitor cattle, and it was not concluded that the co-operation between sensors would solve a problem or that the analysis result was learned from experiences. Additionally, the listed sensors were expensive and required finding the most appropriate location for their attachment.

3. Proposed Solutions

There is a need to design an open platform for precision livestock farming. Yet, most of the research is focused on the development of academic algorithms for specific species [50], which entails more time to investigate before application in farming, while food security must be the top priority. The platform should also be able to individually gather separated data, such as location or sound only, as well as their habitats unfold in mouth’s motion, the duration in a day, and body temperature. The electronic components should be easily found in the market, should be easy to maintain, and should be self-made works.

3.1. Methodology

The overall purpose of this paper is to create an inexpensive data collector based on an open-source framework in order to observe the living style of livestock. Via monitoring parameters (i.e., tracking location, temperature, pose of motion, and vocal data of chewing or biting actions), farm managers are able to anticipate sudden phenomena in daily activities and to determine livestock pasture preference, and hence, enhance grazing management. On account of species, we only represent the experimental studies on Bos taurus indicus, which is well-known in Vietnam.
Following requirements analysis, we built a conceptual prototype so that workers could operate the proposed device on their farms. From non-specialist electronic components, this solution offers the benefits of ease-of-use, extendable ability, and reasonable performance to the farm industry. To facilitate farmers to employ this device, user interface software that necessitates low-level programming only is installed on their pocket devices. Data exchange between the slaves and the host has three set-up requirements: First, it can be set-up on the farm computer; second, it can be set-up in the slave tools; and third, the declarations and set-up configuration of the database are stored in Firebase.

3.2. Do-It-Yourself Hardware

In this section, the design hardware for the open platform is demonstrated, such that the network tool warrants non-stop communication and a reliable protocol. The electronic modules should be readily available in the market so that they are easy to replace, and they should have easy wiring and be of low cost. All parts are placed into the compact unit and should be of small size and durable material, and should support signal strength.

3.2.1. Network Protocol

MQTT (Message Queuing Telemetry Transport) is a publish/subscribe protocol in IoT devices, which has low bandwidth, high reliability, and two directions, and is compatible with almost operating systems. The network communication was built as in [51], in which numerous clients can be associated to the server—named as MQTT broker in Figure 1. Every client registers their individual channel and publishes information; subscribed activity is considered as registration. The database is categorized into messages: Control and feedback. The server transmits a control command, received from external units, to the slave nodes. The feedback frame, including the node status and the acknowledge response, is transmitted back to server from the slave nodes. Using this protocol network, the system can prevent data loss during message transmission.
To interface with the host, it is necessary for the central processor unit (CPU) in the slave nodes to program, as shown Figure 2. Depending on the performance of each CPU, the interrupt service routine (ISR) must ensure the communication process. In the first instance, the system parameters, cyber address, and network specifications are set; then, data from the sensing modules are collected after the connection to the server is confirmed. The feedback of information to the host and receiving the control messages to proceed complete a communication cycle. Otherwise, an error message is activated in the system.

3.2.2. Electronic Components

One of the indispensable functions for the monitoring system is tracing movements. In order to support this purpose, a GPS receiver, such as GPS NEO-6M V2 (Figure 3), obtains information from satellites in the form of radio signals toward the Earth. Unlike other GPS modules, it can update a maximum of five locations per second with 2.5 m horizontal position accuracy. Especially, the power-saving mode of this chip features a reduction in system power consumption. With a compact design, the antenna—which has a –161 dBm sensitivity—is attached behind the module. This receiver-type provides up to 50 channels with an update rate of 5 Hz, a horizontal position accuracy of 2.5 m, and serial communication to the main CPU.
ESP32-based communication—named Ethernet Thing [54]—is exploited for receiving, processing, and parsing data from the sensors. In Figure 4a, it is a wireless compatible micro-processor, which provides low-energy Bluetooth and plenty of general purpose input/output pins. This module is beneficial in terms of its low cost (approximately 14USD) and low power (approximately 0.5 W). With its wide range from 2.2 to 3.6 V, the ESP32 board can be turned on by a USB power supply or an external battery. It is commonly employed in IoT applications and updated version of ESP8266. Ethernet Thing offers several libraries of different functions, simple compiler and example codes.
To display the body temperature of cattle, a reasonable module of temperature humidity DHT11 (as shown in Figure 4b) was designed. Its maximum sampling frequency of 1 Hz aids the supervisory system to obtain enough data, while it does not cost much in terms of its hardware. With acceptable precision of temperature and humidity measurements, this sensor is a great tool for farmers to implement in their IoT devices. The jaw motion of livestock is saved owing to MPU-6050 (Figure 4c), which has ability to measure the motion in three-dimensional (3D) space and to return analog signals back to the main CPU. Although it is highly sensitive, incorrect evaluations of the yaw angle are unavoidable, and it tends to vibrate when external forces appear. Thus, filters—for example, a complementary filter or a Kalman filter—should be embedded to prevent drift phenomena.
Acoustic data are chronicled by a microphone amplifier GY-MAX4466, as shown in Figure 5. This is micro-power op-amp that can be used as a microphone. It delivers an ideal combination of an optimized gain bandwidth product with supply current, and low-voltage operation in an ultra-small dimension. In shutdown, the amplifier’s supply current is lessened to 5 nA and the bias current to the external microphone is cut-off for ultimate power saving. It is wired to the amplifier as shown in Figure 6 to reject external disturbances. Additionally, the installation location of GY-MAX4466 should be near the voice source to decline noises and far from the power supply to attain the best signals.
All of the electronic components are positioned in the basement module. The operating voltage of the sensors is from 3.3 to 5 V, while 5 V voltages is supplied from the battery. Unfortunately, the Ethernet Thing module works from 0 to 3.3 V voltages, which does not match the sensor feedback pins. To overcome this issue, the voltage level is shifted by using a pull-down resistor array, as shown in Figure 7. This connection serves to enhance the sensing value measurement. Generally, a Printed Circuit Board (PCB) design is compulsory since animals can move at dissimilar speeds. Inside, the electronic components are fixed to either the upper or lower part. Some positions are a must, such that the temperature sensor should be placed to derm vis-à-vis, while the microphone module should be situated at head. The accelerometer should stay at the center of the box to stabilize the measuring values. While moving, unexpected vibration or collision may happen, and such impact may cause broken connections. In farming, without professional PCB design skills, a worker is able to exploit a copper board and soldering to fix such connections.
To protect the electric components entirely, a cover box manufactured by 3D printing technology is necessary, as illustrated in Figure 8. ABS (Acrylonitrile Butadiene Styrene) plastic material is very popular thanks to its low cost and its better mechanical properties. In addition, the external surface of the box should be scabrous for drainage, and it should be comfortable for livestock to wear it for the whole day. For measurement of jaw motions, this plastic box should be hung close to mouth using a nylon rope.
The hardware set-up on the forehead of cattle is illustrated in Figure 9. First and foremost, the equipment is placed near the animal’s mouth to acquire better information. For the animal’s comfort, a knot helps farmers to tie the device appropriately at various dimensions. The material of the belt should be soft, easy to disassemble, and, especially, evaporative for water to come out. In this position, the motion of the jaw can be documented exactly and effectively.

3.3. The Open Software

Firebase is a mobile and web application development platform developed by Firebase, Inc. in 2011, later acquired by Google in 2014 [59]. Several services—for instance, develop, grow, or earn—have been introduced, as shown in Figure 10. Several noticed functions of Google Firebase are explained below.
Real-time database: The database provides application developers an Application Programming Interface (API) that allows application data to be synchronized across clients and stored on Firebase’s cloud. The company offers client libraries that enable integration with Android, iOS, or Node.js applications.
Firebase authentication: Firebase can authenticate users using only client-side code. It supports social login providers Facebook, GitHub, Twitter, and Google, as well as other service providers such as Apple or Microsoft.
Firebase hosting: Firebase is a static and dynamic web hosting service that launched on May 13, 2014. It supports hosting static files such as Cascading Style Sheets (CSS), Hypertext Markup Language (HTML), or JavaScript. The service delivers files over a content delivery network through HTTP Secure and Secure Socket Layer encryption.
Cloud messaging: This is a cross-platform solution for messages and notifications for Android, iOS, and web applications.
In the next part, the open compiler is selected as Arduino Integrated Development Environment (IDE) [60]. This platform benefits from a cheap price and an open hardware feature, and is well-suited with all kinds of operating systems, such as Linux or Windows, and agriculturalists need only spend a short time to get acquainted with it. The programming language is C/C++, which is widely supported by various libraries and example codes.
The mobile development tool is based on Android Studio 3.0 [61]. It is the official integrated development environment for Google’s Android operating system and supports all of the same programming languages (Java, C++, etc.). The following features are provided in the current version.
A rich layout editor that allows users to drag-and-drop User Interface (UI) components and offers the option to preview layouts on multiple screen configurations.
Built-in support for the Google Cloud platform, enabling integration with Firebase Cloud Messaging and Google App Engine.
Android Virtual Device (Emulator) to run and debug apps in the Android Studio.
Template-based wizards to create common Android designs and components.

3.4. Architecture of the Open Control Platform

Firstly, the firmware (as shown in Figure 11) is programmed in micro-controller CPU by Arduino IDE. In the main loop, a series of commands that read values from the sensor block are written before interfacing with the wireless communication. API functions in the libraries are provided for hardware access. Note that the pin mode has to register correctly in order to match the configurations. As the battery often reduces the voltage capacity according to time, a voltage regulator is used to preserve the power level, which, for Firebase, plays the role of cloud server to store data via the wireless network. A large amount of data (i.e., position, motion, sound, temperature) requires rapid transmission and reliable storage in the host server. On pocket devices, the Android-based application, developed by Android Studio, displays the monitoring data; the illustration comprises graphical data and recent records that reflect most outdoor activities. On personal computers, a web page is also established to visualize the data.

4. Experimental Results

4.1. Validated Performance from Practical Scenario

As described above, the proposed low-cost, open-source data collector was set-up on a farm in North Vietnam to acquire practical evaluation data, and to parse the acquired data to the IoT server through Ethernet Thing for remote supervision and monitoring control. A real platform was accomplished and the test case was exemplified, as shown in Figure 12. During daylight, the livestock move around the farming area while wearing the data collector. During the main mealtimes, quantitative food is brought to feeder and the eating action is observed in order to classify the movements of the jaw. The data collector is then detached at night in order for the cattle to relax properly. During this time, the alkaline battery is checked in order to recharge or replace as appropriate.
After attaching the device to the animal, an operator can view the received data directly on a mobile phone. This allows configuring the network constraints, enabling machine and filling in the IP address of the server, and inserting the appropriate password (if the user is authorized to do so), after which, the well-being parameters shortly appear on the main Graphical User Interface (GUI), as shown in Figure 13a. Once received from the cloud console, the data are automatically logged to both the dashboards and the data buckets for remote management and automated control via electronic consumer devices. On the main screen, general information is briefly displayed for the user. Each category of received data has an average value, and maximum and minimum thresholds. In the case that the current rate fluctuates far from these thresholds, the fitness status (i.e., the “conclusion”) changes to abnormal to alert the farmer. Otherwise, a normal message is returned to the user. In the second configuration (Figure 13b), the temperature information is updated every ten minutes and its graph helps farmers to visualize temperature variations. When the system was being tested, a digital sensing meter was connected to each of the points of interest to measure the actual values.

4.2. Implementation of Integrated Filter

The motion in the three axes Ox, Oy, and Oz was recorded by MPU-6050, as shown in Figure 14. Since it is situated near to the jaw, it is considered that 80% of the motion of the mouth can be noted accurately. In order to use MPU6050, it must be calibrated to the center of gravity (CoG) of the system [62]. The rotation matrix of the system is described by:
R x y z ( Φ , θ , ψ ) = R z ( ψ ) R y ( θ ) R x ( Φ )
= [ c θ c ψ c Φ s ψ + s Φ s θ c ψ s Φ s ψ + c Φ s θ c ψ c θ s ψ c Φ c ψ + s Φ s θ s ψ s Φ c ψ + c Φ s θ s ψ s θ s Φ c θ c Φ c θ ]
where Φ, θ, and Ψ are the roll, pitch, and yaw angles, respectively.
Assume that R1 is fastened to the earth inertial coordinate, R2 is parallel to R1 and is located at the the CoG of the system, and that R3 is tied to the body of the system and is also located at its CoG. Due to the small Euler angle, the angular velocity of system in the R3 coordinate is as follows:
gyroRate = Ω = (Ωx3, Ωy3, Ωz3)
Ω x 3 Φ ˙ [ Ω y 3 ] [ θ ˙ ] Ω z 3 ψ ˙
Assume that the system is performed by a linear acceleration ar and put into gravitational acceleration. Assume that the linear acceleration is very small (ar ≈ 0) and that MPU6050 is placed its z axis, along with the gravitational acceleration. We named R the rotation matrix:
A c c = [ A c c x A c c y A c c z ] = R ( g a r ) = R × g
Hence, Euler angles can be evaluated from the roll, pitch, and yaw values of the sensor:
R x ( Φ ) = [ 1 0 0 0 cos Φ sin Φ 0 sin Φ cos Φ ]
R y ( θ ) = [ cos θ 0 sin θ 0 1 0 sin θ 0 cos θ ]
R z ( ψ ) = [ cos ψ sin ψ 0 sin ψ cos ψ 0 0 0 1 ]
As a result, the rotation matrix is written as follows:
R x y z × [ 0 0 1 ] = R x ( Φ ) × R y ( θ ) × R z ( ψ ) × [ 0 0 1 ]
= [ sin θ cos θ sin Φ cos θ cos Φ ]
The values of the roll and pitch angles can be estimated:
Φ = arctan ( A c c y A c c z )
θ = arctan ( A c c x A c c y 2 + A c c z 2 )
To lessen high-frequency noise from the accelerometer, a complementary filter (as shown in Figure 15) is recommended to estimate the angle θ e s t i m a t e based on the variation of the speed from the gyroscope. Then, it is added to with the angles θ a c c e l from the accelerometer. Consider that with small values, the estimation of the roll value Φ and the pitch value θ are known, respectively.
The superiority of a complementary filter mainly concentrates on parameter γ. In this filter, a delay time occurs in the output signal (regularly, because of the low-pass filter of the accelerometer and the high-pass filter of the gyroscope). The closer the γ value is to 1, the better the quality of the filter. However, values of the sensor that vary quickly result in longer convergent times. It is impossible to estimate directly the yaw angle from the accelerometer, so at present, we still apply values inferred from the gyroscope and accept the drift phenomenon. By using more magnetic sensors, this problem can be solved.
θ ( n ) = γ θ e s t i m a t e ( n ) + ( 1 γ ) θ a c c e l ( n )
0.5 γ 1
To visualize the current audio processing, the performance of sound wave analysis is described as Figure 16. In pocket monitoring devices, a breeder can determine remotely how cattle is fed. In more detail, some experts are able to examine the cattle’s habits, the kind of grass, and so on via the interpretation of online or offline data.

5. Discussion

Agriculture is a field that could considerably profit from IoT technology. Interestingly, this research constructs an open platform using wireless communication and a mobile monitor for determining the habits of livestock. The key sections, such as the low-cost hardware, the programming software, and the algorithm implementation, were designated. Nevertheless, some typical habitats in North Vietnam were discussed to clarify inappropriate farming, which highlights the need to employ the proposed device accurately into the farming industry.

5.1. Battery Lifetime Estimation

It is important to estimate a battery’s lifetime to manage power effectively. In actual application, the power consumed by our logger relies on each component’s usage. We consider that for an electronic component i t h , I i a w a k e and T i a w a k e are the current and the time spent in active mode, respectively, while I i s l e e p and T i s l e e p are the current and the time consumed in stand-by mode with all of the components n . Then, I a v is the time-averaged power consumption, and the total time of the estimation period is T p e r i o d . The following is the formula to compute I a v :
I a v = n I i a w a k e T i s l e e p T p e r i o d
with T p e r i o d = n T i a w a k e + n T i s l e e p
Since the main loop in the Interrupt Service Routine (ISR) manipulates the whole operation in the device, the time durations in both the working mode and the sleep mode are the same in every component module. We estimate that the updated period is 10 s, and that the time for the ISR is 200 milliseconds. The specifications in the currents of each electronic component are shown in Table 1. As a result, the time-averaged power consumption I a v equals 36 , 618149 mA .
For convenient usage, the batteries used in this research were AA-sized 1.5 V alkaline batteries, which are readily available in the market. The sum of the power capacities W is evaluated as 6100 mAh. The total battery lifetime T w o r k is calculated as:
T w o r k = W I a v
Therefore, the battery lifetime is roughly 21 days if the proposed data logger runs 8 h per day. Whenever the power source is nearly empty, farm managers can replace the batteries without experiencing any difficulties. To extend the battery lifetime, AA batteries with larger capacities can be used, or the number of frequent updates can be decreased.

5.2. Hardware

Both the memory and the flash on-board of the current mirco-processor are sufficient for upgrades within the same family of Arduino in order to keep an open platform. The collected data must be implemented in MATLAB using an Intel Core i7 processor (3 M cache, 2.4 GHz). With powerful computation, the analyzed results are more rapid, well-founded, and extendable. Reducing the sampling frequency does not lower the present one in the accelerometer, but it subtilizes the amount of data handling in the mirco-processor. It is possible to stimulate a lower sampling frequency to only every third sample. This also impacts on segmentation time, and the sensitivity, precision, and accumulated rumination time varies with various segmentation times.
In terms of cost-effective hardware, Table 2 outlines the approximate cost of the materials individually. In the case of retail, the price of each item is noted from a commercial market perspective. To minimize the cost, hundreds of proposed instruments could be mass-produced.

5.3. Software

In the graphical user interface, the main language is English; thus, Vietnamese farmers find it hard to interact with the device. The arrangement of the buttons, charts, or numbers ought to be simpler for elder persons. The filtering process is a crucial step for getting clear numbers from the raw data. In a complementary filter, the first-order filtering process can return low-level limit cycles. This leads to oscillation of the output signal after filtering, or else the output value remains stuck at a non-zero value, even though input does not exist. This issue can be overcome by minimizing the steady-state error to a reasonable value. In detail, scaling up the signal before filtering and scaling it down after filtering might assist in achieving better results.

5.4. Configuration of the Proposed Approach

From the experimental results in the previous section, it is indispensable to collate output performance between our data logger and a business product. In [63], biologists selected collars from Vectronic to obtain continuous activity data on the ecology of a species. The results were analyzed to determine daily activity patterns and seasonal changes, and it was concluded that VERTEX Lite is well-suited to monitor farming livestock, and thus is considered a comparable product. Table 3 illustrates the contrasting parameters for comparative performance results.
In Figure 17, a successful experiment was conducted under a practical scenario in grassland. A total of nine cows with nine collars took part in the experiment, which lasted four weeks in order to obtain full breeding data. Most of the examples took place in an outdoor environment to visualize the output performance. The observations were time-consuming, as data were collected non-stop. Depending on each test, collars were attached to some livestock animals, while the others remained collar-free. No loss of generalizability occurred, as the farmers regularly took care of their cattle in formation of a group and fed them simultaneously.
During the first use, breeders may feel very strange and sometimes uncomfortable, for the reason that they rarely use pocket devices and that they lack the fundamental skills to manipulate the screen. Gradually, it will become commonly applied as the farmers recognize its multiple benefits. Previously, they paid attention to supervising their livestock throughout the whole day, and as such, the labor cost was very high. Yet, this device can offer a method to remotely manage cattle; for instance, changes in eating habitats, sudden events, or outdoor environments can trigger warning messages on the mobile device carried by farmers.

5.5. Acoustic Feature Extraction

Information on outdoor events is not enough to determine an animal’s health status. A novel data collector, including vocal materials from feeding activities, is necessary to ensure accurate monitoring. From the data obtained using an open-source data collector, stockbreeders can (a) recognize which grass is suitable for their livestock, (b) determine the eating habits of their cattle via advanced analysis, and (c) classify ingestive behaviors. The data resource in the records from the proposed instrument is available online in [64]. In this test, we tried to analyze this sample to verify the correctness and feasibility of our approach. It is considered that our signals correspond to the chew, composite chew–bite, and a bite actions of livestock [27]. For implementation targets, the completion of feature extractions can be done as a set of five successive stages, as shown in Figure 18.
Envelope intensity: This is the first task of sound analysis. The envelope of a sound signal can indicate actions and periodicities. During the process, low-frequency signals are retained, while high-frequency ones that do not relate to regular actions are discarded. Initially, the absolute value of a sampling signal is calculated. Then, the sound signal passes through a low-pass filter to produce sound magnitude. Then, the low-frequency envelope signal is re-sampled to pick up several sampling signals, since there are much sound data recorded per second. Without compromising the performance of the original sound data, the output values are transmitted to the next step.
Segmentation: Long data are divided into segments. Short segments require lower calculation resources; hence, they are easier to handle and better facilitate the treatment of unexpected events. The capacity of segments depends on the computational ability that is available for implementation. Normally, an embedded platform with lower computational resources should select smaller-sized segments. Segments that had a minimum size of several seconds were able to be processed in our test.
Detection of grazing action: In the present shape of sound envelope intensity, fluctuations in the slope occur continuously and may peak at in some places. Each maximum/minimum value is identified as a change in the derivative of the envelope. To ensure the peaks, experience-based thresholds can be compared. Breeders can collect a sound library of actions as threshold resources based on their experiences, at which time, the potential target actions must be revealed. The output results of this stage contain sound information with respective timestamps to indicate the location of the identified peaks.
Analysis of sound properties: Special attention should be paid to the shape, maximum intensity, and duration of the candidate actions identified in the previous step. The shape of an action is estimated as the number of turn changes in the sign of the envelope intensity slope. The maximum intensity in the envelope data is calculated from the absolute value of the sound signal over a window time. The duration of an action is computed as the time period if the envelope intensity is higher.
Classification of grazing action: To distinguish between the various activities of livestock, a set of rules is recommended to be employed heuristically. For example, rule 1: If the change in the sign of the slope in the envelope intensity is larger than 2, the maximum intensity at that time is greater than the environmental noise, and duration of the action is greater than 0.3 s, then the action is a composite chew–bite; rule 2: If the change in the sign of the slope in the envelope intensity is less than or equal to 2, the maximum intensity at that time is greater than or equal to half of the expected peak value, and the duration of the action is less than 0.3 s, then action is a bite; rule 3: If the change in the sign of the slope in the envelope intensity is less than or equal to 2, the maximum intensity at that time is both greater than the environmental noise and less than or equal to half of the expected peak value, and the duration of the action is less than 0.3 s, then the action is a chew.
To verify our approach, the input of the system was the digitalized sound (.wav) in [37]. These samples are too large to synthesize on an embedded processor. Hence, the sound signal was down-sampled into smaller segments to reduce the amount of data, as shown in Figure 19. In the remaining stages, we introduced the experimental results based on this segment. Within the signal processing step, the numerical values of the digitalized vocal data were normalized and harmonized with our computational CPU. The raw signals may have contained unexpected noises, especially in outdoor environments. Using a linear time-invariant filter, the signal was synchronously demodulated to obtain the sound envelope. Moreover, this signal was checked to determine the maximum amplitude, named the maximum checker. As the sound envelope was of low frequency, the signal was compared with the experience-based threshold to recognize the animal’s actions. Conventionally, the time frame to scan is about a second in duration. However, in our test, although there was a trade-off in terms of time processing, half a second was chosen to smooth and prevent loss of action. The output results of this step are presented in Figure 20.

6. Conclusions

The open platform developed in this study provides complete implementation of a monitoring data collector using wireless communication and sensors that gather data from physical outdoor activities to determine the best method of feeding and breeding during grazing. The performance of the proposed data collector and its effectiveness were examined via experiments. The platform and its system were validated in a countryside farm, namely, Cat Ba National Park, Vietnam. The useful purposes for farmers and livestock are briefly outlined as follows:
This paper might offer solutions to avoid the unknown issues of changing environments of the livestock industry using different kinds of modern technologies. The collected data of the physical actions of animals can be used to alert farmers of diseases and breeding work.
The comfortable living conditions of the device help livestock to relax, and thus promote their good health and physical well-being. Moreover, large numbers of animals can be taken care with minimal investment.
With its compact size, its lightweight feature, and its easy maintenance, the proposed device can be mass-produced in a short period of time. Furthermore, the multi-functions and extendable ability are also benefits of this low-cost instrument.
However, future research is a must. The platform ought to be fully automatic in its operation, incorporating other bio-sensors and some advanced Information Technology. Once the hardware system works stably, a data processing strategy—for instance, Big Data, Artificial Intelligence, or expert-knowledge technology—should be considered to inspect diseases, insemination, or climate change.

Author Contributions

Conceptualization, H.Q.T.N.; Methodology, H.Q.T.N.; Software, T.P.N.; Validation, H.Q.T.N.; Formal analysis, H.Q.T.N.; Investigation, T.P.N.; Resources, H.N.; Data curation, T.P.N.; Writing—original draft preparation, H.Q.T.N.; Writing—review and editing, H.Q.T.N.; Visualization, H.N.; Supervision, T.P.N.; Project administration, H.Q.T.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Acknowledgments

We acknowledge the support of time and facilities from Ho Chi Minh City University of Technology (HCMUT), VNU-HCM for this study.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zanella, A.; Bui, N.; Castellani, A.; Vangelista, L.; Zorzi, M. Internet of things for smart cities. IEEE Internet Things J. 2014, 1, 22–32. [Google Scholar] [CrossRef]
  2. Tao, F.; Zuo, Y.; Da Xu, L.; Zhang, L. IoT-based intelligent perception and access of manufacturing resource toward cloud manufacturing. IEEE Trans. Ind. Inform. 2014, 10, 1547–1557. [Google Scholar]
  3. Catarinucci, L.; De Donno, D.; Mainetti, L.; Palano, L.; Patrono, L.; Stefanizzi, M.L.; Tarricone, L. An IoT-aware architecture for smart healthcare systems. IEEE Internet Things J. 2015, 2, 515–526. [Google Scholar] [CrossRef]
  4. Masek, P.; Masek, J.; Frantik, P.; Fujdiak, R.; Ometov, A.; Hosek, J.; Andreev, S.; Mlynek, P.; Misurec, J. A harmonized perspective on transportation management in smart cities: The novel IoT-driven environment for road traffic modeling. Sensors 2016, 16, 1872. [Google Scholar] [CrossRef] [PubMed]
  5. Tu, M. An exploratory study of Internet of Things (IoT) adoption intention in logistics and supply chain management. Int. J. Logist. Manag. 2018, 29, 131–151. [Google Scholar] [CrossRef]
  6. Idrees, Z.; Zou, Z.; Zheng, L. Edge computing based IoT architecture for low cost air pollution monitoring systems: A comprehensive system analysis, design considerations & development. Sensors 2018, 18, 3021. [Google Scholar]
  7. Yang, Q.; Yoo, S.J. Optimal UAV path planning: Sensing data acquisition over IoT sensor networks using multi-objective bio-inspired algorithms. IEEE Access 2018, 6, 13671–13684. [Google Scholar] [CrossRef]
  8. Li, Z.; Liu, G.; Liu, L.; Lai, X.; Xu, G. IoT-based tracking and tracing platform for prepackaged food supply chain. Ind. Manag. Data Syst. 2017, 117, 1906–1916. [Google Scholar] [CrossRef]
  9. Ji, Z.; Ganchev, I.; O’Droma, M.; Zhao, L.; Zhang, X. A cloud-based car parking middleware for IoT-based smart cities: Design and implementation. Sensors 2014, 14, 22372–22393. [Google Scholar] [CrossRef]
  10. Kragh, M.F.; Christiansen, P.; Laursen, M.S.; Larsen, M.; Steen, K.A.; Green, O.; Karstoft, H.; Jørgensen, R.N. Fieldsafe: Dataset for obstacle detection in agriculture. Sensors 2017, 17, 2579. [Google Scholar] [CrossRef] [Green Version]
  11. Camas-Nafate, M.P.; Alvarez-Gutiérrez, P.; Valenzuela-Mondaca, E.; Castillo-Palomera, R.; Perez-Luna, Y.D.C. Improved agricultural products drying through a novel double collector solar device. Sustainability 2019, 11, 2920. [Google Scholar] [CrossRef] [Green Version]
  12. Idbella, M.; Iadaresta, M.; Gagliarde, G.; Mennella, A.; Mazzoleni, S.; Bonanomi, G. AgriLogger: A New Wireless Sensor for Monitoring Agrometeorological Data in Areas Lacking Communication Networks. Sensors 2020, 20, 1589. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  13. Jiang, G.; Grafton, M.; Pearson, D.; Bretherton, M.; Holmes, A. Integration of Precision Farming Data and Spatial Statistical Modelling to Interpret Field-Scale Maize Productivity. Agriculture 2019, 9, 237. [Google Scholar] [CrossRef] [Green Version]
  14. Germani, L.; Mecarelli, V.; Baruffa, G.; Rugini, L.; Frescura, F. An IoT Architecture for Continuous Livestock Monitoring Using LoRa LPWAN. Electronics 2019, 8, 1435. [Google Scholar] [CrossRef] [Green Version]
  15. Maroto-Molina, F.; Navarro-García, J.; Príncipe-Aguirre, K.; Gómez-Maqueda, I.; Guerrero-Ginel, J.E.; Garrido-Varo, A.; Pérez-Marín, D.C. A low-cost iot-based system to monitor the location of a whole herd. Sensors 2019, 19, 2298. [Google Scholar] [CrossRef] [Green Version]
  16. Zhang, L.; Kim, J.; Lee, Y. The Platform Development of a Real-Time Momentum Data Collection System for Livestock in Wide Grazing Land. Electronics 2018, 7, 71. [Google Scholar] [CrossRef] [Green Version]
  17. Available online: https://en.wikipedia.org/wiki/Raspberry_Pi (accessed on 18 May 2020).
  18. Mesas-Carrascosa, F.J.; Santano, D.V.; Meroño, J.E.; De La Orden, M.S.; García-Ferrer, A. Open source hardware to monitor environmental parameters in precision agriculture. Biosyst. Eng. 2015, 137, 73–83. [Google Scholar] [CrossRef]
  19. Patil, A.; Beldar, M.; Naik, A.; Deshpande, S. Smart farming using Arduino and data mining. In Proceedings of the 2016 3rd International Conference on Computing for Sustainable Global Development (INDIACom), New Delhi, India, 16–18 March 2016; pp. 1913–1917. [Google Scholar]
  20. Rahman, S. Use of closed loop system using arduino for different parameters in farming. Bull. Electr. Eng. Inform. 2020, 9, 1373–1378. [Google Scholar]
  21. Jayaraman, P.P.; Yavari, A.; Georgakopoulos, D.; Morshed, A.; Zaslavsky, A. Internet of things platform for smart farming: Experiences and lessons learnt. Sensors 2016, 16, 1884. [Google Scholar] [CrossRef]
  22. Saqib, M.; Almohamad, T.A.; Mehmood, R.M. A Low-Cost Information Monitoring System for Smart Farming Applications. Sensors 2020, 20, 2367. [Google Scholar] [CrossRef] [Green Version]
  23. Trilles, S.; González-Pérez, A.; Huerta, J. A Comprehensive IoT Node Proposal Using Open Hardware, A Smart Farming Use Case to Monitor Vineyards. Electronics 2018, 7, 419. [Google Scholar] [CrossRef] [Green Version]
  24. Tzounis, A.; Katsoulas, N.; Bartzanas, T.; Kittas, C. Internet of Things in agriculture, recent advances and future challenges. Biosyst. Eng. 2017, 164, 31–48. [Google Scholar] [CrossRef]
  25. Talavera, J.M.; Tobón, L.E.; Gómez, J.A.; Culman, M.A.; Aranda, J.M.; Parra, D.T.; Quiroz, L.A.; Hoyos, A.; Garreta, L.E. Review of IoT applications in agro-industrial and environmental fields. Comput. Electron. Agric. 2017, 142, 283–297. [Google Scholar] [CrossRef]
  26. Zervopoulos, A.; Tsipis, A.; Alvanou, A.G.; Bezas, K.; Papamichail, A.; Vergis, S.; Stylidou, A.; Tsoumanis, G.; Komianos, V.; Koufoudakis, G.; et al. Wireless Sensor Network Synchronization for Precision Agriculture Applications. Agriculture 2020, 10, 89. [Google Scholar] [CrossRef] [Green Version]
  27. Cerchecci, M.; Luti, F.; Mecocci, A.; Parrino, S.; Peruzzi, G.; Pozzebon, A. A low power IoT sensor node architecture for waste management within smart cities context. Sensors 2018, 18, 1282. [Google Scholar] [CrossRef] [Green Version]
  28. Gia, T.N.; Sarker, V.K.; Tcarenko, I.; Rahmani, A.M.; Westerlund, T.; Liljeberg, P.; Tenhunen, H. Energy efficient wearable sensor node for IoT-based Fall detection systems. Microprocess. Microsyst. 2018, 56, 34–46. [Google Scholar]
  29. Zhang, Y.; Chen, Q.; Liu, G.; Shen, W.; Wang, G. Environment parameters control based on wireless sensor network in livestock buildings. Int. J. Distrib. Sens. Netw. 2016, 12, 9079748. [Google Scholar] [CrossRef] [Green Version]
  30. Bhargava, K.; Ivanov, S.; Donnelly, W. Internet of nano things for dairy farming. In Proceedings of the Second Annual International Conference on Nanoscale Computing and Communication, Boston, USA, 23–25 September 2015; pp. 1–2. [Google Scholar]
  31. Jeong, H.S.; Yoe, H. Study on the sensor MAC protocol for environment monitoring of livestock farm. In Proceedings of the International Conference on Wireless Networks (ICWN) (p. 1). The Steering Committee of the World Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp), Hsinchu, Taiwan, 29 June 2012. [Google Scholar]
  32. Asikainen, M.; Haataja, K.; Toivanen, P. Wireless indoor tracking of livestock for behavioral analysis. In Proceedings of the 2013 IEEE 9th International Wireless Communications and Mobile Computing Conference (IWCMC), Sardinia, Italy, 1–5 July 2013; pp. 1833–1838. [Google Scholar]
  33. Available online: https://ec.europa.eu/growth/tools-databases/dem/monitor/content/connected-livestock (accessed on 18 May 2020).
  34. Vázquez-Diosdado, J.A.; Paul, V.; Ellis, K.A.; Coates, D.; Loomba, R.; Kaler, J. A combined offline and online algorithm for real-time and long-term classification of sheep behaviour: Novel approach for precision livestock farming. Sensors 2019, 19, 3201. [Google Scholar] [CrossRef] [Green Version]
  35. Ikhsan, M.G.; Saputro, M.Y.A.; Arji, D.A.; Harwahyu, R.; Sari, R.F. Mobile LoRa Gateway for Smart Livestock Monitoring System. In Proceedings of the 2018 IEEE International Conference on Internet of Things and Intelligence System (IOTAIS), Bali, Indonesia, 1–3 November 2018; pp. 46–51. [Google Scholar]
  36. Moritz, M.; Galehouse, Z.; Hao, Q.; Garabed, R.B. Can One Animal Represent an Entire Herd? Modeling Pastoral Mobility Using GPS/GIS Technology. Hum. Ecol. 2012, 40, 623–630. [Google Scholar] [CrossRef]
  37. Manning, J.; Cronin, G.; González, L.; Hall, E.; Merchant, A.; Ingram, L. The behavioural responses of beef cattle (Bos taurus) to declining pasture availability and the use of GNSS technology to determine grazing preference. Agriculture 2017, 7, 45. [Google Scholar] [CrossRef] [Green Version]
  38. Available online: https://www.vectronic-aerospace.com/ (accessed on 18 May 2020).
  39. Available online: https://www.lotek.com/ (accessed on 18 May 2020).
  40. Available online: https://www.holohil.com/ (accessed on 18 May 2020).
  41. Löttker, P.; Rummel, A.; Traube, M.; Stache, A.; Šustr, P.; Müller, J.; Heurich, M. New possibilities of observing animal behaviour from a distance using activity sensors in GPS-collars: An attempt to calibrate remotely collected activity data with direct behavioural observations in red deer Cervus elaphus. Wildl. Biol. 2009, 15, 425–434. [Google Scholar] [CrossRef] [Green Version]
  42. Ferrari, P.; Flammini, A.; Rinaldi, S.; Sisinni, E.; Maffei, D.; Malara, M. Impact of quality of service on cloud based industrial IoT applications with OPC UA. Electronics 2018, 7, 109. [Google Scholar] [CrossRef] [Green Version]
  43. Fernández-Caramés, T.M.; Fraga-Lamas, P.; Suárez-Albela, M.; Castedo, L. Reverse engineering and security evaluation of commercial tags for RFID-based IoT applications. Sensors 2017, 17, 28. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  44. Yoon-Min, H.; Gyu, K.M.; Jae-Jeung, R. Understanding Internet of Things (IoT) diffusion. Inf. Dev. 2015, 32, 969–985. [Google Scholar]
  45. Quintana-Suárez, M.A.; Sánchez-Rodríguez, D.; Alonso-González, I.; Alonso-Hernández, J.B. A low cost wireless acoustic sensor for ambient assisted living systems. Appl. Sci. 2017, 7, 877. [Google Scholar] [CrossRef] [Green Version]
  46. Chelotti, J.O.; Vanrell, S.R.; Milone, D.H.; Utsumi, S.A.; Galli, J.R.; Rufiner, H.L.; Giovanini, L.L. A real-time algorithm for acoustic monitoring of ingestive behavior of grazing cattle. Comput. Electron. Agric. 2016, 127, 64–75. [Google Scholar] [CrossRef] [Green Version]
  47. Milone, D.H.; Galli, J.R.; Cangiano, C.A.; Rufiner, H.L.; Laca, E.A. Automatic recognition of ingestive sounds of cattle based on hidden Markov models. Comput. Electron. Agric. 2012, 87, 51–55. [Google Scholar] [CrossRef]
  48. Carpentier, L.; Berckmans, D.; Youssef, A.; Berckmans, D.; van Waterschoot, T.; Johnston, D.; Ferguson, N.; Earley, B.; Fontana, I.; Tullo, E.; et al. Automatic cough detection for bovine respiratory disease in a calf house. Biosyst. Eng. 2018, 173, 45–56. [Google Scholar] [CrossRef]
  49. Andriamandroso, A.; Bindelle, J.; Mercatoris, B.; Lebeau, F. A review on the use of sensors to monitor cattle jaw movements and behavior when grazing. Biotechnol. Agron. SociÉTÉ Et Environ. 2016, 20, 1–14. [Google Scholar]
  50. Vanrell, S.R.; Chelotti, J.O.; Galli, J.R.; Utsumi, S.A.; Giovanini, L.L.; Rufiner, H.L.; Milone, D.H. A regularity-based algorithm for identifying grazing and rumination bouts from acoustic signals in grazing cattle. Comput. Electron. Agric. 2018, 151, 392–402. [Google Scholar] [CrossRef]
  51. Tran, H.A.M.; Ngo, H.Q.T.; Nguyen, T.P.; Nguyen, H. Design of Green Agriculture System Using Internet of Things and Image Processing Techniques. In Proceedings of the 2018 IEEE 4th International Conference on Green Technology and Sustainable Development (GTSD), Ho Chi Minh City, Vietnam, 23–24 November 2018; pp. 28–32. [Google Scholar]
  52. Available online: https://lastminuteengineers.com/neo6m-gps-arduino-tutorial/ (accessed on 18 May 2020).
  53. Available online: http://wiki.sunfounder.cc/index.php?title=Ublox_NEO-6M_GPS_Module (accessed on 18 May 2020).
  54. Aghenta, L.O.; Iqbal, M.T. Low-Cost, Open Source IoT-Based SCADA System Design Using Thinger, IO and ESP32 Thing. Electronics 2019, 8, 822. [Google Scholar] [CrossRef] [Green Version]
  55. Available online: https://github.com/espressif/arduino-esp32/issues/544 (accessed on 18 May 2020).
  56. Available online: http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_Temperature_and_Humidity_Sensor (accessed on 18 May 2020).
  57. Available online: http://wiki.sunfounder.cc/index.php?title=MPU6050_Module (accessed on 18 May 2020).
  58. Available online: https://www.maximintegrated.com/en/products/analog/audio/MAX4466.html (accessed on 18 May 2020).
  59. Available online: https://en.wikipedia.org/wiki/Firebase (accessed on 18 May 2020).
  60. Available online: https://en.wikipedia.org/wiki/Arduino (accessed on 18 May 2020).
  61. Available online: https://en.wikipedia.org/wiki/Android_Studio (accessed on 18 May 2020).
  62. Ngo, H.Q.T.; Nguyen, T.P.; Huynh, V.N.S.; Le, T.S.; Nguyen, C.T. Experimental comparison of complementary filter and kalman filter design for low-cost sensor in quadcopter. In Proceedings of the 2017 IEEE International Conference on System Science and Engineering (ICSSE), Ho Chi Minh City, Vietnam, 21–23 July 2017; pp. 488–493. [Google Scholar]
  63. Krop-Benesch, A.; Berger, A.; Hofer, H.; Heurich, M. Long-term measurement of roe deer (Capreolus capreolus) (Mammalia: Cervidae) activity using two-axis accelerometers in GPS-collars. Ital. J. Zool. 2013, 80, 69–81. [Google Scholar] [CrossRef] [Green Version]
  64. Available online: https://tinyurl.com/rbfha3b (accessed on 18 May 2020).
Figure 1. Protocol communication via Message Queuing Telemetry Transport (MQTT) in the proposed design.
Figure 1. Protocol communication via Message Queuing Telemetry Transport (MQTT) in the proposed design.
Agriculture 10 00180 g001
Figure 2. Flowchart of the embedded hardware in the proposed design.
Figure 2. Flowchart of the embedded hardware in the proposed design.
Agriculture 10 00180 g002
Figure 3. Module of GPS NEO-6M V2: (a) Connection scheme [52]; (b) hardware schematic [53].
Figure 3. Module of GPS NEO-6M V2: (a) Connection scheme [52]; (b) hardware schematic [53].
Agriculture 10 00180 g003
Figure 4. The module of ESP32 DEVKIT V1 [55] (a); the DHT11 sensor [56] (b); and MPU-6050 [57] (c).
Figure 4. The module of ESP32 DEVKIT V1 [55] (a); the DHT11 sensor [56] (b); and MPU-6050 [57] (c).
Agriculture 10 00180 g004
Figure 5. Microphone amplifier GY-MAX4466 [58].
Figure 5. Microphone amplifier GY-MAX4466 [58].
Agriculture 10 00180 g005
Figure 6. Electric schematic of GY-MAX4466 [58].
Figure 6. Electric schematic of GY-MAX4466 [58].
Agriculture 10 00180 g006
Figure 7. PCB design (a) and layout design (b) for the interface basement module.
Figure 7. PCB design (a) and layout design (b) for the interface basement module.
Agriculture 10 00180 g007
Figure 8. Upper side (a) and bottom side (b) of the cover box.
Figure 8. Upper side (a) and bottom side (b) of the cover box.
Agriculture 10 00180 g008
Figure 9. Location attachment for the proposed data collector on the forehead of cattle.
Figure 9. Location attachment for the proposed data collector on the forehead of cattle.
Agriculture 10 00180 g009
Figure 10. Google Firebase service.
Figure 10. Google Firebase service.
Agriculture 10 00180 g010
Figure 11. Block diagram of communication and power.
Figure 11. Block diagram of communication and power.
Agriculture 10 00180 g011
Figure 12. Experimental hardware (a) and the test scenario (b).
Figure 12. Experimental hardware (a) and the test scenario (b).
Agriculture 10 00180 g012
Figure 13. Main graphical user interface (a) and temperature data record (b).
Figure 13. Main graphical user interface (a) and temperature data record (b).
Agriculture 10 00180 g013
Figure 14. Motion data from the accelerometer (a) and the GPS-tracking data (b).
Figure 14. Motion data from the accelerometer (a) and the GPS-tracking data (b).
Agriculture 10 00180 g014
Figure 15. Structure of the complementary filter.
Figure 15. Structure of the complementary filter.
Agriculture 10 00180 g015
Figure 16. Audio data from GY-MAX4466 (a), and a spectrum plot (b).
Figure 16. Audio data from GY-MAX4466 (a), and a spectrum plot (b).
Agriculture 10 00180 g016
Figure 17. Example of a practical test for monitoring livestock during grazing.
Figure 17. Example of a practical test for monitoring livestock during grazing.
Agriculture 10 00180 g017
Figure 18. Flow chart of sound signal processing.
Figure 18. Flow chart of sound signal processing.
Agriculture 10 00180 g018
Figure 19. Signals recorded by the proposed data collector: (a) Original sound signal; (b) resampled sound signal.
Figure 19. Signals recorded by the proposed data collector: (a) Original sound signal; (b) resampled sound signal.
Agriculture 10 00180 g019
Figure 20. Flow example of a 10 s soundtrack with correspondent signals achieved by the proposed data collector: (a) A down-sampled sound signal; (b) envelope magnitude; (c) slope sign; (d) maximum amplitude; (e) duration of detection.
Figure 20. Flow example of a 10 s soundtrack with correspondent signals achieved by the proposed data collector: (a) A down-sampled sound signal; (b) envelope magnitude; (c) slope sign; (d) maximum amplitude; (e) duration of detection.
Agriculture 10 00180 g020
Table 1. List of currents in both active mode and stand-by mode for each component.
Table 1. List of currents in both active mode and stand-by mode for each component.
No.DescriptionCurrent in Active Mode (mA)Current in Stand-by Mode (mA)
1ESP322400.8
2GPS NEO-6M5030
3MPU-6050 (Gyros)3.60.005
4MPU-6050 (Accelerator)0.50.06
5DHT110.30.06
6GY-MAX44660.060.05 (uA)
Table 2. Cost of the materials individually.
Table 2. Cost of the materials individually.
No.ItemCost (unit: USD)
1ESP326.87
2GPS NEO-6M13.96
3MPU-60501.03
4DHT111.29
5GY-MAX44662.15
6Cover2.3
7Belt1.1
Total28.7
Table 3. Comparative results between the proposed approach and a currently available device.
Table 3. Comparative results between the proposed approach and a currently available device.
SpecificationVERTEX LiteProposed Approach
Weight320 g200 g
Battery1 Cell—349 days21 days *
Frequent updateEvery 2 hEvery 10 s
Price (USD)1000~200028.7
Tracking modeGPSGPS
Max records130.000 positionsDepends on Firebase
Data transmissionIridium/Globalstar/Global System for Mobile CommunicationsTransmission Control Protocol/ Internet Protocol
Motion sensorYesYes
Axis36
Temperature sensorYesYes
Mortality sensorYesNo
Radio beaconVHFNo
MicrophoneNoYes
Acoustic analysisNoYes
* Battery is extendable by using one of a larger capacity or by lowering the number of frequent updates.

Share and Cite

MDPI and ACS Style

Ngo, H.Q.T.; Nguyen, T.P.; Nguyen, H. Research on a Low-Cost, Open-Source, and Remote Monitoring Data Collector to Predict Livestock’s Habits Based on Location and Auditory Information: A Case Study from Vietnam. Agriculture 2020, 10, 180. https://doi.org/10.3390/agriculture10050180

AMA Style

Ngo HQT, Nguyen TP, Nguyen H. Research on a Low-Cost, Open-Source, and Remote Monitoring Data Collector to Predict Livestock’s Habits Based on Location and Auditory Information: A Case Study from Vietnam. Agriculture. 2020; 10(5):180. https://doi.org/10.3390/agriculture10050180

Chicago/Turabian Style

Ngo, Ha Quang Thinh, Thanh Phuong Nguyen, and Hung Nguyen. 2020. "Research on a Low-Cost, Open-Source, and Remote Monitoring Data Collector to Predict Livestock’s Habits Based on Location and Auditory Information: A Case Study from Vietnam" Agriculture 10, no. 5: 180. https://doi.org/10.3390/agriculture10050180

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop