Abstract:
According to the actual needs of small and medium-sized farms, an automatic control system for eco-environmental monitoring and cleaning was designed with PLC (programmable logic controller) as the core controller. The system was composed of subsystems such as sunshade, fan unit, spray system, manure scraper, and flushing control system. According to the detected value of ecological environment parameters such as temperature, humidity, the ammonia concentration in the pigsty, PLC and human-machine interface controlled the subsystems to achieve the regulation of the environmental parameters for improving the survival rate of piglets and reducing the incidence of pigs, resulted in realize the automatic breeding of pigs. According to the different temperature requirements of pigs in different growth stages, temperature-sensitive resistors were used to measure and control the temperature in different areas of the pigsty. Because the resistances of the temperature-sensitive resistor and the changes of the temperature were non-linear to achieve accurate temperature measurement, a simple resistance-voltage conversion circuit was designed and the measured value of the temperature-sensitive resistor was piecewise linearized in the PLC program design. The test results showed that the processing method made the temperature measurement accuracy reach ±0.2 ℃, which fully met the requirements of the control system. Because the PLC analog input module used in this system had only 4 input channels and the temperature and humidity analog signals had 16 channels. In order to reduce the production cost of this system, a 16-channel analog time-shared data acquisition circuit was designed in this study. This circuit was mainly composed of two CD4052. The two output switch signals of the PLC were converted into TTL (transistor-transistor logic) signals as the strobe address signals. Because the output signal of the ammonia concentration sensor used the MODBUS-RTU communication mode, this article gave a program design method to achieve this communication in Delta PLC. Due to the large space in each area of the pigsty, the detection value output by each sensor was related to the location where it was installed. In order to realize the reasonable detection of the environmental parameters in all areas of the pigsty, a multi-sensor adaptive weighted average fusion algorithm was adopted in this study, and a PLC program design method of the algorithm had given. The test results showed that using the data fusion algorithm, the minimum value of the total variance of the temperature measurement values in the piglet's living area was about 0.012 5 at 20 ℃, and the variance was 0.856 2 when using the arithmetic mean. When the ammonia concentration was around 15 mg/m3, the minimum value of the variance of the ammonia concentration measurement value of the whole pigsty using the data fusion algorithm was 0.040 6, and the arithmetic mean was 0.954 8. This showed that with the data fusion algorithm, the variance of the measured values of the parameters in each area was much smaller than the variance when the arithmetic mean was used. Each subsystem ran reliably during the test and achieves the design goals. The control system had a simple structure, it was easy to install, debug and maintain, and had a low cost. It could greatly reduce the labor intensity of workers, save manpower, and reduce environmental pollution. Its high application value was especially suitable for small and medium-sized scale breeding farms.