当前位置:文档之家› 步进电机中英文对照外文翻译文献

步进电机中英文对照外文翻译文献

中英文对照外文翻译(文档含英文原文和中文翻译)基于单片机的步进电机控制流水线设计摘要:通过采用电子化和智能化技术,本文实现了力学和电子产品流水线包装控制的有效整合。

要达到这个目的,步进电机是由一个单片微型计算机(SCM)式STC89C516RD+的控制。

一旦LJ-JT02的光电开关型检测产品合格,信号给出了以供应链管理为指导的步进电机。

此外,剪刀用于切断包装带,这是由HRS4H-S-DC5V 的继电器类型实现。

实验结果表明,上述设计的有效性。

关键词:单片机(SCM);步进电机;驱动芯片;接力1 引言- 1 - - 1 -在20世纪50年代到70年代,随着电子和合成化学品的快速发展,对用合成材料作为包装材料的一系列新的包装技术和设备有很大的影响。

例如,有高速自动包装机的机电一体化,容易操作的多功能包装机和高生产率的自动包装机。

这些机器使包装机械行业成为被看好的机械制造行业。

虽然早在20世纪50年代中期就已经有一些包装机械厂出现在中国,然而生产率很低。

在改革开放之初,许多食品机械和包装机械被介绍到中国,极大地促进了行业发展。

20世纪80年代后期,国民经济的快速发展对包装机的需求量很大。

而与此同时,很多传统的用于生产农业机械的工厂,开始生产包装机械。

在1997年底,包装机械制造厂的数目已增至1600个左右,并有大约75个研究机构从事包装机械的研究和开发。

更重要的是,大约有21所高校引入关于包装机械的专业。

因此,该行业在中国不仅要推进,还应进一步提高。

未来具有微电脑和机电一体化的包装机械将呈现增长的趋势。

一个完整的机电一体化系统是一个系统集成multidisciplines,如机械、微电子计算机和传感器。

它带来了深刻的变化,通过设计、制造和包装机械的控制和改变industry.In来达到更快速地开发。

事情应该这样做才能提高包装机械,机电一体化,产品的可靠性和稳定性的水平,因此,现代包装产业将会进一步得到改善。

在这项工作中,我们在模拟包装流水线的基础上,由单片机驱动步进电机控制。

首先我们介绍的是硬件电路的整体设计和硬件的主要连接,然后描述了软件设计和编程过程,最后我们证明了产品设计实验的可行性,以及对包装机械未来的展望。

2 硬件电路设计2.1 总体电路设计为了便于实验,用剪刀和发光二极管代替部分由步进电机控制的器件。

当发光二极管发光,这意味着相应的端口输出高电平。

如果他们不亮,这意味着相应的端口输出低电平。

一种光电开关被安装在传送带上,如果没有产品通过时,光电开关的红外线接收器和发射设备被关闭,并且输出为高电平。

如果某些对象被传递,红外线被中断,它会立即输出一个负脉冲。

一旦单片机的输入端口检测到光电开关传输的负脉冲,单片机的输出端会产生由程序控制的特殊电平,传输到驱动芯片,使步进电机工作。

当包装的时间到了,单片机输出脉冲信号给继电器,使剪刀接近,切断包装带。

在这之后,剪刀再次打开,等待下一次的行动。

2.2 主要组件2.2.1 步进电机步进电机是一台将电脉冲信号转变为角位移或线位移的机器。

步进电机可以作为一个特殊的电机,用于控制其他机器。

因为其误差将不会被累积,所以被广泛应用于各种开环控制电路。

2.2.2 STC89C516RD+SCM是单片微型计算机的缩写,其也被称为微控制器。

它是一种半导体芯片,集成了CPU,ROM,RAM,I / O接口,定时器/计数器,中断系统和其他一些部件于一身,构成了一个完整的数字计算机。

目前该供应链管理已成功应用于智能仪表,机电设备,过程控制,数据处理,自动检测,家用电器和其他一些领域。

在本设计中,我们使用了宏景科技公司生产STC89C516RD+。

STC89C516RD+的工作电压为5V,工作频率范围为0-80MHz,其实际的工作频率一般为48MHZ。

2.2.3 L297为了简化外围电路,在此设计中,我们采用步进电机驱动芯片L297来驱动它。

L297是步进电机的一个专用控制器。

它不仅可以生成四个控制信号,还可以控制两相双极和四相单极步进电机。

L297为20引脚塑料双列直插器件。

2.2.4 继电器一个中继被称为一个开关,它关闭时可在特殊条件下打开。

继电器的开关特性已被广泛应用于控制系统,尤其是在离散控制系统。

在这个设计中,我们选择电压继电器HRS4H-S-DC5V,这是常用的电路保护器件,它可以提供过压保护和低压闭锁。

