Stepper motor speed control and motion planning - Database & Sql Blog Articles

The biggest characteristic of the stepping motor is that it can accept the digital control signal (electric pulse signal) and convert it into the corresponding angular displacement or linear displacement, so it is an actuator that completes the digital analog conversion. .

Moreover, it can perform open loop position control, and input a pulse signal to obtain a specified position increment. Compared with the conventional DC servo system, such an incremental position control system has a significantly reduced cost, and it is almost unnecessary to perform system adjustment. Therefore, stepper motors are widely used in CNC machine tools, robots, remote control, aerospace and other fields, especially the development of microcomputers and microelectronics technology, making stepper motors more widely used.

Speed ​​characteristics of stepper motors

The speed of the stepper motor depends on the pulse frequency, the number of rotor teeth and the number of beats. Its angular velocity is proportional to the pulse frequency and is synchronized with the pulse in time. Therefore, in the case where the number of teeth of the rotor and the number of running beats are constant, the required speed can be obtained by controlling the pulse frequency. Since the stepper motor is started by its synchronous torque, the starting frequency is not high in order to avoid out-of-step. In particular, as the power increases, the diameter of the rotor increases, the inertia increases, and the starting frequency and the maximum operating frequency may differ by as much as 10 times.

In order to give full play to the fast performance of the motor, the motor is usually started below the starting frequency, and then the pulse frequency is gradually increased until the desired speed. The selected rate of change is such that the motor does not lose synchronization and the startup acceleration time is minimized. In order to ensure the positioning accuracy of the motor, the motor must be gradually reduced from the highest speed to a speed that can be stopped (equal to or slightly greater than the starting speed) before stopping. Therefore, when the stepping motor drags the load at a high speed and is accurately positioned, it generally includes five stages of “start-acceleration-high-speed operation (constant speed)-deceleration-stop”. The speed characteristic is usually trapezoidal if moving. The short distance is the triangular velocity characteristic, as shown in Figure 1.

Stepper motor speed curve

Figure 1 Speed ​​curve of stepper motor

Stepper motor control system structure

At the appropriate time, the PC assigns an initial value to the 8253 counter 0 on the hardware control circuit, and sets the frequency change (ie, speed and acceleration change) of the acceleration/deceleration process to prevent out-of-synchronization. For example, set the speed graph in the point control. When starting and raising the speed, the stepping motor generates enough torque to drive the load to keep up with the specified speed and acceleration. When decelerating, the falling characteristic makes the load not generated. Overshoot, stop at the specified position. The 8253 on the hardware control circuit board generates a pulse square wave as the interrupt signal source, starts the solidification program in the subdivision drive circuit to generate a pulse of a certain frequency, and drives the step motor movement after power amplification. The change of the moving direction of the stepping motor and the starting and stopping are realized by the computer control hardware control circuit.

Stepper motor control system

Figure 2 Stepper motor control system

The combination of software and hardware is controlled, and has the advantages of simple circuit and convenient control. In this kind of control, the microcomputer software occupies less storage units, and the program development is not limited by timing. As long as the external interrupt is allowed, the microcomputer can freely perform other tasks between each step of the motor to realize the motion control of multiple stepping motors.

Determination of the initial value of the timer

The real-time control of the stepper motor uses the PC. The pulse square wave is generated by the 8253 timer. The counter 0 works in mode 0 to generate the pulse square wave.

1 works in mode 1 counting function, the clock frequency of 8253 counter 0 is provided by 2MHz crystal oscillator. If the initial value of the counter assigned to the 8253 counter 0 is D1, the generated square wave frequency is f1=f0/D1, the period is T1=1/f1=D1/f0, and D1=f0T1=f0/f1. Where f1 is the starting frequency and f0 is the crystal frequency.

Mathematical model of stepping motor lifting speed

In order to prevent the stepping motor from running out of step, it is generally required that the maximum operating frequency should be less than (or equal to) the step response frequency fs. At this frequency, the stepper motor can be started, stopped or reversed without any loss of step. There are two driving modes for stepping motor speed-up, namely triangular and trapezoidal driving (see Figure 1), and the triangular driving method is a special case of trapezoidal driving, so we only need to study the trapezoidal mode. The acceleration and deceleration of the motor is achieved by the computer constantly modifying the initial value of the timer. In the motor acceleration phase, starting from the start-up instant, each time a pulse is generated, the initial value of the timer is decreased by a certain value, and the corresponding pulse period is decreased, that is, the pulse frequency is increased; in the deceleration phase, the initial value of the timer is continuously increased, The corresponding pulse period increases, the pulse frequency decreases, and the deceleration phase corresponds to the trapezoidal pulse frequency characteristic. The key to this design is to determine the pulse timing tn, which is the pulse period Tn and the pulse frequency fn. Assume that the number of pulses is calculated from the start of the instant, the number of pulses in the acceleration phase is n, and the start instant is the start of the count, the initial value of the timer is D1, and the decrease of the initial value of the timer is Δ. From the physical process of the acceleration phase, the first pulse period, that is, the pulse period T1 at the start-up, D1/f0, t1=0. Due to the modification of the initial value of the timer, the second pulse period T2=(D1-?)/f0=T1-?/f0, and the pulse timing t2=T1, the period of the nth pulse is:

Tn=T1-(n-1)â–³/f0 (1)

The pulse timing is:

formula (2)

The pulse frequency is:

1/fn=Tn=T1-(n-1)â–³/f0 (3)

The above equation shows the relationship between the pulse number n and the pulse frequency fn and time tn, respectively. Let △/f0=δ, that is, the decrement of the adjacent two pulse periods in the acceleration phase, then the above formula is simplified as:

