Share this

Design of a laser marking system controller based on a microcontroller

2026-04-06 08:00:35 · · #1
Abstract: Currently, laser marking technology, with its outstanding marking effect and speed, has replaced traditional marking methods in many fields. It mainly consists of a laser, an optical system, and a controller, with the controller being the core component. The controller has undergone two development stages: hardware numerical control (NC) and computer numerical control (CNC). This paper focuses on the control system module of a laser marking system, conducting a detailed analysis and research on both hardware and software design. Furthermore, the design of the system's hardware, software, and anti-interference measures is discussed; finally, conclusions are drawn, and future improvement directions are proposed. Keywords: laser marking, control system, laser, interpolation algorithm Abstract: At present, laser marking technology has replaced traditional marking technology in many fields due to its perfect effect and high speed. The laser marking system is composed of laser, optical system, and controller, which is the core component. In its history, the controller has experienced two generations of NC and CNC. The hardware and software design of the controller system module has been analyzed. Furthermore, the anti-jamming measure of the system has been carefully studied. A conclusion and the direction for improvement are given at the end. Keywords: laser marking system, laser, optical system, control. 1 Introduction In the 1970s and 1980s, a brand-new laser application technology emerged internationally: laser marking technology. It has many advantages that are difficult to match with traditional methods. 1. It adopts CNC technology, the marking speed is fast, and it is very simple to change the marking content. 2. It uses laser as the processing means, and the application range is wide. 3. There is no mechanical force between the laser and the workpiece, which ensures the original accuracy of the workpiece. 4. The processing method is flexible. 5. It can be used for offline production or online production; there are no pollution sources, and the environmental impact is very small. 6. It is easy to operate, has strong anti-counterfeiting capabilities, and low operating costs. Due to these numerous advantages, laser marking technology has gradually replaced traditional marking methods. In the 1990s, with the increasing maturity of laser marking technology and the continuous improvement of laser marking equipment, laser marking technology has been widely used abroad. Some developed countries internationally have adopted this technology as a process standard for industrial processing. China also attaches great importance to this technology, and the State Science and Technology Commission has long included it in the "Eighth Five-Year Torch Program" for research and promotion. Therefore, laser marking has enormous development potential. 2. Laser Marking Machine System Controller Functions The laser marking controller is the core part of the laser marking system, generally composed of a host computer and a slave computer. The working principle of this controller is as follows: When used online, the marking data generated by the marking software on the host computer is transmitted to the controller. The microcontroller in the controller temporarily stores these data in a buffer. Then, the marking parameters of these marking points are converted from digital to analog and output point by point according to a given order and time interval to control the X and Y axis deflection of the galvanometer, the laser power, and the laser's output and shutdown. When used offline, the marking data generated by the marking software on the host computer is transmitted to the controller. The microcontroller in the controller assigns marking file numbers to these data and saves them in the controller's non-volatile memory. The controller can then work independently of the host computer. We can use the controller's keyboard input and LCD display to select marking files, modify marking parameters (laser power and interpolation period), start marking, and abandon marking, etc. In this way, the controller completely replaces the host computer in controlling the marking system. 3. Laser Marking Machine System Controller Hardware Design 3.1 Laser Marking Machine System Controller Principle Block Diagram The laser marking controller hardware mainly consists of an RS232 serial communication circuit, a stepper motor power drive circuit, a data storage circuit, a keyboard/display circuit, and a DC power supply circuit. [align=center] Figure 1 Laser Marking Machine Principle Diagram[/align] This system consists of two parts: a system computer and a microcontroller. Due to the complexity of the graphics processing algorithm, graphics processing software is required. Therefore, the graphics processing and marking control functions are separated. The graphics processing part is completed by the system computer. The system computer generates and processes the PLT, BMP, or PCX format graphics files to be marked and then transmits the generated graphics files to the microcontroller via the RS232 standard interface. The microcontroller's task is to store the received graphics file data in the external data storage 29C040, perform various file operations, set marking parameters, and finally control the laser marking machine to achieve automatic or manual marking. All control operations are performed via the keyboard, and the display screen will show the corresponding prompts in real time. The control signal from the microcontroller is amplified by the drive circuit and drives the stepper motor to rotate, thereby controlling the deflection angle of the scanning lens and thus controlling the position, movement speed, and acceleration of the light spot. The circuits of each part are described below. 3.2 Laser Marking Machine System Controller Unit Circuit Design 3.2.1 Data Storage Circuit and Microcontroller External Circuit Design The external data storage circuit consists of a 6264 memory, a 29C040 memory, and a 74LS573 address latch. This system uses the 6264 as a data buffer to process file data in intermediate stages. The 6264 chip has shared data input and output pins, tri-state output, and is pin-compatible with the EPROM2764 chip, thus having the ability to expand the program memory 2764, leaving room for future technology upgrades. Since this controller needs to store at least 10 files and can easily perform online reading and writing, a large-capacity, non-volatile memory that does not lose data after power failure and can be read and written online must be selected. After comprehensive comparison, we chose the AT29C040 from Atmel. The microcontroller uses the 89C52, 6264, and AT29C040 as external data memory. In addition, the system also uses the 8279 keyboard display controller and the 74LS377 step signal latch for the X and Y motors. As can be seen, this system has both extended external data RAM and interfaces with peripheral circuits and chips. To differentiate data operations on different objects, all these external circuits must have different addresses. The 74LS573 latch is used to latch the lower eight bits of the address data. The P0 port of the 89C52 needs to both transmit data and output the lower eight bits of the address; therefore, the address data output from the P0 port must be latched. The latch control signal is the control signal output from pin ALE. The address data output from the P0 port is latched on the falling edge of ALE. [align=center]Figure 2 Data Storage Circuit Schematic[/align] 3.2.2 Power Drive Circuit Design The power drive circuit is used to amplify the TTL level signal output by the 89C52 to drive the stepper motor. A 4N33 opto-isolator and a T1P41C power transistor are used. The working principle of the drive circuit is that the control signal output from the microcontroller's P0 port is sent to the power amplifier after passing through the opto-isolator, and finally output through pin 2 to drive the stepper motor. The input and output terminals of the opto-isolator are electrically isolated, and there is no feedback from the output terminal to the input terminal, thus providing both isolation and anti-interference functions. Adding an opto-isolator to the drive circuit electrically isolates the power drive section from the control section, eliminating interference from the drive circuit to the microcontroller circuit and improving the system's reliability. 3.2.3 Serial Communication Circuit Design This system adopts the simplest zero-modulation three-wire economic type. Bidirectional data transmission is achieved using only two signal lines. The level signal output by the system is converted into a TTL level signal by a MAX232C level converter and sent to the RXD pin of the microcontroller. The TTL level signal output by the microcontroller's serial transmit pin TDX is converted into a level signal that the system can receive by a MAX232C level converter and connected to the RXD pin of the system. This circuit has a simple structure and good reliability. 3.2.4 Human-Machine Interface Circuit Design The human-machine interface circuit mainly consists of a display and keyboard circuit. Latches or programmable parallel I/O port chips (such as 8155) can be used as the keyboard and display interface. However, their common disadvantage is that they require programming for timed scanning of the display and keyboard, which not only consumes CPU time and reduces efficiency but also makes the entire system software more complex. Therefore, we adopted a dedicated keyboard and display chip 8279. This system uses 24 keys and an 8-digit LED display. 3.2.5 DC Power Supply Design The DC power supply circuit provides +5V power to the microcontroller system. The circuit diagram is shown in Figure 3. [align=center]Figure 3 Schematic diagram of DC power supply circuit[/align] 4 Laser marking machine system controller software design 4.1 Data flow diagram of laser marking control system 4.2 Design of main functional modules of the system 4.2.1 System unit The functions of the system unit include loading and processing graphic files, setting marking parameters, and data transmission. Among them, graphic file processing is very important because it involves the marking control of the microcontroller. The system unit processing should make it easy for the microcontroller to retrieve data for marking. Users can set various parameters on the system unit. 4.2.2 Parameter setting module Set the marking ratio, marking speed, idle speed, hysteresis compensation, light output spacing, scanning spacing, etc. 4.2.3 Serial communication module Serial communication is responsible for transmitting the graphic files generated on the system unit to the microcontroller control system. Its data flow is as follows: A. After entering communication, first check if there is a file loaded. If not, communication should be exited. B. If there is a file loaded, start the preparatory work before communication, such as: opening the database file, communication test. If any of these steps fail, return. C. Next, select the file number (0-9). Numbers marked "already in use" are unavailable. After selecting a valid number, data transmission begins, and the process exits after completion. The serial communication module of the microcontroller system is responsible for receiving data transmitted from the system. 4.2.4 File Operation Module Since the microcontroller system can store at least ten files, it must have file processing capabilities, including file insertion, deletion, and complete clearing. This approach borrows from the file processing concept of computer operating systems, setting a fixed-length header for each file to store information such as file number, type, starting address, and size. Therefore, operations such as inserting, deleting, and clearing only require modifying the corresponding file header information, without manipulating the actual file information. This method is both simple and fast. 4.3 Stepper Motor Speed ​​Control The stepper motor has a maximum starting frequency to prevent step loss, and the worktable always has a certain inertia. To ensure the stepper motor does not lose steps during startup and to minimize the impact on mechanical components, the frequency of the pulse signal controlling the stepper motor should be gradually increased during the speed-up phase and gradually decreased during the speed-down phase. The acceleration and deceleration control in this system is relatively simple, representing a uniform acceleration process. The worktable is set to accelerate from rest to its maximum speed within time t. The deceleration process is similar, but the deceleration time can be shorter. During transitions, if the speed difference between the two segments is too large, an acceleration/deceleration process can be introduced. 4.4 Laser Hysteresis Compensation It takes a certain amount of time for the laser to output its rated power from power-on. Similarly, it takes a certain amount of time for the laser to re-emerge after it has turned off; this time is called hysteresis compensation. Typically, hysteresis compensation is required 50ms after the laser has turned off. 5 Summary and Author's Innovations The laser marking technology introduced in this paper is gradually replacing traditional marking methods due to its many advantages. The laser marking controller is the core component of the laser marking system. This paper mainly focuses on the control system module of the laser marking system, conducting a detailed analysis and research on both hardware and software design. The microcontrollers used in this control system are 89C52, 6264 and AT29C040 for external data memory. In addition, if the system requires a large capacity of external data RAM or a large number of I/O interfaces, the I/O interfaces can be addressed using a decoding method, which greatly improves the system's storage capacity. References: [1] Liu Zhengyu. Latest Interface Circuit IC Characteristic Replacement Manual. Fuzhou: Fujian Science and Technology Press, 2003: 673-678 [2] Zhang Taoying, Zhu Hengjun. Design of Data Acquisition System Based on EZ-USB [J]. Foreign Electronic Measurement Technology, 2004 Supplement: 73 [3] Li Chaoqing. Microcontroller & DSP Peripheral Digital IC Technology Manual. Beijing: Beijing University of Aeronautics and Astronautics Press, 2003: 625-657 [4] Gao Guangda, Xu Zhenying. Digital Analog Device Application Technology [M]. Beijing: Science Press, 2000: 168-180 [5] Tan Hanmo, Zhong Yingshan. A Fast and High-Precision Linear Interpolation Algorithm [J]. Mesh Method. Journal of Changshu Higher Vocational College, 2000, Vol. 14, No. 2 [6] Huang Letian, Xie Yi. Practical High-Precision Intelligent Constant Temperature Heater System Design [J]. Microcomputer Information, 2005, 10-2 Author Biographies: Chang Yi (April 1961-), female, associate professor, Zibo Vocational College, Mechanical Design and Manufacturing, Teaching and Research; Tan Ning (December 1960-), male, associate professor, Zibo Vocational College, Physics, Computer Teaching and Research.
Read next

CATDOLL 108CM Dodo – Customer Photos

Height: 108cm Weight: 14.5kg Shoulder Width: 26cm Bust/Waist/Hip: 51/47/59cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22