Design of Environment Monitoring System for Intelligent Breeding Base Based on Internet of Things

Abstract

With the advent of the intelligent age of electronic information and the continuous improvement of application management, electronic information technology has penetrated into the fields of industry, agriculture, intelligent breeding, and smart home. The aquaculture industry is gradually changing from the traditional method of relying solely on human measurement, control and management to an intelligent, informatized, and automated modern aquaculture method. In order to design an intelligent breeding base, this article proposes to use “Internet+” technology to design an intelligent poultry breeding base environmental monitoring system based on the Internet of Things, starting from information and network, breeding industry and management. The system uses ESP-12F WIFI module as the control core, which has wireless transmission function. It can use sensors to collect the environmental temperature and humidity, light, air quality and other indicators of the breeding base, and upload it to the cloud platform. IN manual mode, users can use mobile terminals to perform operations such as online monitoring of environmental data, issuing instructions, and timing to achieve remote management. In the automatic mode, the system can automatically perform functions such as ventilation, humidification, and dehumidification according to the internal environmental thresholds, so as to ensure that the environment of the breeding base is in a good state. In view of the situation that different poultry may have different adaptability to the environment, the user can directly modify the environmental threshold on the mobile terminal.

Share and Cite:

Zhang, X.J. and Zhi, Y. (2021) Design of Environment Monitoring System for Intelligent Breeding Base Based on Internet of Things. Open Access Library Journal, 8, 1-9. doi: 10.4236/oalib.1108044.

1. Introduction

With the expansion of the scale of poultry farming, the impact of environmental factors on farming production has become more and more significant. At present, most poultry farming in our country is still in the artificial stage, and the environmental monitoring in the breeding base is time-consuming and laborious. If the situation of the breeding base cannot be controlled in time, it may cause serious losses to the farmers. Therefore, the “Internet+” technology is used to design a set of intelligent poultry breeding base environmental monitoring system which is still necessary for breeding. Although our country’s aquaculture industry is gradually transforming from the traditional completely relying on manpower to the intelligent and large-scale modern farming method, the development is very slow.

Temperature and humidity are an important factor for the success or failure of breeding. If the temperature is too low, the birds are likely to get cold and cause diarrhea or respiratory diseases, etc., and they usually get together in order to maintain body temperature [1], which is very likely to cause trampling. It will cause a large number of deaths. In addition, it takes a lot of energy to maintain body temperature. Eating will increase the consumption of feeding, resulting in a decrease in feed conversion rate, which directly affects the growth of poultry. Generally speaking, the suitable temperature for laying hens is between 18˚C - 23˚C. High temperature can reduce egg weight, shell weight and egg production rate. The suitable temperature for broiler chicken growth is between 18˚C - 25˚C. Too low or too high temperature will reduce the growth rate of the chicken and cause immunosuppression, making it susceptible to pathogen infection during the growth process or reduced antibodies after immunization [2]. And too high or too low humidity can cause poultry diseases and affect the growth and survival rate of poultry. Relevant studies have shown that at a suitable temperature, a relative humidity of 60% to 65% is the best. For parameter control such as temperature and humidity, most farms do not realize automatic operation and still rely on manual measurement and control. In addition, the management plan is not mature enough, and the management staff lacks relevant management experience and other reasons, resulting in unsatisfactory input and output of breeding. Compared with developed countries, the gap is large.

2. Systematic Designs

For the breeding base, the wired control method is adopted. Although the anti-interference and confidentiality are strong, it has the problems of high cost and difficulty in upgrading and maintenance. Therefore, the feasibility is not high, so the wireless control method is adopted. The environmental monitoring system of the intelligent poultry breeding base designed in this paper is mainly composed of ESP-12F WIFI module, OLED display, MQ-135 air quality sensor, DHT11 temperature and humidity sensor, DC motor, photoresistor and other modules [3]. Among them, the ESP-12F module is responsible for network connection and communication. In addition, it also acts as a control module to collect sensor data and report it to the cloud server. At the same time, the user sends commands from the mobile terminal. It receives commands to make the device perform different actions, such as: Ventilation, dehumidification, humidification, feeding and other actions; DHT11 module is used to detect the temperature and humidity data of the breeding base; MQ-135 air quality sensor is used to detect the concentration of harmful gases such as ammonia and hydrogen sulfide in the breeding base; DC motor is used to simulate ventilation The fan rotates; the OLED screen is used to display sensor data and interactive information; the photoresistor is used to detect the light intensity. The system hardware framework is shown in Figure 1.

