Design of clothing workstation machine based on LPC11C14

Publisher:Radiant777Latest update time:2012-09-07 Source: 现代电子技术 Keywords:LPC11C14 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The clothing manufacturing industry is a typical labor-intensive industry, and information-based production management is usually lacking, especially workshop management. Modern enterprises expect to use high-tech to enhance the competitiveness of products and reduce costs, and maximize production capacity by effectively utilizing and controlling logistics information. Internationally, with the explosion of information in the information management of production logistics, RFID technology has been introduced to reduce the burden of manual input and processing of large amounts of data, and provide a basis for the refined management of production processes. Nowadays, domestic clothing manufacturers are keen on the informatization of clothing production and are in urgent need of developing cheap intelligent clothing production station machines. This article uses NXP's 32-bit ARM microcontroller with built-in CAN controller, plus RFID card reader module and CAN transceiver, eliminating the CAN controller chip. CAN communication uses the internal CAN controller of the microcontroller, and the communication protocol is implemented by the microcontroller software, thereby simplifying the application circuit and improving the practicality of the circuit.

1 Brief introduction to NXP Semiconductors LPC11C14 microcontroller
LPC11C14 uses ARM's Cortex-M0 core, which has the characteristics of extremely low energy consumption, small number of gates, and small code space. Due to its low price and powerful control and computing performance, it is widely used in embedded networks. Its specific performance indicators are as follows: 1) Operating frequency: up to 50 MHz; operating temperature range: -40~+85°; wide voltage supply: 1.8~3.6 V; 2) 32 k bytes of flash memory and 8 k SRAM; 3) 2 16-bit general-purpose timers and 2 32-bit general-purpose timers; 4) CAN control unit, internal ROM integrates initialization and communication API functions for CAN and CANOpen standards, which can be directly called by users; compatible with CAN2.0A/B, with a transmission rate of up to 1 Mbit/s; supports 32 message objects, and each message object has its own mask identifier; provides maskable interrupts.

2 RFID technology analysis
Discretely manufactured products are often made up of multiple parts that are processed and assembled through a series of discontinuous processes. Clothing manufacturing belongs to this category. The production process has a wide variety of products, complex processes, and contains a huge amount of production logistics information. Therefore, the RFID system used in clothing manufacturing needs to include three parts: 1) Transponder, that is, the RFID tag of the material, which consists of a coupling element and a chip, with a built-in antenna for communication with the RF antenna. The tag used in this system is a read-only contactless card with a carrier frequency of 125 kHz. It is powered by induction from the card reader and reads the unique card number stored in the chip EEPROM. Passive and contactless are the two most prominent features of this chip. The RF interface circuit is the key core technology. It receives RF energy from the reader, generates power and clock for the chip, and uses phase shift keying and load amplitude modulation to achieve wireless communication between the card and the reader. 2) Reader, using linear RF signals to achieve information transmission with the transponder through spatial coupling (alternating magnetic field or electromagnetic field). In the coupling channel, energy transfer and data exchange will be achieved according to the timing relationship. After the tag information is read, it will be transmitted to the back-end application software. 3) Application software, process the transponder information obtained by the reader and writer, and upload it to the server through the CAN bus. The RFID system structure diagram is shown in Figure 1.

f.JPG



3 System Hardware Design
The hardware part of the workstation based on LPC11C14 is mainly composed of RF card reader module, power input terminal and CAN communication module. The overall hardware diagram is shown in Figure 2.

h.JPG [page]

3.1 RF card reader
The card reader chip uses the dedicated card reader chip EM4095 from Swiss EM Company, which has the following features: no external clock is required, the carrier frequency range is 100-150 kHz, it is compatible with multiple response modes, and the sleep mode current is 1μA. As shown in Figure 3, the peripheral circuit of this card reader chip is simple. It only needs an antenna receiving circuit and a small number of peripheral components to read the information on the IC card under the control of the microprocessor.

h.JPG


The radio frequency tag uses the contactless read-only RFID chip H4001 provided by the Swiss EM company. It has a 64-bit one-time programmable (One Times Programmable) memory inside. In addition to 10 synchronization bits and 14 check bits, the remaining 40 bits are used as identification codes in the application system. Its typical operating frequency is 125 kHz, and the data transmission code uses Manchester coding with a transmission rate of 718 kbps. It has various external packages, such as ISO thin cards, ISO thick cards, key chains, etc. It is the most cost-effective contactless read-only RFID card on the market.
3.2 CAN communication module
Since the IPC11C14 microcontroller has integrated the CAN controller, only an external CAN transceiver is needed to realize CAN communication, which simplifies the circuit and saves circuit costs. This design uses the high-speed transceiver TJA1050 from Philips. TJA1050 is the interface between the CAN controller and the physical bus, which can provide differential transmission capability to the bus and differential reception capability to the CAN controller. The features are as follows: high speed up to 1 Mbit/s; extremely high electromagnetic interference resistance EMI; unpowered nodes will not cause disturbances to the bus; the TXD pin has a timeout function to prevent clamping at the dominant bus level; protect the bus pins to prevent transient interference in industrial environments; at least 110 nodes can be connected, etc.
3.3 Architecture of communication between the workstation and the server PC
After realizing CAN communication, the workstation cannot communicate with the server. This design uses the CAN interface card USBCAN-I of ZLG. USBCAN-I complies with the CAN2.0A/B specification, supports any baud rate between 5 kbps and 1 Mbps, and has a single-channel maximum data flow of 3,000 fps (standard frame), which can meet the communication needs of the workstation and server in clothing production. The communication system structure diagram is shown in Figure 4.

