基于ARM的嵌入式水钻加工控制系统的设计与研究
Research and Design of Crystal Processing Control System Based on ARM
【作者】 党向宇
【学位授予单位】:重庆大学
【学位级别】:硕士
【学位授予年份】:2011
【分类号】:TS934.3
【摘要】 近年来,随着人们生活水平的不断提高,商品的外观装饰越来越明显地成为消费者亲睐的因素。水钻的材质经济,质细透明,视觉上有钻石般的光彩夺目,因此,作为一种装饰辅件,水钻被广泛运用于各种中低档商品的装饰中,大大提高了产品的附加价值。未来,水钻的市场需求量将逐年走高,水钻产业将有很大的发展前景。本课题主要从提高水钻加工设备自动化水平的角度来考虑,主要目标是设计一套全自动水钻加工设备的控制系统,该系统具有较高的实现平台,开放性强,用经济的方式实现高精度运动控制,操作无人化,可根据用户需求进行不同规格的水钻加工,系统具有价格优势。本文设计了一种新型的水钻加工控制系统方案,系统采用S3C44B0X微处理器为核心,配以ATmega64单片机为辅助控制模块,构成“ARM +单片机”的双CPU型体系结构,通过扩展外围功能模块,构建硬件平台;采用UCOS-Ⅱ嵌入式实时操作系统构建软件平台,保证了系统的实时性、稳定性。本文提出了一种改进的步进电机直线型加减速控制方案。在系统上电初始化阶段,通过预编译的方式建立加减速频段表;在步进电机加减速运行时,只需查表读出相应频段即可;在步进电机的PWM控制时,使用了S3C44B0X的双缓冲定时器,实现了加减速频段之间的无延时过渡。最后设计了脉冲测试系统对实际加减速控制过程进行验证,证明了该方案的有效性。本文完成了控制系统的各硬件模块设计,其中包括:系统电源模块设计、复位电路设计、存储器系统设计、系统输入输出电路设计、步进输出模块设计。在硬件设计时,充分考虑到系统的抗干扰性能。本文完成了控制系统软件平台的搭建,将UCOS-Ⅱ移植到S3C44B0X处理上,详细设计了UCOS-Ⅱ实时操作系统的中断系统。详细完成了基于S3C44B0X的水钻磨抛控制程序设计与基于ATmega64的上下料对接控制程序设计,最后从软件的角度提高了系统的抗干扰能力。经过实践证明,该系统运行稳定可靠,满足水钻高质量加工,同时具有良好的开放性与可维护性,实现了预期目标,具有广阔的应用前景。
【Abstract】 In contemporary society, with the continuous improvement of people’s living standard, consumers are more likely to buy the goods with gorgeous appearance. Crystals are economy, transparent, and visual dazzling diamond-like, consequently, as a decorative accessories, crystals are widely used in the decoration of various commodity, which are greatly improved the product’s added value. In the future, the demand of diamond market probably rises year by year, and diamond industry tends to have whopping prospects.In this paper, with the consideration of the automation of diamond processing equipment, the automatic control system of diamond processing equipment is designed, which has great performance. With unmanned operation, it also achieves high precision motion control. In particular, according to specification needs of consumers, it can processes crystals conveniently, which is also economy.In this paper, a new control system of diamond processing program is persented. The hardware architecture is constituted by S3C44B0X, ATmega64 micro-controller and the external function modules, and the appication software is based on UCOS-Ⅱ, which ensures that the control system is real-time and stability.The acceleration and deceleration control algorithm for stepper motor is designed and implemented. the acceleration and deceleration frequency table is built by pre-compiled in the the system initialization phase.in the stepper motor’s run-times, it only look up frequency table and get the corresponding frequency. The PWM control of stepper motor fully advantages the double buffer timer of S3C44B0X to achieve acceleration and deceleration without time delay. The system of pulse test is designed to verify the process of acceleration and deceleration control system, and to demonstrate the effectiveness of the system.The hardware system of the control system is designed in this paper, and the main peripheral circuits include memory circuit, power supply circuit, reset circuit, JTAG interface circuit, serial interface circuit, stepper output circuit and digital input and output circuit.Based on theμC/OS-Ⅱreal-time embedded operating system, the softwar platform is constructed in this paper. Firstly, the interrupt system ofμC/OS-Ⅱreal-time embedded operating system is designed in details. Secondly, the diamond grinding control system based on S3C44B0X and the Atmega64-based installation system of materials is created. Thirdly, system’s interference is improved from the perspective of the software.The grinding experiment shows that the numerical control system provides good performance of stability, and it can not only meet high precision requirement, but also offer good robustness, openness, man-machine interface and maintainability, which achieves the desired objectives and has broad application prospects.
【关键词】 水钻; UCOS-Ⅱ; 加减速控制; 多任务; 多工位;
【Key words】 Crystal; UCOS-Ⅱ; Acceleration and Deceleration Control; Multi-task; Multi-station;
【目录】:
中文摘要3-4
英文摘要4-9
1 绪论9-15
1.1 嵌入式系统概述9-10
1.2 水钻与水钻产业10-12
1.2.1 水钻简述10
1.2.2 国内水钻产业的现状及发展10-11
1.2.3 水钻加工的技术现状及发展趋势11-12
1.3 课题研究的目的及意义12-13
1.4 课题主要研究内容13-15
2 系统的总体方案设计15-23
2.1 水钻磨抛一体机的加工原理15-16
2.2 系统总体需求分析16-18
2.3 系统总体方案设计18-20
2.4 ARM 处理器选型20-21
2.5 UCOS-Ⅱ 操作系统21-22
2.6 本章小结22-23
3 步进电机加减速控制的研究与设计23-43
3.1 步进电机的加减速控制原理23-24
3.2 改进的直线型加减速控制方案24-26
3.3 加减速控制软件的设计与实现26-35
3.3.1 直线型加减速的离散化处理26-28
3.3.2 加减速过程中的拐点查找28-30
3.3.3 加减速脉冲序列的控制30-31
3.3.4 加减速控制软件的设计31-35
3.4 步进脉冲测试系统的设计35-37
3.5 加减速过程的测试与分析37-41
3.5.1 标准信号测试37-38
3.5.2 实际加减速运行测试38-41
3.6 本章小结41-43
4 控制系统的硬件详细设计43-55
4.1 硬件总体结构设计43-44
4.2 电源模块设计44-45
4.3 复位电路设计45-46
4.4 存储器系统设计46-50
4.4.1 NORFLASH 电路设计47
4.4.2 NANDFLASH 电路设计47-49
4.4.3 SDRAM 电路设计49-50
4.5 JTAG 调试接口设计50-51
4.6 串口模块设计51
4.7 系统输入输出电路设计51-52
4.8 步进输出模块设计52-53
4.9 本章小结53-55
5 控制系统的软件详细设计55-77
5.1 软件总体结构设计55-56
5.2 控制系统软件平台的搭建56-62
5.2.1 系统引导程序设计56
5.2.2 UCOS-Ⅱ 操作系统移植56-60
5.2.3 UCOS-Ⅱ 中断系统设计60-62
5.3 基于S3C44B0X 的水钻磨抛控制程序设计62-73
5.3.1 控制软件模块化设计62-66
5.3.2 系统任务的划分66-67
5.3.3 系统关键任务的详细设计67-72
5.3.4 主从机通信模块设计72-73
5.3.5 I/O 端口映射模块设计73
5.4 基于ATmega64 的上下料对接控制程序设计73-75
5.4.1 主从机循环控制原理73-74
5.4.2 上下料对接控制程序设计74-75
5.5 软件抗干扰设计75-76
5.6 本章小结76-77
6 人机界面设计与系统的调试改进77-83
6.1 系统实物图77
6.2 人机接口界面77-81
6.3 系统调试与改进81
6.4 本章小结81-83
7 结论与展望83-85
7.1 结论83-84
7.2 展望84-85
致谢85-87
参考文献87-91
附录91
A.作者在攻读学位期间发表的论文目录91
B. 作者在攻读学位期间取得的科研成果目录91