2.1. Components Selection

1) DHT11 temperature and humidity module, used to detect the temperature and humidity information of the breeding base; DHT11 temperature and humidity sensor is a temperature and humidity composite sensor [4]. It includes an NTC temperature measuring element and a capacitive humidity sensing element. It adopts a single bus communication method to realize data communication and control with the single-chip microcomputer [4]. This product has the advantages of low cost, long-term stability, ultra-fast response, strong anti-interference, and high accuracy [5]. The relative humidity measurement range is 5 - 95%RH, the temperature measurement range is −20˚C - 60˚C, and under the condition of 25˚C, the temperature error is ±5%RH, and the humidity error is ±2˚C. Use it to realize the collection of environmental temperature and humidity information.

Figure 1. Block diagram of system hardware composition.

2) OLED screen, used for data interaction; 0.96-inch OLED module uses SSD1306 as the driver chip, with a resolution of 128 × 64, using I2C as the communication method, simple interface and low power consumption. Use the OLED screen to display interactive information executed by the system, such as temperature and humidity, networking status and other information, allowing users to more directly understand the execution of the system and basic information about the current environment.

3) The MQ-135 air quality sensor is used to detect the concentration of harmful gases in the breeding base; the gas sensitive material used in the MQ-135 gas sensor is tin dioxide with low conductivity in clean air [6]. When there are pollutant gases such as ammonia, sulfide, benzene vapor, etc. in the environment where the sensor is located, the conductivity of the sensor increases with the increase of the pollutant gas concentration in the air [7]. Using this feature, the ADC can be used to collect the voltage. The analog quantity is converted into a digital quantity to judge the size of the density. Under the condition of 20˚C and 65%RH, the working voltage is 5V, the measuring range is 10 - 1000 ppm, and the sensor resistance ratio is less than or equal to 0.6 (sensitivity). In addition, the sensor has a long life, low cost, and simple drive circuit, making it a low-cost sensor suitable for many occasions.

4) The light sensor is used to detect the brightness in the breeding base; the light sensor is a sensor that uses a photosensitive element to convert light signals into electrical signals [8]. The photodiode (photoresistor) is very sensitive to changes in light. The resistance value decreases with the increase of light [5]. Therefore, this feature can be used to design a circuit for detecting light intensity.

2.2. Systematic Designs

1) Main program workflow

After the device is started, check whether there is WIFI configuration information in the memory. If not, enter the network distribution process. After the network is successfully configured, the product will go to the cloud, upload the environmental data to the cloud platform, and write the WIFI information into the memory, and start next time The device is directly connected to the target WIFI, and the configuration information can be cleared by restarting the device five times quickly, and the network reconfiguration process can be entered; in the automatic mode, the temperature, humidity, light, and air quality detection and control subroutines are automatically executed according to the environmental thresholds set by default. The data is displayed on the OLED in real time. In addition, for different breeding environments, the environmental threshold can be modified on the mobile App. In manual mode, you can manually perform ventilation, humidification, drying and other actions through the mobile App. The main program workflow is shown in Figure 2.

2) Detection and control of temperature and humidity subroutine

Figure 2. Main flow chart of system control.

After the equipment is started, it will continue to detect the temperature and humidity around the breeding base. In the automatic mode, when the detected ambient temperature is greater than the temperature threshold, ventilation is performed to dissipate heat; otherwise, heating is used to maintain the temperature in the breeding base [5]. The system as shown in Figure 3; when the humidity is greater than the humidity threshold, the humidity is reduced by performing dehumidification, and vice versa, humidification is turned on.