i.JPG

[page]

4 System software design
The main program block diagram of the system software is shown in Figure 5 and Figure 6. Figure 5 is the main program software block diagram, and Figure 6 is the card reading interrupt software flow chart.

j.JPG a.JPG


The main program includes four task modules: receiving and sending CAN data frames, reading RFID tags, reading membrane button values, and displaying LCD screens. It involves numerous tasks and complex control functions. Therefore, a time slice round-robin scheduling algorithm is adopted. The system arranges all tasks in a first-in-first-out queue in order. Each time the CPU is assigned to the task at the head of the queue, and it is ordered to execute a time slice, which constitutes a multi-task effect of taking turns to run at the micro level and executing at the macro level.
The main program is in an infinite loop state. When the time slice of the card reading task is executed, if the GPIO port connected to DEMON_O generates an interrupt, it will enter the corresponding interrupt response function. DEMON_O is the interface of the output waveform of the card reader chip EM4095. It is obtained by an interrupt GPIO port, and the clock obtained from the CLK port of EM4095 is used as a reference to record the pulse width on DEMON_O. The RFID tag using H4001 chip adopts Manchester coding. A correct waveform read from DEMON_O port should contain two kinds of pulse widths. The wide pulse should be about 64 clock cycles long (i.e. 1T in Figure 6), and the narrow pulse width should be about 32 clock cycles long (i.e. 0.5T in Figure 6). By setting the threshold based on this information, the effective waveform can be selected for decoding and verification. The data structure of LF band RFID tag is based on ISO11784/11785 protocol, which stipulates that a 9-bit (11111111) data header is used to mark the beginning of the data stream, and the verification part will prevent the data header from repeating.

[page]

According to the CAN2.0B specification, the extended frame information is 13 bytes, including information and data. The first 5 bytes are the information part, and bytes 6 to 13 are the actual data of the data frame. The CAN2.0B specification is shown in Table 1.

b.JPG


Therefore, in CAN communication, a data frame can only transmit 8 bytes of data at most. If more than 40 bytes of messages need to be sent and received during communication, the messages need to be unpacked. The following is the unpacked CAN message communication protocol.
The basic format of the data frame is:

c.JPG


CAN frame address identification field (29BIT)CAN frame data field (64BIT)
From the above decomposition, we can know that the first frame of the multi-frame is to put the "priority", "destination address" and "source address" of the data packet into the address identification field of the CAN frame, and the "data" into the data field of the CAN frame. "Total number of frames" is used to identify how many data frames the current data packet consists of. The total frame value is 2-8, indicating that there are 2-8 frames; "Current frame number" is used to identify the number of frames in the data packet. Its value is 0-7, indicating that there are 1-8 frames.
The "data" (56BIT) part of the first frame is decomposed into:

d.JPG


The basic format of the second frame to the last frame is the same as the first frame, but the "data" part is just the "specific production logistics information" immediately following the previous frame, with a length of 56 BIT.

5 Practical application
Figure 7 is the program panel of the production line scheduling server. When scheduling, first set the CAN communication timer to match the baud rate, then click the "Connect" and "Start CAN" buttons to start the USBCAN-I interface card; in the task setting bar, enter the work station number, process number, logistics card number, work number and task duration, and click the "Add Task" button to issue the work order information to the work station computer. The task status bar is responsible for real-time monitoring of the progress of the work order. Through actual testing, it was found that the work station computer system can reliably collect and process production logistics information in real time.

e.JPG



6 Conclusion
This system uses RFID as a data collection method and CAN bus communication technology to solve the real-time collection, transmission and processing of logistics information, and provides support for the digital management of clothing production. This system has been initially debugged on site in Jiaxing Senchuang Fashion Co., Ltd., which has increased production efficiency by 15%, reduced product quality problems by about 20%, and greatly improved the company's information management level.

Keywords:LPC11C14 Reference address:Design of clothing workstation machine based on LPC11C14

Previous article:ARM Cortex-A15 will be available in portable devices by the end of this year
Next article:STM32 MCU hardware key foundation essence and precautions

Recommended ReadingLatest update time:2024-11-16 21:01

Detailed analysis: CAN-BUS, the electronic system in the car
This article is a technical article. I will explain to you what the "CAN-BUS system" is and its functions. For example: In the past, the circuit system of a car was a bit like household electricity. There must be electricity and plugs to supply electricity to electric
[Automotive Electronics]
Detailed analysis: CAN-BUS, the electronic system in the car
Measuring automobile CAN-BUS bus signals and waveform analysis-auto repair oscilloscope
With the increasing number of automotive electronic devices, it is a reliable and economical approach to use serial bus to achieve multi-channel transmission and form an automotive electronic network. In the original traditional automobile circuits, the connection between the powertrain module and the body module is
[Test Measurement]
Measuring automobile CAN-BUS bus signals and waveform analysis-auto repair oscilloscope
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号