Design of Data Acquisition System for Clothing Production Line

: To solve the problems of production information diversification and slow transmission of production data, a data acquisition system for clothing production line is designed. Firstly, by analyzing the clothing production process, an overall structure consisting of electronic tag, RFID reader, ZigBee routing node, coordination gateway node and upper computer database is constructed; secondly, hardware circuit design and software function program design are focused on RFID module, ZigBee module, human-machine interaction module and the memorizer in the RFID reader; and finally, according to system requirements from the electronic tags data acquisition system, the whole system is tested from two aspects: electronic tags data acquisition and information transmission. The experiment vertified that the system can feed back the processing information of the clothing production line into database of the supreme machine in real time, which enhances the enterprise information management ability to a certain extent and improves the clothing production efficiency.


Introduction
Textile industry is one of the important parts of manufacturing industry, and it is also closely connected with people's life [1].In recent years, with the proposal and promotion of German "Industry 4.0" [2] American "Industrial Internet" [3] and "Made in China 2025" [4], the clothing manufacturing industry is gradually moving from the local automatic manufacturing stage to intelligent manufacturing stage.Textile intelligent manufacturing system formed by the deep integration of the textile industry with the Internet of Things technology and artificial intelligence technology has the functions of self-decision making, self-execution and self-learning [5][6][7].As an important component of textile industry, the clothing processing industry should improve its intelligence [8,9], which is the reform of the textile industry.At present, people's aesthetic upgrading of clothing culture shows that dressers no longer meet the basic requirements of clothing for covering the human body and keeping warm and personalized customization [10] and fashion version [10,11] design are gradually incorporated into the ever-changing consumption demand.In order to keep up with the dynamic development trend of the industry, the orders undertaken by the production line of the garment enterprises simultaneously present the clothing products of different specifications such as customized [12] sizes, various styles and the like.However, enterprises need to conduct detailed management and real-time monitoring of clothing in the production process, which requires a large amount of labor and time for inventory and clothing data statistics.In order to improve the industrial benefit, clothing enterprises are seeking a new management strategy of digitization and informationization.
With the rapid development of economic globalization and cultural diversification, the clothing industry gradually presents a small-batch and diversified market demand in its production orders [13,14].However, the process of clothing production is complex involving a large number of production personnel.Combined with the characteristics of products with various size parameters and labor-intensive industries, a large number of production data information and statements are generated during clothing production.In view of the problems of poor feedback and high error rate of data information channel generated by traditional manual statistics and counting method in clothing production line, this paper designs a data acquisition system for clothing production line.The design of the system overcomes the defects of manual operation in the process of traditional clothing customization, and has positive significance for the transformation and development of digitalization and informatization of the clothing industry.

Analysis of Clothing Production Process
According to the field research in a clothing enterprise, the production process model of clothing is shown in Figure 1.Its production process is complicated and there are a large number of participants, which is mainly divided into cutting, sewing and ironing step, among which sewing is the most complicated link.Through the research and analysis of the clothing production process of this enterprise, it can be concluded that there are many main problems in the clothing producing process.In particular, due to the large number of participants in the production process, the workload of the employees cannot be accurately counted.At the same time, the quality problems in the producing process cannot be traced accurately, which easily leads to the unclear attribution of responsibilities and other problems.

Overall Structure Design of the System
The overall structure of the system is composed of five parts: two kinds of electronic tags (clothing electronic tag and employee electronic tag), RFID reader, ZigBee routing node, coordination gateway node and upper computer database server.
The employee electronic tag and the clothing electronic tag served as information storage carriers and identification objects, the information stored in the employee electronic tag is the employee number, and the information stored in the clothing electronic tag is the clothing order number.The data acquisition unit based on the RFID reader is installed on the corresponding processing station according to the machine number stored by the RFID reader.The RFID reader, ZigBee routing node and central coordination gateway node constitute the ZigBee wireless sensor network, wherein the ZigBee routing node is responsible for information and data forwarding for the relay routing function, and the coordination gateway node is composed of the ZigBee central coordinator and protocol conversion module.On the one hand, ZigBee network is created to manage and collect data of reader terminal nodes; on the other hand, the heterogeneous data protocol is converted and the data after the protocol conversion is sent to the server database.The database server and the upper computer develop the corresponding application software according to the user's demand, and carry out the functions of information input, data statistics and on-site production monitoring.

