文档介绍:摘要
在焊接的过程中,焊接压力的大小和焊接的时间,直接影响着焊接质量。本次设计主要对焊接压力控制系统进行研究和设计,并对控制的方法和原理进行讨论,最后进行调试实验来验证设计的正确性和可行性。
焊接压力控制系统的设计主要分为硬件的设计和软件的设计。
硬件的设计包括:电源模块、单片机控制模块、DA转换模块、通信模块、电磁铁驱动模块、压力检测模块。
软件的设计主要包括单片机软件设计和Windows应用程序设计。其中单片机软件设计主要是PID算法的实现和与外设的交互;Windows应用程序设计主要是显示焊接压力和串口的收发。
在本设计中,焊接压力控制系统采用了闭环控制,具有精度高、响应速度快、抗干扰能力强的特点。其中单片机使用PID控制算法充当控制系统的调节器,DA转换模块作为执行器,焊接压力作为被控对象,压力检测作为反馈环节。控制的具体过程为,首先单片机获取焊接压力值的大小,之后通过与给定值行进做差运算后得到压力的误差值,经过PID运算后得到控制量,单片机将控制量通过DA转换然后控制电磁铁,最后单片机再次读取焊接压力值,这样就构成了一个反馈控制系统。
单片机与PC机之间通过串口进行通信。为了保证通信的可靠性,本设计采用了数据帧以及CRC校验机制,即发送方将数据帧进行CRC校验后,然后将校验值加入到数据帧中一块发送,接收方接收到数据帧以后,用同样的方式对数据帧进行CRC校验,然后再与接收到的CRC校验值进行比较,当且仅当接收方计算出的CRC校验值与发送方发送过来的CRC校验值一致时,才能认为接收到的数据就是发送方发送的数据。
关键词:焊接压力;闭环控制;单片机;PID算法;串口通讯
Abstract
In the welding process,welding pressure and the welding time,directly affect the quanlity of purpose of this design is that research and design the welding pressure control system,and discuss the control verify the correctness and feasibility of the design by experiments.
Design of welding pressure control system, including software and hardware.
Hardware design includes: power supply module, microprocessor control module, DA converter module, communication module, the driver module, pressure sensor module.
Software design includes MCU software design and Windows application software which is designed primarily to achieve the PID algorithm and interactive with the peripherals. Windows application is designed primarily to display welding pressure and using the serial port to send or receive message.
In this design , the welding pressure control system uses a closed-loop control method,which has many advantages such as high precision, fast response, better anti-jamming ability. MCU with the PID control algorithm acts as a regulator, DA converter acts as executor, welding pressure is the controlled plant, pressure sensor acts as the feedback loop. The specific process : frist of all , MCU read the pressure value , pared w