HRS4H-S-DC5V的施加电压为5V,它的吸合电压为3.75V。

2.3 主设备的连接- 3 - - 3 -2.3.1 单片机与L297之间的连接步进电机驱动芯片L297,它只需要输入的时钟,方向和模式信号是有效的。

因此,在软件编程的过程中,应该做的唯一一件事就是从单片机的P1.1口产生高低电平交替的脉冲。

与此同时,根据控制转向和模式,使P1.3和P1.4端口都设置为高级或符合要求的状态。

理论上P1.3和L297可以直接连接,但实际上微控制器的负荷使P1口的输出电压低且不稳定。

系统不能识别的高低电压之间的过渡,因而P1.1不能输出理想的脉冲到L297。

为了解决这个问题,我们使用电压跟随器来连接单片机的输出端口。

它们可以维持和稳定电压。

电压跟随器具有良好的抗干扰性,并且可以稳定地输出,因此它可以使电压达到其驱动电路的标准。

2.3.2 L297与步进电机之间的连接7904是一个普通的门电路芯片,它由四个AND门构成。

IRLZ44N是增强型NMOS器件。

2.3.3 单片机与继电器之间的连接原则上单片机的输出端口可以直接连接到继电器,但实验中单片机的输出信号实际上是非常不稳定的。

由于负载的原因,P1.5的输出电压被拉低,因此它不能驱动继电器。

为了解决这个问题,我们使用光电耦合器来驱动继电器。

光电耦合器具有良好的抗干扰性能,可以解决输出的问题,这使得电路变得可靠。

继电器VCC为12V,当单片机P1.5输出高电压时,由于继电器的作用,开关打开;当P1.5输出低电压时,开关闭合。

3 软件设计3.1 程序流程当没有物体通过时,光电开关输出高电压。

一旦某些物体被检测到,这个光电开关的输出立即产生一个下降沿信号,并将其输入到单片机的P1.0口。

然后单片机输出的信号给步进电机驱动器芯片的三个控制端口:CLK(P1.1),CW(P1.3),HALF (P1.4),以此来控制步进电机的工作。

我们可以通过单片机定时器设定具体的包装时间。

包装完成后,从P1.5口产生低电压使继电器立即导通,然后再次关闭打开的开关。

这样就完成切割包装带的工作。

3.2 编程本设计中的程序是用C语言编写的。

C语言与汇编语言相比具有较灵活,方便和紧凑的优点。

更重要的是它可以在一个大的领域中应用,具有良好的便携性。

我们选择Keil C集成开发环境,它具有Windows界面,有效地生成目标代码的特点。

大多数汇编语言代码生成非常紧凑,易于理解。

然后,该程序是由具有操作方便的ISP,STC软件下载到单片机的。

主程序如下所示:V oid main (){ ports();Time()_init();While(1){ if(P1^0==0)…….}}光电开关的信号由查询模式检测。

与中断子程序中,相应的微控制器产生转换的高低电压。

中断子程序如下图所示:P1^1=0;delay(m);P1^1=1;delay(m);P1^3= 0;- 5 - - 5 -P1^4= 0;在主程序中该中断子程序被调用多次。

被用来产生脉冲,以驱动步进电机工作。

在这个实验中,我们设置全步和反向模式,它在中断子程序中可以看出。

4 测试结果最后将程序烧写到单片机中,来完成完整的硬件电路。

为了便于实验,单片机的三个输出端口:P1.1,P1.3,P1.4,应连接到L297再连接到三个发光二极管,如图6,光发光二极管以发光来判断输出高电压。

因此,他们灭,表示从单片机输出低电压。

为了便于观察,该继电器的输出端连接一个发光二极管,而不是剪刀。

在开始时,四个光发二极管全都发光。

实验的结果表明,当光电开关检测到某些对象时,P1.1的发光二极管开始闪烁,表示产生脉冲,同时P1.3和P1.4的发光二极管立即熄灭,表示步进马达开始正向和半步模式工作。

一段时间后,连接到所述延迟器输出的发光二极管亮起后立即熄灭,表示开关打开,然后再关闭。

该行为是指剪刀切断包装胶带,然后再打开,等待下一步的行动。

5 结论该实验模拟pipeling控制的进程,由单片机驱动步进电机。

值得注意的是,在实践中,输出电压被下拉是因为负载低且不稳定,因此,电压跟随器和光电耦合器在这里是为了防干扰。

本文结合单片机和步进电机来模拟包装生产线控制。

可以通过用单片机编程,而不是模拟通道或数字电路来实现。

这种控制技术,可以提高系统的性能,不依赖于硬件,但需要软件评测,这就是所谓的微控制技术。

随着微控制技术的发展,全自动和智力水平将在包装行业得到不断的提高。

