文档库 最新最全的文档下载
当前位置:文档库 › 基于TA8435H驱动的步进电机的单片机

基于TA8435H驱动的步进电机的单片机

2009机电工程技术年第38卷第07

基于TA8435H 驱动的步进电机的单片机控制

玮,陈毕双,杨捷顺

(深圳技师学院光机电技术系,广东深圳

518040)

收稿日期:2009-03-11

,广泛应用于各种机电控制设备中。基于专用驱动芯片TA8435H ,、不同速度的转动,。单片机;TA8435H ;细分驱动文献标识码:A

文章编号:1009-9492(2009)07-0034-02

1引言

步进电机是一种将电脉冲转化为角位移的执行机构。当步进驱动器接收到一个脉冲信号,它就驱动步进电机按设定的方向转动一个固定的角度(即步进角),它的旋转是以固定的角度一步一步运行的。可以通过控制脉冲个数来控制角位移量,从而达到准确定位的目的;同时可以通过控制脉冲频率来控制电机转动的速度和加速度,从而达到调速的目的

[1]

。步进电机可以作为一种控制用的特种电

机,利用其没有积累误差(精度100%)的特点,广泛应用于各种机电控制设备中。为较好地理解步进电机的工作原理与控制方式,特开发与研制了单片机控制下的二相步进电机运动控制系统,驱动芯片选用TA8435H 。

2TA8435H 芯片特点

TA8435H 是东芝公司生产的单片正弦细分二相步进电

机驱动专用芯片,图1所示为TA8435H 芯片内部电路图,从中可以看出,TA8435H 主要由1个解码器、2个桥式驱动电路、2个输出电流控制电路、2个最大电流限制电路、

1个斩波器等功能模块组成

[2]

。该芯片具有整步、半步、

1/4细分、1/8细分运行方式可供选择及正/反转控制等功

能。本文研制的步进电机控制电路利用了驱动芯片

TA8435H 的这些功能,简化了电路的设计,且工作可靠。

3控制电路组成

3.1硬件电路设计

图2是单片机与TA8435H 相连控制步进电机的原理图。单片机主控芯片为AT892051。电路中RST 为复位按钮,用于实现电路的起始及复位

[3]

;按钮正/反转、加速

及减速,分别用于控制步进电机正反两个方向的转动及电机的加速与减速转动。

电路中TA8435H 驱动芯片的M1和M2引脚决定电机的转动方式:

M1=0、M2=0,电机按整步方式运转;M1=1、

M2=0,电机按半步方式运转;M1=0、M2=1,电机按1/4

工业控制

2009

机电工程技术年第38卷第07

细分方式运转;M1=1、M2=1,电机按1/8细分方式运转。电路中电机工作在何种运转方式可由拨动开关进行设置。CW/CWW管脚控制电机转动方向;CK1、CK2为时钟输入端,本电路采用单时钟输入,控制时钟的频率,即可控制电机转动速率。REFIN脚为NFA、NFB输出电压控制端,REFIN为高电平,NFA、NFB的输出电压为0.8V,REFIN 为低电平,NFA、NFB的输出电压为0.5V,而NFA、NFB 这两个引脚控制步进电机输入电流;选用不同的二相步进电机时,应根据其额定电流大小选择合适的R8和R9阻值。电路中R6、C5组成复位电路,D1~D4为快恢复二极管,用来泄放电机绕组电流。

3.2电源电路

电路中需要+12V和+5V两组电源。+12V电源接在TA8435H驱动芯片VMA及VMB管脚上,主要给步进电机供电。+5V电源为单片机、驱动芯片及外围电路供电。图2也给出了电源电路图。

3.3软件设计

以下是利用TA8435H控制步进电机的程序,用以控制步进电机的起动,实现和控制步进电机的转向和转速,电机细分控制通过电路拨动开关的设置实现。

ORG0000H

AJMP MAIN

ORG0030H

MAIN:CLR P1.5;软件使能

MOV R5,#0FH;预设速度

MOV R2,#10H;延时参数LOOP:CALL D1MS;调用延时

CPL P1.6;给步进发脉冲

SETB P1.1;查询按键之前要先对按键置1

SETB P1.2;查询按键之前先要对按键置1

JNB P1.1,ADDSP;判断加速按键是否被按下

JNB P1.0,DECSP;判断减速按键是否被按下

JNB P1.2,DCCW;判决正反转按键是否被按下

SJMP LOOP

DCCW:MOV R3,#0FFH

LOOP2:DJNZ R3,LOOP2

DJNZ R2,DCCW

MOV R2,#10H

CPL P1.7;正反转控制

SJMP LOOP

ADDSP:CJNE R5,#09H,SP1;速度加

LOOP11:MOV R3,#0FFH;延时

LOOP21:DJNZ R3,LOOP21

DJNZ R2,LOOP11

MOV R2,#04H

SJMP LOOP

SP1:DEC R5;通过调整延时来控制发脉冲的速度SJMP LOOP

DECSP:CJNE R5,#0FFH,SP2;速度减

(下转第68页)