Circuit Design of RFID Reader
The RFID reader takes STM32F103VET6 as the control core, and the peripheral function module mainly comprises RFID radio frequency read-write module, HMI serial port screen, ZigBee communication module and data memorizer.Figure 1

ZigBee Communication Module Design
The ZigBee communication module, as the lowest layer of the transport layer, is mainly responsible for receiving the integrated serial port data in the microprocessor and sending the obtained information to the ZigBee network.In this paper, CC2530F256 chip is used for circuit design and peripheral circuit design.The schematic diagram of circuit design is shown in Figure 3.Among them, the 32 MHz high-frequency crystal oscillator circuit is used for providing internal clock and RF transceiver, and 32.768KHz low-frequency clock source serves for time accuracy calculation.The RBIAS port is externally connected to a 56KΩ resistor to provide a reference current.A Babylon matching circuit is connected between 25 pins (RF_P) and 26 pins (RF_N) of the differential signal input/output pins to convert the differential signal into a single-ended signal, which is radiated by an antenna, wherein the antenna is designed by using an SMA external rod antenna.

HMI Serial Port Screen and Memorizer Selection
In the system, the 2.4 inch HMI touch screen with a model of TJC3224T024_011R manufactured by Taojingchi Company is selected as the human-machine interaction module; AT24C02 is used as the external memorizer for reading and the IIC bus protocol is used for data access operation.The data addresses of the external storage module 0-12 are divided into three areas to store the data.Area 1 utilized for storing the corresponding process number occupying 3 Byte; Area 2 stores the employee ID identified by 4 Byte; Area 3 refers to the order number storage area occupying 6Byte.

Circuit Design of ZigBee Routing Node and Coordination Gateway
In ZigBee network, the circuit design of ZigBee communication module, routing node and coordination node is basically the same, so it will not be described again.The gateway node adopts ESP8266 produced by Lexin Company to complete the circuit design.

Software Design of Station RFID Reader
The software program of station RFID reader is mainly developed and designed from the electronic tag data identification, data processing, human-machine interaction and wireless communication.The card reader extracts the employee number information in the card to update the contents reserved for the employee information storage area II in the memorizer, updates the employee number information in the information display interface at the same time, and returns to the state of continuing to wait for the induction electronic tag after the completion.If the judgment result is the clothing electronic tag, the content reserved for the employee information storage area 3 in the clothing order number updating memorizer in the card is extracted and updating the order number information of the information display interface.After obtaining the employee information and the clothing order number, wait for the employee touch information to send a control key, if the information is triggered, the processor takes out the work station number and the processing personnel number corresponding to the order number in the first to the third memory areas, and sends them to the ZigBee module from the serial port.and completing one time of data acquisition after judging that the sending is successful, and returning to the state of waiting for the next electronic tag sensing.
The software design flowchart of the main program is shown in Figure 4.

RFID Module Software Design
Information interaction between the microprocessor and the RFID electronic tag is accomplished by manipulating the register function in RC522.After the reader is powered on, firstly, the SPI pin configuration of the main control chip and the initialization of the RC522 module are conducted.And after the initialization, the radio frequency module is reset to enter the card seeking request state at the same time, and the PcdRequest (u8 req_code, u8*pTagType) function will continuously transmit the card seeking signal; if multiple cards enter the sensing area, the serial numbers of the card feedback simultaneously overlap, the reader selects one card to establish communication through the anti-collision processing PcdAnticoll (u8*pSnr), and the return value is the selected electronic tag number.The functions PcdAuthState (u8 auth_mode, u8 addr, u8*pKey, u8*pSnr) completes the authentication password and block read operation, where auth_mode is the selected authentication key A or B, addr is the block address to be read,*pKey is the authentication password, and*pSnr is the UID card number read previously.