3) Subroutine detection and control of light intensity

After the equipment is started, it continuously detects the light intensity inside the breeding base. In the automatic mode, when the light value is greater than the light threshold, the brightness of the lights in the breeding base is appropriately reduced, otherwise, the brightness is appropriately increased.

4) Air quality subroutine testing and control

After the equipment is started, it continuously monitors the air quality of the breeding base. In the automatic mode, if the concentration is greater than the present value, the ventilation is turned on to accelerate the air circulation, thereby reducing the concentration of harmful gases.

Figure 3. Temperature detection control flow chart.

3. System Hardware Design

This system uses the ESP-12F module as the main control core. This is a high-performance wireless SoC that has a complete and self-contained WIFI network function and supports UART, GPIO, ADC, PWM, SPI, I2C and other interfaces.

When the system is running, GPIO2 remains externally pulled high, and GPIO15 remains externally pulled low. When in serial download mode, GPIO0 is externally pulled low, and when in program operation mode, GPIO0 is externally pulled high. Combining the pin definition and working mode, the minimum system circuit to make it work normally is shown in Figure 4.

The module reset is active low, and the reset circuit is designed. ESP_RST is connected to the RST pin of the module, and the reset circuit includes two modes of manual button reset and power-on reset. The working voltage of the ESP-12F module is 3.0 - 3.6 V. Since the general USB power supply is 5 V, a step-down circuit is required to provide the module with a suitable working power supply. The three-terminal regulator filters the power supply through parallel capacitors to make it output Pure 3.3 V voltage.

The light-sensitive characteristic of photoresistor is used to design the light detection circuit. GL5506 is a photoresistor. When the ambient light changes, the voltage across the GL5506 will change accordingly. The stronger the light, the higher the output voltage, the weaker the light, and the lower the output voltage. Through the ADC pin of ESP8266, collect the voltage change, you can get the intensity of the ambient light.

MQ135 has high sensitivity to harmful gases such as sulfide, benzene vapor, smoke, etc. It uses 5 V power supply and AIN0 outputs analog quantity. The

Figure 4. Minimal system circuit diagram.

analog quantity output increases with increasing concentration. The higher the concentration, the higher the output voltage. The ESP8266 has only one single channel 10-bit ADC to collect the IO port, so the PCF8591 AD/DA conversion chip is used here.

DHT11 relative humidity range: 5 - 95%RH, temperature range: −20˚C - 60˚C. DHT11’s No. 2 pin is connected to a 4.7K pull-up resistor when used, and connected to the IO port of ESP8266 as the output serial data.

The No. 2 pin of DHT11 is a data line, which adopts a single bus communication mode and is responsible for data exchange and control with the microprocessor. Because only one data line is used, the IO port resources of the single-chip microcomputer are greatly saved. After DHT11 collects the ambient temperature and humidity, it adopts the high-order priority output mode and sends 40 bits of data each time. Data format: 8 bit humidity integer data + 8 bit humidity decimal data + 8 bit temperature integer data + 8 bit temperature decimal data + 8 bit check digit.

4. System Software Design

This development is based on the Windows 10 system, create a project, and create a product in the project; 1) Function definition; 2) Human-computer interaction settings, network distribution guidance: 3) Choose one-key network distribution and mobile hotspot distribution network; 4) Equipment Panel: Place components according to the function definition; 5) Equipment debugging: After selecting the module, add test equipment; 6) Burn the triplet information to the equipment NVS partition.

The data obtained by the sensor is reported to the Alibaba Cloud platform through a JSON string. The key name in the JSON string must be consistent with the identifier in the function definition. Use the App (Cloud Intelligence) provided by Alibaba to scan the QR code of the distribution network in the “Batch Production”. After the distribution is completed, you can see the device collection data in the Alibaba Cloud background.

5. Comprehensive Debugging of the System