- 7 - - 7 -Pipelining Design Controlled by Stepper Motor Based on SCMAbstract: By employing electronics and intelligent technology, this paper realizes an effective integration of mechanics and electronics in pipelining packing control. To achieve this aim, stepper motor is controlled by a single-chip microcomputer(SCM) type of STC89C516RD+. Once the photoelectric switch type of LJ-JT02 detects products passing, signals are given out to SCM to direct the stepper motor. Furthermore, the scissors are used to cut off the package tape, which are realized by a relay type of HRS4H-S-DC5V. The experimental results show the effectiveness of above design.Keyword: Single-chip Microcomputer(SCM); Stepper Motor; Driving-chip; Relay1 INTRODUCTIONDuring the 1950s to 1970s, with the rapid development of electronics and synthetic chemicals, the packaging machinery has been influenced a lot, and there were a series of new packaging technology and equipment based on synthetic materials as packing materials. For example, there were high-speed automated packaging machines of electromechanical integration, multi-functional packaging machines which are easy to operate and automatic packaging machines with high productivity. Those machines made the packaging machinery industry promising in the machinery manufacturing industry. Although there were already some packaging machinery factories as early as the mid 1950s in China, the productivity is very low. At the beginning of the reform and opening up, a number of food machines and packaging machines have been introduced to China, which promoted the industry greatly. During the late 1980s, the rapid development of the national economy had a great demand for packaging machines. And at the same time, a lot of traditional factories for agricultural machinery production, began the production of packaging machinery. At the end of 1997, the number of packaging machinery factories has increased to more than 1,600, and there are about 75 research institutes engaging inresearch and development of packaging machinery. What’s more there are approximately more than 21 colleges and universities concerning packaging machinery professionally. However, the industry in China does not advance enough and it should be further improved.In the future the packaging machinery has a growing tendency for the application of microcomputer and electromechanical integration. A complete mechatronics system is a system to integrate multidisciplines such as machinery, computers microelectronics and sensors. It brings profound changes to the design, manufacturing and control of packaging machinery and changes the situation of the industry.In order to develop more quickly, something should be done to improve the level of packaging machinery, electromechanical integration, product reliability and stability, and thus the modern packaging industry will be improved.In this work, we simulate the control process of packaging assembly line based on stepper motor which is operated by SCM. First we introduce the overall design of hardware circuit and the main connection of hardware, and then describe the software design and programming ideas, at last we testify the feasibility of the design by experiment, as well as prospect for the future packaging machinery.2 HARDWARE CIRCUIT DESIGN2.1 Overall Circuit DesignTo facilitate the experiment, the parts of scissors and stepper motor are instead by light-emitting diodes. When the light-emitting diodes are light, that means the corresponding ports output high level. While they are not light, that means the corresponding ports output low level. A photoelectric switch is installed on the conveyor belt. If there is no product passing, the infrared receiver and transmitter devices of the photoelectric switch are closed and the output is high level. If some object is passing, the infra-red is interrupted and it outputs a negative pulse immediately. Once the input port of- 9 - - 9 -SCM detects the negative pulse transmitted by the photoelectric switch, the outputs of SCM will produce special electrical levels controlled by program, transmitting to a driver chip to make stepper motor work. When the packing time is up, SCM outputs a pulse to the relay, making the scissors close so that cutting off the packing tape. After that the scissors open again, waiting for the next action.2.2 Main Components2.2.1 Stepper MotorA stepper motor is a machine which transmits electrical pulse signals into angular or linear displacement. The stepper motor can be used as a special motor for controlling other machines because its errors will not be accumulated. It is widely used in a variety of occasions of open-loop.2.2.2 STC89C516RD+SCM is an abbreviation of a single-chip micro-computer, which is also known as a micro-controller. It is a semiconductor chip, integrated by a CPU, ROM, RAM, I/O interface, timer/counter, interruption systems and some other components, constituting a complete digital computer. At present SCM has been successfully used in intelligent instruments, electromechanical devices, process controls, data processing, automatic detection, household appliances and some other fields. In this design we use STC89C516RD+ produced by HongJing Technology Company. STC89C516RD+ has working voltage of 5V, working frequency between 0 to 80MHZ, and its actual working frequency can be up to 48MHZ.2.2.3 L297To simplify the external circuit, in this design we use a stepper motor driver chip L297 to drive it. L297 is a special controller for stepper motors. It can generate four control signals. It can control two-phase bipolar and four-phase unipolar stepper motors. The device is 20-pin of plastic dual in-line.2.2.4 RelayA relay is known as a switch. It closes or opens in special conditions. The switching characteristics of the relay has been widely applied in many control systems, especially in a discrete control system. In this design we select voltage relay HRS4H-S-DC5V which is commonly used in circuit protection devices for over-voltage protection or low-voltage lockout.The applied voltage of HRS4H-S-DC5V is 5V, and its pick-up voltage is 3.75V.2.3 Connection of the Main Devices2.3.1 Connection between SCM and L297The stepper motor driver chip L297 has an advantage that it just needs inputting signals of clock, direction and mode. So in the progress of software programming, the only thing which should be done is to produce high-low alternating pulses from P1.1 port of SCM. At the same time, to control the steering and mode, P1.3 and P1.4 ports are set to high - level or low-level on request.Theoretically speaking P1.3 and L297 can be connected directly, but actually the loads of microcontroller make the output voltage of P1 port low and unstable. The system could not identify the transition between the high and low voltages and thus P1.1 can not output ideal pulses to the L297. In order to solve this problem, we use voltage followers to connect the output ports of SCM. They are to maintain and stabilize voltage. The voltage follower has good interference immunity and can output stably so it can make the voltage achieve the standard which drives the following circuit.2.3.2 Connection Between L297 and Stepper Motor7904 is a common gate circuit chip, which is formed by four AND gates. IRLZ44N is enhanced NMOS.2.3.3 Connection Between SCM and Relay- 11 - - 11In principle the output ports of SCM can be connected to the relay directly. In the experiment the output of SCM is actually very unstable, and the output voltage of P1.5 is pulled down low because of the loads, so it can not drive the relay. To solve the problem, we use optocoupler to drive the relay. The optocoupler has good anti-interference performance and can effectly solve the output problem, which makes the circuit more reliable. Then VCC of relay is 12V. when P1.5 of SCM outputs high-voltage, the relay powers and thus the switch is open. When P1.5 outputs low-voltage, the switch is closed.3 SOFTWARE DESIGN3.1 Program FlowWhen there is no object passing, the photoelectric switch outputs high-voltage. Once some object is detected, the output of the photoelectric switch generates a falling edge signal immediately, and input it to P1.0 of SCM. Then SCM outputs desired signals to the three control ports of stepper motor driver chip: CLK (P1.1), CW (P1.3), HALF (P1.4) to control the stepper motor to work. We can set specific packaging time through the SCM timer. After finishing packaging, a moment low-voltage from P1.5 is generated to the relay and makes the switch which is normally closed open immediately and then close again. That completes the action of cutting packing tape.3.2 ProgrammingIn this design the program is written in C language. C has the advantages of both the high-level language and assemble language. It is flexible, convenient and compact in structure. What’s more it can be applied in a large of fields and has good portability. We choose Keil C language integrated development environment which shows Windows interface that generates object codes efficiently. The majority of assembly language codes generated are very compact and easy to understand. Then the program is burnt into SCMby ISP, a STC download programming software, which is easy to operate. The main program is shown as below.V oid main (){ ports();Time()_init();While(1){ if(P1^0==0)…….}}The signals of photoelectric switch are detected by query mode. With interruption subroutine, the corresponding microcontroller produces conversion of high and low voltages. The interruption subroutine is shown as below.P1^1=0;delay(m);P1^1=1;delay(m);P1^3= 0;P1^4= 0;In main program this interruption subroutine is called for several times. That generates pulses to drive the stepper motor to work. In this experiment we set full-step and reverse mode, which can be seen in the interruption subroutine.4 TEST RESULTSAfter the hardware circuit is built completely, the program is burnt into the SCM. In order to easy the experiment, the three output ports of SCM, P1.1, P1.3, P1.4, which should be- 13 - - 13connected to L297, is connected to three light emitting diodes, as shown in Figure 6. That the light emitting diodes are light means to output high voltage. And that they are off means to output low voltage from SCM. In order to facilitate observation, the output of the relay is also connected to a light-emitting diode instead of scissors. At the beginning, the four light-emitting diodes are all light.The results of the experiment show that when some object is passing the transmitter and the receiver of the photoelectric switch, that is to say, when the photoelectric switch detects some object, the light-emitting diode of P1.1 begins to flash, which shows pulses are generated. At the same time the light-emitting diodes of P1.3 and P1.4 are off immediately, which means the stepper motor begins to work with the forward and half-step mode. After a period of time, the light-emitting diode connected to the output of the delay are off first and light immediately, which means that the switch opens first and then closes. That act means the scissors cut off the packing tape first and then open, waiting for the next move.5 CONCLUSIONThis experiment simulates the progress of the pipeling control, using stepper motor driven by SCM. It is noteworthy that in practice the output voltage is pulled down to be low and unstable because of the loads, so voltage follower and optocouplers are introduced here for anti-interference.This article combines SCM and the stepper motor to simulate packaging lines control. This can be achieved by SCM with programming instead of mimic channel or digital circuits. This control-technology which can improve the system performance does not dependent on hardware but onsoftware. It is called the micro-control technology. With the development of micro-control technology, the automatical and intellectual level will be improved continuously in packaging industry.。

相关主题