基于单片机的自动化点焊控制系统.doc

约35页DOC格式手机打开展开

基于单片机的自动化点焊控制系统,1.3万字35页摘 要点焊在汽车制造业和其他一些需要精密焊接的领域中发挥着重要作用。在许多没有实现自动化焊接的工业领域,采用了大量的人工焊接的方法。由于人工操作的随机性,漏点、漏焊现象时有发生。这又需要增加大量的品质人员,以便对点焊质量进行检查和巡查。采用单片机实现焊接控制的自动化,可以有...
编号:10-34345大小:295.00K
分类: 论文>通信/电子论文

内容介绍

此文档由会员 20023286 发布

基于单片机的自动化点焊控制系统
1.3万字 35页


摘 要

点焊在汽车制造业和其他一些需要精密焊接的领域中发挥着重要作用。在许多没有实现自动化焊接的工业领域,采用了大量的人工焊接的方法。由于人工操作的随机性,漏点、漏焊现象时有发生。这又需要增加大量的品质人员,以便对点焊质量进行检查和巡查。采用单片机实现焊接控制的自动化,可以有效地改变这一现状,减少人力并提高焊接质量。
本研究根据上海保隆汽车科技股份有限公司对自己生产线上焊接工艺进行改进的要求,采用位移传感器,X/Y轴步进电机等器件,和单片机一起构成闭环控制系统,完成了自动化点焊控制系统的软件和硬件设计,为公司节省成本和人力资源,提高焊接质量和效率,创造了可观的经济效益。
本文着重论述了界面设计和相关程序的编写.主要采用单片机技术、液晶显示(LCD)技术、脉宽调制(PWM)技术,完成焊接操作机的数字控制和自动化焊接,实现焊点的精确定位与界面程序的编写。


【关键词】
点焊 自动化 闭环控制 液晶显示(LCD) 脉宽调制(PWM)



MCU-based automatic
control system for spot-welding

Abstract

Spot-welding in the automotive manufacturing and other areas of needing exact welding plays an important role. There is no automatic welding in many industrial areas of welding, using a large number of methods with manual welding. Because of the randomicity in the manual operation, the phenomenon of leak and leakage in the welding occur from time to time. And again, this needs to increase a large number of personnel who examine product qualities, to carry out spot checks and inspections of the quality. Adopting single-chip computer control to achieve welding automation is an effective way to change this status quo, to reduce the manpower and improve the welding quality.
In this study, according to the request for their production lines to improve the welding process in Shanghai Baolong Automotive Technology Co., Ltd., the components of displacement sensors, X / Y-axis stepper motor devices and so on, constitute a closed-loop control system with single-chip computer. And we use them to complete the software and hardware designs of the automated spot-welding control system ,in order to save costs & human resources for the company, to improve the quality and efficiency of welding, thus creating a considerable economic benefits.
This article focuses on the interface design and related procedures for the preparation. Mainly we have adopted single-chip technology, liquid crystal display(LCD)technology and pulse width modulation(PWM)technology to complete the digital control and automatic welding with the welding operation machine, to achieve precise position of the solder joint and to write interface procedures.


【Key words】
spot-welding automation closed-loop control
liquid crystal display(LCD) pulse width modulation(PWM)





目 录

绪论…………………………………………………………………………………… (1)
1 设计要求………………………………………………………………………………(1)
1.1技术概要……………………………………………………………………………(1)
1.2 系统实现功能……………………………………………………………………(1)
2 设计原理………………………………………………………………………………(2)
2.1 硬件设计及实现………………………………………………………………… (2)
2.1.1 结构框图…………………………………………………………………(2)
2.1.2 中央处理单元……………………………………………………………(3)
2.1.2.1 MCU的管脚图……………………………………………………(3)
2.1.2.2 MCU与电源………………………………………………………(3)
2.1.2.3 MCU与晶振……………………………………………………(4)
2.1.2.4 MCU与接近开关…………………………………………………(4)
2.1.2.5 MCU与步进电机………………………………………………(5)
2.1.3 反馈单元…………………………………………………………………(6)
2.1.4 焊接单元…………………………………………………………………(6)
2.1.5 按键控制单元……………………………………………………………(7)
2.1.6 液晶显示单元……………………………………………………………(8)
2.2 界面设计与实现…………………………………………………………………(9)
2.2.1按键分布与功能说明……………………………………………………(9)
2.2.1.1按键分布图……………………………………………………(9)
2.2.1.1按键功能说明…………………………………………………(9)
2.2.2界面显示与按键操作……………………………………………………(9)
2.2.2.1 界面关系图……………………………………………………(9)
2.2.2.2 主界面………………………………………………………(10)
2.2.2.3 采点时的选点界面…………………………………………(11)
2.2.2.4采点显示界面………………………………………………(11)
2.2.2.5 设置时的选择界面…………………………………………(12)
2.2.2.6 焊点选择界面………………………………………………(12)
2.2.2.7 焊点参数设置界面…………………………………………(13)
2.2.2.8 汽缸选择界面………………………………………………(13)
2.2.2.9 汽缸参数设置界面……………………………………………(14)
2.2.2.10 操作界面……………………………………………………(15)
2.2.2.11 复位界面……………………………………………………(15)
2.3软件设计及实现…………………………………………………………………(16)
2.3.1软件功能…………………………………………………………………(16)
2.3.2重要程序设计举例………………………………………………………(16)
2.3.2.1 按键程序设计………………………………………………(16)
2.3.2.2 液晶显示程序设计…………………………………………(16)
2.3.2.3 电机和汽缸运的程序设计…………………………………(18)
2.3.3软件程序流程图设计……………………………………………………(19)
3 设计总结………………………………………………………………………………(19)
3.1设计成果…………………………………………………………………………(19)
3.2 设计中的不足以及改进方向……………………………………………………(19)
参考文献…………………………………………………………………………………(20)
附录A………………………………………………………………………………………(21)
附录B ……………………………………………………………………………………(23)
附录C ……………………………………………………………………………………(26)



参考文献
[11] 电磁式继电器的工作原理和特性详见 资料继电器的工作原理和特性.doc .
[12] 周明德,蒋本珊.微机原理与接口技术.北京:人民邮电出版社. 2002年4月.
[13] YM1604AP-1的使用手册详见 资料字符使用说明书.pdf.
[14] 谭浩强.C程序设计(第三版).北京:清华大学出版社. 2005年7月.
[15] 按键程序按键扫描设计思路详见 资料单片机键盘全接触.pdf .



附录A:
/*------------------------ 主程序-----------------------------------------------------------------*/
#include "head.h"

void main(void)
{
DisableInterrupts;
mcu_init(); //对LJ-12单片机进行初始化
port_init(); //对LJ-12单片机的端口进行初始化
......



附录B:
//------------------------------键盘扫描-----------------------------------------//

void key_scan(void)

{
unsigned char temp; // 中间变量
unsigned char temp_v; //中间变量

PTA|=0x00; // PTA=0x77
PTA0=0; //第一列置0
PTA1=1;
PTA2=1;
temp_v=PTA;
......



附录C:
//------------------------------------汽缸控制子程序-----------------------------------//

void cylinder(void)

{
CYL_2=1;

if(flag_sec_timer) // flag_sec_timer=1停止并复位计数器1

{
delay_1ms(1000);

T1SC_TSTOP=1; // 停止计数器1
T1SC_TRST=1; // 复位T1

T1SC=0x46; // 使能溢出中断,64分频
......