RS-485 bus-based silkworm egg induction control system
2026-04-06 06:00:18··#1
Abstract: To address the problems of manual silkworm egg hatching, a novel real-time monitoring system for the silkworm egg hatching process was designed. This system enables silkworm eggs to automatically rotate 360 degrees at set times, accurately controls temperature, humidity, and light, and manages the silkworm egg sales process. It boasts advantages such as high reliability, low cost, and flexible control methods. Keywords: Silkworm egg hatching, automatic rotation, silkworm egg sales 0 Introduction During the hatching process, the silkworm eggs' sensitivity to temperature, humidity, and light is constantly changing. Therefore, manual methods are insufficient to control these changes, leading to uneven hatching, weak egg larvae, and deteriorated cocoon quality. Based on the requirements of a silkworm egg supply station, this paper designs a novel real-time monitoring system for the silkworm egg hatching process. The system fully utilizes the characteristics of instruments, PLCs, and personal computers, employing a system integration approach to form a control system. This system enables silkworm eggs to automatically rotate 360 degrees at set times, accurately controls temperature, humidity, and light, and boasts advantages such as high reliability and flexible control methods. Computer-controlled silkworm egg hatching ensures more concentrated and uniform hatching, accurate hatching dates, and a higher first-time hatching rate, thus increasing the yield of mature silkworms. The system features a user-friendly interface and strong data processing capabilities. Users can not only achieve automated control of the entire silkworm egg hatching process but also easily handle issues such as silkworm egg sales management. 1. System Control Indicators Temperature control range: 20℃~28℃, control accuracy ≤±0.5℃ Humidity control range: 30%~90%RH, control accuracy ≤±3%RH 2. System Composition and Features The silkworm egg supply station has 6 hatching rooms on each floor, with a total of 12 hatching rooms across two floors. Each hatching room has incubators mounted on rotating frames, driven by variable-speed motors through reducers with constant transmission ratios. By controlling the variable-speed motors, the speed of the rotating frames is adjusted, allowing the silkworm eggs to automatically rotate 360 degrees at regular intervals, ensuring uniform hatching across all hatching beds. Two pairs of temperature and humidity transmitters are installed in each incubation room. The computer processes the temperature and humidity signals from different locations to obtain optimal temperature and humidity data. Based on technical requirements and the actual location of the incubation rooms, this system is divided into two independent control systems. Each control system controls the temperature and humidity of six incubation rooms on one floor. The system consists of two main parts: a control room and the incubation rooms. The entire system uses the RS-485 bus, widely used in processing and manufacturing processes and automation, to form a two-level control system with an industrial PC and a PLC, creating a comprehensive automation mode integrating control and management. The host computer uses an Advantech industrial control computer, running self-developed silkworm egg incubation process management software, to perform functions such as system monitoring and sales management, control parameter modification, system configuration, alarms, tabulation, and curve plotting. The basic automation level uses Siemens S7-200 series PLCs and XSL inspection instruments to achieve data acquisition, uploading, and control; therefore, any failure of the host computer will not affect the system operation. The system configuration is shown in Figure 1: [align=center] Figure 1[/align] In this scheme, one monitoring instrument is installed on each floor. The monitoring instrument has 24 analog inputs, corresponding to the upper and lower temperatures and humidity of each incubation chamber. The temperature and humidity sensors use JWSF integrated temperature and humidity transmitters. The sensor outputs a current signal corresponding to the temperature and humidity, which is then processed by the monitoring instrument to obtain a digital signal. This digital signal is then uploaded to the computer via the PLC and displayed intuitively on both the monitoring instrument and the computer. This reduces system costs (the PLC does not sample) and ensures consistency between the data displayed on the monitoring instrument and the computer. The PLC issues output signals according to control requirements to control humidification, heating, air conditioning, and motors, ultimately achieving stable temperature and humidity and uniform light sensitivity in the incubation chamber. 3 Control Method and Implementation The temperature and humidity in the incubation chamber are objects with large pure time delays and exhibit nonlinear and time-varying characteristics. Smith compensation control is typically used for objects with large pure time delays. However, to achieve Smith compensation control, a relatively accurate mathematical model is required. Besides the accuracy of the mathematical model, the characteristics of the controlled object change with variations in operating conditions such as the field environment and load, which also affects the effectiveness of Smith compensation control. Considering the large temperature and humidity variations in the control system and the different characteristics of the objects in each control loop, this system adopts an advanced gain-adaptive Smith predictor compensation control scheme. The gain-adaptive compensation scheme adds a divider, a first-order differential element (identifier), and a multiplier after the Smith predictor compensation model. The divider divides the output value of the controlled process by the output value of the Smith predictor compensation model; the time constant in the identifier ensures that the output of the controlled process enters the multiplier for calculation one pure time delay before the output of the Smith predictor compensation model; the multiplier multiplies the Smith predictor output by the identifier output and sends the result as the feedback value of the controlled variable to the regulator. The function of these three elements is to provide a signal for automatically correcting the predictor gain based on the difference between the Smith predictor compensation model and the output signal of the controlled process; the divider before the regulator is used for adaptive adjustment of the regulator gain. Therefore, the system can adapt when the gain and dynamic performance parameters of the process object drift, or when the Smith prediction compensation model is inaccurate. 3.1 Setting of Control Parameters The temperature and humidity control system has 12 control zones (each control zone has one temperature and one humidity control loop, for a total of 24 control loops). Because the temperature and humidity vary greatly among the control zones and affect each other, it would be difficult to ensure the synchronous and coordinated operation of the 24 temperature and humidity controls if instrument control is used, and parameter tuning would also be difficult. Using a computer to control the 24 control loops, if 24 sets of PID parameters are used, parameter tuning during actual debugging and operation would be difficult. Because of the use of gain adaptive prediction compensation control, the adaptive regulator compensates for the differences in the characteristics of the process object, so the 24 temperature and humidity controls use the same set of control parameters, making regulator parameter tuning more convenient. 3.2 Decoupling Problem Using the same set of PID control parameters, in such a large space as the incubation chamber, the temperature and humidity at the sampling points vary greatly and affect each other, making it difficult to ensure that the 24 temperature and humidity controls simultaneously meet the process requirements. Therefore, a limiter was added after each control output. Based on the difference between the actual temperature and humidity at each point and the given temperature and humidity, the percentage of the limiter (0-100%) was adjusted appropriately, thereby achieving localized fine-tuning of temperature and humidity. This effectively solved the problem of uneven temperature and humidity caused by temperature and humidity coupling, achieving good control results in actual operation. 3.3 Anti-interference Issues Silkworm hatching has a short time cycle, directly impacting farmers' economic income, thus placing high demands on system reliability. Accurate and reliable temperature and humidity signal acquisition is crucial for successful control. This system uses JWSF temperature and humidity transmitters. This transmitter integrates the temperature and humidity sensor and transmitter into one unit, is compact, easy to install, stable, reliable, and highly accurate. One temperature and humidity transmitter is arranged at both the high and low positions in each hatching chamber, ensuring accurate and reliable signal acquisition. This system employs a highly reliable PLC at the basic automation level. Data acquisition utilizes the XSL inspection instrument, which has strong anti-interference capabilities against field signals. The inspection instrument displays the processed signals locally and transmits them to the PLC via parallel data lines, improving system reliability and standardization. 4. Communication Interface and Software Programming An RS-485 industrial fieldbus is used to connect the monitoring computer and multiple measurement and control workstations into a remote measurement and control network. Real-time modification of PLC parameters is possible, achieving integrated management and control. The interconnection and communication between the PLC and the personal computer is the key technology for achieving this goal. Based on the characteristics of the S7-200 PLC, communication between the PC and the PLC is realized using free-port communication and related special flags. Considering that the PLC operates in signal acquisition and control mode for extended periods, while the computer only acts as a monitor, the communication between the computer and the PLC adopts a master-slave mode, with the computer always in a dominant position. Data transmission is initiated by the computer issuing commands periodically, which also serve as handshake signals. Once the PLC receives a command, it confirms its correctness and returns the command as a response. Then, according to the command, the data is organized and stored in the designated data buffer, and uploaded to the computer; or it is prepared to receive data downloaded from the computer and stored in the designated storage area. To verify the correctness of the data, all the sent data is accumulated, and the result is compared with the accumulated sum sent. If they are equal, the transmission is successful; otherwise, the data is discarded, and an error message is sent to the other party, requesting retransmission. The communication protocol considers various possible situations. The protocol is divided into two aspects: PLC sending field data and host computer sending field data. The former consists of the following three situations: correct communication, no response, and incorrect response or FCS error. The latter consists of the following three situations: correct communication, no response or incorrect response, and no response or FCS error. In this communication protocol, the host computer and the slave computer operate in a master-slave mode: the host computer is in an active query state, and the slave computer is in a waiting response state. The specific process is shown in Figure 2: [align=center] Figure 2[/align] Compared with the communication method based on single data interruption, this method is simpler and faster in real-time communication, does not require the addition of a communication module, has low cost, and has good flexibility. The PC uses the MSComm communication control in Visual C++ 6.0 to write the software program. This communication control uses event-driven or polling methods to solve problems encountered in the development of communication software, ensuring the real-time nature of communication. 5. Improved Silkworm Seed Sales Management The system has functions such as ordering, sales registration, ordering, payment of outstanding payments and collection/outstanding payment inquiries (divided into all inquiries and inquiries by township), township name setting, data backup, data recovery, and clearing of expired data, integrating control and sales, facilitating users, and improving the level of sales management. 6. Summary This system has been successfully applied to a silkworm seed supply station in a county in Jiangxi Province. The system operates stably and reliably, with good control effect. The successful development of this system has solved key technical problems in the silkworm egg hatching process. It provides accurate temperature and humidity control, uniform temperature, humidity, and light sensing, and consistent hatching, enhancing the disease resistance of silkworms. The one-time hatching rate is 3-4% higher than traditional methods, increasing the annual number of hatched silkworm eggs to 300,000 sheets. This has played a positive role in addressing the large surplus labor force in impoverished areas and increasing farmers' income. This technology also provides successful experience for the control and modification of temperature and humidity in other indoor systems. The authors' innovation lies in constructing a real-time monitoring and control system using a PLC, conventional instruments, and a monitoring and control workstation via an RS-485 bus. Using instruments instead of A/D converters for data acquisition reduces costs and improves the system's anti-interference capability, reliability, and standardization. The application of configuration software includes functions such as silkworm egg sales and management, integrating management and control, overcoming the shortcomings of similar systems with only single functions (only control functions), and improving the overall management level of silkworm egg hatching. 7 References: [1] Xu Caiquan. Research and application of control system for silkworm egg hatching chamber [J]. Sericulture Bulletin, 2003, (04). [2] Cai Jinlan. A brief discussion on the characteristics and technical measures of automated high-density hatching [J]. Sericulture Bulletin, 2004, (02). [3] Li Chuncai, Yu Rongfeng, et al. Standardization of hatching management to improve the hatching rate of silkworm eggs [J]. China Sericulture, 2004, (01). [4] Wang Bingwen, Li Guokuan, Jiang Xin. An improved Smith prediction compensation method [J]. Journal of Huazhong University of Science and Technology, 1999, (12). [5] Sun Youxian, Chu Jian. Industrial process control technology (methods) [M]. Beijing: Chemical Industry Press, 2006. [6] Zhang Hong, Long Wei. Control System for Waste Acid Water Treatment in Steel Plant Based on PLC and Configuration Software [J]. Microcomputer Information, 2006, 11: 109-111.