程序流程图
摘要
机械手是一种能模仿人手的某些动作,代替人完成某些特定工作的自动化装置。它可代替人的繁重劳动以实现生产的机械化和自动化,能在有害环境下操作以保护人身安全,因而广泛应用于机械制造、冶金、电子、轻工和原子能等部门。
本设计主要是二维机械手运动的控制。机械手采用的是两相混合型步进电机作为动力源,应用L298双H桥芯片作为步进电机驱动器来实现步进电机正反转的控制。除机械手步进电机控制外,本设计还要完成传送装置的设计、传感器电路的设计,这些设计配合机械手完成物体的分拣动作。
采用安装在微机WINDOWS 98系统DOS下的TURBO C软件对微机并口进行编程控制。设计需要完成对射管检测将要被分拣的物体到来和接近开关检测金属和非金属的信号采集,并将采集结果通过微机状态口送入微机,微机根据采集信号的状态通过数据口控制步进电机旋转,横轴和竖轴采取不同的运动组合完成分拣运动,将金属和非金属区分开。
通过本设计,深入了解步进电机的工作原理和工作性能,掌握微机并行接口的工作原理,学会设计步进电机驱动电路和信号传感器的应用电路。在电路制作过程中,学会如何用Protel99se软件进行电路原理图和PCB图的绘制,掌握手工制作PCB板的方法。
关键词:机械手;并行端口;L298
Abstract
Manipulator is a kind of automation deviceswhich can mimic some action of people and complete some certainwork instead of people. It can replace the heavy labor of people to achieve the production mechanization and automation,can be operated in the harmful environment to protect the personal safety,therefore,it iswidely used in machine building, metallurgy, electronics, light industry and atomic energy departments.
The design is main about the movement control of the two-dimensional manipulator.The manipulator uses a two-phase hybrid stepping motor to be the power source, and apply L298 Double H-bridge chip as a stepper motor drive to achieve positive and the stepper motor control.In addition to the stepper motor control of the Manipulator,The design also needs to complete te design of transmission device and the design of the sensor circuit, these designwill complete the sorting actionwith the manipulator.
Wewill programming control the parallel port of the computer by using the TURBOC software under the DOS of WINDOWS 98which is installed in the computer.The design needs to complete the signal acquisition ofwhether having objects come close to switching and the testing of metals and non-metallic,then,the resultswill be sent to the computer through the state port of the computer,the computer control the rotary of the stepper motor through the state of the acquisition signals, the horizontal andvertical axiswill complete the combination of different sports movement to separate metal and non-metallic.
Through the graduate design, in-depth understanding of the stepper motor principle andwork performance, master the Principle of the parallel interface of the computer, learn how to design the stepper motor drive circuit and the sensor signal application circuit.In the circuit production process, learn how to use software Protel99se to draw circuit schematic and PCB map, master the method of hand-made PCB board.
Keywords: Manipulato; Parallel port; L298
目录
引言1
1绪论2
1.1工业机器人的发展历史2
1.2国外工业机器人的技术发展现状2
1.3我国工业机器人的发展现状3
2设计内容、要求及步进电机控制方案选择5
2.1控制方案要求及动作图5
2.1.1横向、纵向运动功能6
2.1.2状态检测功能6
2.3步进电机控制方案选择6
2.3.1方案一单电压功率驱动接口6
2.3.2方案二高低压功率驱动接口7
2.3.3方案三斩波恒流功率驱动接口7
2.3.4方案四集成功率驱动接口8
2.3.5方案示意图9
3硬件设计10
3.1步进电机简介10
3.1.1步进电机的基本特点11
3.1.2进电机原理简介12
3.2并行打印机接口介绍13
3.2.1端口功能介绍13
3.2.2寄存器地址及控制使用14
3.2.3接口定位15
3.2.4TC语言访问并口简介15
3.3 IEEE1284并口协议及并行口5种工作模式介绍与选用16
3.4光电耦合电路设计26
3.4.1光电耦合电路的主要作用26
3.4.2光电耦合电路工作原理26
3.4.3TLP52-1、TLP52-4简介27
3.5步进电机控制电电路设计28
3.5.1 H桥型驱动电路设计28
3.5.2 L298介绍30
3.5.3步进电机控制框图31
3.5.4光电隔离电路32
3.5.5 L298控制电路33
3.6直流电机电路设计33
3.8限位开关检测电路34
3.9接近开关检测电路设计35
3.9.1接近开关原理介绍35
3.9.2接近开关检测电路35
3.10对射管检测电路设计36
3.11电压转换电路设计36
3.11.1 7805、7812芯片简介36
3.11.2电压转换电路设计37
3.12 USB接口电路设计38
3.13系统电路图及其PCB图39
3.14元件清单43
4软件设计44
4.1并口分配44
4.2 TURBO C程序设计概要44
4.3程序流程图49
4.4步进电机控制程序设计52
4.4.1步进程序设计52
4.4.2步进电机A、B相线圈正、负调试及程序设计52
4.4.3机械手横、竖轴起步基准确认程序设计54
4.4.4物体检测判断程序设计55
4.4.5金属非金属检测判断设计56
4.4.6完整控制程序设计57
4.5软硬件调试结果61
5结论62
谢辞63
参考文献64
动作示意图
方案示意图
2摘要
3设计所包含文件
1字数
4目录