Tn=(n-1)T1-(n-2)(n-1)δ/2 (4)

1/fn=T1-(n-1)δ (5)

Simultaneously (4), (5), and simplify the relationship between fn and tn, the mathematical model of the acceleration phase is:

formula (6)

Among them, it is a constant, and its value is related to the initial value of the timer and the amount of change in the timer, A=-δ, B=(2T1+δ)2, C=8δ.

The change in pulse frequency during the acceleration phase is:

formula (7)

It can be seen from equations (6) and (7) that during the acceleration phase, the pulse frequency is continuously increased and the acceleration is increased by a quadratic function. This acceleration method is very advantageous for the operation of the stepping motor because the acceleration is gentle at startup, and once the stepping motor has a certain speed, the acceleration increases rapidly. On the one hand, the acceleration is smoothly transitioned, which is beneficial to improve the positioning accuracy of the machine, and on the other hand, the acceleration process can be shortened and the rapid performance can be improved.

For the deceleration phase, according to the analysis method similar to the above, the expression of the pulse frequency characteristic can be obtained as follows:

formula (8)

formula (9)

Where A=-δ, B=(2T1-δ)2, C=8δ, T1 is the pulse period at the start of deceleration, and δ is the increment of two pulse periods adjacent to the deceleration phase. Since T1>>δ, then B=4T12, it can be seen from equations (8) and (9) that the pulse frequency decreases continuously during the deceleration phase, and the acceleration is negative, and the absolute value decreases by a quadratic function. This deceleration performance is also advantageous for the stepping motor, which enables the stepping motor to smoothly stop without deceleration during deceleration, improving the positioning accuracy of the machine.

In summary, the pulse frequency characteristics of this design can be derived (see Figure 3).

Pulse frequency characteristic

Figure 3 Pulse frequency characteristics

Experiment and summary

The method has been successfully applied to the intelligent motion control unit designed by myself. By developing the control software under the Windows environment and using VC++ to design a good control interface interface, the movement mode, speed, acceleration and deceleration selection and position control are conveniently realized. Have a certain degree of intelligence. The control unit reduces the occupation time of the PC, so as to complete other work while the motor is running, thereby realizing acceleration, deceleration, speed and position control of the three stepping motors. And the use of subdivision drive power, improve step accuracy and positioning accuracy.

Wire To Board Connectors

1.ANTENK Wire to Board connectors are avialable in different terminations and sizes intended for use on a variety of applications. These connectors provide power and signal with different body styles, termination options, and centerlines. To find the wire to board set required, click on the appropriate sub section below.

2.Our products are widely used in electronic equipments,such as monitors ,electronic instruments,computer motherboards,program-controlled switchboards,LED,digital cameras,MP4 players,a variety of removable storage disks,cordless telephones,walkie-talkies,mobile phones,digital home appliances and electronic toys,high-speed train,aviation,communication station,Military and so on


Antenk Wire To Board Connectors Ranges:

Power Wire to Board
IDC Wire to Board
Locking Wire to Board
Latching Wire to Board
Fine Pitch Wire to Board


Wire to Board Connectors Information
Description
Wire-to-board connectors are used to interconnect printed circuit boards (PCBs) by using connectors attached to wires.

Specifications
Specifications for a wire to board connector include the following.
Wire-entry angle - There are three wire-entry angle styles: vertical, right-angle, and bottom-entry.
Wire size - Wire size is usually measured in American wire gauge (AWG), a standard for non-ferrous wire conductor sizes. The term "gauge" refers to the wire`s diameter. The higher the gauge number, the smaller the diameter and the thinner the wire.
Circuits or positions - With wire to board connectors, the number of circuits or positions may range from 1 to 120.
Pitch or center spacing - Pitch or center spacing is measured in millimeters (mm) or inches.
Lock to mating style - There are three basic lock-to-mating styles: positive, friction, and friction ramp.
Maximum current - The maximum current or current-carrying capacity is measured in amperes (A) and ranges from 1.0 A to 50. A.

Termination Methods
Crimp is the physical compression of a contact wire around a conductor to make an electrical and mechanical connection. Insulation displacement connectors (IDC) slice through the cable insulation to make a connection. Choices for termination method also include cage clamp, screw, tabs, and solder cups.

PCB Mounting Styles
With wire to board connectors, there are four choices for PCB mounting.
Through-hole technology (THT) mounts components on a PCB by inserting component leads through holes in the board and then soldering the leads in place on the opposite side of the board.
Surface mount technology (SMT) adds components to a PCB by soldering component leads or terminals to the top surface of the board. SMT components have a flat surface that is soldered to a flat pad on the face of the PCB. Typically, the PCB pad is coated with a paste-like formulation of solder and flux.
Press-fit and compression-style Board To Board Connectors are also commonly available.Wire to Board Connectors Information

Standards
Wire-to-board connectors carry approvals from various national and international organizations. In North America, they often bear marks from Underwriters Laboratories (UL) and/or the Canadian Standards Association (CSA).
A wire to board connector for the European marketplace should comply with the Restriction of Hazardous Substances (RoHS) and Waste Electrical and Electronic Equipment (WEEE) directives from the European Union (EU). Wire-to-board connectors that comply with other requirements are also available.
BS 9526 N0001 - Specification for multi-contact edge socket electrical connectors.

Wire To Board Connectors,Wire Harness,Pcb Wire To Board Connector,Pin Wire To Board Connector,IDC Wire to Board,Locking Wire to Board,Latching Wire to Board,Fine Pitch Wire to Board

ShenZhen Antenk Electronics Co,Ltd , https://www.antenksocket.com