3D打印喷头与轴运动同步控制方法研究与实现

 2022-08-08 09:08

论文总字数:27505字

摘 要

随着智能制造国家战略的实施,增材制造正成为该领域研究热点之一,工业应用也对其有了越来越高的要求。但是,现有3D打印机喷头挤丝运动与XY运动运动之间相互独立,挤丝速度与XY轴扫描速度无法始终保持一定比例关系,导致挤出的细丝粗细不均,严重影响了打印精度。论文旨在设计一套喷头与轴运动的同步控制系统,最大程度上提高挤出细丝的均匀程度。

硬件方面,选用核心开发板MC9S12G128,利用其内置的PWM模块实现对步进电机的控制。3D打印机加工的轮廓曲线都是由直线和曲线构成的,借鉴数控机床中的插补算法思维,利用小段直线逼近要加工的曲线,拟合喷头运动轨迹。与此同时,在插补过程中,坐标轴对应PWM通道的周期必须与挤丝电机对应PWM通道的周期保持严格的比例关系,以处理好喷头与轴运动的同步问题。

利用9S12G系列单片机开发软件Code Warrior IDE开发插补运动算法,在Visual C 软件中打印出每个插补周期结束后的动点坐标,以及每个插补周期喷头的行进距离可以间接验证控制程序的准确性。为了实现人与单片机控制程序的交互,也为了更加直观了解打印机喷头的运动情况,需要开发单片机的监测与控制软件。Visual C MFC恰巧是最方便,易懂的开发语言。

最后,开发出了符合要求的同步控制软件,同时该监测与控制软件也满足了通信、交互和监测的功能。

关键词:插补原理、MC9S12G128单片机、PWM模块、监测与控制软件

Abstract

With the implementation of national strategy of intelligent manufacturing, additive manufacturing is becoming one of the research hot-spots in this field. However, the existing 3D printer nozzle extrusion and XY motion are independent of each other, wire extrusion speed and XY motor scanning speed cannot always maintain a certain proportion relations, lead to extrusion filaments uneven thickness, and this seriously influences the printing accuracy. The aim of this paper is to design a set of synchronous control system of nozzle and shaft motion to improve the evenness of extruded filament to the greatest extent.

In terms of hardware, the core development board MC9S12G128 is selected to control the stepper motor with its built-in PWM module. 3D printers machining contour curve is made up of straight line and curve, the interpolation algorithm thinking in NC machine tools, using small section of the curve of the linear approximation to processing, fitting nozzle trajectory. At the same time, in the process of interpolation, the corresponding PWM channel axes and packed wire motor cycle must correspond to the cycle of the PWM channel maintain strict proportion relationship, to deal with nozzle and shaft movement synchronization issues.

Using 9S12G series MCU development software Code Warrior IDE interpolation algorithm, in the Visual C software to print out each interpolation period after the end of the fixed point coordinate, and travel distance of each nozzle interpolation cycle can be indirectly verify the accuracy of the control program. In order to realize the interaction between man and MCU control program, and to understand the motion of printer nozzle more directly, it is necessary to develop the monitoring and control software of MCU. Visual C MFC happens to be the most convenient, easy-to-understand development language.

Finally, the required synchronous control software is developed, and the monitoring and control software also satisfies the functions of communication, interaction and monitoring.

KEYWORDS : Interpolation principle, ARM MC9S12G128, PWM module, Monitoring and control software

目 录

摘要 I

Abstract II

第一章 绪论 1

1.1 背景意义 1

1.2 国内外研究现状 1

1.2.1 3D打印技术发展现状 2

1.2.2 电机同步控制技术发展现状 2

1.3 论文主要研究内容 4

第二章 3D打印机同步运动插补控制 5

2.1 插补的基本概念 5

2.2 插补的种类 5

2.2.1 逐点比较法 5

2.2.2 时间分割法插补 7

2.3 加减速度控制 9

2.3.1 直线加减速控制 9

2.3.2 “S型”加减速控制 10

2.3.3 减速区判别 11

2.4 本章小结 12

第三章 基于MC9S12G128单片机的步进电机运动控制 13

3.1 MC9S12G单片机 13

3.2 单片机的软件调试环境 13

3.3 内部时钟模块(PLL) 14

3.4 SCI模块 15

3.4.1 串行异步通信概要 15

3.4.2 SCI模块收发数据 17

3.5 TIM模块 18

3.6 PWM模块 19

3.6.1 PWM模块功能 19

3.6.2 PWM通道周期与占空比 19

3.6.3 PWM模块初始化步骤 19

3.7 步进电机多轴同步运动控制 20

3.7.1 控制算法 20

3.7.2 同步控制软件设计 21

3.7.3 同步控制软件实现 21

3.8 本章小结 23

第四章 监测与控制软件设计与实现 24

4.1 监测与控制软件系统总体设计 24

4.1.1 串口通信功能设计 24

3.1.2 参数初始化功能设计 25

3.1.3 实时曲线功能设计 26

4.2 监测与控制系统软件实现 27

4.2.1 界面 27

4.2.2 变量声明 29

4.2.3 添加控件响应代码 30

4.3 控制系统验证 32

4.4 本章小结 33

第五章 总结与展望 34

致谢 35

参考文献 36

附录 38

剩余内容已隐藏,请支付后下载全文,论文总字数:27505字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;