工业控制

2009

机电工程技术年第38卷第07

LOOP12:MOV R3,#0FFH;延时

LOOP22:DJNZ R3,LOOP22

DJNZ R2,LOOP12

MOV R2,#04H

SJMP LOOP

SP2:INC R5

SJMP LOOP

D1MS:MOV A,R5;延时

MOV R7,A

LOOP5:MOV R6,#64H

LOOP6:DJNZ R6,LOOP6

DJNZ R7,LOOP5

RET

END

4结束语

本文介绍了基于TA8435H芯片的二相步进电机的控制,用以实现步进电机的正反向运转,实现不同速度的转动。使用细分方式可提高步进电机的控制精度,降低步进电极的振动和噪声[4]。因电路使用专用驱动芯片,控制系统硬件电路设计简单,结构紧凑,运行可靠;并且软件编制也较简单、清楚。

借助该控制电路,可掌握步进电机的运行与控制,进而对理解机电控制设备及数控设备的运行有一定的帮助。参考文献:

[1]刘宝延.步进电机及其驱动控制系统[M].哈尔滨:哈尔滨工业大学出版社,1997.

[2]刘升.二相步进电机驱动芯片TA8435H及其应用[J].国外电子元器件,2005,3(3):37-40.

[3]何立民.单片机应用系统设计[M].北京:北京航空航天大学出版社,1993.

[4]王志超,林岩,李大庆.两相混合式步进电机细分驱动[J].信息与电子工程,2008,6(6):457-460.

第一作者简介:王玮,男,1965年生,甘肃天水人,硕士,工程师。研究领域:光机电一体化技术及设备。已发表论文8篇。

(编辑:吴智恒)

令:A=polyfit(x,y,n)[5],其中x为拉杆拉力,y为起重量,A为所求多项式系数。

经计算得:A=[4.59-110.411383.20.43],所求拟合多项式为(7)式。

G=0.43+1383.2Q-110.41Q2+4.59Q3(7)根据所求拟合多项式估算起重量值见表1,样本散点图和拟合曲线如图3所示。GB5144—94规定:起重机应安装起重量限制器,对最大起重量大于6t的起重机如设有显示装置,则其数值误差不得大于指示值的5%。拟合曲线误差能够满足国标要求。6结论

本文针对塔机起重量监测中存在的非线性问题,采用数据拟合理论,建立了起重量G和拉杆拉力Q之间的函数关系式,使塔机起重量监测在PLC中得以实现。从实例可见,该方法具有如下优点:

(1)计算结果惟一,计算量小,便于在PLC、单片机等硬件设备上实现;

(2)可精确、方便地实现起重量的实时监测;

(3)当钢丝绳倍率改变时,只需调整对应多项式的系数,不必改动其它硬件设施;

(4)保留了原有起重量限制器中的超重预警开关和超重报警开关,能够实现起重量预警和报警的双重保护。

参考文献:

[1]岳维峻.起重机械安全防护装置的安全性控制[J].起重运输机械,2007(3):81-84.

[2]陈敏,马丽.传感器特性曲线的一种拟合方法[J].传感器技术,2003(1):38-40.

[3]魏毅强,张建国,张洪斌.数值计算方法[M].北京:科学出版社,2004.

[4]贾永峰.塔式起重机多源信息监控系统研究[D].西安:西安建筑科技大学,2005.

[5]张志涌,等.精通MATLAB6.5版[M].北京:北京航空航天大学出版社,2003.

第一作者简介:贾永峰,男,1972年生,陕西西安人,博士研究生,工程师/讲师。研究领域:机电液一体化。已发表论文8篇。

(编辑:梁玉)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(上接第35页)

研究与开发

Abstracts

09-07-13 Research Progress of Polishing Hard Brittle Material by Laser

09-07-28 Decision-making Based on the Constant Tension of the Dual Variables Control Research

09-07-16 Study and Application of Position Servo Control in Shearing Machine Based on PLC

09-07-20 The Design of the Steel Tube Automatic Ultrasonic Detect Test Control System Based on PLC

09-07-30 The Design of Hydraulic Control System of 160 Injecting Molding Machine Based on PLC

09-07-23 The Tobacco Cut-System Based on PLC and AC Servo System

09-07-32 Design of TMS320LF2407 Servo System

09-07-24 Design of Control System for Leather 09-07-34 The Control of Stepping Motor Using a Vacuum Dryer Based on PLC and PT

Single Chip Microcomputer Based on TA8435H Driver

09-07-26 Study on Remote System of Day and Night Monitoring

urban and rural areas is developed. The system is imitation tested and through field verification survey. The results show that the system at the circumstances of no zooming and no focusing can GUO Xiao-yan, LIU Xiao-fei carry out a full range of monitoring in long distance, regardless of day and night, and with clear picture, thus achieve real-time Abstract: The research background of polishing hard brittle monitoring.

material by laser and basic theoretical model are introduced in Key words: remote monitoring; charge-coupled device (CCD); this paper. Then its mechanism is discussed and the influence lightning protection system

