Design of a glass tube cutting controller based on the OMRON-E6B2 encoder
2026-04-06 07:58:31··#1
Abstract: This paper introduces a design method for a quartz glass tube cutting controller based on an OMRON-E6B2 encoder. Utilizing an ATmega16 microcontroller as the control hub, the design concept of the controller is explained from both hardware and software perspectives. A concise description of the hardware schematic and program flowchart is provided. This design offers an effective method for controlling the cutting of quartz glass tubes. Practice has proven that the designed controller has high practical value, enabling accurate control of the quartz glass tube cutting process, thereby improving product quality and generating considerable economic benefits. Keywords: OMRON-E6B2 encoder; quartz glass tube; cutting control; ATmega16 microcontroller Abstract: This paper introduces a method for designing a controller for incising quartz glass tubes based on OMRON-E6B2 encoders and utilizing an ATmega16 microcontroller as the central controller. The design approach of the controller is explained from both hardware and software perspectives, with a brief description of the hardware principle and program framework. This design provides a valid control method for incising quartz glass tubes. Practice demonstrates that the controller has high practical value, enabling accurate control of the incising process, improving product quality, and resulting in significant economic benefits. Keywords: OMRON-E6B2 encoder; quartz glass tube; incising control; ATmega16 microcontroller. 0 Introduction Quartz glass tubes are special industrial technical glass made of silicon dioxide, a very excellent basic material. Quartz glass possesses a series of excellent physical and chemical properties. Its notable characteristics include high temperature resistance, corrosion resistance, good thermal stability, and good light transmission. Due to these excellent physical and chemical properties, quartz glass is widely used in various fields such as electric light sources, semiconductors, optical communications, military industry, metallurgy, building materials, chemicals, machinery, power, and environmental protection. Meanwhile, the cutting control of quartz products is particularly important. The design of a quartz glass tube cutting controller based on the OMRON-E6B2 is proposed to achieve automated control of the quartz glass tube cutting process. 1 Hardware Design 1.1 Encoder An imported encoder is used for accurate positioning (the pulse signal emitted by the rotary encoder forms position feedback, realizing precise displacement control of the glass tube). This design uses OMRON-E6B2-CWZ6C 2000PPR, and its output circuit is shown in Figure 1: [align=center] Figure 1 OMRON E6B2-CWZ6C 2000PPR Output Circuit[/align] 1.2 Slot-type photoelectric switch The slot-type photoelectric switch is used to input the position signal to the ATmega16 microcontroller. The model of the slot-type photoelectric switch is BANNER SL30VB6VY, and its output circuit is shown in Figure 2. [align=center] Figure 2 BANNER SL30VB6VY Output Circuit[/align] 1.3 ATmega16 Single-Chip Control Circuit The ATmega16 single-chip microcontroller is a high-performance, low-power 8-bit AVR® microprocessor with an advanced RISC architecture. Its features include: 16KB of in-system programmable Flash (with simultaneous read/write capability, i.e., RWW), 512 bytes of EEPROM, 1KB of SRAM, 32 general-purpose I/O lines, 32 general-purpose working registers, a JTAG interface for boundary scan, support for on-chip debugging and programming, three flexible timer/counters (T/C) with compare modes, on-chip/external interrupts, a programmable serial USART, a universal serial interface with a start condition detector, eight 10-bit ADCs with selectable differential input stages and programmable gain, a programmable watchdog timer with an on-chip oscillator, an SPI serial port, and six software-selectable power-saving modes. The common package is PDIP40, and its pin assignment is shown in Figure 3. [align=center]Figure 3 Pin Diagram of ATmega16 Microcontroller[/align] 1.3.1 Input Circuit Section The input circuit of the quartz glass tube cutting controller is as follows: l OMRON E6B2-CWZ6C 2000PPR imported encoder The input circuit uses an opto-isolation circuit TLP521-1 to isolate the encoder pulses and input them to the T0 terminal of the ATMEGA16 microcontroller. The output pulses of the encoder are counted to determine the accurate position of the glass tube. l BANNER SL30VB6VY slotted photoelectric switch The input circuit uses an opto-isolation circuit TLP521-1 to isolate the level signal of the slotted photoelectric switch and input it to the PB1 terminal of the ATMEGA16 microcontroller. The switching state of the slotted photoelectric switch can be judged to determine the presence or absence of the position signal. Infrared keyboard receiving circuit The infrared receiving circuit uses an infrared receiver head SM0038. The output terminal is connected to a 74LS14 shaping circuit and finally connected to the external interrupt 0 (INT0) of the ATmega16 microcontroller. The SM0038 is responsible for receiving and demodulating infrared signals, while the 74LS14 shapes the signals. Through the infrared keyboard receiving circuit, the ATmega16 microcontroller processes the numeric and function keys from the infrared keyboard. 1.3.2 Output Circuit Section: The output circuit of the quartz glass tube cutting controller is as follows: l LED Digital Display Circuit: The digital display circuit uses a common dynamic scanning circuit. The PA port outputs segment codes (displayed data), and the PC port outputs bit codes (displaying a specific digit of the digital tube). Using this dynamic scanning circuit greatly saves hardware resources. l Control Output Circuit: The control output circuit consists of four identical circuits, corresponding to the control elements: start, brake, tube cutting, and tube punching, thereby controlling the cutting process of the quartz glass tube. This output circuit uses a TLP521-1 opto-isolation circuit to isolate the output signal of the ATmega16 microcontroller. The microcontroller's output signal is driven by a 7406 and then opto-isolated to activate the relay. [align=center]Figure 4 Hardware Design Overview[/align] 2 Software Design The software design is mainly divided into the following modules: 1) External Interrupt 0 Service Subroutine Module. This module is mainly responsible for infrared reception, recognition, and key encoding. It uses the SAA3010T infrared transmitting circuit corresponding to the SM00383 receiving module. Its encoding rules are: a) Start Code – 2 bits (two logic "1"s); b) Control Code – 1 bit (alternating between two key presses); c) System Code – 5 bits: 00000; d) Instruction Code – 6 bits. [align=center]Figure 5 SAA3010T Data Format[/align] [align=center]Figure 6 Infrared Keyboard Signal Processing Program Flowchart[/align] 2) LED Display Driver Module. The function of this module is to display the contents of the display buffer onto the corresponding LEDs. Using the two parallel ports PA and PC of the ATmega16 as segment control and position control of the LED respectively, the PA port is used as the data port (segment control) of the display to output data; the PC port is used as position control to output position signals to determine which digit of the display shows the data. 3) Counting module. Count the output pulses of the encoder. The program design of the counting part can set the timer/counter T0 of the ATmega16 microcontroller to mode 2 to count from the outside, set the initial count value, and judge whether TF0 overflows to determine whether there is a pulse signal input. A typical program is as follows: START: MOV TMOD, #06H ;T0 is mode 2 external counting MOV TH0, #0FFH ;Initial count value MOV TL0, #0FFH SETB TR0 ;Enable counting LOOP1: JBC TF0, LOOP2 AJMP LOOP1 LOOP2: ;Counting processing AJMP LOOP1 [align=center] Figure 7 Dynamic scanning display program flowchart[/align] 4. Main program. Controlling the cutting process of quartz glass tubes. The main program is relatively simple and will not be elaborated upon here due to space limitations. 3. Conclusion The innovation of this paper lies in using the OMRON-E6B2 encoder as a positioning device, which solves the problem of quartz glass tube cutting in a relatively simple way, providing an effective method for quartz glass tube cutting control. Various parameters can be easily input via an infrared remote control keyboard (or a built-in keyboard) to achieve effective control of quartz glass tube cutting. This design has been put into use in a quartz glass tube factory in Jiangsu Province and has achieved significant results, demonstrating the good application of the OMRON-E6B2 encoder in the cutting control of quartz glass tube products. References [1] Zhang Kaisheng, Li Xia, Wang Jinguang. Design of infrared remote control keyboard for industrial control computer [J]. Microcomputer Information, 2005.9 [2] Dong Hongwei, Xu Wenbo. Development of CNC glass cutting system [J]. Computer Era, 2004.10 [3] Wen Chuanxin. Development of automatic glass cutting system based on PC management and CNC control [J]. Southeast University, 2004 [4] Dong Hongwei, Feng Yingjun, Xu Wenbo. Design and implementation of glass cutting system [J]. Computer Engineering and Design, 2004.5 [5] Pang Changjiang, Xu Yuxia, Ding Ligang. Position control of PC CNC system [J]. Mechanical and Electrical Engineering Technology, 2004.8 [6] Sun Lirong, Li Yali. Selection of glass cutting conditions for AMCD substrate [J]. Journal of Shaanxi University of Science and Technology, 2005.4:103~107 [7] Hu Hancai. Principles of single-chip microcomputer and its interface technology [M]. Beijing: Tsinghua University Press, 2005 [8] Xu Shuhua, Cheng Tuian, Yao Wansheng. Microcomputer Principles and Applications [M]. Harbin Institute of Technology Press, 1994: 115-153. [9] Li Jianhua. Practical Remote Control Principles and Manufacturing [M]. Beijing: Posts & Telecom Press, 1996: 52-66.