Design of paper jam detection system for folding machine based on single chip microcomputer

Publisher:tmgouziLatest update time:2010-01-13 Source: 微计算机信息Keywords:AT89C55 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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

System design diagram

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.

Schematic

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

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.

Keywords:AT89C55 Reference address:Design of paper jam detection system for folding machine based on single chip microcomputer

Previous article:Digital Temperature Servo Control System Based on Microcontroller
Next article:Design of I2C Touch Screen Based on ARM Processor S3C2440 and Linux

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号