本科毕业设计(论文)
GRADUATION DESIGN(THESIS)
题 目: 小型激光雕刻机的设计 学生姓名: 指导教师: 学 院: 专业班级:
信息科学与工程学院
本科生院制
2016年6月
小型激光雕刻机的设计
小型激光雕刻机的设计
摘要
随着时代的发展,激光雕刻技术的应用越来越广。激光雕刻机是以数控技术为基础,激光加工为手段的一种加工方法,它具有与加工材料非接触的特性,加工精度、效率高,适合多种材料的加工。
本次小型激光雕刻机的设计,在对当前激光加工和激光雕刻技术做了详细了解后,完成了雕刻机的控制系统整体设计、硬件电路和软件算法的设计以及雕刻机的机械框架的设计。雕刻机用两个42步进电机驱动XY两轴的运动,激光部分采用小功率激光笔,控制系统使用STM32作为主控芯片,采用主从式控制方式。整个控制流程为:上位机软件完成图像转G代码处理和G代码发送功能,下位机通过串口通信模块接收G代码数据后,进行G代码的解析、插补算法处理,然后控制步进电机的运动和激光笔的开关,完成雕刻功能。
设计以较低的成本和较高的精度实现雕刻机的常用功能,雕刻机体积小、使用方便,符制造设备微型化的发展趋势,具有很好的应用前景。
关键词:激光雕刻 主从式 G代码解析 插补算法 步进电机
I
小型激光雕刻机的设计
Miniature laser engraving machine design
Abstract
With the development of technology, there is a new industry gradually developed, on many occasions the processing technology is to use it, that is laser engraving technology.In laser engraving technology, completed in the form of CNC laser engraving or cutting, because the laser engraving and carved objects without direct contact, so it has high efficiency, suitable for a variety of materials.
This design of small laser engraving based on a detailed investigation of the current laser processing and laser engraving technology.The design completed the design of control system framework of the overall design, hardware and software algorithms design .The design based on STM32 micro control chip,using a low-power laser head.The control system can receive data from a computer serial port, the microcontroller parsing G-code and run the interpolation operation to control the motor movement, achieved an online, offline laser engraving function.
The system at a lower cost, higher precision and stability achieved a regular laser engraving machine’s processing characteristics. Engraving machine is small and easy to use,is in line with manufacturing equipment miniaturization trend, have good prospects for development.
Key words:Laser engraving Client–servermodel G-code parser Interpolation
algorithm Stepping motor
II
小型激光雕刻机的设计
目录
第1章 绪论 ............................................................................................................. ..1
1.1 前言 ............................................................................................................... 1 1.2 项目背景 ....................................................................................................... 1
1.2.1 激光加工概述 ................................................................................... 1 1.2.2 激光雕刻及激光雕刻机 ................................................................... 2 1.3 激光雕刻机及其运控技术发展现状 ........................................................... 5
1.3.1 激光雕刻机发展现状 ....................................................................... 5 1.3.2 运动控制技术的发展现状 ............................................................... 6 1.4 论文安排及主要内容 ................................................................................... 7 第2章 系统总体方案的研究与设计 ....................................................................... 9
2.1 雕刻机的控制结构 ...................................................................................... 9 2.2 功能需求 ...................................................................................................... 9 2.3 控制系统设计过程 .................................................................................... 10 2.4 机械结构设计 ............................................................................................. 11
2.4.1 传动结构 ......................................................................................... 11 2.4.2 外形框架 ......................................................................................... 12 2.4.3 整体搭建 ......................................................................................... 12
第3章 系统硬件电路的研究与设计 ................................................................... ..14
3.1 控制系统硬件电路总体结构设计 ............................................................. 14 3.2 控制芯片选择 ............................................................................................. 15 3.3 系统电源电路设计 ..................................................................................... 16 3.4 电机及驱动系统设计 ................................................................................. 18
3.4.1 步进电机的选择 ............................................................................. 18 3.4.2 电机驱动模块 ................................................................................. 19 3.5 激光及驱动系统设计 ................................................................................. 20 3.6 LCD显示模块 ............................................................................................ 21
III
小型激光雕刻机的设计
3.7 键盘模块设计 ............................................................................................. 22 3.8 辅助系统设计 ............................................................................................. 23 第4章 系统软件的研究与设计 ........................................................................... ..24
4.1 控制系统软件的总体设计 ......................................................................... 24
4.1.1 控制系统软件开发环境 ................................................................. 24 4.1.2 控制系统软件总流程 ..................................................................... 24 4.2 初始化及对刀模式 ..................................................................................... 25 4.3 串口数据接收程序设计 ............................................................................. 26 4.4 G代码解析模块 ......................................................................................... 27
4.4.1 G代码简介 ...................................................................................... 27 4.4.2 G代码解析程序设计 ...................................................................... 28 4.5 插补控制介绍 ............................................................................................. 30
4.5.1 逐点比较插补算法 ......................................................................... 30 4.5.2 直线插补实现 ................................................................................. 32 4.5.3 圆弧插补实现 ................................................................................. 33 4.6 步进电机控制软件设计 ............................................................................. 35 4.7 键盘模块软件设计 ..................................................................................... 36 4.8 上位机软件 ................................................................................................. 37
4.8.1 图形转G代码 ................................................................................. 37 4.8.2 G代码发送 ...................................................................................... 38
第5章 系统整体测试 .............................................................................................. ..39
5.1 系统参数 ..................................................................................................... 39 5.2 激光雕刻机整机测试 ................................................................................. 40
5.2.1 测试流程 ......................................................................................... 40 5.2.2 测试结果 ......................................................................................... 40
第6章 总结与展望 .................................................................................................. ..42 致谢 ............................................................................................................................. 43 参考文献 ..................................................................................................................... 44
IV