ZigBee Module Software Design
The ZigBee communication module receives the working data sent by the reader through the UART, and sends the received data to the ZigBee network in real time and finally to the coordinator.The operation function for sending the data is USART_SendData (USART2, Data [t]), and the serial port function transmits one byte each time.The serial port status is obtained first before transmission.The sending buffer register is empty and can be sent until all bytes have been transmitted; the software development of the ZigBee communication module is completed on the basis of the ZStack protocol stack.When the node is powered on, the node will join the designated ZigBee network and enter the OSAL serial port task monitoring state.Since the protocol stack encapsulates the underlying function interface at the bottom layer of the serial port, the initialization of the serial port can be completed by using the HalUARTInit (void) function.If the serial port receives the data from the reader, the HalUARTRead (0,*buf, len) function is called to read the received data.

Experimental Test and Analysis
In order to verify the overall collaborative work performance of the data acquisition system, two RFID readers, two routing nodes and a gateway coordination node are used in this paper to conduct the actual operation test of the system.The whole physical diagram of the test system is shown in Figure 5. Firstly, multiple electronic tags of two kinds are respectively used in sensing area of the RFID module to detect the identification function of the reader, and the identification result is displayed.As can be seen in the window, after each identification of the tag, the tag card number will be printed out first, and the printed "PcdSelect_MI_OK" indicates successful card selection.Then, the label "PcdAuthState_MI_OK" is returned as anti-collision success.After verifying the password of the selected area, read out the stored data such as "P001" in the area and identify the card type.Secondly, multiple electronic tags are used for cross induction, and the information stored by the reader can be displayed on the human-computer interaction module according to the card type.The tag data is also stored in the designated storage area according to the type.After the screen control is triggered, the storage contents of 0 to 12 bits in the storage area, such as "S00P001C01001".

Data Transmission Test
After the terminal node joins the network, Packet Sniffe software is used to capture the data packet in the ZigBee wireless network.Figure 6 shows the data packet capturing result received for three times, and the content of data transmission is under the entry of "NWK payloda".In Figure 6, from top to bottom, are (a) the transmission data is "S00P001C01001"; (b) the transmission data is "S00P002C01008"; and (c) the transmission data is "S00P002C01001", respectively.Meanwhile, the coordination gateway node sends the received data to the multi-process network server through the TCP/IP protocol so as to realize the expected function.

Conclusion
This paper focuses on the design of the clothing customization process data acquisition system.With the theoretical support of the technology architecture of the Internet of Things, RFID technology, Zigbee wireless communication technology and embedded technology are utilized to collect and track the information of the production and processing process of clothing orders in real time.After debugging and testing, the data acquisition system of clothing customization process can realize the real-time collection of the processing information in the production process of the customized clothing, and can analyze and classify the obtained effective data accordingly, so that managers and employees can monitor the production progress of the clothing order in real time, accurately calculate the employee performance, and reasonably trace the clothing production process.The design of data acquisition system for clothing production line can enhance the digital management level of clothing production process to a certain extent, so as to improve the informatization and digital management level of the clothing enterprises.

Figure 1 :
Figure 1: Hardware structure diagram of station RFID reader

Figure 2 :
Figure 2: Circuit Design Diagram of RFID Read-Write Module

Figure 3 :
Figure 3: Circuit Design Diagram of ZigBee Communication Module illegal Update order number information in memory area three Update the work information display interface clothing card order number Fetching the data of areas 1 to 3 in the memorizer Clothing card

Figure 4 :
Figure 4: Software Program Design of Station RFID Reader

Figure 5 :
Figure 5: Overall physical diagram of the test system

Figure 6 :
Figure 6: Screenshot of ZigBee Network Data Transmission Test