The sensor normally collects environmental data and displays it on the OLED screen, and uploads the environmental data to the server. The mobile terminal of the mobile phone can view it in real time. Compared with the data shown, the data is consistent; in manual mode, the mobile terminal of the mobile phone sends out drying and feeding, Auxiliary heating command, the equipment normally receives and lights up the corresponding LED light, which can be verified by the above test, real-time display of environmental data, equipment online monitoring, mobile terminal control and other functions can work normally.

In the automatic mode, the sensor data collected by the device can be compared according to the preset environmental parameter thresholds to perform corresponding operations. The preset temperature, humidity, light, and air quality thresholds are 30, 60, 50, 50, and the ambient temperature, humidity, light, and air quality are 29.1, 63.0, 24.44, 5.88, respectively, according to the overall function design As shown in the flowchart, the current temperature, light, and air quality are less than the threshold, and the humidity is greater than the threshold, so the device performs auxiliary heating, drying, and lighting brightness increase functions.

In addition, in the automatic mode, the threshold can be modified through the mobile terminal. The temperature and humidity, light, and air quality thresholds can be modified to 10, 73, 9, and 3 respectively. Through comparison, it is found that the temperature, light, and air quality are greater than the threshold, and the humidity is less than the threshold. Perform ventilation, humidification, and lighting brightness reduction operations, the automatic mode test is shown in Figure 5.

Figure 5. Automatic mode test.

Encountered some problems during hardware debugging, such as OLED can’t work and the computer can’t find the serial port Wait, the OLED display problem is because the old VCC version is used for testing, and the new GND version is used for PCB plate making. The problem is solved after replacement; the computer cannot find the serial port because there is a problem with the CH340C chip, and the problem is solved by replacing it with a new chip.

6. Conclusion

The intelligent poultry breeding base environmental monitoring system designed in this subject currently simulates the control of the equipment by controlling the on and off of the LED lights. For example, the LED on behalf of dehumidification lights up, indicating that the equipment has been turned on. In the actual use of the breeding base, the opening and closing of the equipment is controlled by the pull-in of the control relay. Different equipment adopts different control methods. In addition, it has no special requirements for application scenarios. On the contrary, this system can adapt to different poultry breeding environments. For example, in the automatic mode, different poultry may have different adaptation ranges to the environment. In this case, you can modify the environmental parameter threshold. In this way, operations such as ventilation are performed to ensure that the environment of the breeding base is in a good state.

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] Fan, S.Q., Zong, Y.G., Zhang, X.R., et al. (2013) Analysis of Poultry Environment and Healthy Breeding. Poultry Science, No. 4, 7-9.
[2] Li, H.L., Li, M., Zhan, K., Yang, X.J., Weng, S.Z., Yuan, Y., Chen, S., Luo, W. and Gao, H.Y. (2015) Intelligent Monitoring System for Laminated Henhouse Based on Internet of Things. Transactions of the Chinese Society of Agricultural Engineering, No. S2, 210-215.
[3] Ding, Q. (2015) Distributed Laboratory Temperature and Humidity Monitoring System Based on Zigbee. Guizhou University, Guiyang.
[4] Zuo, P. (2017) Design and Implementation of a Monitoring System for the Smart Home Environment of the Internet of Things. Mudanjiang Teachers College, Mudanjiang.
[5] Li, G., Dou, J.H. and Wang, S.Y. (2013) Design of Farmland Temperature and Humidity Monitoring System Based on Kingview. Microcomputers and Applications, No. 4, 55-57.
[6] Zeng, Y. (2016) Design and Implementation of a Smart City Training System Based on the Internet of Things. Southwest Jiaotong University, Chengdu.
[7] Chen, Q.H. (2018) Environmental Monitoring System Based on Wireless Sensors. Journal of Fuqing Branch of Fujian Normal University, No. 5, 50-56.
[8] Chen, Z.H. (2019) Design and Implementation of the Internet of Things for Smart Teachers Based on ZigBee. Master Dissertation, Lanzhou University, Lanzhou.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.