factors on the polishing effect are summed up. Finally some predictions of its future development are presented.

Key words: hard brittle material; laser polishing; mechanism

XIANG Bi-yun Abstract: The textile fiber spurts the color equipment’s positioning processing device by feeding, positioning and rolling SHI Jian-ping, GUO Jun, ZHANG Jian-sheng mechanism. If the control lack of coordination, feeding-rolling Abstract: This paper introduces the method of accurate position speed and positioning the main drive speed is not balanced, servo control in the back of shearing machine based on PLC, causing the displacement control is not accurate, cannot improve servo generator and HMI, etc, enforce auto detection of position processing quality. To solve this problem, setting up the constant and number of the plate. The actual usage shows that rebuilding tension of dual speed digital control system, through the main system has high precision and reliability, invests less, shortens encoder position measurement, as well as analysis of tension-rebuilding period and raises working efficiency.sensing data processing and control algorithm, controlling test Key words: shearing machine; servo control; PLC

data decision-making accurately.

Key words: detected; data processing; the constant tension; regulation control

DING Xu-sheng, LIN Bin-quan, YANG Qing-lan 1,22Abstract: At present, the automatic steel pipe detect equipment CHEN Xiao-jun , XU Bin made in china couldn’t implement monitoring real-timely. To solve this issue, the control system of automatic steel pipe detect equipment was manufactured. The control system of the slave Abstract: According to the tendency of modern plastic injection unit was prepared by adopting C++ Builder, and through RS-232 machine with high productivity, the controller for the machine serial communication, the master unit was carried out real-time must have good automatic control performance. Aiming at the surveillance. The actual production proved that this control actuality in the field of the plastic injection machine controller, system was stable, the movement was reliable, and the control of the relay control system is replaced. The control system based on automatic steel pipe ultrasonic nondestructive test was realized.PLC is used to control the hydraulic system of 160 model Key words: PLC; automatic; serial communication; slave/master injection molding machine. After this, several automatic control unit

strategies for hydraulic system are studied. The actual performance of the system shows the control is satisfactory. Key words: PLC; injection molding machine; hydraulic system

Z H A N G S o n g -j u n ZHONG Geng-jin Abstract: This article generally describes the need to improve on Tobacco Cut-System, expounds the basics structure and Abstract: In order to increase the control precision and velocity working principium of Tobacco Cut-System which based on PLC of servo systems, the vector control theory and infirm magnetism and AC Servo System , the control precision reaches the purpose were used, and the software and hardware of TMS320LF2407 of the Cigarette Making and Plug Assembling Combination were established. The electric motor had nicer movement and running stably.

function static state answering, and the control precision and Key words:Tobacco Cut-System;PLC;AC Servo System; velocity were increased.

Encoder of the motor

Key words: TMS320LF2407; control; precision; velocity

12ZHOU Jian-zhong , XIANG Yu-jian , WANG Long-2tai WANG Wei, CHEN Bi-shuang, YANG Jie-shun Abstract: Summarizing the structure and process of Leather Abstract: As a special controlled motor, the stepper motor is Vacuum Dryer Machine, and Developing the total structural applied in various electromechanical machines. Based on design and software modules based on PLC and PT. After online TA8435H driver chip, the circuit of controlling two-phase adjuster, the control system’s reliability and convenience have stepper motor using the chip-microcomputer is designed and been improved.

given. In this circuit ,,the step motor is controlled to rotate with Key words: Leather Vacuum Dryer Machine; control system; clockwise and counterclockwise directions, and rotate with PLC; PT

different rate. The micro-stepping driving method of two-phase stepping motor is realized. This paper gives schematic circuit diagram and assembler instructions. It is helpful to understand the rotation and control of stepping motor with the presented LIU Xue-fang, REN Hao, BI Jun circuit.

Key words: stepping motor; AT892051 chip-microcomputer; Abstract: Remote monitoring is one of the advanced modern TA8435H; micro-stepping driving

control technology. A social security of monitoring system for

(Zhongshan Torch Polytechnic,

Zhongshan528436, China)

(Shunde Polytechnic, Foshan528333, China)

(Changzhou

Institute of Technology, Changzhou213002, China)

(Guangdong

Goworld Co.,Ltd, Ultrasonic Instrument Branch, Shantou515041, China)

(1. School of Communication and

Control Engineering, Jiangnan University, Wuxi2141221, China; 2. Department of Mechanical Engineering, Nantong Radio & TV University, Nantong226006, China)

(X u c h a n g T o b a c c o M a c h i n e r y Co.,Ltd,Xuchang416000,China)

(Guangdong Communication Polytechnic, Guangzhou510800, China)

(1.Yangzhou V ocational College of Environment and Resources,

(Dept.of Yangzhou225127, China; 2.Institute of Electrical and Mechanical of Photoelectric Machinery, Shenzhen Senior Technical Institute, Yangzhou University, Yangzhou225002, China)

Shenzhen518040, China)

(Guangzhou Research Institute of

O-M-E, Guangzhou510663, China)

相关文档
相关文档 最新文档