1. Introduction
A folding machine is a post-press equipment that folds each large printed paper into a size suitable for daily binding and commonly seen by people. There are many types. It can fold the paper into four, eight, sixteen, and thirty-two folds. When a paper jam occurs during the folding process, the paper jam detection system automatically sends a stop signal and an alarm signal, and sends information to indicate the location of the paper jam.
At present, the design of the paper jam system of the folding machine in China is mainly based on PLC as the core control. The PLC control design is simple, stable and reliable, but PLC has many shortcomings. It occupies too many PLC I/O ports, about 14. The working mode of PLC is to scan each I/O port each time. It makes corresponding processing according to the changes of each I/O port. Occupying too many I/O ports will increase the processing time of PLC. Increase the burden of the main control PLC. Foreign countries such as Japan all use paper jam monitoring systems with single-chip microcomputers as the core. Single-chip microcomputers are small in size, high in computing speed, rich in various resources, and can perform more complex calculations. Reliability basically meets the needs.
2. System overall design requirements
The system is used to detect the running status of the paper in the folding machine. It communicates with the PLC through RS485. If the paper is detected to be stuck in the machine when the machine is running, the system will immediately output a signal to the PLC. The system's several input signals are all NPN type, that is, 24v low level when there is a signal, and 24v high level when there is no signal. Including: a pulse signal from a photoelectric switch. Five photoelectric switch signals. Single paper feed button signal. Continuous paper feed button signal. 24v DC power supply signal. Two spare input terminals. The output signal includes: a relay signal that outputs an open point to a closed point when a fault occurs. 3 spare output terminals.
3. Hardware Design
Figure 1 System design diagram
This system uses AT89C55 as the core controller, and expands 4K RAM to store 24C01 chip. This product is an upgraded product of the original folding machine detection system, so the communication mode of the original system is used as much as possible. The M75176 chip is used, and the 485 communication format is used to communicate with the PLC that controls and displays the operating status of the folding machine. The control output module, that is, the alarm shutdown module, uses AT89C55 to control the 24v Omron relay and outputs a 24v shutdown signal to the main control PLC.
1. Level conversion circuit
There are 5 sensors plus a clock signal on the folding machine, with a total of 6 24V input signals. The input valid signal is 24V low level. When the paper passes through the sensor, the sensor gives a 24V low level. When no paper passes through the sensor, the sensor gives a 24V high level. So when working normally, the sensor outputs a 24V wide pulse signal. When a paper jam occurs, the sensor will always output a 24V high level or a 24V low level. When the paper is stuck under the sensor, it outputs a 24V low level. When the paper is stuck between two sensors, it outputs a 24 high level. Output a control signal and reserve two control lines according to the manufacturer's requirements. Because the microcontroller requires a 5V TTL level, a corresponding level conversion module must be designed. The input and output are converted from 24V level to TTL level, or vice versa, using TLP521-4 optical isolation. Each input and output line is indicated by a light-emitting diode. AT89C55 is one of the 51 series microcontrollers. Port1 has a pull-up resistor, so port1 is selected as the input port.
2. Anti-malfunction module
The relay control terminal inputs a low level to turn on the coil, and the relay stops. When the folding machine is working, if a paper jam occurs, the single-chip microcomputer outputs a low level to the relay control terminal, the coil is energized and turned on, and the relay switch operates. When the folding machine starts working, the circuit design first sends power to the single-chip microcomputer and then to the relay. There is a level change at the relay control terminal, causing the relay to operate. This does not meet production requirements. In order to eliminate relay misoperation, the GAL16VB gate chip is used. GAL inputs 5 signals, the logic represents the status of 5 sensors, and the 5 signals are AND gate input. The GAL chip output controls the relay. When a paper jam occurs under one sensor. One of the GAL input signals is changed accordingly. The GAL chip output changes, and if the relay is turned on again to stop, since the initial status of the five sensors remains unchanged, the relay will not misoperate.
Figure 2 Schematic diagram
3. Storage development module
In actual production, the machine may be shut down temporarily. The next time the machine is turned on, the same batch of tasks will be run, which requires the use of certain parameter variables at the beginning. When the machine is shut down and the power is lost, all the data in the RAM storage area of the microcontroller will be lost. If placed in ROM, the program size is almost close to the capacity of AT89C55, and general variables are not stored in ROM. Once the data in ROM is written, it will not change when the power is off, and it generally stores program data. When the work task changes, the value of these parameter variables will also change. This requires external ROM expansion. 24C01 is an EEPROM chip that can save data even when the power is off and supports I2C. It can be erased and written more than one million times and can save data for 40 years. The communication method between 24C01 and AT89C55 adopts I2C mode.
4. Software Design
1. Software Development Environment
The program uses C51. When starting the software simulation test, the development tools of C51 are the most popular KEIL 51 and μVision2 integrated development environment. KEIL 51 is a single-chip C language compiler developed by KEIL of Germany. Its predecessor is FRANKLIN C51. The latest version V6 has very good functions, especially after being compatible with ANSI C, it has added many compilation features closely related to hardware, making it more convenient and faster to develop applications on the 8051 series of single-chip microcomputers. μVision2 is an integrated file management compilation environment. The compilation environment uses KEIL 51 and integrates multiple functions such as file editing, compilation linking, project management, windows, tool references, and software simulation debugging.
When debugging online, use the development tool WAVE 6000 provided by Weifu. Copy the source code to WAVE 6000, use the C compiler comp51 developed by WAVE, and make corresponding changes. Perform online debugging. WAVE 6000 was developed by Nanjing Weifu Industrial Company. It supports assembly language and C language, and also has powerful project management, variable observation and compilation functions.
2. Software design ideas
The software mainly uses the polling method to detect whether there is a paper jam. First, the main control chip AT89C55 and the extended storage chip 24C01 are initialized. The main control chip AT89C55 includes time mode settings, interrupt enable, etc. The initialization of the extended storage chip 24C01 includes the writing of read and write subroutines, etc. When feeding a single sheet of paper, various parameters are recorded, including the time each sheet of paper passes through each sensor, that is, the number of pulses, and the time each sheet of paper travels between each sensor. When feeding paper continuously, these parameters of each sheet of paper are also recorded, and then the polling method is used to compare the parameters of each sheet of paper with the parameters recorded when feeding a single sheet of paper. If they are within the allowable range, it means that the folding machine is working normally, otherwise an alarm stop signal is issued.
V. Conclusion
This detection system improves the automatic control level of the folding machine. After field experiments, the system runs stably and reliably and meets the design requirements. At present, the system has been made into a product and applied in actual products. If the design ideas of the software are improved and a higher-speed MCU is used, the system will be further optimized and achieve better results.
Previous article:Digital Temperature Servo Control System Based on Microcontroller
Next article:Design of I2C Touch Screen Based on ARM Processor S3C2440 and Linux
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
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
- 【Beetle ESP32-C3】Unboxing
- Dandelion 4G Router Experience
- [Sipeed LicheeRV 86 Panel Review] 13. Using TCP to encapsulate HTTP packets to request weather information
- 28335 Main program error
- Huawei Hongmeng + Alibaba Pingtouge, Runhe Neptune Review (Part 1)
- NMOS controls the negative output
- Introduction to TWS Bluetooth headsets and TI low-power solutions
- A must-know for RF engineers: How to design directional coupler circuits
- DSP Q format operation
- MSP430 Development Considerations and Requirements