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.
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.
[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.
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.
[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.
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.
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:
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:
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.
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.
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
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [GD32E231 DIY Contest]——08. Solution to using JLINK to debug and download GD32E231
- Recruiting hardware test engineers Annual salary: 200,000-500,000 | Experience: more than 5 years | Work location: Shenzhen
- Supercapacitor balancing circuit
- When should you choose DC/DC and when should you choose LDO?
- Share: TI headphone amplifier positive and negative voltage design
- EEWORLD University Hall ---- Digital Image Processing Tianjin University of Technology
- What is the function of SMPS_INDUCTOR of BLUENRG-1?
- [SersorTile.box] Snoring Monitor Work Submission
- Python Steering Committee members share joy of 30th anniversary
- S/PDIF interface signal output problem